summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
Commit message (Collapse)AuthorAgeFilesLines
...
* | Merge remote-tracking branch 'origin/5.13' into 5.14Friedemann Kleint2019-09-091-3/+7
|\| | | | | | | | | | | | | Conflicts: tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp Change-Id: Idd3ca5cb9a2b95a4c3513b2a4c8966e6f56193f1
| * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-09-081-3/+7
| |\ | | | | | | | | | Change-Id: I371c5ae1af6f58e32e579671f485b92b586e0b76
| | * Deliver stationary touchpoints that have changed pressureShawn Rutledge2019-09-021-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As a rule, we don't deliver touch events containing only stationary touchpoints. To fix QTBUG-52510 we added an exception in 1bd0ab7050304d9e8989cde77e486947c56b9696 : if the velocity changed, deliver it anyway. Now we need to do the same if the pressure changed. Also, on the customer's hardware, pressure is indicated via ABS_MT_PRESSURE. Change-Id: If7f7088df055d686cdd86967b999e38024f8170f Fixes: QTBUG-77142 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into 5.14Liang Qi2019-09-041-2/+5
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/codecs/qicucodec.cpp src/dbus/qdbusserver.cpp src/gui/painting/qbezier.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp src/plugins/printsupport/cups/qppdprintdevice.cpp Change-Id: I2703128bb64baf5580fbc2c2061b55b0f0611d2a
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-08-241-2/+5
| |\| | | | | | | | | | Change-Id: I60bb714ef11bced075d94addb74d23c3a3975519
| | * QGuiApplication: drop mutex before emitting fontChanged()Marc Mutz2019-08-231-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Emitting a signal executes an unknowable amount of code. We shouldn't hold a mutex while doing so. E.g., if the signal emission causes another call to QGuiApplication::setFont(), the old code would deadlock, since applicationFontMutex is not recursive. Fix by taking a copy of the application font under mutex protection, then dropping the lock for the emission of the signal. Change-Id: Ib2569b3a08af6ef5f38459a19f74cb0db27b7772 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | QtGui: Refactor parsing of the High DPI scaling env variablesFriedemann Kleint2019-09-031-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | Use qEnvironmentVariable() where applicable and refactor the parsing of QT_SCREEN_SCALE_FACTORS to use QStringRef. Task-number: QTBUG-53022 Change-Id: I8956c6cecd7b634679eb5e66d2a87cccaf9e7936 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | | QTouchDevice: don't play ping-pong with q*PostRoutine()Marc Mutz2019-08-301-15/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removing a qPostRoutine is an O(N) operation. It's perfectly ok to keep calling it even if the list has become empty before. Just qAddPostRoutine in the deviceList's ctor and never remove it again. Add a missing qAsConst as a drive-by. Change-Id: I25f824b74012146214568cfccb22c5dba3ca38ef Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* | | Merge remote-tracking branch 'origin/dev' into 5.14Liang Qi2019-08-271-50/+6
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/widgets/kernel/qwidget.cpp src/widgets/kernel/qwidget_p.h src/widgets/kernel/qwidgetrepaintmanager.cpp src/widgets/kernel/qwidgetwindow.cpp tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp Change-Id: Ifae457d0427be8e2465e474b055722e11b3b1e5c
| * | | Remove usages of deprecated APIs of QWheelEventSona Kurazyan2019-08-231-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Replaced the usages of deprecated QWheelEvent::delta() and QWheelEvent::orientation() with QWheelEvent::angleDelta(). In most of the examples it is acceptable to use only the vertical component of angle delta. - Made the docs APIs to build conditionally, based on the deprecation version. Task-number: QTBUG-76491 Task-number: QTBUG-76540 Change-Id: Id4230d483f724af49e4b6349b44881c3944de2a2 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| * | | Clean up the docs of qevent.cppSona Kurazyan2019-08-201-50/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Build the docs for deprecated APIs conditionally, based on deprecation version. - Remove the docs of methods deprecated since 5.0.0, these methods are not compiled anymore. Change-Id: I2c1b038ce125ca737944f4fc4a28e2f6852eaded Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | | Add high-DPI scale factor rounding policy C++ APIMorten Johan Sørvig2019-08-235-31/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This API enables tuning of how Qt rounds fractional scale factors, and corresponds to the QT_SCALE_FACTOR_ROUNDING_POLICY environment variable New API: Qt::HighDPiScaleFactorRoundingPolicy QGuiApplication::setHighDpiScaleFactorRoundingPolicy() QGuiApplication::highDpiScaleFactorRoundingPolicy() Done-with: Friedemann Kleint <Friedemann.Kleint@qt.io> Task-number: QTBUG-53022 Change-Id: Ic360f26a173caa757e4ebde35ce08a6b74290b7d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | | Deprecate QT_AUTO_SCREEN_SCALE_FACTORMorten Johan Sørvig2019-08-231-6/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace by QT_ENABLE_HIGHDPI_SCALING. QT_AUTO_SCREEN_SCALE_FACTOR has the usability problem that it mixes enabling the high-DPI scaling mode with the method of getting screen scale factors (“auto”). Due to this, it ends up with a slightly strange name. QT_ENABLE_HIGHDPI_SCALING matches the C++ option (Qt::AA_EnableHighDPiScaling), and leaves the scale factor acquisition method unspecified, possibly to be set by some other means (like QT_SCREEN_SCALE_FACTORS). Done-with: Friedemann Kleint <Friedemann.Kleint@qt.io> Task-number: QTBUG-53022 Change-Id: I30033d91175a00db7837efc9c48c33396f5f0449 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | | Update QT_SCREEN_SCALE_FACTORSFriedemann Kleint2019-08-232-17/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Store name->factor associations in a global QHash instead of on the QScreen object, making them survive QScreen object deletion, for example on disconnect/ connect cycles. Make factors set with QT_SCREEN_SCALE_FACTORS override the screen factors computed from platform plugin DPI values. This matches the use case for QT_SCREEN_SCALE_FACTORS (but not the general scale factors combine by multiplication”principle) Done-with: Friedemann Kleint <Friedemann.Kleint@qt.io> Task-number: QTBUG-53022 Change-Id: I12771249314ab0c073e609d62f57ac0d18d3b6ce Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | | Move QT_FONT_DPI to cross-platform codeMorten Johan Sørvig2019-08-235-6/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes it possible to test the effects of setting Qt::AA_HighDpiScaling/QT_AUTO_SCREEN_SCALE_FACTOR, with different DPI values on all platforms. This also makes it possible to access the actual DPI values reported by the OS/WS via the QPlatformScreen API. A drawback is that there is no single place to check the environment variable; currently done in three places. This may be further simplified later on. Done-with: Friedemann Kleint <Friedemann.Kleint@qt.io> Task-number: QTBUG-53022 Change-Id: Idd6463219d3ae58fe0ab72c17686cce2eb9dbadd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | | Update Dpi and scale factor computationMorten Johan Sørvig2019-08-234-24/+254
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove pixelScale() in favor of logicalBaseDpi(). Compute scale factor based on logical DPI and logical base DPI, or optionally based on the physical DPI. Add policies for running the scale factor and adjusting the logical DPI reported to the application. The policies are set via environment variables: QT_SCALE_FACTOR_ROUNDING_POLICY=Round|Ceil|Floor|RoundPreferFloor|PassThrough QT_DPI_ADJUSTMENT_POLICY=AdjustDpi|DontAdjustDpi|AdjustUpOnly QT_USE_PHYSICAL_DPI=0|1 Done-with: Friedemann Kleint <Friedemann.Kleint@qt.io> Task-number: QTBUG-53022 Change-Id: I4846f223186df665eb0a9c827eaef0a96d1f458f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | | Compute logical DPI on a per-screen basisMorten Johan Sørvig2019-08-233-15/+13
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The logical DPI reported to applications is the platform screen logical DPI divided by the platform screen scale factor. Use the screen in question when calculating the DPI instead of the values from the main screen. QHighDpiScaling::logicalDpi now takes a QScreen pointer. Done-with: Friedemann Kleint <Friedemann.Kleint@qt.io> Task-number: QTBUG-53022 Change-Id: I0f62b5878c37e3488e9a8cc48aef183ff822d0c4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | Introduce a new feature called easingcurveTasuku Suzuki2019-08-161-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | features.animation and features.scroller depend on the feature. In total, this saves around 180KB from QtCore and 75KB from QtWidgets. Change-Id: I65aac3ec4d50d62424ee33f44b99f3cfb91121d6 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-08-137-19/+30
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/win32-clang-msvc/qmake.conf src/corelib/tools/qlist.h src/gui/painting/qcompositionfunctions.cpp src/gui/painting/qtriangulator_p.h src/gui/text/qfontengine_p.h src/network/kernel/qhostinfo_p.h src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp Done-With: Allan Sandfeld Jensen <allan.jensen@qt.io> Change-Id: Ib8a0308cf77224c4fbdcf56778fdac4a43e37798
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-08-121-0/+2
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: config.tests/arch/write_info.pri Repair architecture config test for the WASM_OBJECT_FILES=1 build mode configure.pri tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp Done-With: Jörg Bornemann <joerg.bornemann@qt.io> Change-Id: I9e12088356eb5bc65b53211cd7a8e330cccd1bb4
| | * Add nullptr guard to QHighDScaling::scaleAndOrigin(QPlatformScreen *)Morten Johan Sørvig2019-08-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Commit b6ded193 added an unconditional dereference of the platformScreen pointer, for calls where nativePostion is non-nullptr. Change-Id: I4a6fbbd0337f91d4fcb76c17b4dc60e1b9ad10ed Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-08-084-4/+11
| |\| | | | | | | | | | Change-Id: I4c0fd501db974fb8339944b8df845336776d80a9
| | * eglfs: Fix raster windowsLaszlo Agocs2019-08-074-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also sanitize the initial WebAssembly hack. Both eglfs and wasm lack the concept of true raster windows. A QWindow with RasterSurface is rendered with OpenGL no matter what. The two platforms took two different approaches to work around the rest of the machinery: - wasm disabled the QOpenGLContext warning for non-OpenGL QWindows, - eglfs forced the QWindow surfaceType to OpenGLSurface whenever it was originally set to RasterSurface. Now, the latter breaks since c4e9eabc309a275efc222f4127f31ba4677259b7, leaving all raster window applications failing on eglfs, because flush in the backingstore is now checking the surface type and disallows OpenGLSurface windows. (just like how QOpenGLContext disallows RasterSurface windows) To solve all this correctly, introduce a new platform capability, OpenGLOnRasterSurface, and remove the special handling in the platform plugins. Change-Id: I7785dfb1c955577bbdccdc14ebaaac5babdec57c Fixes: QTBUG-77100 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-08-052-15/+17
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/generators/unix/unixmake2.cpp src/plugins/platforms/cocoa/qcocoawindow.mm Change-Id: Iba7aa7324f35543e0297a3680956420058cd3630
| | * macOS: Don't require setting all three color buffer sizes in QSurfaceFormatTor Arne Vestbø2019-08-021-12/+0
| | | | | | | | | | | | | | | | | | Change-Id: Iaa6eb4d64f549a31aa5c53145e8b37facec4ea78 Reviewed-by: Andy Nichols <andy.nichols@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| | * QHighDPI: Fix broken scaling of QPoint(F)Friedemann Kleint2019-08-011-3/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For some reason, the overload resolution of the High DPI scale() functions introduced by b6ded193ee64ffe67df6d22e7a23aa1ea9e02ec7 chose the wrong overloads for QPointF and/or QPoint; it fell back to the generic template intended for qreal, QSize, etc, ignoring the origin. Remove the template and spell out all overloads. Fixes: QTBUG-77255 Change-Id: I5661f16f7326f65156f646f430f5a0c71d5302d2 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | QWheelEvent: use QT_DEPRECATED_VERSION_X_5_15Marc Mutz2019-07-311-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | ... in an attempt to get qt5 integration going. Change-Id: I22dd6ff2cb9a6d11620878c432905bd07292220b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Procrastinate QWheelEvent deprecations until 5.15Shawn Rutledge2019-07-232-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It turns out that Qt3D has uses of x() and y() in a header, which is an error rather than just a warning. So we need more time to do a qt5.git submodule update, then fix Qt3D. Amends 7d29807296cb7ccc7f3459e106d74f93a321c493 Change-Id: Ibead628e7094316bb17d5924f6c6f75dbda5826b Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-07-191-1/+1
|\| | | | | | | | | | | Change-Id: I999ba23a27cd897017d15c6ffe41ea8cd008ffb9
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-07-181-1/+1
| |\| | | | | | | | | | Change-Id: I685000c4f33fb3707b2102fae0b58092107dc8f0
| | * Tie QPlatformOpenGLContext to its QOpenGLContext before initializingTor Arne Vestbø2019-07-171-1/+1
| | | | | | | | | | | | | | | | | | | | | So that the context can be referenced during initialization. Change-Id: I9ec69b2431ba1ac6256cb2e969a76f515497e247 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | Finish deprecating obsolete members of QWheelEventShawn Rutledge2019-07-123-182/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Qt 5.0, delta() and orientation() were already marked obsolete, but Widgets and tests have kept on depending on them all this time. We now start using alternative API so they can really be deprecated. All constructors except the newest one are also deprecated. The plan is for all events from pointing devices to have QPointF position() and globalPosition(), so we deprecate the other position accessors. [ChangeLog][QtGui] Obsolete constructors and accessors in QWheelEvent now have proper deprecation macros. What is left is intended to be compatible with planned changes in Qt 6. Change-Id: I26250dc90922b60a6ed20d7f65f38019da3e139e Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | Add mouseDoubleClickDistance and touchDoubleTapDistance to QStyleHintsShawn Rutledge2019-07-082-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Amends ca280bfe3bc551f814d59d25079e098798fbdad7 and 705e3f68df83dca165e3cddb914d3816155323f8 which added these enums only to QPlatformTheme::ThemeHint but not to QPlatformIntegration::StyleHint. Those patches did not add accessors to QStyleHints, probably because the accessors in QStyleHints use the themeableHint() function which takes both enums; so to have an accessor implemented this way, we need it in both enums. But it's getting too silly, since the only platform plugin that modifies MouseDoubleClickDistance is Android, implemented by QAndroidPlatformTheme overriding QPlatformTheme::themeHint(), and thus illustrating that adding the enum to QPlatformIntegration::StyleHint is not the only way to allow a platform plugin to customize the hint. So it seems we need a new way of writing these accessors without needing to duplicate the enum value in QPlatformIntegration::StyleHint. The new version of themeableHint(QPlatformTheme::ThemeHint) falls back on the static QPlatformTheme::defaultThemeHint() accessor. Users should at least be able to see what the default value is; and having these getters will also provide link targets for QtQuick's TapHandler docs. Change-Id: I0f8560062bcd0ca5e6d580071d9fbcf3f07f625f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | QtGui: port from QMutex::Recursive to QRecursiveMutexMarc Mutz2019-07-062-5/+3
| | | | | | | | | | | | | | | Change-Id: I1ce4fcfa1bfb9a89fe3ebe61d049b9b3100fd700 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | qtlite: Fix build with -no-feature-commandlineparserMikhail Svetkin2019-07-032-0/+4
| | | | | | | | | | | | | | | | | | | | | Change-Id: Ie7b7b119073691c0d3b6358f876298fc86cfe9e9 Reviewed-by: Tasuku Suzuki <tasuku.suzuki@qbc.io> Reviewed-by: Timo Aarnipuro <timo.aarnipuro@qt.io> Reviewed-by: Kari Oikarinen <kari.oikarinen@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-07-014-51/+55
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/ssl/qsslsocket_openssl.cpp src/platformsupport/vkconvenience/qvkconvenience.cpp Change-Id: I97ce6ed185f7fdad8102cc58d3cfec0119fd7bb4
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-06-291-5/+9
| |\| | | | | | | | | | Change-Id: I4cb91777e7ae9f462fa219d5b9ebeb277fde49c3
| | * Fix crash with drag cursor handlingJoni Poikelin2019-06-281-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | 7a7c722782a435f7c01b94f48df7a5f4ff4d599e caused a regresssion in some cases. Change-Id: I1089a79534d811b195de663ff664d9ba5a6ac6c5 Fixes: QTBUG-74110 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-06-283-46/+46
| |\| | | | | | | | | | Change-Id: I912bd8851c390302414d3dfb3c8220df5a0d5630
| | * Fix crash when setting QGuiApplication palette before app is availableTor Arne Vestbø2019-06-251-1/+4
| | | | | | | | | | | | | | | | | | Change-Id: Ia154f66a27cba970d179f100e66aa2daab01c9fa Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | * QHighDpi::fromNativePixels: use correct screenMorten Johan Sørvig2019-06-192-45/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calls like QHighDpi::fromNativePixels(point, window) would return device independent coordinates outside any screen in cases where the window is spanning multiple screens and the native point was not on the main screen. Correct this by looking up the correct screen and use its scale factor and origin when scaling coordinates. Task-number: QTBUG-73231 Change-Id: I01a3a42f42121b8d9f4ced2bb0fb023d6ae6bfe7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-06-202-210/+56
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/gui/painting/qdrawhelper.cpp src/network/ssl/qsslsocket_openssl.cpp src/widgets/styles/qstylesheetstyle.cpp Change-Id: Ibe1cd40f46a823c9e5edbe0a3cd16be1e1686b17
* | | Merge remote-tracking branch 'origin/5.12' into devLiang Qi2019-06-252-210/+56
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/gui/painting/qdrawhelper.cpp src/gui/text/qdistancefield.cpp src/gui/text/qdistancefield_p.h src/network/ssl/qsslsocket_openssl.cpp src/plugins/platforms/android/qandroidinputcontext.cpp src/widgets/styles/qstylesheetstyle.cpp Done-With: Timur Pocheptsov <timur.pocheptsov@qt.io> Change-Id: Ia7daad21f077ea889898f17734ec46303e71fe6b
| * | High DPI: Fix crash in QWindow::mapFromGlobal()Friedemann Kleint2019-06-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With Web Engine, QQuickWidget or similar, the code can hit on the offscreen window, when its handle is null. Add a check. Amends 3af7b279177f7fb092f0e0fb9ffc8e8d846ed774. Fixes: QTBUG-76440 Change-Id: I123633d18386efd3dbfb22aad6072e4f0877a62e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * | QHighDpi: Replace fromNative()/toNative() with scale()Morten Johan Sørvig2019-05-141-209/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need one scale() function for each type: the scale factor can be inverted by the caller for the fromNative case. Add a generic templated implementation which will handle simple types. Add add specialization functions for compound types that don't have operator*(), as well as for position types (e.g. QPoint) which account for the origin. There's no need for fromNativePixels() and toNativePixels() overloads for each type; replace with generic implementations which call scale(). Do the same thing for fromNativeLocalPosition(). Some user code is calling fromNative()/toNative() directly, so leave a definition of those functions around for now. Also leave a couple of one-off scaling functions which do not fit the pattern. Also fix “narrowing conversion scaleFactor to int” warning for the QMargins scale function. Change-Id: Ia67accbb670a80dc1747c2e264b97aab75b1251b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | Port from QAtomic::load() to loadRelaxed()Giuseppe D'Angelo2019-06-208-32/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Semi-automated, just needed ~20 manual fixes: $ find \( -iname \*.cpp -or -iname \*.h \) -exec perl -pe 's/(\.|->)load\(\)/$1loadRelaxed\(\)/g' -i \{\} + $ find \( -iname \*.cpp -or -iname \*.h \) -exec perl -pe 's/(\.|->)store\(/$1storeRelaxed\(/g' -i \{\} + It can be easily improved (e.g. for store check that there are no commas after the opening parens). The most common offender is QLibrary::load, and some code using std::atomic directly. Change-Id: I07c38a3c8ed32c924ef4999e85c7e45cf48f0f6c Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-06-144-8/+19
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/generators/makefile.cpp qmake/generators/unix/unixmake2.cpp src/corelib/thread/qthread_unix.cpp tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp Change-Id: I1df0d4ba20685de7f9300bf07458c13376493408
| * | Merge remote-tracking branch 'origin/5.13.0' into 5.13Liang Qi2019-06-111-1/+1
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/wasm/qwasmintegration.cpp src/plugins/platforms/wasm/qwasmintegration.h Change-Id: Idf4c7936513fb1f21daa8f6105b8545f13447bb8
| | * | QOpenGLWindow: set QOffScreenSurface screenMorten Johan Sørvig2019-05-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Required by QWasmOpenGLContext. Task-number: QTBUG-75463 Change-Id: Ie3cb80b50d7c909e6f46a6dec19644bf27cd41e7 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
| * | | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-06-111-7/+7
| |\ \ \ | | | |/ | | |/| | | | | Change-Id: Ic7c790602e4ac3f4a0d3d4630441b28cf76f75fc