summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/qmenu.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix a bug with menu overflowing from a lower resolution second screen.Pierre Rossi2012-01-311-13/+48
| | | | | | | | | The menu needs to take into account the screen geometry of the screen it's about to be shown on (not the last screen it was shown on) when updating its actions rects Task-number: QTBUG-2748 Reviewed-by: Thierry
* Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2011-05-171-17/+17
|\ | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: Updating file with CRLF line endings for the updated header Fix a regression in QList::mid() update gitignore remove -fno-stack-protector Fix make confclean Update licenseheader text in source files
| * Update licenseheader text in source filesJyri Tahtela2011-05-131-17/+17
| | | | | | | | | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* | Fix for rounded corners bug in QMenuJani Hautakangas2011-05-121-0/+12
|/ | | | | | | | | | Currently QMenus have opaque black corners in cases where theme supports rounded corners. This patch fixes it by setting WA_TranslucentBackground flag to QMenu widget. Task-number: QTBUG-16857 Reviewed-by: Sami Merila
* Merge branch 'mimir' into 4.7David Boddie2011-02-231-29/+7
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: doc/src/declarative/qdeclarativemodels.qdoc doc/src/index.qdoc doc/src/template/style/style.css tools/qdoc3/atom.h tools/qdoc3/doc.cpp tools/qdoc3/doc/qdoc-manual.qdoc tools/qdoc3/doc/qdoc-manual.qdocconf
| * qdoc: Added the \caption command.Martin Smith2011-01-131-4/+3
| | | | | | | | | | And removed some \raw cases. Only 13 raw-html uses remaining. Added the figCaption clause to style.css.
| * qdoc: Replaced many raw-html cases with \div {something}.Martin Smith2011-01-121-29/+8
| | | | | | | | Only 22 raw-html uses remaining.
* | Update copyright year to 2011.Jason McDonald2011-01-101-1/+1
|/ | | | Reviewed-by: Trust Me
* Remove whitespace and leading tab from documentation changeSami Merila2010-12-081-1/+1
| | | | | Task-number: QTBUG-12119 Reviewed-by: TrustMe
* Merge commit 'refs/merge-requests/2509' of gitorious.org:qt/qt into integrationSami Merila2010-12-081-0/+3
|\
| * Adding warning to QMenu documentationKarim Pinter2010-11-261-0/+3
| | | | | | | | | | | | | | | | If the QMenu is made visible using show() it causes problems because the scrolling and layout is not set properly. The warning suggests to use exec() or popup() instead. Task-number: QTBUG-12119
* | Updating merge request 2512Karim Pinter2010-12-071-3/+1
| | | | | | | | | | | | Removing unnecessary comments and changing define to Q_OS_SYMBIAN. Task-number: QTBUG_9505
* | Removes the reseting of the QMenu offset.Karim Pinter2010-11-291-0/+4
|/ | | | | | | | On s60 when the qmenu is opened on the second time, it restores the position of the last activated menu, so there is no need to reset the offset when the popup() is called again. Task-number: QTBUG-9505
* Correcting spelling mistakes in documentation. Part of fix for QTBUG-11938.Jerome Pasion2010-08-091-2/+2
| | | | | Reviewer: David Boddie Task number: QTBUG-11938
* Fixed an assert in QMenuThierry Bastian2010-05-191-11/+1
| | | | | | | | The code was changed and changed the behaviour. This is basically a kind of revert. Reviewed-By: gabi Task-Number: QTBUG-10735
* Merge branch 'qt-4.7-from-4.6' of scm.dev.nokia.troll.no:qt/qt-integration ↵Qt Continuous Integration System2010-04-231-1/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into 4.7-integration * 'qt-4.7-from-4.6' of scm.dev.nokia.troll.no:qt/qt-integration: (71 commits) Revert "Attempt at fixing compile failure introduced by 4.6 merge in qpaintengine_vg.cpp" Attempt at fixing compile failure introduced by 4.6 merge in qpaintengine_vg.cpp Fixing the wrong QUrl usage When on Symbian use smaller files. correctly position glyphs for complex languages Removed inneccessary QGlyphLayout::offsets initialization. Fix mirrored characters for RTL text in Symbian QNAM: Add a code comment related to the cache tst_QSystemSemaphore::processes fixed for WinCE tst_qsystemsemaphore: fix deployment of lackey.exe for WinCE tst_qsharedmemory: create multiple instances of lackey.exe on WinCE tst_qsharedmemory: fix deployment of lackey.exe for WinCE fix compilation of tst_sharedmemory on Windows CE QtScript: regression with instanceof operator for QMetaObject wrappers examples/widgets/stylesheet fix mainwindow.ui QStyleSheetStyle: fix memory leak on base style change QNAM HTTP: Fixed a bug when getting empty files with pipelining Fix window transparency on Symbian. Tweak the 'normalGeometry' of the widget before setting it. Use QDesktopWidget as a status pane observer on Symbian. ...
| * Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Thiago Macieira2010-04-211-1/+3
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/openvg/qpaintengine_vg.cpp src/script/bridge/qscriptqobject_p.h tests/auto/bic/tst_bic.cpp
| | * QMenu: Behavior regressionGabriel de Dietrich2010-04-161-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | When opening a submenu, and then moving the mouse over the parent menu margins, the submenu would close, whereas it didn't in 4.5. Reviewed-by: Olivier Task-number: QTBUG-9785
* | | When using Qt::BypassGraphicsProxyWidget with QMenu the application is not ↵Alexis Menard2010-04-221-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | stuck anymore When using this flag the child of the widget which is embedded is becoming a top level QWidget. So a right click on a text edit trigger the context menu to be top level. When creating this top level context menu we are grabbing the mouse but we were never releasing it when the menu was hidden. The patch check if the widget uses the Qt::BypassGraphicsProxyWidget and ungrab the mouse. The patch also fix a bug when positioning the QMenu, it was for the same reason. Task-number:QTBUG-7254 Reviewed-by:brad
* | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-04-131-25/+25
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (61 commits) Revert Merge Request 551. This introduces regressions to Qt. Fixed scroll area size calculation on Mac. Fix a race where QThread::exit() is "lost" when called after start() make a partial build of linguist in no-gui config make the code less of a trap fix build from top level Partially revert MR 543 changes to Linguist. Apply f176759fc41abc4cb901c2cbaa15264f2a9ac85b to stdout too. Autotest: add some debugging, just in case there's something wrong Autotest: fix the fix for the rounding error. Fix compile error with QT_NO_LIBRARY in QtMultimedia the _setmode() prototype is different on win ce qdoc: Changed qdoc to output the new doc format. Doc: update 'developing on mac' fcntl.h doesn't seem to exist, either - contrary to an example on msdn Autotest: fix paths on the test server after update. Force the repaint during a window resize. fix compile on wince remove CONFIG += ordered again Assistant: Check namespace and virtual folder syntax of help projects. ...
| * | Revert Merge Request 551. This introduces regressions to Qt.Thiago Macieira2010-04-121-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | The regressions noticed were: Mac OS X: qmenu::menuGeometry line 1024 (new test) QWS and Win32: qmenubar::check_menuPosition line 1508 This reverts commits 6947390 and c1ce854.
| * | QMenu::popup() code style fixesminiak2010-04-071-25/+25
| | | | | | | | | | | | | | | Merge-request: 551 Reviewed-by: Benjamin Poulain <benjamin.poulain@nokia.com>
| * | fix QMenu::popup()miniak2010-04-071-4/+3
| | | | | | | | | | | | | | | Merge-request: 551 Reviewed-by: Benjamin Poulain <benjamin.poulain@nokia.com>
* | | Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Thiago Macieira2010-04-121-6/+8
|\ \ \ | |/ / |/| / | |/ | | | | | | Conflicts: qmake/generators/symbian/symmake.cpp src/gui/image/qimage.cpp src/openvg/qwindowsurface_vgegl.cpp
| * QTBUG-4887 and other exception safety fixesmread2010-04-071-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change includes a fix for QTBUG-4887 and other exception safety problems found while testing it. The QTBUG-4887 fix is to qimage.cpp. QImage doesn't throw exceptions on failure like a proper class should, instead it tries to fail "nice". What happens here is that setAlphaChannel would crash on OOM as after the convertToFormat call, d could be NULL. This new version checks the result of the conversion before using it. The other fixes are all cases where exceptions were thrown from destructors. I added code to the test app to help debug these cases, and I fixed all the problems I found. With these changes, tst_exceptionsafety_objects runs and passes on the Symbian emulator. Reviewed-by: Shane Kearns
* | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt into 4.7Alexis Menard2010-03-251-2/+2
|\ \ | |/ | | | | | | | | | | Conflicts: mkspecs/common/symbian/symbian.conf qmake/generators/symbian/symmake.cpp src/3rdparty/webkit/WebCore/WebCore.pro
| * Fixed S60 softkey implementation to use popup/modal dialog softkeys.Janne Anttila2010-03-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously softkey implementation assumed that source for softkey actions is focused widget or activewindow if there is no focused widget. Since for example pop-up menu does not take focus immediately in touch enabled devices, the underlying widget softkeys were visible and usable when menu was open. This lead to problem that underlying widget could be interacted via softkeys when popup menu was open. For example as reported in QTBUG-8688, it was possible to close the underlying filedialog from which the currently active context menu was launched. It was also possible to open "Options" menu of underlying widget when context menu was open, leading to situation where several context menus could be launched via "Actions" item of "Options" menu. This was reported as an issue: QTBUG-6167 In addition when user started navigating in context menu via keypad, the menu got focus and softkeys changed to partially correct. Only partially correct, since context menu "Select" action and "Options" action had same priority and both associated to LSK. In addition the context menu action "Cancel" associated to RSK was set to invisible, meaning that it was also disabled and appeared in sofkeys as dimmed. All of these issues were fixed by making making the popup and modal dialogs highest priority softkey source. In case the focused widget is inside popup or modal dialog it is being used as an initial softkey source. In addition the softkeys created with QSoftKeyManager::createAction or QSoftKeyManager::createKeyedAction are now by default invisible i.e. not visible in context menu and have special property set to make them still normally enabled in softkeys. Task-number: QTBUG-6167 Task-number: QTBUG-8688 Task-number: QTBUG-9144 Reviewed-by: Sami Merila
* | Fix for torn off menus that were way too bigThierry Bastian2010-03-051-4/+5
| |
* | Fixes QMenu to only have static POD membersThierry Bastian2010-03-041-12/+12
| | | | | | | | This also fixes the autotests
* | Make the sub-menu accessible via its shortcut even if it is the currentThierry Bastian2010-03-031-10/+2
| | | | | | | | | | Task-number: QTBUG-7411 Reviewed-by: ogoffart
* | Merge remote branch 'origin/4.6' into integration-master-from-4.6Rohan McGovern2010-02-181-3/+17
|\ \ | |/ | | | | | | Conflicts: src/corelib/codecs/qtextcodec.h
| * Support for dynamic localization in Symbian softkeys.Janne Anttila2010-02-171-3/+17
| | | | | | | | | | | | | | | | | | | | | | This commit adds support for dynamic i.e. runtime localization of S60 softkeys. Note that translations are not provided yet with qt.sis (QTBUG-4919), meaning that localization does not actually happen unless application developer provides its own translation (including translation for softkeys). Task-number: QTBUG-6785 Reviewed-by: Jason Barron
* | Get rid of setFirstActionActive on mouse release in QMenuPierre Rossi2010-02-051-3/+1
|/ | | | | | | | | The point in keeping this behaviour seems limited, and it is causing a bug on touch-screens where there are no mouse moves. Task-number: QTBUG-7907 Reviewed-by: ogoffart Reviewed-by: Thierry
* doc: Corrected some bad grammar.Martin Smith2010-01-271-4/+3
| | | | Task-number: QTBUG-7640
* Update copyright year to 2010Jason McDonald2010-01-061-1/+1
| | | | Reviewed-by: Trust Me
* Fixes problem with QMenu when it's populated on the aboutToShowPierre Rossi2009-12-041-22/+13
| | | | | | | | | When the menu is populated that late, if the menu is to go off-screen, then it is moved and ends up covering its originating button. Includes some code cleanup thanks to Thierry's tips. Reviewed-by: Gabriel Reviewed-by: Thierry
* Fixed context menu placement partially outside screen bug in Symbian.Janne Anttila2009-11-261-6/+6
| | | | | | | | | | | | | | | | | | | | | | | In style demo example when spinbox was long tapped, the context menu was placed partially outside screen. The preconditions for bug were: 1. Tap position is near screen right edge 2. Minimum space width requested by context menu is > sreen width The new (simplified) logic is as follows: 1. If menus right edge in requested position is outside screen right edge, the menu is moved to left enough to fit on screen. i.e. if (tap position + menu width > screen right ) x = screen right - menu width 2. As a result of above statement the x position might go outside left boundary of screen. This is fixed by next statements if( x < screen left ) x = screen left Task-number: QTBUG-6164 Reviewed-by: Alessandro Portale
* QMenu: make the menu follow its parent/caused layout directionThierry Bastian2009-11-181-0/+22
| | | | | | | The autotest are included Task-number: QTBUG-5884 Reviewed-by: ogoffart
* QMenu: do not crash if action is destroyed in the triggered signal.Olivier Goffart2009-11-161-1/+2
| | | | | Task-number: QTBUG-4480 Reviewed-by: Thierry
* Make sure the context menus also clear the status tip when neededThierry Bastian2009-11-101-26/+18
| | | | | Task-number: QTBUG-2700 Reviewed-by: ogoffart
* Merge commit 'origin/4.6' into 4.6Olivier Goffart2009-11-061-0/+2
|\ | | | | | | | | Conflicts: dist/changes-4.6.0
| * Fix QT_NO_MENUBARJørgen Lind2009-11-061-0/+2
| | | | | | | | Reviewed-by: tom
* | Fix crash in QMenu when using QWidgetActionOlivier Goffart2009-11-041-23/+18
|/ | | | | | | | | | | If the QWidgetAction is not the first in a menu, it crashed. This is because when the QEvent::ActionRemoved is sent, the event->before() is not set. We need to find another way to clean up the widgetItems list. This basically revert 4b6ab00e6d68c7 Reviewed-by: Thierry
* Fixed a bug in QMenuBar in RTL that would display menu at the wrong placeThierry Bastian2009-10-271-0/+4
| | | | | | | | This could happen when adding actions in response to the aboutToShow signal. Task-number: QT-2596 Reviewed-by: ogoffart
* Make QMenu::activateCausedStack() exception safe.Marius Bugge Monsen2009-10-211-3/+11
| | | | | | Use an internal class to reset the activationRecursionGuard when the scope is closed. Reviewed-by: Leo Cunha
* QToolButton popup menu is shown at wrong position when embedded in aAlexis Menard2009-10-201-4/+27
| | | | | | | | | | | | | | | | | QGraphicsView. The main problem here is that QWidget assume that they are in the screen somewhere, which means inside the available geometry provided by QDesktopWidget. But in QGraphicsView the button can be in a position that is way bigger than the screen resolution. Lot of widgets make this assumption when positionning subpopups or submenus. Instead of applying the same code on tons of QWidgets, it's better to have an helper function in desktop widget which catch this case. It's not pretty (since it has nothing to do with QDesktopWidget) but we don't have better solution. Task-number:QTBUG-3822 Reviewed-by:brad
* Simplify the soft key roles of QAction.Jason Barron2009-09-211-3/+3
| | | | | | | | | | | | | | | | | | | | | | | Previously there were many options here that were inherited from the Qtopia implementation. It was not clear to developers which value they actually should use. A good example was the 'Next' value. In a typical wizard application, next would be on the right and 'Previous' would be on the left. However, it is also common to have 'Next' on the left and have 'Cancel' on the right. Basically what people really wanted was a way to explicitly set the right and left soft keys, but since this relies on form factor and is wrong if the screen is rotated, we choose positive and negative actions as the values for these such that they still make sense when the screen is rotated. Also this helps people who don't know if a particular action should be on the left or right, but they *do* know if their action has destructive characterisitics (negative). As a convenience for widgets in Qt that use softkeys, we create a standard softkey enumeration. That maps the actions to the correct role and has default text. Reviewed-by: Alessandro Portale
* Refactor soft keys implementation.Jason Barron2009-09-211-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reviewed-by: Alessandro Portale Squashed commit of the following: commit dae5eda6996d48c12c4a5efd3f6042eb293bacbf Author: Jason Barron <jbarron@trolltech.com> Date: Fri Sep 18 10:32:26 2009 +0200 Only update soft keys when KEYPAD_NAVIGATION is enabled. For 4.6, let's just call these functions when keypad navigation is defined to minimize the impact on other platforms. They should probably get thier own define some day. commit 30a730553531f0f138de5eddb30413936a34fa36 Author: Jason Barron <jbarron@trolltech.com> Date: Fri Sep 18 10:30:23 2009 +0200 Add/remove the menu bar action when menu bar is added/removed. commit a83343a2870b34c228c8bc5e6274607b0e97baf6 Author: Jason Barron <jbarron@trolltech.com> Date: Fri Sep 18 10:28:55 2009 +0200 Compile fix for other platforms commit 39c9e3a0a1d3d62bf6ebd3212cfd2a81b86b9b2a Author: Jason Barron <jbarron@trolltech.com> Date: Thu Sep 17 21:37:59 2009 +0200 Fix 'softkeys' example after API re-factoring. Clean up this example and use the simplified soft key API. Now the actions are only allocated in the constructor and dynamically updated by calling addAction and removeAction. commit 314e45c33f40552db74e61755c2a3b0f8c77a41a Author: Jason Barron <jbarron@trolltech.com> Date: Thu Sep 17 21:30:32 2009 +0200 Re-factor and simplify the soft keys API. Several things here: - Move all the logic into QSoftKeyManager - Move the files into 'kernel' since it is not a widget - Remove QWidget::setSoftKey*(). Use addAction/removeAction instead - Made soft keys update on focus, window activation, and action changes. - Fixed several memory leaks where QAction's were created too often - QAction ownership pushed out to widget's - Added Select/Cancel soft keys for comboboxes and menus to be more consistent to platform look-and-feel. commit fb4c240d970262e9872dc5737df6808879143c75 Author: Jason Barron <jbarron@trolltech.com> Date: Mon Sep 7 15:49:31 2009 +0200 Merge the Symbian implementation with the other platforms nativeMenuBar It seems this has been refactored to share more code across the various platforms that support native menubars so the Symbian code can be mostly removed. commit aa55e4bcd1f009ab35c9519e18aa325fd212dd23 Author: Jason Barron <jbarron@trolltech.com> Date: Wed Aug 26 17:00:34 2009 +0200 Change filenames and move softkey stuff from 'widgets' to 'kernel'. This thing isn't a widget and therefore should not be in the 'widgets' subdirectory of gui. Also rename the files in preparation for refactoring and extending.
* Making Keypad Navigation more usableAlessandro Portale2009-09-191-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | All changes of this commit are #ifdef'ed in QT_KEYPAD_NAVIGATION. Most desktop Qts won't notice any change. Navigating between QWidgets was not alwys a pleasure on keypad devices. This commit fixes the navigation behavior for some widgets, mostly itemviews. Furthermore, it adds a 'directional' navigation mode. Until now, the existing keypad navigation used the tab order do go back and forth between widgets. The new mode is supposed to provide a more intuitive navigation. It is the new default mode on Symbian. Screens (and their resolutions) become bigger, and also low resolution screens can be used in landscape mode. That's why the directional mode was requested. Another popular request was to put some more convenience into QSlider: If a (horizontal) slider has focus and the user presses left/right, the value of the slider may directing change without being selected (edit mode). This commit also adds the manual test 'keypadnavigation'. Reviewed-by: Shane Kearns
* Merge branch '4.5' of scm.dev.nokia.troll.no:qt/qt into 4.6Simon Hausmann2009-09-181-0/+5
|\