summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows
Commit message (Collapse)AuthorAgeFilesLines
* Windows QPA: Fix accessibility focus event for table/tree/listAndre de la Rocha2021-03-251-0/+11
| | | | | | | | | | | | | The focused element within a table, tree or list was not being informed in the UI Automation focus change events, causing the focused element to be missed by screen readers. Fixes: QTBUG-91029 Change-Id: I738502e6871358508b4510763018837c304b618e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> (cherry picked from commit f1eccab04e01b3acc1a4b4c6a5fe7b3af3e2dcba) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Return the result we have already when getting an object with no nameAndy Shaw2021-03-241-1/+1
| | | | | | | | | | | This will ensure that something is set for the AutomationId based on the actual object and the parents that do have object names until it reaches one without an object name. Change-Id: I205485bc0ba772e321879e00e64ea8e1d8f1ba91 Reviewed-by: André de la Rocha <andre.rocha@qt.io> (cherry picked from commit 5577cbaac59e7fc198ea2c98c1e4268779fbf0b4) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Revert "Windows QPA: Call QWSI::flushWindowSystemEvents() from WM_PAINT for ↵Morten Johan Sørvig2021-01-131-3/+2
| | | | | | | | | | | | | | | | | | | | full update only" This reverts commit a81dfb32d6f9e7a407567511c20b59e537f6a063. Paint immediately on WM_PAINT in all cases in order to avoid flicker on resize. The cases mentioned in commit a81dfb should no longer apply: - QTBUG-38327: QGLWidget is not supported in Qt 6. - QTBUG-39842: Fixed by using ExcludeUserInputEvents. Fixes: QTBUG-89688 Change-Id: If82cf7703d6663982769048e86a7060223730ce7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> (cherry picked from commit 9f894788dda8407c6221aaa1491cd54a5a2b4cb7)
* Windows QPA: Fix crashes when using screen reader with Q(Plain)TextEditFriedemann Kleint2021-01-121-2/+6
| | | | | | | | | | Make sure the search start with valid values. Task-number: QTBUG-89354 Change-Id: I5b5100db89c62f23748b5c88e9188cfe3811e6e8 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> (cherry picked from commit 7b7dda654acda884b8ebf6e7f2bfed315a566801) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Send Qt::Key_MediaTogglePlayPause for VK_MEDIA_PLAY_PAUSEAllan Sandfeld Jensen2021-01-081-1/+2
| | | | | | | | | | | Speculative fix to get the right keys in WebEngine Fixes: QTBUG-89915 Change-Id: I79519b715a1415dccfc4601aae5025b3222a79ae Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> (cherry picked from commit d5a980df97051dea4b952a1f7c9558316454ccf0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Windows QPA: Pass device for synthesized touch/tablet eventsFriedemann Kleint2020-11-274-12/+41
| | | | | | | | | | | | Add the overloads for mouse events with device/without timestamp and pass the active tablet or touch device. Task-number: QTBUG-88678 Task-number: QTBUG-46412 Change-Id: I8695b493540d0cbf50e9c72afe870a7633de3ab9 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> (cherry picked from commit d3caea04dc6c3a7072a43294b70bec860c199bf1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Adjust code format, add space after 'if'Zhang Sheng2020-11-161-1/+1
| | | | | | Change-Id: Ice081c891ff7f4b766f49dd4bd5cf18c30237acf Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: hjk <hjk@qt.io>
* Windows QPA: Fix a warning about deprecated conversion of keysFriedemann Kleint2020-11-121-1/+1
| | | | | | | | Use QKeyCombinaton::toCombined(). Change-Id: I829f4e88ad316a6f4f5165c1d929f2dcc83f83de Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Windows QPA: Use a QSharedPointer for the touch deviceFriedemann Kleint2020-10-266-32/+27
| | | | | | | | | | For reasons of symmetry with the tablet devices. As a drive by, give it more distinct IDs. Task-number: QTBUG-46412 Change-Id: Ie667621246b26db6fdda84c5ff2455fe38633cb3 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Deprecate QVariant::TypeLars Knoll2020-10-232-2/+2
| | | | | | | | | It's been obsolete for a long time already. Make sure the compiler now warns about it and remove all remaining uses in qtbase. Change-Id: I0ff80311184dba52d2ba5f4e2fabe0d47fdc59d7 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Windows QPA/WmPointer: Register tablet devices of pointer handlerFriedemann Kleint2020-10-202-13/+64
| | | | | | | Task-number: QTBUG-46412 Change-Id: Ib9b5fd6056a5474ce46c7bde53be7a12c1494611 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Windows QPA/wintab: Register tablet devicesFriedemann Kleint2020-10-202-117/+231
| | | | | | | | | | | | | | | | Inherit a class from QPointingDevice with a shared pointer to the data for a physical cursor. As a drive-by, keep the event time in QWindowsTabletSupport for leave proximity events that do not have a time associated. The previous code was relying on QWindowSystemInterface for this, which may be at odds with the tablet's time. Refactor and streamline the code a bit. Task-number: QTBUG-46412 Change-Id: I2f4fab25a49a9d9f1befbd7fc040e8eb23be71ff Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* MinGW: Fix static build using PCHCristian Adam2020-10-091-0/+6
| | | | | | | | | | | | | | | | | | The value of NTDDI_VERSION is computed from _WIN32_WINNT. It makes sense to keep these two in sync. The value used to create the PCHs for _WIN32_WINNT is 0x601, and qwindowspointerhandler.cpp requires for MinGW 0x603. Since the precompile header value cannot be undefined while compiling the source file, it's better not to use the PCH for this particular source file. These problems surface in a static build, in a regular build for some reason the PCH for plugins is not used. Change-Id: Id724490deb9c695ac00b26cd300f9d2382019ea2 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Rename the new platform APIs from QPlatformInterface to QNativeInterfaceTor Arne Vestbø2020-10-078-19/+19
| | | | | | | | | | | | We were already using the 'native' nomenclature when referring to these kinds of APIs, e.g. when talking about native handles, or the existing QPlatformNativeInterface on a QPA level. Using 'native' for the user facing APIs also distinguishes them from the 'platform' backend layer in QPA and elsewhere. Change-Id: I0f3273265904f0f19c0b6d62471f8820d3c3232e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* WinTab: Switch stylus pointer type when the tablet is in the tablet proximityDmitry Kazakov2020-10-061-4/+21
| | | | | | | | | | | | | | | | | | | Some convertible tablet devices have a special stylus button that converts the stylus into an eraser. Such button can be pressed right when the stylus is in tablet surface proximity, so we should check that not only during proximity event handling, but also while parsing normal wintab packets. Make sure that we don't switch tablet pointer type while any **mapped** stylus button is pressed. Pressing the "eraser" button is reported in pkButtons, but it maps to none by CSR_SYSBTNMAP https://bugs.kde.org/show_bug.cgi?id=405747 https://bugs.kde.org/show_bug.cgi?id=408454 Pick-to: 5.15 Change-Id: I1d254f0cf79be6ceb194b1c4b314a11831f50170 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* WinTab: Fix updating tablet pressure resolution on every proximity enter eventDmitry Kazakov2020-10-061-0/+5
| | | | | | | | | | | | | The user can switch pressure sensitivity level in the driver, which will make our saved values invalid (this option is provided by Wacom drivers for compatibility reasons, and it can be adjusted on the fly). See the bug: https://bugs.kde.org/show_bug.cgi?id=391054 Pick-to: 5.15 Change-Id: I6cfdff27eaf5a587bf714871f1495a7ea150c553 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Windows QPA: Fix building with OpenGL disabled after "QFlags: remove ↵Martin Storsjö2020-10-051-1/+1
| | | | | | | deprecated constructor" Change-Id: Icf07bc475ba8f8f9cbe76169dc3dede9ba703292 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* CMake: Regenerate projects to use new qt_internal_ APIAlexandru Croitor2020-09-232-26/+26
| | | | | | | | | | | Modify special case locations to use the new API as well. Clean up some stale .prev files that are not needed anymore. Clean up some project files that are not used anymore. Task-number: QTBUG-86815 Change-Id: I9947da921f98686023c6bb053dfcc101851276b5 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Windows QPA: Fix warnings about deprecated operator + for keysFriedemann Kleint2020-09-221-2/+2
| | | | | | Pick-to: 5.15 Change-Id: I48bd41465e62fef6f5ddcf235716a4be5eff46d4 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Cleanup API of QMimeDataLars Knoll2020-09-214-25/+24
| | | | | | | | | | | | | Do not use QVariant::Type anymore, instead use QMetaType For some reason, this pushed the qvariant autotest over the limit where MSVC requires the /bigobj flag, so add that one. [ChangeLog][QtCore][QMimeData] The signature of the virtual retrieveData() function has changed and now takes a QMetaType instead of a QVariant::Type. Change-Id: Ib46773bd731ee2177b1ef74d8162d744be7017ef Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Windows QPA: Remove unused functionFriedemann Kleint2020-09-161-10/+0
| | | | | | | | | | Amends 983132212c7f3541a8c5fbaf4c5309d92345107f. Pick-to: 5.15 Task-number: QTBUG-86575 Task-number: QTBUG-85676 Change-Id: Id2ea85738a2565ec0d9f33ccb264c11754e1e5ff Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Windows QPA: Fix build with mingw64/Win32 threadingFriedemann Kleint2020-09-151-7/+25
| | | | | | | | | | | | | For this build, cxx11_future is not available and thus QThread::create() as introduced by ed114b728d9dc5265333c593254d9f6527464a60 does not work. Revert back to implementing a QThread. Pick-to: 5.15 Fixes: QTBUG-86575 Task-number: QTBUG-85676 Change-Id: I86a91f6bcdfc88804b35bf617362d92f37e51dea Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Switch QSurfaceFormat::colorSpace to a QColorSpaceAllan Sandfeld Jensen2020-09-151-3/+4
| | | | | | | Allows more flexibility in the future. Change-Id: Idcf2d8ddaee268a7b5d55379ccb42dd9b3c33abf Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Rename QLibraryInfo::location() to path()Lars Knoll2020-09-121-1/+1
| | | | | | | | As per ### Qt6 comment. Also rename the LibraryLocation enum to LibraryPath. Change-Id: I556025a19c5bcdf2ff52598eaba32269522d4128 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Clang 10: Fix missing-exception-spec error on WindowsKai Koehne2020-09-111-0/+1
| | | | | | | | | | | | Fix error qtbase/src/plugins/platforms/windows/qwindowsdropdataobject.cpp:67:25: error: 'GetData' is missing exception specification '__attribute__((nothrow))' [-Werror,-Wmissing-exception-spec] QWindowsDropDataObject::GetData(LPFORMATETC pformatetc, LPSTGMEDIUM pmedium) Follow the example of just disabling microsoft-exception-spec here. Change-Id: I61feb59e188bff7fdfb30e88f8a06c61ec808828 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Port from devicePixelRatioF() to devicePixelRatio()Morten Johan Sørvig2020-09-101-2/+2
| | | | | | | This ports all of QtBase. Change-Id: If6712da44d7749b97b74f4614a04fac360f69d9e Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Fix a number of MSVC integer conversion warningsFriedemann Kleint2020-09-101-1/+1
| | | | | | | | Mostly related to qstrlen(). Change-Id: I69e2052c83766e4fc466ed398d0d0eac011a77ec Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Windows QPA: Enable toggling Windows transparencyFriedemann Kleint2020-09-082-4/+7
| | | | | | | | | | | | | | Change QWindowsWindow::format() to return the QWindow's requested format instead of storing it as do the other platforms. This will cause the alpha (layered flag) to be adapted in QWindowsBackingStore::flush(). Note that it does not fix the issue; the window does not update correctly after changing WS_EX_LAYERED. Pick-to: 5.15 Task-number: QTBUG-60822 Change-Id: I3facd93f993b3b422b6818d55c1bce884fb57234 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* QWindowsKeyMapper: fix mixed math between int and enum/flagsGiuseppe D'Angelo2020-09-051-3/+3
| | | | | | | | | Either do it between ints, or cast to the right types before doing it. This should enable removing operator+ and - between int and QFlags. Change-Id: I30ecc03566cff8ce880b048ba3a9d7d50f3c8509 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QIconEngine: move away from virtual_hook usageMorten Johan Sørvig2020-08-271-1/+1
| | | | | | | | | | | | | | | | | | | | | Upgrade existing functions to be virtual functions: - virtual QString iconName() - virtual bool isNull() - virtual QPixmap scaledPixmap(...) - virtual QList<QSize> availableSizes(...) Make all of them non-const and remove the const_casts in the implementation. Keep the default implementation which calls virtual_hook(), for compatibility. Note: availableSizes was already virtual, but now loses the “const”. Port two overrides in the platform themes. Keep virutal_hook() around for future expansion. Task-number: QTBUG-85885 Change-Id: I76d0c9f75bfd6ca870c669047d4ef18b82c692e5 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Smart pointers: port to explicit operator boolGiuseppe D'Angelo2020-08-261-1/+1
| | | | | | | | | | | | | Enough with the restricted bool trick; use the established solution. [ChangeLog][Potentially Source-Incompatible Changes] QScopedPointer, QSharedPointer and QWeakPointer's conversion operator towards bool is now explicit. In some cases this may require an explicit cast towards bool that was not needed before (notably, when returning an object of these types from a function that actually returns bool). Change-Id: I02b89278e75b7e7493ee7e35460504719e00f028 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Properly deprecate Qt::MidButton in favor of Qt::MiddleButtonEdward Welbourne2020-08-222-14/+14
| | | | | | | | | | | | MidButton had its // ### Qt 5: remove me upgraded to Qt 6 at 5.0; but it dates back to 4.7.0 Replace the many remaining uses of MidButton with MiddleButton in the process. Pick-to: 5.15 Change-Id: Idc1b1b1816673dfdb344d703d101febc823a76ff Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Replace Qt CONSTEXPR defines with constexprAllan Sandfeld Jensen2020-08-141-4/+4
| | | | | | | | Both normal and relaxed constexpr are required by our new minimum of C++17. Change-Id: Ic028b88a2e7a6cb7d5925f3133b9d54859a81744 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Windows QPA: Fix omitted Drop eventAndre de la Rocha2020-08-131-17/+6
| | | | | | | | | | | | | | | In some rare cases, when a mouse button was released while the mouse was static, a drag and drop operation would not be completed until the mouse was moved. Probably due to a Windows bug, the mouse button state supplied through the arguments of the IDropSource callbacks, called from the internal DoDragDrop() loop, would not reflect the actual mouse button state in this case. This change makes the callback implementation use the actual mouse button state provided by GetAsyncKeyState(). Fixes: QTBUG-85300 Pick-to: 5.15 Change-Id: I3405bdf7076ddc46415cd274a502434bdc0d2f3f Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Windows: Remove method not existing in base classKai Koehne2020-08-121-1/+0
| | | | | Change-Id: Ifd016eabb07849fb3f310593ebe5301d3a9b09c1 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Fix build with mingw gcc 9 and -Wsuggest-overrideKai Koehne2020-08-108-36/+46
| | | | | Change-Id: I780b0761a7f6b19022116b738efa7aca1378b715 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Remove last remaining bits of QtPlatformHeadersTor Arne Vestbø2020-08-043-4/+1
| | | | | | Task-number: QTBUG-84220 Change-Id: I951e04bfe9358a99951d1d61ff47b675584b7f81 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Windows: Prevent event processing during QDesktopServices::openUrl()Friedemann Kleint2020-07-291-4/+24
| | | | | | | | | | | | The platform implementation uses the Win32 API ShellExecute(), which may spin an event loop to do COM processing, causing things like QMetaCallEvent being processed. Run it in a thread to suppress this. Pick-to: 5.15 Fixes: QTBUG-85676 Change-Id: I240ca78b41b39ded22e466662ffce8e9b03c10a2 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Windows QPA: Move some internal functions to the new interfaceFriedemann Kleint2020-07-284-71/+51
| | | | | | | | | | | | | Move createMessageWindow(), the GPU detection for qtdiag and the async expose setting (used by Active Qt) from QWindowsNativeInterface to QWindowsApplication. Remove unused registerWindowClass() and use logFontToQFont() directly from the font database. Task-number: QTBUG-83252 Change-Id: I9c72351970b47457d08125557c2580016c66e586 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Windows QPA: Move mime-type related classes to the new interfaceFriedemann Kleint2020-07-288-82/+63
| | | | | | | | | | | | Move QWindowsMime (which was a public class in Qt 4 and moved to the QPA plugin in Qt 5) to the platform namespace and add register functions to the native application. Move in test code from QtWinExtras. Task-number: QTBUG-83252 Change-Id: Iaac440e2d5cb370110919921b1eeb779600b5b65 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QWindowsServices: ungarble the URLThiago Macieira2020-07-271-3/+3
| | | | | | | | | | | | QUrl::toString always encodes as UTF-8, regardless of what the local encoding is. So this produces garbage on Windows (and any non-UTF-8 system, but those don't exist any more outside of Windows, by definition). So use %ls to keep the UTF-16. Task-number: QTBUG-85745 Pick-to: 5.15 Change-Id: Iea47e0f8fc8b40378df7fffd162584f98e5bd633 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Windows QPA: Potential crash fix for WineFriedemann Kleint2020-07-271-2/+4
| | | | | | | | | Add a check for theme instance. Pick-to: 5.15 Fixes: QTBUG-85734 Change-Id: I10aced73379cd5e0b49d5cee08ceead060397a54 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Windows QPA: Move dark mode handling to the new interfaceFriedemann Kleint2020-07-259-37/+43
| | | | | | | | | | Move options to new interface, making them settable from code on this occasion. Task-number: QTBUG-83252 Change-Id: Idd80667c502a8cde5d7c66d7e597ea34c22738e7 Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Windows QPA: Move window properties to the new interfacesFriedemann Kleint2020-07-244-38/+15
| | | | | | | | Affects the custom margin used by QWizard. Task-number: QTBUG-83252 Change-Id: Iffda043f106282f682e119ec955fa2b2eb0f259e Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Add QPlatformInterface::Private::QWindowsWindowFriedemann Kleint2020-07-224-16/+25
| | | | | | | | Remove QWindowsWindowFunctions Task-number: QTBUG-83252 Change-Id: Iacfdf2e0f430208901c182e461c4617e1ef526ce Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Windows QPA: Move the touch types API from platformheaders into QtGuiFriedemann Kleint2020-07-227-25/+72
| | | | | | | | | | | | | | | | | | | | Change TouchWindowTouchType(s) to be (global) property of QGuiApplication's native Windows interface since it does not make sense to set it per window. It appears the previous code setting the types per Window has never worked since registerTouchWindow() bailed out due to the checks for the flags TouchRegistered and IsTouchWindow() (setting in HCBT_CREATEWND). In addition, registering windows for touch after plugging in a device would not observe the setting. Move the checks around to make this work. Task-number: QTBUG-41433 Task-number: QTBUG-48849 Task-number: QTBUG-83252 Change-Id: I4306fdf13208f6eef22655875f3bd1769270e617 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Start the native interface QWindowsApplicationFriedemann Kleint2020-07-2114-71/+172
| | | | | | | | | | | | Implement the static parts of QWindowsWindowFunctions. Move some things around and make them static in tablet support to make this easier. Task-number: QTBUG-83252 Change-Id: I24c3b0b3c6548eb96c4f3285a4e46385a1e79ef5 Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Fix some MSVC int conversion warningsFriedemann Kleint2020-07-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | kernel\qmetaobjectbuilder.cpp(1279): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data kernel\qmetaobjectbuilder.cpp(1432): warning C4267: '+=': conversion from 'size_t' to 'int', possible loss of data sax\qxml.cpp(1275): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data text\qfontsubset.cpp(920): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data text\qfontsubset.cpp(920): warning C4267: 'initializing': conversion from 'size_t' to 'const int', possible loss of data text\qtextengine.cpp(2664): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data text\qtextengine.cpp(2665): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data text\qtextengine.cpp(2706): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data text\qtextengine.cpp(2707): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data itemviews\qbsptree.cpp(60): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) kernel\qprintengine_win.cpp(1558): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data qsql_odbc.cpp(804): warning C4267: 'argument': conversion from 'size_t' to 'SQLINTEGER', possible loss of data qsql_odbc.cpp(822): warning C4267: 'argument': conversion from 'size_t' to 'SQLINTEGER', possible loss of data qsql_odbc.cpp(1585): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data qsql_odbc.cpp(1602): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data qwindowsmime.cpp(770): warning C4267: '+=': conversion from 'size_t' to 'int', possible loss of data windows\qwindowsmime.cpp(770): warning C4267: '+=': conversion from 'size_t' to 'int', possible loss of data Change-Id: I04fbe17b9782f4c2704933fc005449b1e992475e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Refactor pointer event hierarchyShawn Rutledge2020-07-102-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some goals that have hopefully been achieved are: - make QPointerEvent and QEventPoint resemble their Qt Quick counterparts to such an extent that we can remove those wrappers and go back to delivering the original events in Qt Quick - make QEventPoint much smaller than QTouchEvent::TouchPoint, with no pimpl - remove most public setters - reduce the usage of complex constructors that take many arguments - don't repeat ourselves: move accessors and storage upwards rather than having redundant ones in subclasses - standardize the set of accessors in QPointerEvent - maintain source compatibility as much as possible: do not require modifying event-handling code in any QWidget subclass To avoid public setters we now introduce a few QMutable* subclasses. This is a bit like the Builder pattern except that it doesn't involve constructing a separate disposable object: the main event type can be cast to the mutable type at any time to enable modifications, iff the code is linked with gui-private. Therefore event classes can have less-"complete" constructors, because internal Qt code can use setters the same way it could use the ones in QTouchEvent before; and the event classes don't need many friends. Even some read-accessors can be kept private unless we are sure we want to expose them. Task-number: QTBUG-46266 Fixes: QTBUG-72173 Change-Id: I740e4e40165b7bc41223d38b200bbc2b403e07b6 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Add ; to Q_UNUSEDLars Schmertmann2020-07-077-12/+12
| | | | | | | | This is required to remove the ; from the macro with Qt 6. Task-number: QTBUG-82978 Change-Id: I3f0b6717956ca8fa486bed9817b89dfa19f5e0e1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>