summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-01-289-47/+149
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qsettings.cpp src/corelib/kernel/qvariant.cpp src/corelib/serialization/qjsoncbor.cpp src/corelib/serialization/qjsonvalue.cpp src/corelib/tools/tools.pri src/gui/image/qimage.cpp src/gui/kernel/qguivariant.cpp src/widgets/kernel/qshortcut.cpp tests/auto/tools/moc/allmocs_baseline_in.json tests/auto/tools/moc/tst_moc.cpp src/opengl/qglframebufferobject.cpp Done-With: Edward Welbourne <edward.welbourne@qt.io> Done-With: Leander Beernaert <leander.beernaert@qt.io> Change-Id: Ie7f5fa646c607fe70c314bf7195f7578ded1d271
| * Doc: Clarify usage of Qt::ReturnByValue in QCursorSze Howe Koh2020-01-271-4/+4
| | | | | | | | | | Change-Id: I6ce2c658dc0e72beb9e7a2497c6dbdbc71d96bc5 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| * Doc/QtGui: replace some 0 with \nullptrChristian Ehrlicher2020-01-262-2/+2
| | | | | | | | | | | | | | | | | | Replace some 'is 0' or 'are 0' where 0 referes to a nullptr with 'is \nullptr' and 'are \nullptr' Change-Id: Ic18d0c8bcf64159b4c8fae8c9499839954a98884 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
| * Windows QPA: Add detection of dark modeFriedemann Kleint2020-01-251-0/+15
| | | | | | | | | | | | | | | | | | | | Read the dark mode setting and make it accessible via native interface. Add a command line option to set the support level. Task-number: QTBUG-72028 Change-Id: I1e9fe296a6b1bda81512d003183038b866b67545 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| * QCursor: Allow bitmap() and mask() to return by-valueSze Howe Koh2020-01-262-3/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | The previous versions of these functions that returned by-pointer are held over from Qt 1 times. They are inconsistent with the rest of the Qt API. [ChangeLog][QtGui][QCursor] QCursor::bitmap() and QCursor::mask() can now return by-value instead of by-pointer. Task-number: QTBUG-48701 Change-Id: I3ca4f0c28d5c831727a60309facfb49c74673bb7 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * Register QColorSpace as a QtGui metatypeAllan Sandfeld Jensen2020-01-251-0/+1
| | | | | | | | | | | | | | Helps pass it through QVariant, and needed for QML support. Change-Id: Id161ff9b8f81ad55a7ee7a7c4c614bdf74bca4a1 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
| * Fix some qdoc-warningsFriedemann Kleint2020-01-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | src/corelib/tools/qmap.cpp:1199: (qdoc) warning: Can't link to 'QMultiMap::unite()' src/gui/kernel/qevent.cpp:949: (qdoc) warning: Unknown command '\see' src/gui/painting/qpaintengine_raster.cpp:344: (qdoc) warning: clang found diagnostics parsing \fn Type QRasterPaintEngine::type() const error: unknown type name 'Type' src/gui/doc/src/qtgui.qdoc:45: (qdoc) warning: Can't link to 'Build with CMake' examples/widgets/doc/src/gallery.qdoc:28: (qdoc) warning: Cannot find file 'widgets/gallery/gallery.pro' or 'widgets/gallery/gallery.pyproject' src/widgets/kernel/qwidget.cpp:5950: (qdoc) warning: Can't link to 'setFilePath' src/widgets/kernel/qshortcut.cpp:542: (qdoc) warning: No such parameter 'context' in QShortcut::QShortcut() Change-Id: I2395af854efebef719d4762da466f69f7c5aab9e Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| * Replace most use of QVariant::type and occurrences of QVariant::TypeOlivier Goffart2020-01-235-40/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I made a clazy automated check that replaced the use of QVariant::Type by the equivalent in QMetaType. This has been deprecated since Qt 5.0, but many uses were not yet removed. In addition, there was some manual changes to fix the compilation errors. Adapted the Private API of QDateTimeParser and QMimeDataPrivate and adjust QDateTimeEdit and QSpinBox. QVariant(QVariant::Invalid) in qstylesheet made no sense. But note that in QVariant::save, we actually wanted to use the non-user type. In the SQL module, many changes were actually reverted because the API still expects QVarient::Type. Change-Id: I98c368490e4ee465ed3a3b63bda8b8eaa50ea67e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Remove QOpenGLTextureHelper dependency from QOpenGLContextJohan Klokkhammer Helsing2020-01-203-5/+8
| | | | | | | | | | | | | | | | It's now just a pointer to a forward declared class Task-number: QTBUG-74409 Change-Id: I34df385154dcff2bbba2f6318825ab5258fa6695 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-01-191-1/+0
|\| | | | | | | Change-Id: I68702c9f9680772d332b5bb777ddd2663168abd5
| * Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-01-181-1/+0
| |\ | | | | | | | | | Change-Id: I12148e7b20bcdb72d9b328035d528c99633b1e92
| | * Doc: Fix qdoc compilation errors qtbaseNico Vertriest2020-01-171-1/+0
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-79824 Change-Id: I5a39525e3e735415ba96e2d585c5de754deb15de Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* | | Merge "Merge remote-tracking branch 'origin/5.15' into dev"Qt Forward Merge Bot2020-01-171-9/+19
|\ \ \
| * | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-01-161-9/+19
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/widgets/kernel/qshortcut.cpp tests/auto/network/access/spdy/tst_spdy.cpp Change-Id: If76c434beac2c0a393440aa365f89f77439774ce
| | * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-01-151-9/+19
| | |\| | | | | | | | | | | | | Change-Id: I8dbcf23835d52d3aa7d018ed250814d60c68aa83
| | | * doc: explain QWheelEvent::angleDelta() more thoroughlyShawn Rutledge2020-01-131-9/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It has been a QPoint for a long time now, to support both the usual vertical mouse wheel and also the wheel tilt for horizontal scrolling, or the actual horizontal wheel if the mouse has one, or the simulation of a horizontal wheel via touchpad gestures; but the docs continued to read as if it was just one value. Task-number: QTBUG-71575 Change-Id: I3efa686ace4f09c7f237f72bf0500fbfbd3213cb Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | | QPalette: fix function swap and move operatorVitaly Fanaskov2020-01-171-1/+2
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | Additional data should also be taken into account when using move operator and function swap. This is already implemented for move constructor. Task-number: QTBUG-78544 Change-Id: I24ba34b0957a8fba7e15a934f2d08222dc95650f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | Move QOpenGLWindow from QtGui to QtOpenGLJohan Klokkhammer Helsing2020-01-153-809/+2
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-74409 Change-Id: If7d27cdfa2c6cd5b167887ad77b9cfe413cb106a Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-01-152-55/+97
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/auto/network/access/spdy/tst_spdy.cpp Change-Id: I3196c5f7b34f2ffc9ef1e690d02d5b9bb3270a74
| * | Unify application palette handling between QGuiApplication and QApplicationTor Arne Vestbø2020-01-132-52/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The logic is now mostly handled in QGuiApplication, with QApplication only dealing with the widget-specific palettes and interaction between the style and the palette. The application now picks up changes to the platform theme and will re-resolve the current application palette appropriately. This also works even if an explicit application palette has been set, in which case any missing roles are filled in by the theme. The palette can now also be reset back to the default application palette that's fully based on the theme, by passing in the default constructed palette (or any palette that doesn't have any roles set). This is also correctly reflected in the Qt::AA_SetPalette attribute. Conceptually this means QGuiApplication and QApplication follow the same behavior as QWidget, where the palette falls back to a base or inherited palette for roles that are not set, in this case the theme. Behavior-wise this means that the default application palette of the application does not have any roles set, but clients should not have relied on this, nor does QWidget rely on that internally. It also means that setting a palette on the application and then getting it back again will not produce the same palette as set, since the palette was resolved against the theme in the meantime. This is the same behavior as for QWidget, and although it's a behavior change it's one towards a more sane behavior, so we accept it. [ChangeLog] Application palettes are now resolved against the platform's theme palette, the same way widget palettes are resolved against their parents, and the application palette. This means the application palette reflected through QGuiApplication::palette() may not be exactly the same palette as set via QGuiApplication::setPalette(). Change-Id: I76b99fcd27285e564899548349aa2a5713e5965d Reviewed-by: Vitaly Fanaskov <vitaly.fanaskov@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-01-131-3/+21
| |\| | | | | | | | | | Change-Id: I50f70a789ab1438b40d4408be72c090fa00b801f
| | * Windows QPA: Update documentation on command line optionsFriedemann Kleint2020-01-101-3/+21
| | | | | | | | | | | | | | | | | | | | | | | | Sort alphabetically and add recent relevant options with version information. Change-Id: I10c8cc82ce357775ed68cb811a0c906cd38633a5 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-01-133-6/+17
|\| | | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp Change-Id: I4d3041fa291a918c774ffa5eb5c8792a0966451d
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Liang Qi2020-01-093-6/+17
| |\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qobject.cpp Change-Id: I4780b25665672692b086ee92092e506c814642f2
| | * QInputDeviceManager: initialize device countsSamuli Piippo2020-01-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The device counts were used before they were initialized, causing problems e.g. with mouse cursor. Fixes: QTBUG-81207 Change-Id: Ic9dadcaebeb4c4a64bb506e4236d5a9260e0fdbc Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| | * Share updates to QGuiApplicationPrivate::app_pal via helper functionTor Arne Vestbø2020-01-092-5/+16
| | | | | | | | | | | | | | | Change-Id: I2f582358efaadcd33b39c52317222322c589423f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-01-101-3/+3
|\| | | | | | | | | | | Change-Id: I784e23d7913294225686879c9bd77dafe3580bac
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-01-091-3/+3
| |\| | | | | | | | | | Change-Id: I9b4816b4aa6f0c51a446742db58b9d0dcf69aa09
| | * Restore High DPI scale factorsFriedemann Kleint2020-01-071-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Change the default rounding policy to "Round" so that 2 is used for 150% (144DPI) on Windows, as it was in 5.13. Fixes: QTBUG-80934 Change-Id: I0cba986ce6afc9e2737c656000ad854c07844360 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devFriedemann Kleint2020-01-071-2/+3
|\| | | | | | | | | | | Change-Id: Ia2ce994c42adc010c453edaeea57f672556958f6
* | | Merge remote-tracking branch 'origin/5.15' into devLiang Qi2020-01-046-19/+29
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qvector.h Make QVector(DataPointer dd) public to be able to properly merge 5b4b437b30b320e2cd7c9a566999a39772e5d431 from 5.15 into dev. src/widgets/kernel/qapplication.cpp tests/auto/tools/moc/allmocs_baseline_in.json Done-With: Christian Ehrlicher <ch.ehrlicher@gmx.de> Change-Id: I929ba7c036d570382d0454c2c75f6f0d96ddbc01
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-12-274-13/+22
| |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/plugins/platforms/xcb/qxcbscreen.cpp src/widgets/accessible/qaccessiblewidget.cpp Change-Id: Ib3138e61ba7981610940509a7ff02ba2dd281bf0
| | * Don’t reset highDpicaleFactorRoundingPolicyMorten Johan Sørvig2019-12-191-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Don’t reset highDpicaleFactorRoundingPolicy in the QGuiApplication destructior. This is a static property, independent of the application object lifetime. Change-Id: Ibf55e2a6ea1ae6429fce3f0e9d58323111aac374 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| | * High-DPI: restore rounding behavior on AndroidMorten Johan Sørvig2019-12-191-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt 5.14 introduced QApplication::scaleFactorRoundingPolicy, where the default policy rounds the scale factor to an integer, which matches Qt's behavior on Windows and X11. However, Qt has never rounded scale factors on Android. Restore the historical behavior and document the platform difference. Change-Id: I0f8e8fb65e3874338ea290bbb12da350da22f099 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| | * macOS: Deliver theme changes synchronouslyTor Arne Vestbø2019-12-192-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise the expose event that AppKit triggers will be delivered before we've propagated the theme change, and we fail to draw the UI using the new theme. Change-Id: I502122a2bf02a866d136106d831f0c2a0dfe26f2 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | * Doc: Add since versionPaul Wicking2019-12-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | for QCursor::swap and QOperatingSystemVersion::currentType. Fixes: QTBUG-80854 Fixes: QTBUG-80891 Change-Id: Ia256fa0d3ad4665f44b933f5a4a8d4ee87e9fc13 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
| | * Sync implementation of QGuiApplication and QApplication setPaletteTor Arne Vestbø2019-12-171-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | The two static setPalette methods in QApplication and QGuiApplication should have the same behavior in terms of what signals and events they emit. Change-Id: I54579d490e31f3783e2d4fea689ca799a070ff1d Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | * Let sendApplicationPaletteChange() decide when it needs to exit earlyTor Arne Vestbø2019-12-171-2/+4
| | | | | | | | | | | | | | | Change-Id: I7a8e6c0b54d2a16a17b292a4102e05f743bcbe29 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | * Remove ApplicationResourceFlags::ApplicationPaletteExplicitlySetTor Arne Vestbø2019-12-171-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | After 8fb881900c7b it's tracked by AA_SetPalette. Since the latter is publicly observable we remove the internal flag instead. Change-Id: Ie69799f1b45d68017cb9eaab2a9986cc9ac9ca38 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * | QWindowSystemInterface: use QBasicMutex and qt_scoped_lockMarc Mutz2019-12-182-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | There's no reason to use a class-static mutex object here. Use a namespace-static QBasicMutex, port to qt_scoped_lock. Change-Id: Ia9bd3c2fadbf1da25ef79bb393c899b678cbc182 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Liang Qi2019-12-161-1/+1
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/ssl/qsslsocket.cpp src/widgets/kernel/qapplication.cpp Change-Id: Ib7421cc2df59d0969f89b3fbd65a17ea76ffef3b
| | * Doc: Fix qdoc compilation errors qtbaseNico Vertriest2019-12-121-1/+1
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-79824 Change-Id: I6557de598de1931fc30556951d35783d02b83abe Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | | QPalette: fix debug stream operatorVitaly Fanaskov2020-01-031-26/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | Current implementation takes both color group and color role into account. Code readability is also improved. Fixes: QTBUG-78544 Change-Id: Ibfa925f3e4cb0be89915607eee142926e05000b5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | Fix QPalette::isBrushSetVitaly Fanaskov2020-01-022-39/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous implementation did not take into account different color groups in resolve mask. It led to some issues when resolving a palette or checking whether a brush is set or not. Task-number: QTBUG-78544 Change-Id: I9b67b2c444eb62c022643022a874dc400005e6ee Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | QPalette::setBrush: remove a workaround for PlaceholderTextVitaly Fanaskov2019-12-181-26/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | This partially reverts ebd3a13b807c6af2684b42d3912549caf7ef82aa removing the part that was intended to be removed in Qt 6. Task-number: QTBUG-78544 Change-Id: I4b7eb922c46e44411717f80234fad8ad7dd09aef Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-12-112-0/+9
|\| | | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp Change-Id: I6b82507bf9a80a374c40393e72f4843f1557de89
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Liang Qi2019-12-102-0/+9
| |\| | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/network/kernel/qnetworkinterface/BLACKLIST Change-Id: I1e8866c63b54bcd95fc2a044276ee15b7f60e79a
| | * Move the tooltip out of the way of very large mouse cursorsVolker Hilsheimer2019-12-092-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Users that have large mouse pointers configured in their settings can not see tooltips, as they are obscured by the pointer. Native applications on Windows and macOS have the same problem, which includes the tooltips for the minimize/maximize/close controls in the window frame of e.g. Explorer. Introduce QPlatformCursor::size that returns a value that is based on the user's settings, or a default value. We can then use that value to move the tooltip out of the way. On Windows, the calculation of the cursor size is based on experimenting with the settings, which are in logical independent pixels. The placement of the tooltip attempts to keep existing behavior, and to not end up with a tooltip that's very far away from the tip of the arrow even for very large mouse cursors. [ChangeLog][QtWidgets][QToolTip] Make sure that the tooltip is not obscured by very large mouse pointers on Windows and macOS. Change-Id: I8e13b7a166bfe8b59cef4765c950f90fefeaef9d Fixes: QTBUG-79627 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-12-0930-188/+188
|\| | | | | | | | | | | Change-Id: Ia24cc8b86def0d9d9c17d6775cc519e491b860b1
| * | Tidy nullptr usageAllan Sandfeld Jensen2019-12-0630-188/+188
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move away from using 0 as pointer literal. Done using clang-tidy. This is not complete as run-clang-tidy can't handle all of qtbase in one go. Change-Id: I1076a21f32aac0dab078af6f175f7508145eece0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>