summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-08-311-1/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Windows QPA: Call raise unconditionally for popupsFriedemann Kleint2017-08-221-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | A case of nested Qt::WindowStaysOnTopHint may occur when context menus are created on windows with Qt::WindowStaysOnTopHint set. Raise the popup in that case. Amends 329a029c361bcbaf70f3aa919693f0bef48a152f. Task-number: QTBUG-62004 Change-Id: Ifb761edbd42b1447bec30735810c006d02e1aa97 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.9' into dev" into refs/staging/devFrederik Gladhorn2017-08-024-7/+14
|\ \
| * | Merge remote-tracking branch 'origin/5.9' into devOswald Buddenhagen2017-08-024-7/+14
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/xcb/qxcbconnection.h src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp src/plugins/styles/mac/qmacstyle_mac.mm src/widgets/widgets/qdockarealayout.cpp src/widgets/widgets/qmainwindow.cpp src/widgets/widgets/qmainwindowlayout.cpp src/widgets/widgets/qmainwindowlayout_p.h tests/auto/corelib/tools/qlocale/tst_qlocale.cpp tests/auto/other/macnativeevents/BLACKLIST tests/auto/widgets/widgets/qmenu/BLACKLIST Change-Id: Ic8e724b80a65e7b1af25511b0e674d209265e567
| | * Windows QPA: Fix local position reported for enter eventsFriedemann Kleint2017-07-191-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Use QPlatformWindow::mapFromGlobal() instead of QWindow:::mapFromGlobal() as QPA operates in device pixels. Task-number: QTBUG-62028 Change-Id: I64ec4f4c9a536e122676d738db58805b98a45c82 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| | * Windows QPA: Do not call enableNonClientDpiScaling() for embedded windowsFriedemann Kleint2017-07-193-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | Do not call if the property indicating embedded windows is set. Task-number: QTBUG-61972 Change-Id: I8f34dd8a59f1e5c9c8064646bcb15acea115cd68 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| | * Windows QPA: Compare against correct geometry when checking for fullscreenFriedemann Kleint2017-07-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Do not scale the QPlatformScreen's geometry. Fixes tst_QWidget::showFullScreen() when run with a scale factor. Change-Id: I4a2e743303ff70b01fd3d2086281a790737d2c1d Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | | Windows QPA: Store requested geometry before QPlatformWindow::initialGeometry()Friedemann Kleint2017-08-022-7/+10
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When requesting windows with a size of 0x0 for which a default size is determined by QPlatformWindow::initialGeometry(), QWindowsWindow::initialize() did not call handleGeometry() since it compared against the requested geometry obtained after calling QPlatformWindow::initialGeometry(). Store the initial geometry in the context. Amends deb7f9a7c3b2044ef6d6253a3f836fe1837bde6e. Task-number: QTBUG-62177 Task-number: QTBUG-61977 Change-Id: I9e96f2f0b984b9009bebb192f576c92b4409d5d1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Windows QPA: Fix compilation with MinGW 7.1Friedemann Kleint2017-07-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MinGW 7.1 claims the qUuidOf<> specializations are unused: In file included from accessible\qwindowsaccessibility.cpp:59:0: accessible\iaccessible2.h:274:5: error: 'IID qUuidOf() [with DesiredInterface = IAccessible2]' defined but not used [-Werror=unused-function] IID qUuidOf<IAccessible2>() { return IID_IAccessible2; } ^~~~~~~~~~~~~~~~~~~~~ In file included from accessible\qwindowsaccessibility.cpp:59:0: accessible\iaccessible2.h:58:5: error: 'IID qUuidOf() [with DesiredInterface = IAccessibleComponent]' defined but not used [-Werror=unused-function] IID qUuidOf<IAccessibleComponent>() { return IID_IAccessibleComponent; } ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Amends 4f599c5ea180f5246adf2a95c158b50f027a8c21. Change-Id: Iafcfe8b8d8ca9cdf00663f39ad491347b51d3ace Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | Enable IAccessible2 for MinGWFriedemann Kleint2017-07-256-35/+42
| | | | | | | | | | | | | | | | | | | | | | MinGW 5.3 is able to compile the IAccessible2 classes. All that is needed is some way to provide the missing IIDs, which is done via specialization of a function template (similar to the MinGW's __uuidof operator). [ChangeLog][Windows][Accessibility] MinGW builds now support IAccessible2. Change-Id: I218a4b89c81b54aa96f7c743544388631ca9a53e Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devSimon Hausmann2017-07-191-12/+0
|\| | | | | | | | | | | | | | | Conflicts: src/corelib/io/qwindowspipewriter.cpp src/widgets/styles/qcommonstyle.cpp Change-Id: I0d33efdc4dc256e234abc490a18ccda72cd1d9e6
| * Revert "Windows: Fallback to d3d9 when in a VM on VMWare Workstation 12"Andy Shaw2017-07-171-12/+0
| | | | | | | | | | | | | | | | Revert SHA1 - b1708efeeb31242a4a0d932f42caf3808b00bc28 as it causes a problem with QtMultimedia. Change-Id: I0ba366fa6ddccff3715917f5f455b20c73c2e49e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Windows QPA: Implement QPlatformWindow::initialize()Friedemann Kleint2017-07-185-21/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the code that sends geometry change events from QWindowsIntegration::createPlatformWindow() to QWindowsWindow::initialize(), using the obtained geometry from the creation context. Drop the check for window flags since they are not changed. Complements change 4c855a9f9ff523e2753157897100393d14bf2f9e Task-number: QTBUG-61977 Change-Id: I0c23abefc45110cc4bf11e10d65dc7ddbb9d20d5 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devGabriel de Dietrich2017-07-135-11/+61
|\| | | | | | | | | | | | | Conflicts: src/widgets/widgets/qmainwindowlayout.cpp Change-Id: I306b4f5ad11bceb336c9091241b468d455fe6bb6
| * Windows QPA: Fix build with draganddrop disabledFriedemann Kleint2017-07-111-1/+3
| | | | | | | | | | | | Task-number: QTBUG-61885 Change-Id: Ibb4a7ac43785dcdb46afcd5c2081e43df7d9e9a5 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| * Windows: Fallback to d3d9 when in a VM on VMWare Workstation 12Andy Shaw2017-07-111-0/+12
| | | | | | | | | | | | | | | | | | | | On VMWare Workstation 12 it will indicate OpenGL 2.1 support but it is not sufficient enough as it is lacking things needed to use QtWebEngine without crashing. Falling back to d3d9 works fine in this case as d3d11 also crashes. Change-Id: I404867045a74f37d3ecc7e04e669dd305570deeb Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * QWindowsFileIconEngine::filePixmap(): Handle non-existent filesFriedemann Kleint2017-07-081-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pass SHGFI_USEFILEATTRIBUTES/FILE_ATTRIBUTE_NORMAL to ShGetFileInfo() in case a file does not exist to obtain an icon. SHGFI_USEFILEATTRIBUTES cannot be used unconditionally as it breaks custom directory icons. The functionality is then on par with XCB which obtains icons via QMimeDatabase look-up. Task-number: QTBUG-25319 Change-Id: Icd894d97fd8d1a2c4d5d39e86afe89843e6720c4 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
| * Windows QPA: Further restrict windows for WM_DPICHANGEDFriedemann Kleint2017-07-071-3/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Exclude popups among other non-applicable windows types from resizing in WM_DPICHANGED. When resizing was enabled for non-fixed size windows by c854fc5a6be1e94d2ea313a1d0ef637bc3df178f it turned out that context menus were truncated when moving an application from a high resolution to a low resolution monitor. Factor out a function to check for the applicable window types. Amends 886ce572d628e7cd98cc39edcc930ffae951e95e, c854fc5a6be1e94d2ea313a1d0ef637bc3df178f. Task-number: QTBUG-55510 Change-Id: I16fee07f3e11828848ec71cdceadff958cedb13a Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * [Windows] Update hMonitor handles when a display is turned offAlexandru Croitor2017-07-061-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In a multi-monitor setup, when the main display is turned off or disconnected, all remaining monitors have their hMonitor handle changed. Qt did not store these updated handles, which led to not posting the WindowScreenChanged event when a window was moved to a different DPI-scaled display, leading to e.g. improperly scaled popup menus. The fix consists in updating the hMonitor handles whenever a new monitor is connected or disconnected. Change-Id: Id2ca2c128510d9ff3e9746eb33e86dce8f6c4c83 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * Windows QPA: Take hasBorderInFullScreen into account when checking for ↵Friedemann Kleint2017-07-051-0/+2
| | | | | | | | | | | | | | | | | | | | | | fullscreen Add a margin to the window geometry. Task-number: QTBUG-61595 Change-Id: I12c557d7cfb1fe954a9845848c0777817c4cbf27 Reviewed-by: Thomas Sondergaard <thomas@sondergaard.cc> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Fix an egregious misnaming, s/deg([XY])/rad$1/gEdward Welbourne2017-07-071-4/+4
| | | | | | | | | | | | | | | | The angles in question were in radians, not degrees; we get them from std::atan(). Change-Id: Ifd60efbd975997ffca02e45ae884fb75e59806b4 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Relieve platform plugins of having to persist geometry on WM callbacksTor Arne Vestbø2017-07-071-1/+0
| | | | | | | | | | | | | | | | | | We can offload this to QGuiApplication, just like the geometry of the QWindow is set. This ensures that all platforms behave the same, and that the documentation of QPlatformWindow::setGeometry is adhered. Change-Id: I19dbc32cb4fb146d716ec289c28030a547d3afaa Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-07-061-1/+1
|\| | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I43531e087bb810889d5c1fbfcdffb29b78804839
| * Windows QPA: Correctly check for fixed sized windows in WM_DPICHANGEDFriedemann Kleint2017-07-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Use Qt's flags instead of WS_DLGFRAME which matches WS_CAPTION as well (WS_BORDER | WS_DLGFRAME). Amends 886ce572d628e7cd98cc39edcc930ffae951e95e. Task-number: QTBUG-58959 Change-Id: Ifdc106667d67cc6f5d3611806aae1035742fb882 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Use qRadiansToDegrees() and qDegreesToRadians() more widelyEdward Welbourne2017-07-051-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Especially in examples, where we should show off our convenience functions, prefer calling these functions over doing arithmetic with M_PI (or approximations thereto) and 180 (give or take simple factors). This incidentally documents what's going on, just by the name of the function used (and reveals at least one place where variables were misnamed; the return from atan is in radians, *not* degrees). Task-number: QTBUG-58083 Change-Id: I6e5d66721cafab423378f970af525400423e971e Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-07-044-10/+8
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qprocess_unix.cpp src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbwindow.cpp src/widgets/util/util.pri tests/auto/corelib/thread/qthread/qthread.pro tests/auto/corelib/thread/qthread/tst_qthread.cpp Change-Id: I5c45ab54d46d3c75a5c6c116777ebf5bc47a871b
| * Windows code: Add Q_FALLTHROUGH or break to unmarked fallthroughs seen by GCC 7Friedemann Kleint2017-06-282-1/+2
| | | | | | | | | | | | | | Rearrange code handling QtWindows::DisplayChangedEvent. Change-Id: If9f32516108fb64c4a252c84392f2fd7f1872bf1 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| * Convert features.tabletevent to QT_CONFIGStephan Binner2017-06-283-9/+6
| | | | | | | | | | Change-Id: Ibd7ed7f269a64afddadee70979b20f1c58398378 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Remove requirement to call QWindow::setMask after creating windowTor Arne Vestbø2017-06-281-0/+3
| | | | | | | | | | | | | | | | | | | | | | Like other QWindow properties we can just store it, and the platform window should pick it up on creation like other properties. [ChangeLog][QtGui][QWindow] setMask() no longer requires the window to be created to have an effect; it can be set at any time. Change-Id: I55b616363801b770bd61bda5325b443013b99866 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-06-1910-44/+37
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qprocess_unix.cpp src/corelib/io/qprocess_win.cpp src/plugins/platforms/android/qandroidplatformintegration.h src/plugins/platforms/windows/qwindowscontext.cpp src/plugins/platforms/windows/windows.pri src/tools/uic/cpp/cppwriteinitialization.cpp src/widgets/doc/src/widgets-and-layouts/gallery.qdoc Change-Id: I8d0834c77f350ea7540140c2c7f372814afc2d0f
| * Windows QPA: Port to new feature systemFriedemann Kleint2017-06-0810-51/+44
| | | | | | | | | | | | | | | | | | Replace all checks for DEFINES in windows.pri by proper configure system checks as they no longer seem to work. Task-number: QTBUG-61192 Change-Id: I625c9de0812fd376d06eacb065d3a32a499b6b00 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Native Windows file dialog: Observe Windows Explorer "Show hidden files" settingFriedemann Kleint2017-06-134-16/+30
| | | | | | | | | | | | | | | | | | | | Extract a helper function to read the setting and use that in file dialogs and tray icon. Task-number: QTBUG-60593 Change-Id: I03cf1e45611690a128bf2cc17eba5dff23b86969 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | QPlatformCursor: Add functions for setting/clearing override cursorsFriedemann Kleint2017-06-133-3/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QPA is modeled on the assumption that the cursor is a property of the window and therefore sets the override cursors on all windows. However, on macOS and Windows, the cursor is set per application (or screen). On these platforms, the per window cursor setting needs to be emulated which is a source of bugs especially for override cursors. Add new virtuals to QPlatformCursor allowing to set override cursors which can be implemented by directly setting the cursor on those platforms. Task-number: QTBUG-40122 Task-number: QTBUG-61133 Change-Id: I31d6a927128d22bb1620a8ace35988c0e126236e Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-06-071-2/+1
|\| | | | | | | | | | | | | Conflicts: src/widgets/widgets/qmenu.cpp Change-Id: I6d3baf56eb24501cddb129a3cb6b958ccc25a308
| * Revert "Win: If the combined key is unknown then fall back to the original ↵Friedemann Kleint2017-05-311-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | key pressed" The change has been found to break Ctrl+C/V shortcuts when using a Russian keyboard layout. This reverts commit c6ecbd4762dd753d34a8ed36bbb4ef3885a2f0fe. Task-number: QTBUG-61086 Change-Id: I0dce708b1a65b08ea10317d723c38b0414cbac7f Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-05-292-4/+13
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf mkspecs/common/msvc-desktop.conf mkspecs/win32-g++/qmake.conf mkspecs/win32-icc/qmake.conf src/platformsupport/fontdatabases/mac/coretext.pri src/plugins/platforms/cocoa/qcocoawindow.h src/plugins/platforms/cocoa/qcocoawindow.mm Change-Id: I74a6f7705c9547ed8bbac7260eb4645543e32655
| * Merge remote-tracking branch 'origin/5.9.0' into 5.9Liang Qi2017-05-191-2/+9
| |\ | | | | | | | | | Change-Id: Ia8ac1960387c0f78c32f9d0385bb0aa9a8209af1
| | * Restore behavior of using libEGL and libGLESv2 as default for angleOliver Wolff2017-05-111-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As Qt applications using OpenGL are linked against these libs, merging them into QtANGLE by default (780105f9062dec350bbe2a6800c40db3e6382578) was a binary incompatible change. This change restores the default behavior to the one before given change. If the user wants the libraries to be merged, he can pass combined-angle-lib to configure. Task-number: QTBUG-60373 Change-Id: Iedbd3f2ce9284fdde924cfae8d915d6d5fef00db Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * | Windows QPA: Do not raise/lower windows with Qt::WindowStaysOnTop/BottomHintFriedemann Kleint2017-05-151-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prospectively helps to fix Qt::WindowStaysOnTopHint not working reliably on Windows by preventing HWND_TOPMOST being cleared in raise(). Task-number: QTBUG-50271 Change-Id: I88f916a1cf8a2082236360b9eab874ad22b85762 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | | Merge remote-tracking branch 'origin/5.9' into devFrederik Gladhorn2017-05-101-8/+13
|\| | | | | | | | | | | Change-Id: I172e3e19ddcc5b7665e6c8382d725e7cc4f9794f
| * | Windows QPA: Call InvalidateRect() for GL windows when Aero is offFriedemann Kleint2017-05-081-8/+13
| |/ | | | | | | | | | | | | | | | | Some AMD cards have been reported to not update otherwise. Task-number: QTBUG-60527 Change-Id: I84d57a57eb2b76fb31255ae42b79b96ab7b257c9 Reviewed-by: Kimmo Leppälä <kimmo.leppala@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-05-072-3/+4
|\| | | | | | | | | | | | | | | Conflicts: src/network/access/qnetworkreply.cpp tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp Change-Id: Iadf766269454087e69fb216fc3857d85b0ddfaad
| * QWindowsInputContext: Fix indentationKai Koehne2017-05-021-1/+1
| | | | | | | | | | | | | | Fix indentation of code (introduced in 14efcaa3) Change-Id: Iee9bc7c66dbde4088168497e9428940554612e84 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * Windows QPA: Find window before invoking native filtersOlivier JG2017-05-021-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When handling WM_NCCALCSIZE in a global filter, the associated platform window needs to be assigned to platformWindowPtr so that its frame margins can be updated on return. See also 3035400f36731c400adb9204b94e9afe346a71b7, which introduced the platformWindowPtr out parameter for this purpose. [ChangeLog][Platform Specific Changes][Windows] Fixed frameMargins for WM_NCCALCSIZE when handled inside with QAbstractNativeEventFilter. Change-Id: I7827b81d30a5c80dad591206a88712169dea0108 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Windows QPA: Move system tray icon implementation into the pluginFriedemann Kleint2017-04-277-0/+579
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The system tray icon implementation relied on QMenu. After the introduction of QPlatformSystemTrayIcon::contextMenuRequested(), the code can be moved into the plugin, making use of native menus when enabled or falling back to QMenu. This enables the SystemTrayIcon QML Type to work. [ChangeLog][QtGui][Windows] A native system tray icon is now available for SystemTrayIcon. Change-Id: I0fdbfb5cbb815c1ea6fb19305a9bceb9c5bcc034 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Windows QPA: Add native menusFriedemann Kleint2017-04-2713-1/+1340
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add simple Win32-API based menus (not owner-drawn). Native menus are implemented using Win32 API and are simpler than QMenu-based menus in for example that they do allow for placing widgets on them or changing properties like fonts and do not provide hover signals. They are mainly intended for Qt Quick. By default, they will be used if the application is not an instance of QApplication or for Qt Quick Controls 2 applications. In addition, the command line option -platform windows:menus=native will unconditionally activate them and -platform windows:menus=no turns them off. [ChangeLog][QtGui][Windows] Native menus have been implemented. Task-number: QTBUG-55967 Change-Id: I439a7d949745debea3eb0e5789cf42288a0d526f Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* | QtBase: use new QStaticByteArrayMatcher where applicableMarc Mutz2017-04-241-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Even for compilers that don't yet support C++14 constexpr, this should improve performance of searches a lot, if, indeed, Boyer-Moore still is an optimization over linear searching at all in these days of hardware prefetchers and deep CPU pipelines, because the setup cost is only incurred once. As function-statics, we also don't care about startup ordering and cost. It's a pity that the platform that would benefit the most - Windows - doesn't have constexpr support, yet. Change-Id: I827df135854fd6fbd6546e248dc37ef0fbaf1792 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
* | QUuid: add fromString(QStringView/QLatin1String)Marc Mutz2017-04-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As for the formatting code, de-duplicate the parsing code by only parsing char*s, converting QChars to Latin-1 first in a small buffer. The QUuid(const char*) ctor performed no length checking, relying instead on the checks performed within _q_uuidFromHex(), which includes an implicit check for premature end (because NUL is not a valid token for the parser). The (QString) and (QByteArray) ctors did perform length checking. To the extent possible, this is removed, since it is handled by _q_uuidFromHex(). Failure cases need not be optimized. Only the QLatin1String overload needs to do some checking, because views in general are not NUL-terminated. The QStringView overload can just append a NUL when it converts to Latin-1. The only check I added to _q_uuidFromHex() is that for src == nullptr. It would otherwise be duplicated in several callers. While touching the internal functions, port to passing and returning by value. Saves 1.6KiB in text size on optimized GCC 6.1 Linux AMD64 builds, even though we added new API. Port some users to the new functions. Expand fromString() test. [ChangeLog][QtCore][QUuid] Added fromString(QStringView/QLatin1String). Change-Id: I519339419129550c86e0ea80514865cd6a768f5d Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-04-201-1/+6
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qbytearray.h src/corelib/tools/qdatetime.h src/corelib/tools/qstring.h src/corelib/tools/qversionnumber.h src/plugins/platforms/android/qandroidplatformintegration.cpp tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp Change-Id: Iefd92a435e687a76cd593099e40d9a9620a1454d
| * Windows QPA: Move initialization of resources out of the Qt namespaceFriedemann Kleint2017-04-131-1/+6
| | | | | | | | | | | | | | | | | | Q_INIT_RESOURCE() should not be within the Qt namespace; the namespace is appended to the resource function. Task-number: QTBUG-60118 Change-Id: I05203c3196ccdcffaf27658bcd7f3ec1c25f22d9 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>