Merge remote-tracking branch 'origin/5.12.3' into 5.12

Change-Id: I2816cb8a3cbc4a2cf5ca5f333a1fddc245b3c06a
This commit is contained in:
Qt Forward Merge Bot 2019-04-17 10:34:32 +02:00
commit b6c79d3ca0
3 changed files with 111 additions and 11 deletions

82
dist/changes-5.12.3 vendored Normal file
View File

@ -0,0 +1,82 @@
Qt 5.12.3 is a bug-fix release. It maintains both forward and backward
compatibility (source and binary) with Qt 5.12.0 through 5.12.2.
For more details, refer to the online documentation included in this
distribution. The documentation is also available online:
https://doc.qt.io/qt-5/index.html
The Qt version 5.12 series is binary compatible with the 5.11.x series.
Applications compiled for 5.11 will continue to run with 5.12.
Some of the changes listed in this file include issue tracking numbers
corresponding to tasks in the Qt Bug Tracker:
https://bugreports.qt.io/
Each of these identifiers can be entered in the bug tracker to obtain more
information about a particular change.
****************************************************************************
* Third-Party Code *
****************************************************************************
- Changed classification of the wintab license from Public Domain to
Custom.
****************************************************************************
* QtCore *
****************************************************************************
- Event system:
* [QTBUG-72438] Fixed a possible race condition on Windows that would
cause an interrupted event loop to be stuck until more events were
posted.
- Logging system:
* [QTBUG-74359] Fixed the compilation of qCDebug("", ...) when debug
output was disabled.
- QCollator:
* [QTBUG-74209] Fixed a bug that caused QCompare to incorrect return a
sorting order on Windows if the Win32 API failed.
- QDateTime / QTimeZone:
* [QTBUG-74614] Fixed handling of timezones that contain no DST
transitions.
- QProcess:
* [QTBUG-73778] Fixed a crash when calling closeWriteChannel() on Windows.
****************************************************************************
* QtSql *
****************************************************************************
- When cross-compiling pg_config, mysql_config are not looked up in PATH
anymore. Pass -psql_config path/to/pg_config or -mysql_config
path/to/mysql_config to explicitly enable PSQL or MySQL in this setup.
****************************************************************************
* Platform Specific Changes *
****************************************************************************
- Android:
* Text fields with ImhNoPredictiveText set are no longer working around
keyboards that disregard this setting. To enforce the workaround, the
environment variable
QT_ANDROID_ENABLE_WORKAROUND_TO_DISABLE_PREDICTIVE_TEXT should be set.
* [QTBUG-74029] Added entries in the AndroidManifest.xml for specific
portrait and landscape splash screens. If one is present for the current
orientation, it will be preferred over the generic one.
- Linux:
* [QTBUG-74526] Changed the way we use the statx() system call to use a
fallback mechanism provided by the GNU C library. This should allow Qt
applications that are compiled with glibc >= 2.28 to run even on kernels
older than 4.11.
- Windows:
* [QTBUG-74062] Fixed QToolTip pop-ups and QComboBox animation pop-ups
being off by a few pixels on Windows 10.

View File

