summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms
Commit message (Collapse)AuthorAgeFilesLines
* Windows QPA: Format window title correctly when creating a window.Friedemann Kleint2016-05-233-2/+11
| | | | | | | | | Add convenience QWindowsWindow::formatWindowTitle() and use that in QWindowsIntegration::createPlatformWindow(). Task-number: QTBUG-53394 Change-Id: I76ebade97c5af71ffa3d11075511b94a54a3dbf8 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-05-1928-77/+257
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp src/network/access/qnetworkaccessmanager.cpp src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.h src/widgets/widgets/qlineedit_p.cpp src/widgets/widgets/qlineedit_p.h src/winmain/winmain.pro tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp tests/auto/dbus/qdbusconnection/tst_qdbusconnection.h tests/auto/testlib/selftests/expected_cmptest.teamcity tests/auto/testlib/selftests/expected_cmptest.txt tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp tools/configure/configureapp.cpp Change-Id: Ib9997b0d0f91946e4081d36c0c6b696c5c983b2a
| * Merge remote-tracking branch 'origin/5.6.1' into 5.6Liang Qi2016-05-192-0/+14
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/network/socket/qnativesocketengine_winrt.cpp Change-Id: I8edb72f8ba958d80c3d7993b3feaaae782ca8d9c
| | * ANGLE: fall back to warp mode in case of standard VGA driverOliver Wolff2016-05-121-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The combination of vendor and device ID being 0000 indicates, that the standard VGA driver is used, and happens when using Qt in a: - Windows 7 machine without proper GPU drivers - Windows 7 machine with disabled GPU - HyperV vm The default driver does neither support D3D9 nor D3D11 properly so that we have to fall back to warp mode for ANGLE. Change-Id: Ia766e32d680c910a50ec3d6b5002892cdb90fdbb Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| | * Merge 5.6 into 5.6.1Oswald Buddenhagen2016-05-1214-43/+181
| | |\ | | | | | | | | | | | | Change-Id: I22003b840f1a7ac685a1ec3353d7e7dbd84c3953
| | * | Cocoa integration - avoid dangling menuitem pointerTimur Pocheptsov2016-05-101-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since QCocoaMenu can live longer than its m_attachedItem pointer, this pointer is becoming invalid after QCocoaMenuItem deleted (and its 'm_native' was released). Task-number: QTBUG-53251 Change-Id: I6d97b75b2c09e2443cd21415c5db94206d5d89ce Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
| * | | xcb: Fix dropping URL on Firefox window.Urs Fleisch2016-05-181-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a URL is dropped on a Firefox window, the "text/x-moz-url" data takes precedence over the "text/uri-list". The "text/x-moz-url" is interpreted as UTF16, however, the data from Qt 5 applications is not in the correct format. The code to create correct UTF16 data exists, but it is not called for two reasons: The atomName will never be "text/x-moz-url" because it is changed to "text/uri-list" by mimeAtomToString() and the InternalMimeData::hasFormatHelper() case is already handled above and the else part will never be considered. This patch fixes the check and brings it into the right order. Task-number: QTBUG-49947 Change-Id: I5ebd31914cc6c1417c513c1ff09e0e858a16915d Reviewed-by: Dmitry Shachnev <mitya57@gmail.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
| * | | xcb: Fix drop of text/uri-list and text/html.Urs Fleisch2016-05-181-11/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When dropping URLs from Firefox or Chrome, the contents are encoded as UTF16, but not correctly decoded. Moreover, the special handling of "text/x-moz-url" drops does not work because this format is converted to "text/uri-list" before. This fixes the handling for URL list and also for UTF16 "text/html". Task-number: QTBUG-47981 Change-Id: I1153f21ede07b2bfe4d104e0fe8bc8487ec5c165 Reviewed-by: Błażej Szczygieł <spaz16@wp.pl> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
| * | | egl: Reshuffle headers to help less fortunate systems with X11Laszlo Agocs2016-05-1710-13/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | EGL headers including X headers has traditionally been problematic due to getting macros for Status, None, etc. In most cases this is not an issue anymore because on embedded one will almost always use a driver targeting the framebuffer or DRM/KMS and therefore the EGL headers do not pull in X dependencies. Furthermore, Mesa supports MESA_EGL_NO_X11_HEADERS which we set, avoiding the problem altogether with Mesa regardless of targeting X11 or KMS. However, other drivers do not have this option. On i.MX6 for instance, targeting X11 is problematic due to not having EGL_API_FB defined, which in turn means the EGL headers pulls in X headers in order to be able to define the native display and window types as Display and Window. Try to play nice with this use case by reshuffling the includes and undefining the problematic names. This restores patch set 2 from the previously merged, and then reverted commit. This here is safe since the egl.h include and the following undefs are only done internally for eglfs and can have therefore no effect on other code. Task-number: QTBUG-52928 Change-Id: I383e783d5064dc8fb41f3ef56d2a4f4fcd31a6cf Reviewed-by: Louai Al-Khanji <louai.al-khanji@qt.io>
| * | | Use QPlatformTheme for the context to translate the color dialog buttonsAndy Shaw2016-05-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QDialogButtonBox does not have translations, it queries QPlatformTheme for button texts. So in order to ensure that the buttons added to QColorDialog natively are translated it should be set to use QPlatformTheme instead. Change-Id: I67d0e509398aa81f9de9b8785544c1e23bb596d9 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * | | xcb: Properly interpret data.l[0] field of XdndStatus messageAlexander Volkov2016-05-121-1/+1
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The standard https://freedesktop.org/wiki/Specifications/XDND/ states: "In order for the proxy window to behave correctly, the appropriate field of the client messages, window or data.l[0], must contain the ID of the window in which the mouse is located, not the proxy window that is receiving the messages." So compare it with the current target window instead of the current proxy window. Change-Id: Ie31fd3aeadebcf5a9be7b9a9194f35a4ec7bdebb Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
| * | eglfs: Support dynamic mouse cursor show/hide with DRM HW cursorLaszlo Agocs2016-05-112-8/+81
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-52743 Change-Id: I0bea1451dfe7b049c129b11716d593115e3d8374 Reviewed-by: Louai Al-Khanji <louai.al-khanji@qt.io>
| * | QCocoaWindow - do not call resignKeyWindowTimur Pocheptsov2016-05-101-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QCocoaWindow::setMouseGrabEnabled/setKeyboardGrabEnabled calls resignKeyWindow. According to Apple's docs, we should _never_ call this function (it's done by Cocoa automatically). Calling this function leaves a window in weird state where it can not become key again until you explicitly make another window key first. Task-number: QTBUG-53050 Change-Id: I7a887659df8df11880328ffa2adc07c4a3af63e6 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| * | winrt: Fix potential startup crashMaurice Kalinowski2016-05-101-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Depending on the windowstate passed to QWinRTWindow constructor we might act on the uiElement which has not been created yet. This happened especially in release mode, probably due to timing. Hence delay uiElement changes until we created it in the constructor and can ensure it is valid. Change-Id: I00daa9fcf8542a0535bbcb663a76d85c36e510e2 Reviewed-by: Andrew Knight <andrew.knight@intopalo.com> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| * | xcb: Properly unset mousePressWindow()Błażej Szczygieł2016-05-091-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some cases the mouse release event won't arrive, i.e. when window is minimized on button press. Check for mouse buttons state on mouse move event and properly unset the mousePressWindow to avoid blocking enter/leave events in this case. Amends: c511466d747d99ee76465cfe90ce594fa1f27469 Change-Id: I543a75104f528df1bf644bace13f78a6af017455 Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
| * | QXcbDrag: forward mouse release event to initiator windowAlberto Mardegan2016-05-092-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The mouse release event which ends the drag and drop operation must be forwarded to the window where the drag started, and not to the QShapedPixmapWindow, which is not supposed to handle input events. Task-number: QTBUG-52541 Change-Id: I24a7c7b331a06342ac28b420ff9467aa05fe00dd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Błażej Szczygieł <spaz16@wp.pl> Reviewed-by: Dmitry Shachnev <mitya57@gmail.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
| * | linuxfb: Support transparencyLaszlo Agocs2016-05-091-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Always clearing to opaque black makes it impossible to create semi-transparent overlays with linuxfb. Instead, behave like other platforms' backingstores: if the target image has an alpha channel, clear to transparent instead and set the correct composition mode. Task-number: QTBUG-52475 Change-Id: I2db4588e0112e200a3aa5eed49f806c37d7ca8b5 Reviewed-by: Louai Al-Khanji <louai.al-khanji@qt.io>
| * | Add FreeType libraries for Windows -system-freetype buildsJames McDonnell2016-05-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add a "CONFIG += qpa/basicunixfontdatase" to the -system-freetype block so that the FreeType libraries are included in LIBS. Task-number: QTBUG-35767 Change-Id: I81e18e72e068d5ac240cba79bab880e50a033860 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| * | Fix threading issue in creating static opengl contextMäättä Antti2016-05-091-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | Add mutex lock for static opengl context creation. Task-number: QTBUG-53202 Change-Id: Iba22339776ec8885efd82b13ae56f6781a426f4b Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| * | Windows Accessibility: Use QWindowsAccessibility::windowHelper().Friedemann Kleint2016-05-091-11/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Amends changes ee516381873857e833b53b175fd3c40e4c45a5fd, d7a3b6145999d015997e26e12a7345f774b053f3. Task-number: QTBUG-52943 Change-Id: Icdf9d99c327bdd38dfb084e6cf77b14cd5ce073b Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
| * | Windows Accessibility: Recurse up to find a window.Friedemann Kleint2016-05-061-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not all classes inheriting QAccessibleInterface implement QAccessibleInterface::window(), so, go up the hierarchy to find one that does. The window is required to be able to determine the correct scale factor for the screen when High DPI scaling is active. Fixes multimonitor issues for QtWidgets. Amends change d7a3b6145999d015997e26e12a7345f774b053f3. Task-number: QTBUG-52943 Change-Id: I81733765faee4d296bd6ea046bc2cecb018eb28d Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
| * | Cocoa: Add QCocoaWindowPointerGabriel de Dietrich2016-05-063-19/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch extends 5b54c352edbc597ec5283bc9cfdd77906350161f by abstracting the watcher pattern. The class is specialized for QCocoaWindow since it's aware of the QObject sentinel there. We update the usage in QNSWindowHelper and extend it to the forward window (this one is used for mouse coordinate conversion when docking windows). Change-Id: I628415527593daec835bbad1b6e83d13fe7b6703 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
| * | Cocoa: Clear the backing store pointer when changing windowGabriel de Dietrich2016-05-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the geometry is being changed at some point while showing the widget after reparenting, we set the Cocoa frame on the QNSView. This results in Cocoa invalidating the view and calling drawRect: before we get a chance to flush the backing store. This may be an issue if the previous parent toplevel window has been deleted. In that case, the backing store pointer is a dangling one, resulting in a crash. Change-Id: I18b5dd7794a3bde8815daf3f84e4113a37aaea90 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
| * | QCocoaMenuBar: set the native item's titleGabriel de Dietrich2016-05-061-1/+3
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Or, "Give Cocoa a Chance to do its Magic" Some menubar items, like the "Edit" menu, get extra items added at some point by Cocoa. Evidence points out to those extra items being added right after the NSMenu holding the menubar is set as the current menubar. At that point, both the child NSMenu and its NSMenuItem (the entry in the menubar) must have their title set. Therefore, we must set the menubar native item's title before QCocoaMenuBar::updateMenuBarImmediately() sets the main menu. Task-number: QTBUG-53085 Change-Id: Idd775cf0e3485739f38363a84cfed8d2db9cb662 Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Marko Kangas <marko.kangas@theqtcompany.com> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* | add AA_CompressHighFrequencyEvents to control compression on xcbShawn Rutledge2016-05-152-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | 7edd10e6c added this compression feature, but some applications may need to disable it. [ChangeLog][X11] It's now possible to unset AA_CompressHighFrequencyEvents to disable the new X event compression feature that was added in 5.6.0. This is a replacement for the WA_NoX11EventCompression flag in Qt 4. Task-number: QTBUG-44964 Change-Id: I37a9c8a4831f1c02eda0f03b54125f3255d25500 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | eglfs: Fix DRM+KMS backendsLaszlo Agocs2016-05-1010-14/+17
| | | | | | | | | | | | | | | | The native display was simply invalid. Task-number: QTBUG-53225 Change-Id: I682fb1d91dbea3dab971a079060d181fc313da46 Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* | QEglFSKmsIntegration: use new QJsonObject::value(QLatin1String)Marc Mutz2016-05-101-5/+5
| | | | | | | | | | | | | | | | | | Allows to get rid of some QStringLiterals. Change-Id: I546aace6876cf373b1cb67269fcc3d042dfd3aac Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Merge "Merge remote-tracking branch 'origin/5.6' into 5.7" into refs/staging/5.7Liang Qi2016-05-069-34/+69
|\ \
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-05-069-34/+69
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/qtestlib/tutorial5/containers.cpp examples/widgets/tools/tools.pro src/corelib/io/qprocess.cpp src/corelib/io/qprocess_unix.cpp src/corelib/io/qprocess_win.cpp src/network/kernel/qdnslookup_unix.cpp src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/testlib/qtestcase.cpp tools/configure/configureapp.cpp Change-Id: I838ae7f082535a67a4a53aa13a21ba5580758be8
| | * Fix FPE under EGLFS_KMS if mesa-10.2.7Elena Zaretskaya2016-05-041-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If mesa-10.2.7 is installed, gbm_bo_create returns NULL (QEglFSKmsCursor ctor, qeglfskmscursor.cpp:80), but after that the pointer m_bo is used in function QEGlFSKmsCursor::changeCursor without verification. Task-number: QTBUG-52404 Change-Id: I5b1b15d751e46a5200248e7a8642f7917dedd220 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| | * Revert "egl: Reshuffle headers to help less fortunate systems with X11"Liang Qi2016-05-0412-10/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit ecf127505effbbf4dbfd1e7cb9561de5dae51bf2. ecf12750 breaks the build of qtwayland. Change-Id: If8bf04f035aa47e4e867d201ec7d95b0d3e18317 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| | * xcb: don't compress tablet motion eventsShawn Rutledge2016-05-043-8/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7edd10e6c added this compression feature, but it's not a good idea for drawing-tablet applications, because smooth drawing depends on receiving every movement of the stylus. Also show the device ID in qt.qpa.input.devices category logging. [ChangeLog][X11] The new X event compression feature that was added in 5.6.0 no longer applies to motion events from drawing tablets. Task-number: QTBUG-44964 Change-Id: Icd2ca8ca77d8f80c2f39160c74208db10e382501 Reviewed-by: Gatis Paeglis <gatis.paeglis@theqtcompany.com>
| | * Cocoa: Enable skipping Ctrl+LMB to RMB overrideGabriel de Dietrich2016-05-031-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This can be enabled with QT_MAC_DONT_OVERRIDE_CTRL_LMB=1 environment variable. The goal is to provide consistent cross-platform input when it's more desirable than full platform comformance. Change-Id: I3b96733077bd1c0367edeef21a98a44b15425807 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
| | * egl: Reshuffle headers to help less fortunate systems with X11Laszlo Agocs2016-05-0312-15/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | EGL headers including X headers has traditionally been problematic due to getting macros for Status, None, etc. In most cases this is not an issue anymore because on embedded one will almost always use a driver targeting the framebuffer or DRM/KMS and therefore the EGL headers do not pull in X dependencies. Furthermore, Mesa supports MESA_EGL_NO_X11_HEADERS which we set, avoiding the problem altogether with Mesa regardless of targeting X11 or KMS. However, other drivers do not have this option. On i.MX6 for instance, targeting X11 is problematic due to not having EGL_API_FB defined, which in turn means the EGL headers pulls in X headers in order to be able to define the native display and window types as Display and Window. Try to play nice with this use case by reshuffling the includes and undefining the problematic names. Task-number: QTBUG-52928 Change-Id: I059f26b340b6e442e7296055915d18f5a1ce7a7f Reviewed-by: Louai Al-Khanji <louai.al-khanji@qt.io>
| | * QLinuxFbScreen: fix uninitialized member warningsEdward Welbourne2016-05-031-17/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prompted by Coverity CID 11720 (allegedly recently new in dev but long-standing in 5.6). Even assuming the class is used correctly - test initialize() and only use if that succeeded - the destructor would have passed uninitialized arguments to munmap() and ioctl(). Noticed a double close along the way: it's been fixed on dev but should have been fixed in 5.6, too. Documented why ioctl() failure in switchToGraphicsMode() should at least do no harm. Change-Id: Ie26a9eefa435b5ff5b1a02e03e29469b8db72d3c Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| | * iOS: Report correct physicalSize and physicalDotsPerInch for iPhone6+Tor Arne Vestbø2016-05-022-7/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On iPhone 6(s) Plus devices, or when display zoom is enabled in an iPhone 6, the render buffer is scaled before being output on the physical display. We have to take this into account when computing the physical size. Task-number: QTBUG-50941 Change-Id: I318f3a866d039fccf0ba08f381fc9d8bcd676acd Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
| | * xcb: Fix drag and drop to Emacs.Urs Fleisch2016-05-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unfortunately, the improved patch for QTBUG-45812 fixed things for Chromium, but did no longer work for Emacs. This fixes commit [269fdb] to make it work for both Emacs and Chromium. Task-number: QTBUG-45812 Change-Id: I2fca708503f27679681bc6959de1ad94943a063e Reviewed-by: Dmitry Shachnev <mitya57@gmail.com> Reviewed-by: Błażej Szczygieł <spaz16@wp.pl> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* | | compile fix for static qt with dynamic openglTim Blechmann2016-05-061-1/+1
|/ / | | | | | | | | | | Change-Id: If78f6afeeeda5ea46a2ed17c6938fa25be9802fe Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | iOS: Add text selection support from the platform pluginRichard Moe Gustavsen2016-05-044-2/+1065
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch will add touch based text selection support to Qt from the iOS plugin. QIOSTextInputOverlay will listen to changes to the focus object, and if IM enabled, create three different gesture recognizers that tracks what the user is doing. The first recogniser detects if the user does a press and hold on the text when there is no selection. If triggered, it will show a loupe that follows the touch around together with the cursor. The second recogniser will instead be active when text is selected, and takes care of drawing a set of handles on each side of the selection. If the user drags on any of the handles, a loupe will show that follows the touch/text line together with the handle. The third recogniser detects if the user does a tap, and depending on if there's a selection, or if the cursor didn't move, it will show or hide the edit menu. The handles and loupe are implemented as overlays using Core Animation layers. Change-Id: Idff6e40e12307a458c9c399b0487bb976fce29c8 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | iOS: set StyleHint::StartDragTime to 300Richard Moe Gustavsen2016-05-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | From testing on iOS, StartDragTime should be adjusted slightly, from 500 (default in qplatformtheme.cpp) down to 300. This will also affect how long the user needs to press before the text selection magnifier shows up for doing text selections. Change-Id: I42ebfec6f0dc809b5d392412cf8f70d128ee6246 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | Fix plugin name for eglfs' GBM backendLaszlo Agocs2016-05-031-1/+1
| | | | | | | | | | | | | | | | | | | | In 5.7 the Gbm prefix was added but the .pro file was not updated. This breaks static builds. Task-number: QTBUG-53136 Change-Id: I37af46ff768bf8c1dc9269892db25d61b76c0376 Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com> Reviewed-by: Louai Al-Khanji <louai.al-khanji@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.6' into 5.7" into refs/staging/5.7Liang Qi2016-05-028-57/+112
|\ \
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-298-57/+112
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/qml_module.prf mkspecs/features/qt_common.prf src/gui/text/qzip.cpp src/plugins/platforms/cocoa/qnsview.mm src/plugins/platforms/windows/array.h src/testlib/qtestcase.cpp src/widgets/dialogs/qfilesystemmodel.h Change-Id: Ie41c5868415b81f7693c80e045497035504bb210
| | * winrt: Refactor pointer device handling to support penMaurice Kalinowski2016-04-281-30/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In addition to pen events being handled as tablet events, we create touch events. Same principle is used on other platforms as well. This allows devices as Surfaces to use the pen with Qt applications. Furthermore, the first update event does not have to be a press event, as in a pen has proximity values describing a move without touch, but also the HoloLens uses touch points as permanent pointer devices. They all send an exit event once released or out of range. Hence, clean up the internal touchpoint hash when the touch device is gone, not on release. Task-number: QTBUG-38681 Change-Id: I38acaa034a3cfe224098bfa36bfead5428f4db16 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| | * winrt: Fix memory leak for file readingMaurice Kalinowski2016-04-281-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | IInputStream::ReadAsync might create a separate buffer to fill in data. Passing a buffer with GetAddressOf() can cause a memory leak of the size of data to be read. Instead, pass a separate buffer pointer and continue to use this one after the async operation. This way, the OS can decide whether to switch buffers or not, keeping ref counting in sync. Task-number: QTBUG-52961 Change-Id: I9dfb627287142355ebcf74ca52427b4e8108e8d1 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| | * QCocoaMenu: Have the menu delegate return the right amount of itemsGabriel de Dietrich2016-04-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some cases we move menu items around, therefore we should not rely on QCocoaMenu::items() being the actual items inside the menu. But, since the NSMenu is updated before hand, we can rely on NSMenu.numberOfItems instead. Change-Id: Icd4497beca4f52a6d38408eeaa2e6ec71b579685 Task-number: QTBUG-52931 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com> Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| | * Silence MSVC warnings when using certain std algorithmsMarc Mutz2016-04-263-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MSVC STL warns when passing naked pointers as non-bounded iterators to algorithms such as std::equal and std::copy, in an attempt to inform users that the range specified by that iterator has an implicit minimum size that the caller of the algorithm must ensure is met: warning C4996: 'std::_Equal1': Function call with parameters that may be unsafe - \ this call relies on the caller to check that the passed values are correct. To \ disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to \ use Visual C++ 'Checked Iterators' When building Qt, as well as when building user projects with qmake (cf. 0a76b6bc7f98900ea884cd10ccca1a332e5bdba5), we globally disable this warning (with -D_SCL_SECURE_NO_WARNINGS), but since we started using STL algorithms in public headers (e.g. in qvector.h), users get this warning in their own projects now, unless they, too, define said macro. But such a requirement is against the Qt policy to have headers that are warning-free as much as possible. The suggested way of fixing this warning is to wrap the naked pointer in a stdext::unchecked_array_iterator before passing it to the algorithm, cf. examples in https://msdn.microsoft.com/en-us/library/ttcz0bys%28v=vs.120%29.aspx or, together with the capacity-made-explicit, in a stdext::checked_array_iterator. To avoid ifdefs for platforms that don't have these extensions (which, incidentally, for the unchecked case, includes MSVC 2012), wrap the calls in macros. The end game here is to drop -D_SCL_SECURE_NO_WARNINGS, at least for public headers, even though this commit also adds the wrapper to implementation and private header files. An alternative to the wrapper would have been the version of std::equal that takes four iterators. However, that is a C++14 library feature, while this version of Qt still needs to compile with a C++98 compiler, and, more importantly, there isn't, and never will be, a corresponding 4-iterator version of std::copy. Task-number: QTBUG-47948 Done-with: Stephen Kelly <steveire@gmail.com> Change-Id: I1bbab257fb5f1c5042939c382a412b596112ff26 Reviewed-by: Stephen Kelly <ske@ableton.com>
| | * Windows QPA/High DPI: Scale accessibility coordinates.Friedemann Kleint2016-04-262-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | Use High DPI when interfacing with the Accessibility API. Task-number: QTBUG-52943 Task-number: QTBUG-50991 Change-Id: Ica4489222dca5d58864172470e634f709deb69f8 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| | * OSX: mark mouse events from tablet devices as synthesizedShawn Rutledge2016-04-262-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is equivalent to d7db6c6c1944894737babf3958d0cff1e6222a22 on the xcb platform. Task-number: QTBUG-51617 Change-Id: I837a764c8382244307ba6aa02bd8bde12bd08bff Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| | * xcb: Fix drag and drop to applications like Emacs and Chromium.Urs Fleisch2016-04-251-11/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Drops without matching time stamp do not work. I have fixed the issue by reanimating the findXdndAwareParent() function (adapted to XCB) and using it to find a matching transaction if all else fails. Task-number: QTBUG-45812 Change-Id: Ibca15bbab02ccf2f25280418e9edf36972ebf9a0 Reviewed-by: Błażej Szczygieł <spaz16@wp.pl> Reviewed-by: Dmitry Shachnev <mitya57@gmail.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>