summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel
Commit message (Collapse)AuthorAgeFilesLines
* doc: Add class qualifiers to parameter typesMartin Smith2017-12-061-2/+2
| | | | | | | | This change supplies several missing class qualifiers for parameter types and function return types. Change-Id: I569026e4da0948902fcc13557003d3748b85dd82 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Revert "QApp: Method to check for native style usage."Alexander Volkov2017-12-012-28/+0
| | | | | | | | | | | | | | | | | This reverts commit 958a4c9087e03502d0173735df4611a7f96a0463. QApplicationPrivate::usesNativeStyle() introduced by that commit was never used. We have an untested method that is furthermore may return wrong results because it relies on the comparison 'app_style->objectName() != QApplicationPrivate::desktopStyleKey()', but not all styles set their object names. Conflicts: src/widgets/kernel/qapplication.cpp src/widgets/kernel/qapplication_p.h Change-Id: I48d221f9387381db9ed51a7a068bfd0a0c2ed58d Reviewed-by: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com>
* macx-clang: Opt-in xcb QPA support with XQuartzGabriel de Dietrich2017-12-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Enable xcb QPA plugin when XQuartz is available. This is done in a single build, alongside the Cocoa version. We delegate part of the configuration stage to pkg-config, so this becomes a requirement. Ensure that PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig:/opt/X11/share/pkgconfig is in your environment, or pkg-config is properly set up. Tested with the following configure options: configure \ -pkg-config \ -fontconfig -system-freetype \ -system-xcb -xkb -no-opengl \ -qt-xkbcommon -qt-xkbcommon-x11 Change-Id: I2eb5a0491172368afc4c629c540cbef08580348d Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-234-2/+7
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/access/qhttp2protocolhandler_p.h src/network/kernel/kernel.pri src/network/ssl/qsslkey_qt.cpp src/plugins/platforms/cocoa/qcocoascreen.mm src/plugins/platforms/windows/accessible/iaccessible2.cpp src/plugins/platforms/windows/accessible/iaccessible2.h src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.h src/widgets/widgets/qmenu_p.h tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/auto/other/qaccessibility/tst_qaccessibility.cpp tests/auto/testlib/selftests/expected_cmptest.lightxml tests/auto/testlib/selftests/expected_cmptest.teamcity tests/auto/testlib/selftests/expected_cmptest.txt tests/auto/testlib/selftests/expected_cmptest.xml Done-with: Edward Welbourne <edward.welbourne@qt.io> Change-Id: I4217cc7d840cbae3e3dd28574741544469c4c6b9
| * Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-11-092-1/+3
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qwindow.cpp src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/windows/qwindowssystemtrayicon.cpp src/plugins/platforms/xcb/qxcbconnection_xi2.cpp tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp tests/auto/widgets/kernel/qaction/tst_qaction.cpp Change-Id: Ifa515dc0ece7eb1471b00c1214149629a7e6a233
| | * QWidget: Propagate window file path after createTor Arne Vestbø2017-11-071-0/+2
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-63340 Change-Id: Ic21964a33ee2910200627fe8a8c8ec2454e2e20c Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| | * Disable window shortcuts if there is a window modal dialogElvis Angelaccio2017-11-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a window is blocked by a WindowModal dialog, it should not be possible to trigger window shortcuts on that window if it receives a WindowActivate event. This currently happens if the blocked window gets clicked, because the window becomes the active_window and then QApplication sends it a WindowActivate event (this doesn't happen with application modal dialogs). The correctWidgetContext() function calls QApplicationPrivate::tryModalHelper() only if the shortcut context is ApplicationShortcut. This patch makes it call even if the shortcut context is WindowShortcut. Change-Id: Iff87d85bcae603a6a24128e0cedfa9d33b6485fd Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-302-1/+4
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/windows/qwindowswindow.cpp tests/auto/widgets/kernel/qaction/tst_qaction.cpp Change-Id: Ia017a825ed2ca2d53ac586f4ae48df6f65818d40
| | * QAction: fix ::setData() always emits changed()Yulong Bai2017-10-241-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QAction::setData() always emits changed() even without actual data change. Original code lacks a guard to check if the data changes. According to http://doc.qt.io/qt-4.8/signalsandslots.html, adding guard also benefits to prevent infinite looping in case of cyclic connections. Task-number: QTBUG-62006 Change-Id: I776369b668082f9f02e4502a36b1ae234ee7e079 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | * Add clarifying documentation for QLayout::removeWidget()Andy Shaw2017-10-241-1/+2
| | | | | | | | | | | | | | | Change-Id: I6c256c6c5cdfed6ceb45758d708fdc8f74d2939f Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | | Remove a few more uses of deprecated QDesktopWidget APIsTor Arne Vestbø2017-11-171-0/+3
| | | | | | | | | | | | | | | | | | Change-Id: I3834ba7ce8f9bd7026f3d59f15d268b4c03e364a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Deprecate QDesktopWidget in favor of QScreenTor Arne Vestbø2017-11-084-35/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtWidgets] QDesktopWidget has been deprecated. Use the corresponding QScreen functions instead. Task-number: QTBUG-62094 Change-Id: I0941d2aa27a06ec650ca52d6467e5bfb0ad43459 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-051-0/+4
|\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/minimum-linux.S src/network/access/qhttpthreaddelegate.cpp src/widgets/kernel/qwidgetwindow.cpp Change-Id: Id2e817e85f85c68f5482c9a12912d35590f9d5f8
| * | Fix -no-opengl buildTimur Pocheptsov2017-10-281-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A follow-up patch for 8e70241dccaf5a9e5c79c8d6da5665b881c5914d: Make 'shareContext' conditionally included/compiled (protected by QT_CONFIG(opengl)). Change-Id: Ieaeea6b146b47fba7a77e2576ae0a33042280199 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* | | qwidgetwindow: remove seemingly stray QApplicationPrivate::mouse_buttonsGatis Paeglis2017-10-271-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes mouse_buttons related code from qwidgetwindow.cpp as it does not belong there for the following reasons: - The commit (ed2a2dc6dae0a2523cecfd272609d322ace16145) that added it in Qt5 says that the logic was copied from qapplication_x11.cpp (filename in Qt4 repository). Other qapplication_*.cpp platform implementations did not have this kind of logic; thus having it in cross platform location qwidgetwindow.cpp does not make sense. - According to the documentation, QApplicationPrivate::mouse_buttons: "Returns the current state of the buttons on the mouse. The current state is updated synchronously as the event queue is emptied". So the only place where changing this variable makes sense is in QGuiApplicationPrivate::processMouseEvent, which is *when the event queue is emptied*. There are other places in source code where this variable is changed, but all of those are hacks and should be cleaned out eventually: // a hack due to insufficient QWindowSystemInterface API plugins/platforms/windows/qwindowsdrag.cpp // a hack to support code that bypasses QWSI API when sending mouse events // via qApp->notify(). widgets/kernel/qapplication.cpp - AFACT, the released button bit will be already unset by the time mouse release event reaches QWidgetWindow::handleMouseEvent. Change-Id: Ifb2b3b443ffff0274545e5d3c631cf1e77160502 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | | Merge remote-tracking branch 'origin/5.10' into devAllan Sandfeld Jensen2017-10-242-3/+3
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/windows/qwindowsmousehandler.cpp src/plugins/platforms/xcb/qxcbimage.cpp tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/manual/qtabletevent/regular_widgets/main.cpp Done-with: Friedemann Kleint<Friedemann.Kleint@qt.io> Done-with: Mårten Nordheim<marten.nordheim@qt.io> Change-Id: I5b2499513a92c590ed0756f7d2e93c35a64b7f30
| * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-231-1/+3
| |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/direct2d/direct2d.pro src/plugins/platforms/ios/qiosclipboard.mm src/plugins/platforms/windows/windows.pro Change-Id: Idffa03b3990bd642784f528821c5446b2e1008ef
| | * QShortcut: Fall back to cross platform code in absence of QPA menuGabriel de Dietrich2017-10-171-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On macOS, absence of a QPA menu means that we should be using our own internal logic since there's no entity on the QCocoaMenuDelegate to take care of the shortcuts. Change-Id: I35ed8f0b55445f61d0528709d4debb636a502002 Task-number: QTBUG-61039 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * | MinGW: Globally define WINVER and _WIN32_WINNT to enable Windows 7 APIOrgad Shaneh2017-10-191-2/+0
| | | | | | | | | | | | | | | Change-Id: I637b33ba6d05f40486d8da927ae5cc5148299348 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-10-175-77/+107
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/network/fortuneclient/client.cpp examples/network/fortuneserver/server.cpp src/platformsupport/platformcompositor/qopenglcompositorbackingstore_p.h src/plugins/platforms/cocoa/qcocoabackingstore.h src/plugins/platforms/cocoa/qcocoaintegration.h src/plugins/platforms/cocoa/qcocoascreen.h src/plugins/platforms/ios/qiosbackingstore.h src/plugins/sqldrivers/oci/qsql_oci.cpp src/widgets/kernel/qwidgetwindow.cpp Change-Id: Ia6dd2c52d4a691b671cf9a2ffca70deccece8f10
| * | Merge "Merge remote-tracking branch 'origin/5.9' into 5.10" into ↵Liang Qi2017-10-053-5/+40
| |\ \ | | | | | | | | | | | | refs/staging/5.10
| | * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-043-5/+40
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qconfig-bootstrapped.h src/corelib/global/qglobal.h src/corelib/tools/qcryptographichash.cpp src/corelib/tools/qcryptographichash.h src/corelib/tools/qmessageauthenticationcode.cpp src/plugins/platforms/windows/qwindowswindow.h tests/auto/gui/kernel/qwindow/BLACKLIST tests/auto/widgets/itemviews/qitemdelegate/BLACKLIST Change-Id: Ib68112de985a3d714c2071f47c10e907e4f0229a
| | | * Fix crash when reparenting window containerPaul Olav Tvete2017-09-281-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QWindowContainer assumed that a widget could never change from native to non-native. This is not a fact when the window container is reparented to toplevel and back. In this case, usesNativeWidgets would be stuck at true, and parentWasChanged() would go down the native widget path, triggering an assert. The solution is to always recalculate the usesNativeWidgets bool. Task-number: QTBUG-63168 Change-Id: I88178259878ace9eb5de2ee45ff5e69b170da71c Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
| | | * Fix QGraphicsEffect draw error size in decimal scale factorIceyer Lee2017-09-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When QT_SCALE_FACTOR=1.5 or other decimal, QWidget draw QGraphicsEffect in error size. Use QPaintDevice::devicePixelRatioF instead QPaintDevice::devicePixelRatio() will fix it. Change-Id: I423e224d73b948ecdeca0e6b24c51f12a724a0ba Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| | | * QGestureManager::filterEventThroughContexts(): Reduce debug outputFriedemann Kleint2017-09-201-2/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Log only relevant input events which are ignored. This reduces the output when COIN re-runs failing item view tests with full debug output enabled. Change-Id: Ifce9a56fdf313b7572baff9de8fb298b38e8b33a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | | Let QPlatformBackingStore handle its own QOpenGLContextTor Arne Vestbø2017-10-053-29/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The resources allocated by QPlatformBackingStore are owned by the class, and should be allocated in a context the class also owns. This removes the asymmetry of having to pass in a context to composeAndFlush, while having to make the same context current before destroying the platform backingstore. The context owned by QPlatformBackingStore is shared with the associated window though a new QWindowPrivate::shareContext() API. The result is that on e.g. iOS, the backingstore does not need to tie the resource allocation of QPlatformBackingStore to the global share context, but can instead tie them to the per-window context, and hence clean them up after each window is closed. Task-number: QTBUG-56653 Change-Id: Ic1bcae50dafeeafaa8d16a7febd83b840ec6367a Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| * | | Widgets: change QWidget::setTabOrder to understand compound widgetsRichard Moe Gustavsen2017-10-041-43/+56
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A "compound widget" is a widget that has a focus proxy set to an inner child. This is normal for complex black-box components where focus handling is delegated to the children. Since the compound can have several children, a local tab order might exist between them. The current implementation of setTabOrder had no idea about compound widgets. As such, when connecting two compounds in the tab chain, it would just break up their inner tab order and cause tabbing to ignore children other than the proxy. The new implementation recognizes compound widgets, and add some extra code to figure out the correct tab targets. This way, the local tab order between the children will be preserved. This implementation was inspired by the patches of Marek Wieckowski posted in the linked bug report, and later modified by Nikita Krupenko. [ChangeLog][Widgets] QWidget::setTabOrder() will now preserve the local tab order inside a widget if it has a focus proxy set to an inner child. Task-number: QTBUG-10907 Change-Id: I0673d39d70ec8c6bf64af30bf978d67c651b2f3c Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | | Remove pointer checkJesus Fernandez2017-09-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | The win pointer is valid because it is ensured before the check. It cannot be null. Coverity-Id: 21652 Change-Id: Iec8c1710d33a4eeb3820cd70bd94bd5b02fa0b41 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-09-2612-46/+79
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qguiapplication.cpp src/platformsupport/input/libinput/qlibinputpointer.cpp src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.h src/plugins/platforms/cocoa/qcocoawindow.h src/testlib/qtestsystem.h Change-Id: I5975ffb3261c2dd82fe02ec4e57df7c0950226c5
| * | Widgets: be able to tab to a widget that has a focus proxyRichard Moe Gustavsen2017-09-251-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When tabbing/searching for the next focus widget, the current code would check if the next widget in the focus chain had a focus proxy, and if so, ignore it. The exact reason for this behavior is not clearly understood, but some widgets (e.g QSpinBox) has children (a QLineEdit) that sets the parent as focus proxy. If we didn't ignore children with focus proxy, tabbing from a QSpinBox would lead us to find the inner QLineEdit, which (because of its proxy), would lead us back to the QSpinBox. And therefore not be able to tab out. But ignoring the focus proxy has other problems. Normally a focus proxy is the next sibling to the widget it acts as a proxy for, and tabbing to the widget will therefore appear correct. But if the focus proxy is not the next sibling, the logic will fail, since the tab would anyway give focus to the next sibling. This becomes very apparent if the focus proxy is a child of the widget, since then its likely that the focus proxy is not the _first_ child among all the children. So tabbing to the parent would not give focus to the proxy. This patch will change this logic so that you are allowed to tab to a widget with a focus proxy. But we check that if you do so, you actually end up moving focus in the right direction. If not, we ignore it like before. This will ensure that we tab correctly when dealing with focus proxies, and especially when focus proxies are used to construct compound widgets. [ChangeLog][Widgets] When tabbing to a widget with focus proxy, focus will now be given to the proxy rather than just being ignored. Task-number: QTBUG-10907 Change-Id: I66d1da5c941fdd984bb2783cc355ca65b553b5dd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
| * | Widgets: add QWidgetPrivate::deepestFocusProxy()Richard Moe Gustavsen2017-09-252-3/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Factor out searching for the deepest focus proxy in to a private function. Other than being called from QWidget::setFocus(), this function will also be used in subsequent patches. Change-Id: I4450a42e362eccb64f8a88c7ea83b415101973b9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-09-207-6/+18
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/styles/mac/qmacstyle_mac.mm src/widgets/util/qcompleter.cpp src/widgets/widgets/qmainwindowlayout.cpp src/widgets/widgets/qmdisubwindow.cpp Change-Id: If0e96981af07ce36ac68f2e69211bc2120f93973
| | * Convert features.menu to QT_[REQUIRE_]CONFIGStephan Binner2017-09-195-5/+13
| | | | | | | | | | | | | | | Change-Id: I031356411294b259ebd2b22c53159c93fd92af6e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| | * Convert features.sizegrip to QT_[REQUIRE_]CONFIGStephan Binner2017-09-121-0/+2
| | | | | | | | | | | | | | | Change-Id: Ieac4ae1f0b8b84e943c00da9903346a44e57138c Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| | * Convert features.mdiarea to QT_[REQUIRE_]CONFIGStephan Binner2017-09-111-1/+3
| | | | | | | | | | | | | | | Change-Id: I6d2ec035a218869aa6595f5848de94ce491d3124 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * | Add QGuiApplication::screenAt()Tor Arne Vestbø2017-09-111-20/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtGui] It's now possible to retrieve the screen at a given point via QGuiApplication::screenAt(). Change-Id: Ic09514ec731d8cce5d453833e98fcd118a70600e Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io> Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
| * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-09-066-16/+26
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/opengl/qopenglwidget/main.cpp src/3rdparty/pcre2/src/pcre2_printint.c src/plugins/platforms/cocoa/qnsview.mm src/widgets/widgets/qcombobox.cpp Change-Id: I37ced9da1e8056f95851568bcc52cd5dc34f56af
| | * Convert features.effects to QT_[REQUIRE_]CONFIGStephan Binner2017-09-041-2/+6
| | | | | | | | | | | | | | | Change-Id: I8421b5e81dc21e8f9f6bdd9f714fb3f535618a3c Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| | * Convert features.scrollarea to QT_[REQUIRE_]CONFIGStephan Binner2017-09-042-5/+5
| | | | | | | | | | | | | | | Change-Id: Ifc7b0a6b025c282234b4aeaf23daecff8a558236 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| | * Convert features.menubar to QT_[REQUIRE_]CONFIGStephan Binner2017-09-043-9/+15
| | | | | | | | | | | | | | | Change-Id: Idbd4978852fa280dd18a5684469d499da3892126 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | | Replace Q_NULLPTR with nullptr where possibleKevin Funk2017-09-1916-37/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remaining uses of Q_NULLPTR are in: src/corelib/global/qcompilerdetection.h (definition and documentation of Q_NULLPTR) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: If6b074d91486e9b784138f4514f5c6d072acda9a Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | Replace Q_DECL_OVERRIDE with override where possibleKevin Funk2017-09-1925-153/+153
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remaining uses of Q_DECL_OVERRIDE are in: src/corelib/global/qcompilerdetection.h src/corelib/global/qglobal.cpp doc/global/qt-cpp-defines.qdocconf (definition and documentation of Q_DECL_OVERRIDE) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: Ib9b05d829add69e98a86238274b6a1fcb19b49ba Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-08-311-4/+10
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/examples.pro qmake/library/qmakebuiltins.cpp src/corelib/global/qglobal.cpp Re-apply b525ec2 to qrandom.cpp(code movement in 030782e) src/corelib/global/qnamespace.qdoc src/corelib/global/qrandom.cpp src/gui/kernel/qwindow.cpp Re-apply a3d59c7 to QWindowPrivate::setVisible() (code movement in d7a9e08) src/network/ssl/qsslkey_openssl.cpp src/plugins/platforms/android/androidjniinput.cpp src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/widgets/widgets/qmenu.cpp tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp Change-Id: If7ab427804408877a93cbe02079fca58e568bfd3
| * QWidget: Call appropriate QWindow method from setGeometry_sys()Gabriel de Dietrich2017-08-231-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When calling resize() from showEvent(), we'd set the full geometry on the widget's QWindow. This resulted in the top-level window being moved to the top-left corner, even though no other call to move() or setGeometry() had happened before. The solution consists on calling the proper QWindow methods depending on whether setGeometry_sys() is called for a move, a resize or both. Furthermore, this needs QWindow::resize() to set its position policy to frame-exclusive. The documentation states that is already the case and we're setting the full geometry on the platform window, so we need to convey that bit of information. This also solves the age-old conundrum: "### why do we have isMove as a parameter?" Change-Id: I2e00fd632929ade14b35ae5e6495ed1ab176d32f Task-number: QTBUG-56277 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | New AA_DisableWindowContextHelpButton to globally hide ? buttonKai Koehne2017-08-291-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Dialogs and Sheets by default have the WindowsContextHelpButtonHint set, which adds a question mark button to dialogs on Windows. This button then triggers the 'What's this' mode by changing the cursor, and letting the user explore the UI by showing whatsThis tooltips. Anyhow, the paradigm is little used today and a lot of applications do not set any whatsThis properties, leaving the mode pretty non-functional. It's therefore common to explicitly remove the WindowsContextHelpButtonHint from dialogs. However, this has to be done for _every_ dialog. Instead, this patch adds a global application flag to not set the WindowsContextHelpButtonHint by default. This allows developers to already buy into the Qt 6 behavior, where the flag will not be set anymore by default. [ChangeLog][QtWidgets] Added AA_DisableWindowContextHelpButton attribute. Setting this attribute globally prevents the automatic "What's this" button on dialogs on Windows (WindowsContextHelpButtonHint). Change-Id: I497a79575f222c78b2d5d051a6de346b231f72d3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Reduce usage of QDesktopWidget to resolve screen properties in QtWidgetsTor Arne Vestbø2017-08-185-23/+112
| | | | | | | | | | | | | | | | | | | | | | Removes the need to initialize QDesktopWidget, just to look up which screen a widget would map to, the geometry of a screen, number of screens, etc. Change-Id: Ieb153b9ff6d3fba645fc528d6e430e8392f990bf Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Don't send extra mouse press to popups on dblClickPaul Olav Tvete2017-08-171-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | QWidget::event() will turn an unhandled double click into a mouse press. Therefore, we must avoid sending a separate mouse press in that case. This copies the logic from 9063edef796ad10eb9ac2229627f36d60168f0e2, the previous fix for QTBUG-25831, which only applied to the non-popup case. Task-number: QTBUG-25831 Change-Id: I616f398a5ebe1f95d4b65b9f6ce2fe39a6fad83e Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-08-1515-88/+106
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qcocoamenu.h src/plugins/platforms/cocoa/qcocoamenu.mm src/plugins/platforms/cocoa/qcocoawindow.mm src/widgets/styles/qstylehelper_p.h Change-Id: I54247c98dd79d2b3826fc062b8b11048c9c7d9bb
| * Convert features.graphicsview to QT_[REQUIRE_]CONFIGStephan Binner2017-08-1515-88/+104
| | | | | | | | | | Change-Id: I1083097802772624e5d414678b4612308683a56f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * QAction: Note that the QAction parent parameter is optional since 5.7hjk2017-08-081-0/+2
| | | | | | | | | | Change-Id: Id1cb5591dae55cd22621cd8e403d2056f1aa9364 Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>