summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/qmenu.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-03-311-29/+7
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/src/declarative/example-slideswitch.qdoc doc/src/development/qmake-manual.qdoc doc/src/snippets/code/doc_src_qmake-manual.pro doc/src/snippets/code/doc_src_qtscript.qdoc src/corelib/animation/qabstractanimation.cpp src/s60installs/bwins/QtOpenGLu.def src/s60installs/eabi/QtOpenGLu.def src/s60installs/eabi/QtOpenVGu.def tests/auto/qdir/qdir.pro tests/auto/qsslsocket/tst_qsslsocket.cpp tools/qdoc3/doc/qdoc-manual.qdocconf
| * 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.
* | | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-01-171-1/+1
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/webkit/imageanalyzer/imageanalyzer.h examples/webkit/imageanalyzer/mainwindow.h mkspecs/unsupported/qws/linux-x86-openkode-g++/qplatformdefs.h src/corelib/io/qfsfileengine_iterator_unix.cpp src/corelib/io/qfsfileengine_iterator_win.cpp src/corelib/kernel/qcoreapplication.cpp src/network/access/qnetworkaccessdatabackend.cpp src/plugins/bearer/connman/qconnmanservice_linux.cpp src/plugins/platforms/openvglite/qwindowsurface_vglite.h src/s60installs/bwins/QtCoreu.def src/s60installs/eabi/QtCoreu.def src/s60installs/s60installs.pro tools/assistant/tools/assistant/helpviewer_qwv.h tools/qdoc3/test/qt-html-templates.qdocconf
| * | Update copyright year to 2011.Jason McDonald2011-01-101-1/+1
| |/ | | | | | | Reviewed-by: Trust Me
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-12-131-0/+5
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | Conflicts: configure src/gui/graphicsview/qgraphicslayout.cpp src/gui/text/qfontengine_s60.cpp src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp src/opengl/qwindowsurface_gl.cpp src/s60installs/bwins/QtGuiu.def src/s60installs/eabi/QtGuiu.def tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp
| * 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
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-08-131-2/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/painting/qpainter.cpp src/gui/text/qtextengine.cpp tests/auto/qimage/tst_qimage.cpp tests/auto/qpainter/tst_qpainter.cpp tools/qdoc3/test/assistant.qdocconf tools/qdoc3/test/designer.qdocconf tools/qdoc3/test/linguist.qdocconf tools/qdoc3/test/qmake.qdocconf tools/qdoc3/test/qt-build-docs.qdocconf tools/qdoc3/test/qt-html-templates.qdocconf tools/qdoc3/test/qt-html-templates_zh_CN.qdocconf tools/qdoc3/test/qt.qdocconf
| * Correcting spelling mistakes in documentation. Part of fix for QTBUG-11938.Jerome Pasion2010-08-091-2/+2
| | | | | | | | | | Reviewer: David Boddie Task number: QTBUG-11938
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-05-251-11/+1
|\ \ | |/
| * 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 remote branch 'origin/4.7' into qt-master-from-4.7Thiago Macieira2010-05-021-1/+3
|\ \ | |/
| * 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
* | | | Merge remote branch 'origin/4.7' into qt-master-from-4.7Thiago Macieira2010-04-271-1/+1
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: tools/qdoc3/test/assistant.qdocconf tools/qdoc3/test/designer.qdocconf tools/qdoc3/test/linguist.qdocconf tools/qdoc3/test/qmake.qdocconf tools/qdoc3/test/qt-html-templates.qdocconf tools/qdoc3/test/qt.qdocconf
| * | | 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
* | | Minor optimisation in QMenuTom Cooksey2010-04-231-1/+1
|/ / | | | | | | | | | | Stops the QMenu re-painting itself for every mouse move event. Reviewed-By: gabi
* | 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