@ -930,7 +930,7 @@ inline QRandomGenerator::SystemGenerator &QRandomGenerator::SystemGenerator::sel
*/ */
/*! /*!
\fn quint32 QRandomGenerator::bounded(int highest) \fn int QRandomGenerator::bounded(int highest)
\overload \overload
Generates one random 32-bit quantity in the range between 0 (inclusive) and Generates one random 32-bit quantity in the range between 0 (inclusive) and
@ -957,7 +957,6 @@ inline QRandomGenerator::SystemGenerator &QRandomGenerator::SystemGenerator::sel
\snippet code/src_corelib_global_qrandom.cpp 14 \snippet code/src_corelib_global_qrandom.cpp 14
Note that this function cannot be used to obtain values in the full 32-bit Note that this function cannot be used to obtain values in the full 32-bit
range of quint32. Instead, use generate(). range of quint32. Instead, use generate().
@ -965,7 +964,7 @@ inline QRandomGenerator::SystemGenerator &QRandomGenerator::SystemGenerator::sel
*/ */
/*! /*!
\fn quint32 QRandomGenerator::bounded(int lowest, int highest) \fn int QRandomGenerator::bounded(int lowest, int highest)
\overload \overload
Generates one random 32-bit quantity in the range between \a lowest Generates one random 32-bit quantity in the range between \a lowest

View File

@ -250,6 +250,23 @@ static Qt::MouseButtons mouseButtonsFromKeyState(WPARAM keyState)
return result; return result;
} }
static Qt::MouseButtons queryMouseButtons()
{
Qt::MouseButtons result = Qt::NoButton;
const bool mouseSwapped = GetSystemMetrics(SM_SWAPBUTTON);
if (GetAsyncKeyState(VK_LBUTTON) < 0)
result |= mouseSwapped ? Qt::RightButton: Qt::LeftButton;
if (GetAsyncKeyState(VK_RBUTTON) < 0)
result |= mouseSwapped ? Qt::LeftButton : Qt::RightButton;
if (GetAsyncKeyState(VK_MBUTTON) < 0)
result |= Qt::MidButton;
if (GetAsyncKeyState(VK_XBUTTON1) < 0)
result |= Qt::XButton1;
if (GetAsyncKeyState(VK_XBUTTON2) < 0)
result |= Qt::XButton2;
return result;
}
static QWindow *getWindowUnderPointer(QWindow *window, QPoint globalPos) static QWindow *getWindowUnderPointer(QWindow *window, QPoint globalPos)
{ {
QWindow *currentWindowUnderPointer = QWindowsScreen::windowAt(globalPos, CWP_SKIPINVISIBLE | CWP_SKIPTRANSPARENT); QWindow *currentWindowUnderPointer = QWindowsScreen::windowAt(globalPos, CWP_SKIPINVISIBLE | CWP_SKIPTRANSPARENT);
@ -531,7 +548,7 @@ bool QWindowsPointerHandler::translatePenEvent(QWindow *window, HWND hwnd, QtWin
if (!QWindowsContext::user32dll.getPointerDeviceRects(penInfo->pointerInfo.sourceDevice, &pRect, &dRect)) if (!QWindowsContext::user32dll.getPointerDeviceRects(penInfo->pointerInfo.sourceDevice, &pRect, &dRect))
return false; return false;
const quint32 pointerId = penInfo->pointerInfo.pointerId; const qint64 sourceDevice = (qint64)penInfo->pointerInfo.sourceDevice;
const QPoint globalPos = QPoint(penInfo->pointerInfo.ptPixelLocation.x, penInfo->pointerInfo.ptPixelLocation.y); const QPoint globalPos = QPoint(penInfo->pointerInfo.ptPixelLocation.x, penInfo->pointerInfo.ptPixelLocation.y);
const QPoint localPos = QWindowsGeometryHint::mapFromGlobal(hwnd, globalPos); const QPoint localPos = QWindowsGeometryHint::mapFromGlobal(hwnd, globalPos);
const QPointF hiResGlobalPos = QPointF(dRect.left + qreal(penInfo->pointerInfo.ptHimetricLocation.x - pRect.left) const QPointF hiResGlobalPos = QPointF(dRect.left + qreal(penInfo->pointerInfo.ptHimetricLocation.x - pRect.left)
@ -547,7 +564,7 @@ bool QWindowsPointerHandler::translatePenEvent(QWindow *window, HWND hwnd, QtWin
if (QWindowsContext::verbose > 1) if (QWindowsContext::verbose > 1)
qCDebug(lcQpaEvents).noquote().nospace() << showbase qCDebug(lcQpaEvents).noquote().nospace() << showbase
<< __FUNCTION__ << " pointerId=" << pointerId << __FUNCTION__ << " sourceDevice=" << sourceDevice
<< " globalPos=" << globalPos << " localPos=" << localPos << " hiResGlobalPos=" << hiResGlobalPos << " globalPos=" << globalPos << " localPos=" << localPos << " hiResGlobalPos=" << hiResGlobalPos
<< " message=" << hex << msg.message << " message=" << hex << msg.message
<< " flags=" << hex << penInfo->pointerInfo.pointerFlags; << " flags=" << hex << penInfo->pointerInfo.pointerFlags;
@ -570,7 +587,7 @@ bool QWindowsPointerHandler::translatePenEvent(QWindow *window, HWND hwnd, QtWin
switch (msg.message) { switch (msg.message) {
case WM_POINTERENTER: { case WM_POINTERENTER: {
QWindowSystemInterface::handleTabletEnterProximityEvent(device, type, pointerId); QWindowSystemInterface::handleTabletEnterProximityEvent(device, type, sourceDevice);
m_windowUnderPointer = window; m_windowUnderPointer = window;
// The local coordinates may fall outside the window. // The local coordinates may fall outside the window.
// Wait until the next update to send the enter event. // Wait until the next update to send the enter event.
@ -583,12 +600,12 @@ bool QWindowsPointerHandler::translatePenEvent(QWindow *window, HWND hwnd, QtWin
m_windowUnderPointer = nullptr; m_windowUnderPointer = nullptr;
m_currentWindow = nullptr; m_currentWindow = nullptr;
} }
QWindowSystemInterface::handleTabletLeaveProximityEvent(device, type, pointerId); QWindowSystemInterface::handleTabletLeaveProximityEvent(device, type, sourceDevice);
break; break;
case WM_POINTERDOWN: case WM_POINTERDOWN:
case WM_POINTERUP: case WM_POINTERUP:
case WM_POINTERUPDATE: { case WM_POINTERUPDATE: {
QWindow *target = QGuiApplicationPrivate::tabletDevicePoint(pointerId).target; // Pass to window that grabbed it. QWindow *target = QGuiApplicationPrivate::tabletDevicePoint(sourceDevice).target; // Pass to window that grabbed it.
if (!target && m_windowUnderPointer) if (!target && m_windowUnderPointer)
target = m_windowUnderPointer; target = m_windowUnderPointer;
if (!target) if (!target)
@ -607,7 +624,7 @@ bool QWindowsPointerHandler::translatePenEvent(QWindow *window, HWND hwnd, QtWin
QWindowSystemInterface::handleTabletEvent(target, localPos, hiResGlobalPos, device, type, mouseButtons, QWindowSystemInterface::handleTabletEvent(target, localPos, hiResGlobalPos, device, type, mouseButtons,
pressure, xTilt, yTilt, tangentialPressure, rotation, z, pressure, xTilt, yTilt, tangentialPressure, rotation, z,
pointerId, keyModifiers); sourceDevice, keyModifiers);
return false; // Allow mouse messages to be generated. return false; // Allow mouse messages to be generated.
} }
} }
@ -681,7 +698,6 @@ bool QWindowsPointerHandler::translateMouseEvent(QWindow *window,
} }
const Qt::KeyboardModifiers keyModifiers = QWindowsKeyMapper::queryKeyboardModifiers(); const Qt::KeyboardModifiers keyModifiers = QWindowsKeyMapper::queryKeyboardModifiers();
const Qt::MouseButtons mouseButtons = mouseButtonsFromKeyState(msg.wParam);
QWindow *currentWindowUnderPointer = getWindowUnderPointer(window, globalPos); QWindow *currentWindowUnderPointer = getWindowUnderPointer(window, globalPos);
if (et == QtWindows::MouseWheelEvent) if (et == QtWindows::MouseWheelEvent)
@ -709,7 +725,8 @@ bool QWindowsPointerHandler::translateMouseEvent(QWindow *window,
const MouseEvent mouseEvent = eventFromMsg(msg); const MouseEvent mouseEvent = eventFromMsg(msg);
if (mouseEvent.type >= QEvent::NonClientAreaMouseMove && mouseEvent.type <= QEvent::NonClientAreaMouseButtonDblClick) { if (mouseEvent.type >= QEvent::NonClientAreaMouseMove && mouseEvent.type <= QEvent::NonClientAreaMouseButtonDblClick) {
QWindowSystemInterface::handleFrameStrutMouseEvent(window, localPos, globalPos, mouseButtons, const Qt::MouseButtons nonclientButtons = queryMouseButtons();
QWindowSystemInterface::handleFrameStrutMouseEvent(window, localPos, globalPos, nonclientButtons,
mouseEvent.button, mouseEvent.type, keyModifiers, source); mouseEvent.button, mouseEvent.type, keyModifiers, source);
return false; // Allow further event processing return false; // Allow further event processing
} }
@ -725,6 +742,8 @@ bool QWindowsPointerHandler::translateMouseEvent(QWindow *window,
return true; return true;
} }
const Qt::MouseButtons mouseButtons = mouseButtonsFromKeyState(msg.wParam);
handleCaptureRelease(window, currentWindowUnderPointer, hwnd, mouseEvent.type, mouseButtons); handleCaptureRelease(window, currentWindowUnderPointer, hwnd, mouseEvent.type, mouseButtons);
handleEnterLeave(window, currentWindowUnderPointer, globalPos); handleEnterLeave(window, currentWindowUnderPointer, globalPos);