Merge remote-tracking branch 'origin/5.9' into 5.10

Change-Id: I3fa5c9e216201bdf7da260c395f65d7fb95cba0b
This commit is contained in:
Liang Qi 2018-01-04 17:24:18 +01:00
commit 4ef667d200
6 changed files with 19 additions and 16 deletions

0
src/corelib/io/qfilesystemengine_win.cpp Executable file → Normal file
View File

View File

@ -886,6 +886,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;
@ -934,14 +936,15 @@ Q_GLOBAL_STATIC(QCocoaTabletDeviceDataHash, tabletDeviceDataHash)
rotation -= 360.0;
Qt::KeyboardModifiers keyboardModifiers = [QNSView convertKeyModifiers:[theEvent modifierFlags]];
Qt::MouseButtons buttons = ignoreButtonMapping ? static_cast<Qt::MouseButtons>(static_cast<uint>([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<uint>(m_buttons), pressure, xTilt, yTilt, rotation);
static_cast<uint>(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;

View File

@ -57,6 +57,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
@ -71,6 +72,7 @@
}
];
}
#endif
}
+ (Class)layerClass

View File

@ -141,19 +141,17 @@ static QSet<QByteArray> 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
@ -163,7 +161,7 @@ static QSet<QByteArray> keywords()
<< "arm"
#endif
#ifdef Q_AUTOTEST_EXPORT
#ifdef QT_BUILD_INTERNAL
<< "developer-build"
#endif
;

View File

@ -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

0
tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp Executable file → Normal file
View File