summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-03-208-61/+104
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qplatformintegration.cpp src/gui/kernel/qplatformintegration.h src/plugins/platforms/wasm/qwasmintegration.cpp src/plugins/platforms/xcb/qxcbconnection_screens.cpp Change-Id: I15063d42e9a1e226d9d2d2d372f75141b84c5c1b
| * Don't quit when last QWindow is destroyed, wait for it to closeTor Arne Vestbø2019-03-191-4/+10
| | | | | | | | | | | | | | | | | | | | | | Destroying windows happens independently of closing them, e.g. when a window is moved from one screen to another non-sibling screen. The logic for quitting the application should apply to the actual closing of a window, as documented. Change-Id: I2226aff29278aa6fbf054a0994a320eb53196e9e Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| * Move screen maintenance functions from QPlatformIntegration to QWSITor Arne Vestbø2019-03-196-54/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QWindowSystemInterface is the de facto API for any plumbing going from the platform plugin to QtGui. Having the functions as protected members of QPlatformIntegration was idiosyncratic, and resulted in awkward workarounds to be able to call the functions from outside of the QPlatformIntegration subclass. The functions in QPlatformIntegration have been left in, but deprecated so that platform plugins outside of qtbase have a chance to move over to the new QWSI API before they are removed. Change-Id: I327fec460db6b0faaf0ae2a151c20aa30dbe7182 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
| * macOS: Add IOSurface based backingstore for layer-backed viewsTor Arne Vestbø2019-03-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The naïve approach used for layer-backing in the past caused a detach of the backingstore QImage on each beginPaint, since the image was assigned to the layer via a CGImageRef that participated in the QImage implicit sharing (and had to, so we couldn't get around that). We now use IOSurfaces, wrapped in a QPlatformGraphicsBuffer abstraction. The surfaces can be assigned to the layer's content the same way images could, but allows us to reason more closely about whether or a buffer is in use, and increases the chance that we will have a zero-copy path to the screen. Unless the window has requested a surface format with single buffering we use a dynamic swap chain of buffers. In most situations there will be two buffers in play, one assigned to the layer and one ready to paint to, but during resize and some other situations the buffers will grow temporarily to accommodate the increased back-pressure. Since QBackingStore is documented as having single-buffer behavior, we take care to persist content between the buffers before every swap. By doing this before swapping, instead of before each paint, we can avoid preserving areas that will be painted to anyways, and will in many situations (such as blinking cursors e.g.) end up not persisting anything. The RasterGL surface case is handled by reading out the buffer data and doing a manual texture upload. In the future we can support direct texture access via CGLTexImageIOSurface2D, but this requires QPlatformBackingStore::composeAndFlush to learn how to support other targets than GL_TEXTURE_2D, as CGLTexImageIOSurface2D only works with GL_TEXTURE_RECTANGLE_ARB targets. Fixes: QTBUG-48763 Fixes: QTBUG-72360 Fixes: QTBUG-71162 Change-Id: Ica12f69b244e54d0fd31c929730d15657c286af8 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-03-151-1/+1
|\| | | | | | | Change-Id: I2bf3b4ceb79364330eae4cbf3cdee9a82d1be46d
| * QOpenGLContext: fix docs about sharingGiuseppe D'Angelo2019-03-131-1/+1
| | | | | | | | | | | | | | FBOs cannot be shared. Streamline the remainder of the sentence. Change-Id: I654b23f86f4ee4ea2ca8e71958464d9f55394297 Reviewed-by: Martin Smith <martin.smith@qt.io>
* | Doc: replace 0 with \nullptr in documentationChristian Ehrlicher2019-03-132-2/+3
| | | | | | | | | | | | | | Replace some more 0 with \nullptr. Change-Id: I2af91bf3712eef5161b11da0c44614bc039ade03 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-02-282-2/+19
|\| | | | | | | Change-Id: Icc9b061c56e969756f0351c936cdeb8063c86079
| * Clear only one device from g_pointIdMap when all points releasedShawn Rutledge2019-02-262-2/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | The new test tst_QTouchEvent::touchOnMultipleTouchscreens() needs the touchpoint IDs to be predictable, but another test currently has a QEXPECT_FAIL; without release events, g_pointIdMap continued to hold the touchpoints that were there when the test failed. So it's necessary to add QWindowSystemInterfacePrivate::clearPointIdMap() to be able to call it in the test cleanup function. Fixes: QTBUG-73830 Change-Id: Ia6a70d028be95cd2b6676db6363ec408c0b116bc Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* | Fix can not -> cannotRobert Loehning2019-02-252-3/+3
| | | | | | | | | | Change-Id: Ie9992f67ca59aff662a4be046ace08640e7c2714 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | QtGui/Network/OpenGl/Widgets/Xml: use \nullptr in documentationChristian Ehrlicher2019-02-205-8/+9
| | | | | | | | | | | | | | Replace null and '\c nullptr' with \nullptr in the documentation. Change-Id: I58934eea06943309ba895833f1991629870ab45b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | qguiapplication: move long comment to JIRAGatis Paeglis2019-02-191-35/+2
| | | | | | | | | | | | | | ... where it can be commented on. Change-Id: I627c7562be3a650e08ec7e7e76839797f07d5b2e Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | remove obscure commentGatis Paeglis2019-02-151-2/+0
| | | | | | | | | | | | Task-number: QTBUG-73826 Change-Id: I2d15ab726ae3be85220bf96aef673d0037738d97 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Fix: "Missing emit keyword on signal call"Alessandro Portale2019-02-131-4/+4
| | | | | | | | | | | | | | [-Wclazy-incorrect-emit] Change-Id: I32cf5db522dcb14bbe5151914624979929eeb52e Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-02-088-44/+43
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/android/templates/AndroidManifest.xml src/network/ssl/qsslsocket_mac.cpp src/widgets/styles/qstylesheetstyle.cpp tests/auto/corelib/kernel/qtimer/BLACKLIST tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp tests/auto/testlib/selftests/expected_blacklisted.lightxml tests/auto/testlib/selftests/expected_blacklisted.tap tests/auto/testlib/selftests/expected_blacklisted.teamcity tests/auto/testlib/selftests/expected_blacklisted.txt tests/auto/testlib/selftests/expected_blacklisted.xml tests/auto/testlib/selftests/expected_blacklisted.xunitxml tests/auto/testlib/selftests/expected_float.tap tests/auto/testlib/selftests/expected_float.teamcity tests/auto/testlib/selftests/expected_float.txt tests/auto/testlib/selftests/expected_float.xunitxml Done-With: Christian Ehrlicher <ch.ehrlicher@gmx.de> Done-With: Edward Welbourne <edward.welbourne@qt.io> Done-With: Timur Pocheptsov <timur.pocheptsov@qt.io> Change-Id: If93cc432a56ae3ac1b6533d0028e4dc497415a52
| * Remove requirement to lock graphics buffer before getting total sizeTor Arne Vestbø2019-01-291-1/+0
| | | | | | | | | | | | | | | | | | | | QPlatformGraphicsBuffer::byteCount() shouldn't need locking unless bytesPerLine() is implemented in a way that requires it, in which case the assert should be in the subclass. Change-Id: I0fdb04c0a3ab042408d6d17b2759509853573d16 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * QtGui: Unify license headersKai Koehne2019-01-297-43/+43
| | | | | | | | | | Change-Id: I0a2553b95b099fdfa83d42e71bdf9a192a6588c7 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* | QtGui: replace 0 with \nullptr in documentationChristian Ehrlicher2019-02-023-10/+9
| | | | | | | | | | | | | | | | | | Replace 0 with \nullptr in the documentation. As a drive-by also replace some 0 with nullptr in the corresponding code. Change-Id: Ieffbfffa76e3018257b667a3e8ad6e3b88486cde Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.12' into dev" into ↵Liang Qi2019-01-284-12/+12
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/5.12' into devLiang Qi2019-01-264-12/+12
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: src/android/templates/AndroidManifest.xml tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp Change-Id: I4c9679e3a8ebba118fbf4772301ff8fde60455b9
| | * Merge remote-tracking branch 'origin/5.12.1' into 5.12Qt Forward Merge Bot2019-01-233-9/+6
| | |\ | | | | | | | | | | | | Change-Id: Icebd151eae0cf9d400319a42573290d1a911ce26
| | | * Doc: Restore documentation for QTest functions in other modulesTopi Reinio2019-01-041-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt Test library sources specific to Core, GUI and Widgets modules were moved around in commit 88867e39b. The new source locations must be referenced in Qt Test documentation configuration. The same sources are excluded in their original doc projects, and the related snippet file is moved over to qttestlib. The commit also fixes the remaining documentation issues for Qt Test. Change-Id: Ibe011aa83639e574d647f12bc9e53e618781bce6 Reviewed-by: Martin Smith <martin.smith@qt.io>
| | | * Make QWindow::type() reflect ForeignWindow statusMorten Johan Sørvig2018-12-221-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Qt::ForeignWindow flag is or’ed to d->windowFlags by QWindow::flags(). Use this getter function instead of accessing d->windowFlags() directly. Change-Id: I6a82aa7e379ba51272954ffe7b87f108034da8c6 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| | | * Fix layering violation in isForeignWindow()Morten Johan Sørvig2018-12-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QPlatformWindow::isForeignWindow() should return whether the native window is of the foreign window type, or false if the platform (plugin) does not support this concept. It should not call QWindow::type(), since that function may itself be implemented in terms of isForeignWindow(). Change-Id: Ib67a5a44c5c1db0acb4d3bc155e187f8164146d1 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | * | fix crash if no screens are availableRolf Eike Beer2019-01-211-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | Fixes: QTBUG-73166 Change-Id: I936672b7a09a540d21e6dcd371f5ffe1e5536b85 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | | Migrate QPlatformDialogHelper to QRegularExpressionSamuel Gaist2019-01-262-6/+8
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | This patch updates the QPlatformDialogHelper class to use QRegularExpression in place of QRegExp which is to be considered deprecated. Change-Id: I8a79c5425217d18a3210c87f7f505b1aa288801d Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Add comment to a tr() callLars Knoll2019-01-251-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a comment for the translator explaining what the "+" sign is being used for that they are translating. Fixes: QTBUG-2657 Change-Id: I4c828bcc36fa94c0f1771831667b2b1f591ae92e Reviewed-by: Lucie Gerard <lucie.gerard@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | | QDrag: mark QDrag::start() as deprecatedChristian Ehrlicher2019-01-232-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QDrag::start() is deprecated since Qt4. Therefore annotate it with Q_DEPRECATED so it can be removed in Qt6. Change-Id: I5b82c482fa579f357cc67e38b86e6fe587f18ded Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2019-01-218-8/+23
|\| | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Ibfcb30053f3aacb8ec2ec480e146538c9bf440ea
| * | Fix multiple emission of QGuiApplication::lastWindowClosed() when native ↵Friedemann Kleint2019-01-161-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | child widgets are used Run the handling in QWindowPrivate::maybeQuitOnLastWindowClosed() for top level windows only. Fixes: QTBUG-73061 Change-Id: I74deb50b06a64e8ef0e438d2abf14888f778a46e Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
| * | Documentation: Add \nullptr macro and use where applicableFriedemann Kleint2019-01-107-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt for Python users reading the documentation assume that int(0) can be passed for pointer parameters. Use the newly introduced \nullptr to disambiguate this. In a follow-up step, the \nullptr macro can be defined as None when generating the Qt for Python documentation. Task-number: PYSIDE-903 Change-Id: I3a45f87175a0668ab5f3f95f0aff409f7e3ef027 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| * | Emit paletteChanged and send ApplicationPaletteChange on theme changeTimur Pocheptsov2019-01-082-0/+13
| |/ | | | | | | | | | | Fixes: QTBUG-72575 Change-Id: I407e081295a456a7bdd36de91ca5bbf74bba6078 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Fix and unit test QPalette::resolveAlejandro Exojo2018-12-311-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | The function is setting the brushes correctly in the return value, but without updating the resolve_mask, making it return wrong results in functions like isBrushSet or the debug operator. Added a unit test for the member function, since the class is still mostly untested, and clarified the reference documentation of what the function is supposed to do. Change-Id: Iaa820dc44f095e125f9375cb00da5569986803c6 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | QPalette: mark foreground()/background() as deprecatedChristian Ehrlicher2018-12-172-4/+11
| | | | | | | | | | | | | | | | | | | | QPalette::foreground()/background()/ColorRole::Foreground/Background are deprecated since Qt4 times. Therefore mark them as deprecated so they can be removed in Qt6. Change-Id: I24a47e080241b7f16b8adde1f9f16e29133462a7 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: André Hartmann <aha_1980@gmx.de>
* | QtGui: Use Q_DISABLE_COPY_MOVE for QPA interface classesFriedemann Kleint2018-12-1310-10/+23
| | | | | | | | | | | | | | | | Introduce Q_DISABLE_COPY_MOVE or replace existing Q_DISABLE_COPY and add default constructors where needed. Change-Id: Ibd14ee9d1d69e64f6289efe789d4b64a3d6cb998 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Use Q_DISABLE_COPY_MOVE for private classesFriedemann Kleint2018-12-124-4/+4
| | | | | | | | | | Change-Id: I3cfcfba892ff4a0ab4e31f308620b445162bb17b Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | Refresh QGuiApplication's devicePixelRatio cache when screens changeSteve Mokris2018-12-103-8/+27
| | | | | | | | | | | | Task-number: QTBUG-63548 Change-Id: Id934cda6e15449c00c80a646055899f49580da88 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Pass non-trivial types by const-ref in range-loop [-Wclazy-range-loop]Sergio Martins2018-12-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | corelib/serialization/qcbormap.h:176:14: warning: Missing reference in range-for with non trivial type (QPair<QCborValue, QCborValue>) corelib/serialization/qjsoncbor.cpp:820:10: warning: Missing reference in range-for with non trivial type (QJsonValue) gui/kernel/qguiapplication.cpp:1171:10: warning: Missing reference in range-for with non trivial type (QString) printsupport/dialogs/qprintdialog_unix.cpp:741:10: warning: Missing reference in range-for with non trivial type (QString) printsupport/kernel/qprinter.cpp:1851:10: warning: Missing reference in range-for with non trivial type (QVariant) tools/qlalr/cppgenerator.cpp:463:8: warning: Missing reference in range-for with non trivial type (Name) Change-Id: I327b0f116e329e55952ed5740a5f5af4b2918392 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.12' into devLiang Qi2018-12-041-1/+1
|\| | | | | | | | | | | | | Conflicts: src/gui/painting/qdrawhelper.cpp Change-Id: I4916e07b635e1d3830e9b46ef7914f99bec3098e
| * Fix crash in QSimpleDrag when no platform windowVal Doroshchuk2018-11-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | No need to return top level window if it was not created. It means no platform resources have been allocated. Events might not be delivered if the wrong window is returned. Fixes: QTBUG-70544 Change-Id: I43462974f70871470f7b7490dc2b3c08846f77b1 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | Rename QList<T>::swap(int, int) to swapItemsAt()Lars Knoll2018-12-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | The old name was confusing as it conflicted with QList<T>::swap(QList &other), that was doing something completely different. Rename the method to swapItemsAt() which is a lot clearer. Change-Id: Iac77a1e790a7256766f83a24d2a243c880d875f4 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* | Add setter for property QStyleHints::showShortcutsInContextMenusFriedemann Kleint2018-11-242-2/+20
| | | | | | | | | | | | | | | | Add a tri-state setter logic similar to the other properties. Fixes: QTBUG-71471 Change-Id: Iddb5be18a037634a53ad8725bddb91c12fb33fed Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | QStyleHintsPrivate: Use member initializationFriedemann Kleint2018-11-241-23/+10
| | | | | | | | | | | | Task-number: QTBUG-71471 Change-Id: I368193bc363944825c01da5337738fd0a7ba2219 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devLiang Qi2018-11-223-5/+13
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qdir.cpp src/corelib/kernel/qtimer.cpp src/corelib/kernel/qtimer.h Done-With: Edward Welbourne <edward.welbourne@qt.io> Change-Id: I683d897760ec06593136d77955f8bc87fdef3f9f
| * Merge remote-tracking branch 'origin/5.11' into 5.12Liang Qi2018-11-192-5/+7
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm Change-Id: I66a08c770767a93cd26535689e3e7806486aab06
| | * Modernize the "settings" featureLiang Qi2018-11-152-5/+7
| | | | | | | | | | | | | | | | | | Change-Id: I9b8a61ecb1413b513ae5c9e77d3ee1b3e8b6562c Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * | Merge remote-tracking branch 'origin/5.12.0' into 5.12Liang Qi2018-11-161-0/+6
| |\ \ | | | | | | | | | | | | Change-Id: Ic1dd39044e19f50e1068d4ac70dacaad6440e570
| | * | Doc: Qt GUI: Fix documentation warningsTopi Reinio2018-11-061-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These are minor typos or documentation warnings that snuck in with new features. Task-number: QTBUG-71502 Change-Id: I03669cfecc3c3d80168ff7b1ca8bca7571e06d25 Reviewed-by: Martin Smith <martin.smith@qt.io>
* | | | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-11-131-1/+6
|\| | | | | | | | | | | | | | | Change-Id: I5dbdc13c6133e5b03e362c5461b4a599d781bd1e
| * | | Document QScreen::grabWindow high-DPI behaviorMorten Johan Sørvig2018-11-121-0/+5
| | | | | | | | | | | | | | | | | | | | Change-Id: Ib32510ff30e907365e64921fda14e686a495c77c Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>