summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel
Commit message (Collapse)AuthorAgeFilesLines
* Close popups when switching applications on Windows.Friedemann Kleint2012-09-111-2/+16
| | | | | | | | | | | Bring back code from 4.8 (Note that ALT-TAB is not received as key event). Task-number: QTBUG-27146 Change-Id: I6dd2e9c88fdc4c89d26dfaa8ab47deb2be451f25 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Streamline forwarding of blocked events.Friedemann Kleint2012-09-111-12/+10
| | | | | | | | | Do not send to layouts, invoke modalWidget() only once. Task-number: QTBUG-27039 Change-Id: I96db02c8da544d0961c8ab25505926ac6f699342 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: hjk <qthjk@ovi.com>
* Fix build with QT_NO_WHEELEVENT.Sérgio Martins2012-09-102-0/+8
| | | | | Change-Id: I80c64183677a5f518e2c637f4c1ff4004e3010c0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Do not call requestActivateWindow() on popups.Friedemann Kleint2012-09-101-4/+7
| | | | | | | | | | | | | | | Showing a compo dropdown would cause the parent to become deactivated (Windows). Introduced by: 8368557b9c0010fb205969d010c9d8549fbee0ae for QTBUG-25852 , QTBUG-23699 . Task-number: QTBUG-27145 Change-Id: I7b89697a2c55d58cc0ab184b61a0cff8bf2275ec Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Jonathan Liu <net147@gmail.com> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Rename QPaintDevice::init() to initPainter()Richard Moore2012-09-102-2/+2
| | | | | | | | The old name was too generic and was likely to cause warnings in user code. Change-Id: I7126d8fe89a394cd8388af5a030961af7b69c741 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Removing duplicate includesSergio Ahumada2012-09-091-5/+2
| | | | | | | Do not include a header more than once Change-Id: Ia2e5d66e72988ad833cf5177a3f8aa988bf510e9 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* don't use QT_{BEGIN,END}_INCLUDE_NAMESPACE needlesslyOswald Buddenhagen2012-09-081-4/+1
| | | | | | | | these macros behave counter-intuitively, so don't use them unless the code structure really suggests their use. Change-Id: I58213b39f8a98e4368901217fac14ca49c28b8cf Reviewed-by: hjk <qthjk@ovi.com>
* Revert "Implement automatic mouse grabbing on mouse button press."Friedemann Kleint2012-09-073-30/+1
| | | | | | | | | | | | | | | | This reverts commit 6b5bbc531b30d8ece25425e39843c6ae1af1d045. Autograbbing mouse shouldn't be done in crossplatform code, as X11 does this automatically. Windows needs platform specific solution. Task-number: QTBUG-26962 Task-number: QTBUG-27039 Task-number: QTBUG-23699 Change-Id: I911df92c4a34deb50b729f50681497046657948b Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Fix updating of drag icons.Friedemann Kleint2012-08-312-53/+66
| | | | | | | | | | | | Try to find a target widget that accepts drops; ignore the event if none can be found. Split the handleDrag*() functions to reduce indentation. Add an autotest. Task-number: QTBUG-22987 Change-Id: I516ac5f0c002caaf83c52ac16f821246e565230f Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* doc: remove links to Qt DesignerFrederik Gladhorn2012-08-281-1/+1
| | | | | | | | Designer is in the tools repo, we cannot link there. Mentioning the name should be good enough. Change-Id: I55193aa31e60ae266a8890f706c332a63ed3610d Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Improve docs.Frederik Gladhorn2012-08-251-129/+5
| | | | | | Change-Id: I073398e4da14a1c6489c951200f022a346f4d2fa Reviewed-by: J-P Nurmi <j-p.nurmi@nokia.com> Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Doc: Really minor typo fixSergio Ahumada2012-08-221-1/+1
| | | | | | Task-number: QTBUG-26891 Change-Id: I9b726d8766337fbb001afcb9ecbc45f51b6e363f Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Add hint for touch -> mouse event synthesizingMorten Johan Sorvig2012-08-221-0/+4
| | | | | | | | | | | | | | | | | Commit 7808ec79 changes QApplication to synthesize mouse events from (unhandled) touch events. On Mac OS X this creates a conflict for two-finger scroll swipes, which generates both touch events and mouse wheel events: scrolling in QTextEdit will also select the text. Add a SynthesizeMouseFromTouchEvents platform style hint that enables the event synthesising. Set to true by default and false in Cocoa. Change-Id: I1ffa5a141476aa38b81ce92a87eff676c7ec2276 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Propagate initial size constraints to QWidgetWindow.Friedemann Kleint2012-08-211-1/+6
| | | | | | | | | | | Size constraints set on a widget before the creation of the QWidgetWindow were lost (for example, Qt Creator's preference page). Task-number: QTBUG-26745 Change-Id: I7c2f5aed9c8817795603e5ad3c24418d66627bab Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: hjk <qthjk@ovi.com>
* Enable QComboBox animation on Windows and fixing related bugsThomas Hartmann2012-08-201-0/+3
| | | | | | | | | | | | | | | QWidget:grab() has a default parameter (invalid rect). QRect() is the null rect and widget->grab(QRect()) returns an empty pixmap. QWidget:grab() has to be free of side effects and should not affect any dirty flags. Change-Id: I8ff558343c366769cd6c587e77f862668e8054f2 Task-number: QTBUG-25436 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Fix in-process QAxServers inside modal windows.Miikka Heikkinen2012-08-201-0/+8
| | | | | | | | | | | | | | | | The main window of in-process QAxServers doesn't have QWindow parent, but it does have native parent that is part of the native window tree of the application. The lack of Qt parent makes embedded controls look like toplevel windows, which causes problems e.g. with modality. Introduced new optional method QPlatformWindow::isEmbedded() to detect if a window is an embedded window and utilized it in proper places during modality handling. Task-number: QTBUG-26871 Change-Id: Iac9a51dae06b8fc15410de7838857e203e4275b8 Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Ensure that all the children get the new stylesheet set on a parentAndy Shaw2012-08-201-2/+4
| | | | | | | | | | | | | | When a stylesheet was set on a parent widget then in some cases it would not get applied to all the child widgets. This was because the order of the children list may have been modified while it was being set on children. By making a copy of the list we prevent this from being a problem. Task-number: QTBUG-26321 Change-Id: Iea6bf72c69a0c39746f7ef5e7893dda5a93ed7e5 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Remove QWidgetStar.Stephen Kelly2012-08-181-2/+1
| | | | | | | | | | | | This allows us to remove the odd hacks to get the static metaobject for the QWidget* metatype. The QWidget* is still an automatic metatype thanks to the QObject partial template specialization. It is registered as a metatype at runtime automatically in qwidgetsvariant.cpp. Change-Id: Ie01b69eadf2cbe87af1a86c3284550f60dcf9e94 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Remove docs for removed functions.Frederik Gladhorn2012-08-181-34/+0
| | | | | Change-Id: I75ec0137c56581653ee0dd6fd84f10f0a6c3429c Reviewed-by: J-P Nurmi <j-p.nurmi@nokia.com>
* Reference proper example.Frederik Gladhorn2012-08-181-1/+1
| | | | | Change-Id: Icda7e21f7e1eee8d4a6939ce3a50d1874ecda1e6 Reviewed-by: J-P Nurmi <j-p.nurmi@nokia.com>
* Remove outdated docs.Frederik Gladhorn2012-08-184-149/+1
| | | | | Change-Id: I6eaffdad3b800b7d90478cb7c4044ec27e659ec9 Reviewed-by: J-P Nurmi <j-p.nurmi@nokia.com>
* Documentation for QWidgetItem::controlTypes.Frederik Gladhorn2012-08-151-0/+6
| | | | | | Change-Id: I673b884ac8513714d733411729a7418c19f05682 Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* Update docs.Frederik Gladhorn2012-08-151-1/+6
| | | | | Change-Id: I7bd1f1efe2d6ce3aee8cb7454f43cfef2979f525 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Remove docs for removed enum values.Frederik Gladhorn2012-08-151-5/+0
| | | | | Change-Id: I225ea48606d60894a851c1dd620983b7a65d234d Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
* Move docs for QSessionManager to the right file.Frederik Gladhorn2012-08-151-293/+9
| | | | | Change-Id: Ia3735ac14fe91de8cfbb58fc68f1a37f04d7b668 Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
* Remove outdated docs.Frederik Gladhorn2012-08-151-35/+0
| | | | | Change-Id: Ic878226c3b627b445ac45f56497a6a4ae77b2d38 Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
* Remove deprecated docs for QActionGroup.Frederik Gladhorn2012-08-151-32/+0
| | | | | Change-Id: If086395d3e1d151324df3cc1c59152715cb4af40 Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
* Do not call markDirty() for hidden widgets.Samuel Rødal2012-08-061-1/+1
| | | | | | | | | | Fixed crash when resizing a scroll area with a native viewport (typically a QGLWidget) causes the scroll bars to get hidden, while there are still expose events in the queue for the scroll bar widget. Task-number: QTBUG-26746 Change-Id: Ia77c8eb32a6730670333120af3f9a772c64807f1 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Revert "Move QWindowSystemInterface out of qpa."Paul Olav Tvete2012-08-032-4/+4
| | | | | | | | | | | | | | This reverts commit 784a877d3cd9a1a75aca9c83146389503a966071. Conflicts: src/plugins/platforms/cocoa/qcocoawindow.mm src/testlib/qtestkeyboard.h src/testlib/qtestmouse.h src/testlib/qtesttouch.h Change-Id: Iebfed179b3eb7f30e4c95edcae5a8ad6fd50330e Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* fix a few qdoc command typosJeremy Katz2012-08-011-1/+1
| | | | | Change-Id: I5eb3a6d2bb7939f001f1fcb836660dd46a47c350 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* change \img to \image in docsJeremy Katz2012-08-012-2/+2
| | | | | | | | \img was a macro defined in macros.qdocconf. This collection of macros is being phased out. Use the full command instead. Change-Id: Ia55212f87bb46349d61359d40568e0aa33882596 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* replace \key and \gui qdoc commands with \uicontrolJeremy Katz2012-08-011-5/+5
| | | | | Change-Id: I0753305d4fe1ea20417f451766101da1247dfeeb Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Avoid qobject_castKent Hansen2012-08-011-1/+2
| | | | | | | | | | | | This is slightly faster, and also avoids accessing the object's meta object that would cause any lazily created meta objects (e.g., for QML) from being built. This is just a port of commit a5972f8ec32631e70578c64e9d6c063b3c47f0f5 (which fixed QGuiApplication, but not QApplication). Change-Id: I0d5080495aa4fd4486db297968c4d06bbfacf89b Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* fix QWidget::activateWindow for child widgetsJoerg Bornemann2012-07-311-2/+4
| | | | | | | For child widgets we must use the windowHandle of the toplevel widget. Change-Id: If7bad8ed4bba694806a2c8b77bae3d25cc200b8b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Describe an example usage of stretch in QSizePolicy documentation.Mitch Curtis2012-07-271-0/+11
| | | | | | | | | | | Martin Pejcoch suggested QSizePolicy's setVerticalStretch and setHorizontalStretch functions be better documented. This change gives sample usages. Task-number: QTBUG-18373 Change-Id: I54da8605f5e9e5f405c145b78865402baf78eee7 Reviewed-by: Martin Pejcoch <martin.pejcoch@nokia.com> Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
* Fix position of mouse events generated from touch events.Andrew den Exter2012-07-261-1/+1
| | | | | | | | | | | In touch event terminology the global position is the screenPos, scenePos is the windowPos. Fixes a tst_qdeclarativepincharea test failure in qtquick1. Change-Id: Ie98fe12be8cbedc9b019913b066e7c4bce75278d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
* Document emission of commitDataRequest() signal in QApplication doc.Mitch Curtis2012-07-251-0/+4
| | | | | | | | | | It is currently not clear that QApplication::commitData() emits the commitDataRequest() signal. Users should know this if they plan to override the default implementation. Task-number: QTBUG-23117 Change-Id: I418af4b83795d53c9d86a2ac620c0f7c5bb9ada3 Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
* Propagate synthesized mouse events in parallel (lock-step) with touchKevin Ottens2012-07-242-0/+91
| | | | | | | | | | | | | | | | | | | | This patch implement the equivalent of 468626e99a90d6ac21cb311cde05c658ccb3b781 in qtdeclarative but for QtWidgets. If a widget doesn't accept a touch event, then QApplication gives it another try by synthesizing a corresponding mouse event. This way QtQuick and QtWidget behave in a similar way, removing the need for platform backends to try to emulate a mouse event from a touch event unconditionally. Also add relevant unit tests and adjust old QApplication ones. Change-Id: Iddbf6d756c4b52931a9d1c314b50d7a31dbcdee9 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Move QWindowSystemInterface out of qpa.Stephen Kelly2012-07-192-4/+4
| | | | | | | | Public QtTest headers require it, so all unit tests would have to use private Qt headers otherwise, which is not practical. Change-Id: I5d4466ec30b6a57ebdfc34413e716e657eb51368 Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* Fix rendering glitches when using native widgets in MDI subwindowsMiikka Heikkinen2012-07-182-4/+3
| | | | | | | | | | | | | | | | | | | | When mixing native and regular widgets in same QMdiArea, some subwindows didn't properly get set native. This was because when a native parentless widget was given a parent, it wouldn't enforce native window on the new parent and its ancestors. This happened because window flags were adjusted too late in relation to createWinId() call in setParent_sys(). Fixed by moving the createWinId() call to its proper place. Also removed some old Q_WS_* ifdeffing in QWidget::setParent() that masked some native enforcement code. Additionally removed few QEXPECT_FAILs from QWidget autotest now that those cases work correctly. Task-number: QTBUG-26424 Change-Id: Ib6f9d0531e5c7299e2c307734d49c81f1ffa9713 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Fix widget animations.Friedemann Kleint2012-07-171-21/+7
| | | | | | | | | - Update opacity. - Change Q_WS_WIN to Q_OS_WIN. Task-number: QTBUG-25436 Change-Id: I76c1e4668dc2ee4f4d861da320c10aa05e57e804 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* QWidget::showFullScreen fixed for widgets with valid size hintJoerg Bornemann2012-07-161-0/+4
| | | | | | | | | | Ensure the initial size is valid, since we store it as normalGeometry below. Task-number: QTBUG-26226 Change-Id: I3a55c389a48504699942930063089c80657687a0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* Fix applicationName() being empty in QApplication.David Faure2012-07-162-8/+0
| | | | | | | | | | | | | | | A virtual method was reimplemented to return an always-empty string, probably a leftover from a refactoring. This fix showed that tst_qwidget_window was buggy: between Qt4 and Qt5, a "Before" became "After", which made "Before" unused, and was masking the fact that the app name was empty by default. In addition, the earlier Qt5 change that made the app name default to argv[0] now requires updating this test, now that it's actually working. Change-Id: I5360026821a9b95bedd0ff09dba3d51a22e542b7 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
* Use DropShadow from QPlatformTheme everywhere in qwhatsthis.cpp.Friedemann Kleint2012-07-161-15/+9
| | | | | Change-Id: Ib8281d44e2d4b51aba13417c26247d3e19b1b2f8 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Clear qt_button_down widget when starting a drag.Friedemann Kleint2012-07-112-0/+12
| | | | | | | | | Prevent pickMouseReceiver() from using the widget from which the drag was started. Task-number: QTBUG-26145 Change-Id: I65d4c295a894193e41c676fb9fd1f7113c2631b5 Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* Don't set the resize and move flags when activating fullscreen modeThomas McGuire2012-07-111-0/+8
| | | | | | | | | This fixes tst_QWidget::movedAndResizedAttributes() for platforms that don't have support for QPlatformWindow::setWindowState(). Change-Id: Id0f123d11b08a75c0c131080d509e6b23b281600 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* Fix showNormal() and friends for platforms with fullscreen hintThomas McGuire2012-07-102-4/+4
| | | | | | | | | | | | Don't call show() inside of QWidget, as that might make the window fullscreen due to QStyleHints::showIsFullScreen(). This regression was introduced earlier when QWidget::show() gained support for the hint. No auto test caught the problem, as the affected platforms (EGL and QNX) are not CI-tested. Change-Id: I647c2362ac5b53ced562f1d77848552cc122fba0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* fix "paintEngine: Should no longer be called" warnings on WindowsJoerg Bornemann2012-07-091-1/+1
| | | | | | Change-Id: Idece743d1f28f1c579d823123b6814fae786b58b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* fix fullscreen state in QWidgetWindow::handleWindowStateChangedEventJoerg Bornemann2012-07-091-2/+0
| | | | | | | | | A widget can be Qt::WindowMaximized and Qt::WindowFullScreen at the same time. See tst_qwidget::windowState. Task-number: QTBUG-26420 Change-Id: I89d6edb857f41cda911152244cf23d36dfd1cdce Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Update framestrut initially after window creationMiikka Heikkinen2012-07-061-0/+7
| | | | | | | | | | | Creating native widgets such as QGLWidget and then calling move() on top level widget before doing show() on it caused framestrut to be incorrect, as native widgets force the creation of the native windows also on their ancestors when they are constructed, rather than waiting for window to be shown. Change-Id: I3e8d60547b3b683178ba059c5d92526a1d447442 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>