From 997dd020c1e86c466f862d0f83da7d6474266d4a Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Tue, 2 Jan 2018 15:36:49 +0100 Subject: [PATCH 1/6] Fix source code file permissions Fix permissions after commit ffc8409aa58c04c1dd140001976b55925ac959f6 - our source files are not executable. Change-Id: Idc5103704256b6f73857b645c323492beaabe879 Reviewed-by: Friedemann Kleint --- src/corelib/io/qfilesystemengine_win.cpp | 0 tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp | 0 2 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 src/corelib/io/qfilesystemengine_win.cpp mode change 100755 => 100644 tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp diff --git a/src/corelib/io/qfilesystemengine_win.cpp b/src/corelib/io/qfilesystemengine_win.cpp old mode 100755 new mode 100644 diff --git a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp old mode 100755 new mode 100644 From 4f76c2dbadb09a27cecaba5a36512f68fac3d319 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Thu, 22 Dec 2016 14:33:29 +0100 Subject: [PATCH 2/6] Cocoa: make "Send correct mouse buttons for tablets" optional Add an env variable QT_MAC_TABLET_IGNORE_BUTTON_MAPPING which, if set, reverts to the old behavior. The issues that it fixes are: 1) With a Genius tablet, it's not possible to generate a middle-click at all, regardless of preferences, unless you set this variable 2) With a Wacom mouse (passive mouse used with an Intuos 3), the side-buttons (normally mapped to forward and back buttons) do not work unless you set this variable [ChangeLog][macOS][Tablet support] If you have changed the button mapping of your Wacom tablet in System Preferences, it will be respected in Qt applications. To revert to the old behavior, set the environment variable QT_MAC_TABLET_IGNORE_BUTTON_MAPPING Task-number: QTBUG-57487 Task-number: QTBUG-54160 Change-Id: I0a1c9c6550e4dfe6ee2daa2d993f22691430826c Reviewed-by: Andy Shaw --- src/plugins/platforms/cocoa/qnsview.mm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm index 2e64204fb7..78287b482c 100644 --- a/src/plugins/platforms/cocoa/qnsview.mm +++ b/src/plugins/platforms/cocoa/qnsview.mm @@ -1064,6 +1064,8 @@ Q_GLOBAL_STATIC(QCocoaTabletDeviceDataHash, tabletDeviceDataHash) - (bool)handleTabletEvent: (NSEvent *)theEvent { + static bool ignoreButtonMapping = qEnvironmentVariableIsSet("QT_MAC_TABLET_IGNORE_BUTTON_MAPPING"); + if (!m_platformWindow) return false; @@ -1112,14 +1114,15 @@ Q_GLOBAL_STATIC(QCocoaTabletDeviceDataHash, tabletDeviceDataHash) rotation -= 360.0; Qt::KeyboardModifiers keyboardModifiers = [QNSView convertKeyModifiers:[theEvent modifierFlags]]; + Qt::MouseButtons buttons = ignoreButtonMapping ? static_cast(static_cast([theEvent buttonMask])) : m_buttons; qCDebug(lcQpaTablet, "event on tablet %d with tool %d type %d unique ID %lld pos %6.1f, %6.1f root pos %6.1f, %6.1f buttons 0x%x pressure %4.2lf tilt %d, %d rotation %6.2lf", deviceId, deviceData.device, deviceData.pointerType, deviceData.uid, windowPoint.x(), windowPoint.y(), screenPoint.x(), screenPoint.y(), - static_cast(m_buttons), pressure, xTilt, yTilt, rotation); + static_cast(buttons), pressure, xTilt, yTilt, rotation); QWindowSystemInterface::handleTabletEvent(m_platformWindow->window(), timestamp, windowPoint, screenPoint, - deviceData.device, deviceData.pointerType, m_buttons, pressure, xTilt, yTilt, + deviceData.device, deviceData.pointerType, buttons, pressure, xTilt, yTilt, tangentialPressure, rotation, z, deviceData.uid, keyboardModifiers); return true; From 631c64582e8e545357dbcf52fd9832229313c27f Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Tue, 19 Dec 2017 10:46:48 +0100 Subject: [PATCH 3/6] QTreeView: Fix QTreeViewPrivate::itemAtCoordinate() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit QTreeViewPrivate::itemAtCoordinate() did not calculate the correct item when non-uniformRowHeights is enabled and vertical scroll mode is ScrollPerPixel. This results e.g. in an activation of the item above when the click happens on the very first pixel line of an item. Another, more problematic effect was that once a drop happened on the very first line of an item, QAbstractItemViewPrivate::dropOn() calculated the root as the drop index because the visualRect of the calculated item is compared with the drop position which did not match. Task-number: QTBUG-57538 Change-Id: If89571bf0fb76fc01d60ba7139f1d985b49d70db Reviewed-by: Richard Moe Gustavsen Reviewed-by: Thorbjørn Lund Martsum --- src/widgets/itemviews/qtreeview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/itemviews/qtreeview.cpp b/src/widgets/itemviews/qtreeview.cpp index 20e99d2aee..73083773f5 100644 --- a/src/widgets/itemviews/qtreeview.cpp +++ b/src/widgets/itemviews/qtreeview.cpp @@ -3514,7 +3514,7 @@ int QTreeViewPrivate::itemAtCoordinate(int coordinate) const const int contentsCoordinate = coordinate + vbar->value(); for (int viewItemIndex = 0; viewItemIndex < viewItems.count(); ++viewItemIndex) { viewItemCoordinate += itemHeight(viewItemIndex); - if (viewItemCoordinate >= contentsCoordinate) + if (viewItemCoordinate > contentsCoordinate) return (viewItemIndex >= itemCount ? -1 : viewItemIndex); } } else { // ScrollPerItem From 9464b7aa9315f767d71fec904783a2e9133e2444 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 29 Dec 2017 10:17:57 -0200 Subject: [PATCH 4/6] Update MSVC versions because 2017 is 19.11 too (and 19.12) So invert the list and let "msvc-2017" be the latest, at least until we know about a different version. Change-Id: I39332e0a867442d58082fffd1504c316e27f51d0 Reviewed-by: Friedemann Kleint --- src/testlib/qtestblacklist.cpp | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/src/testlib/qtestblacklist.cpp b/src/testlib/qtestblacklist.cpp index 57661bb389..b52b9f008c 100644 --- a/src/testlib/qtestblacklist.cpp +++ b/src/testlib/qtestblacklist.cpp @@ -135,19 +135,17 @@ static QSet keywords() #endif #ifdef Q_CC_MSVC << "msvc" - #ifdef _MSC_VER - #if _MSC_VER == 1910 - << "msvc-2017" - #elif _MSC_VER == 1900 - << "msvc-2015" - #elif _MSC_VER == 1800 - << "msvc-2013" - #elif _MSC_VER == 1700 - << "msvc-2012" - #elif _MSC_VER == 1600 +# if _MSC_VER <= 1600 << "msvc-2010" - #endif - #endif +# elif _MSC_VER <= 1700 + << "msvc-2012" +# elif _MSC_VER <= 1800 + << "msvc-2013" +# elif _MSC_VER <= 1900 + << "msvc-2015" +# else + << "msvc-2017" +# endif #endif #ifdef Q_PROCESSOR_X86 From 624a186295acc6695778e7224f9dae75e0e58f17 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sun, 31 Dec 2017 10:25:15 -0200 Subject: [PATCH 5/6] Correct "developer-build" in QtTest black list features Q_AUTOTEST_EXPORT is *always* defined. Change-Id: I39332e0a867442d58082fffd150560a6042056fb Reviewed-by: Friedemann Kleint --- src/testlib/qtestblacklist.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/testlib/qtestblacklist.cpp b/src/testlib/qtestblacklist.cpp index b52b9f008c..8ad0f13dc2 100644 --- a/src/testlib/qtestblacklist.cpp +++ b/src/testlib/qtestblacklist.cpp @@ -155,7 +155,7 @@ static QSet keywords() << "arm" #endif -#ifdef Q_AUTOTEST_EXPORT +#ifdef QT_BUILD_INTERNAL << "developer-build" #endif ; From 175d691fa377d43fbc18d52d116135e0bf76a5f4 Mon Sep 17 00:00:00 2001 From: Jake Petroules Date: Mon, 1 Jan 2018 21:38:20 -0800 Subject: [PATCH 6/6] Fix the iOS/tvOS platform plugin build on tvOS This fixes a regression from ba44cdae38406c429c7fb43863a6883bd0f79cf5. Task-number: QTBUG-65516 Change-Id: I989b075d3f96170660042349437e4a6a4a115cf9 Reviewed-by: Liang Qi --- src/plugins/platforms/ios/quiview.mm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/platforms/ios/quiview.mm b/src/plugins/platforms/ios/quiview.mm index ed8af8e290..17506ff8fb 100644 --- a/src/plugins/platforms/ios/quiview.mm +++ b/src/plugins/platforms/ios/quiview.mm @@ -58,6 +58,7 @@ + (void)load { +#ifndef Q_OS_TVOS if (QOperatingSystemVersion::current() < QOperatingSystemVersion(QOperatingSystemVersion::IOS, 11)) { // iOS 11 handles this though [UIView safeAreaInsetsDidChange], but there's no signal for // the corresponding top and bottom layout guides that we use on earlier versions. Note @@ -72,6 +73,7 @@ } ]; } +#endif } + (Class)layerClass