diff --git a/qtbase/src/corelib/thread/qmutex.cpp b/qtbase/src/corelib/thread/qmutex.cpp index 58f42791..1f54484b 100644 --- a/qtbase/src/corelib/thread/qmutex.cpp +++ b/qtbase/src/corelib/thread/qmutex.cpp @@ -637,6 +637,7 @@ void QRecursiveMutex::unlock() noexcept /*! \internal helper for lock() */ +Q_NEVER_INLINE void QBasicMutex::lockInternal() QT_MUTEX_LOCK_NOEXCEPT { if (futexAvailable()) { @@ -670,6 +671,7 @@ bool QBasicMutex::lockInternal(int timeout) QT_MUTEX_LOCK_NOEXCEPT /*! \internal helper for tryLock(QDeadlineTimer) */ +Q_NEVER_INLINE bool QBasicMutex::lockInternal(QDeadlineTimer deadlineTimer) QT_MUTEX_LOCK_NOEXCEPT { if (deadlineTimer.hasExpired()) @@ -809,6 +811,7 @@ bool QBasicMutex::lockInternal(QDeadlineTimer deadlineTimer) QT_MUTEX_LOCK_NOEXC /*! \internal */ +Q_NEVER_INLINE void QBasicMutex::unlockInternal() noexcept { QMutexPrivate *copy = d_ptr.loadAcquire(); diff --git a/qtbase/src/gui/rhi/qrhid3d12.cpp b/qtbase/src/gui/rhi/qrhid3d12.cpp index 90d5c7f0..a738d888 100644 --- a/qtbase/src/gui/rhi/qrhid3d12.cpp +++ b/qtbase/src/gui/rhi/qrhid3d12.cpp @@ -5697,7 +5697,16 @@ bool QD3D12GraphicsPipeline::create() } QD3D12RenderPassDescriptor *rpD = QRHI_RES(QD3D12RenderPassDescriptor, m_renderPassDesc); - const DXGI_SAMPLE_DESC sampleDesc = rhiD->effectiveSampleDesc(m_sampleCount, DXGI_FORMAT(rpD->colorFormat[0])); + DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN; + if (rpD->colorAttachmentCount > 0) { + format = DXGI_FORMAT(rpD->colorFormat[0]); + } else if (rpD->hasDepthStencil) { + format = DXGI_FORMAT(rpD->dsFormat); + } else { + qWarning("Cannot create graphics pipeline state without color or depthStencil format"); + return false; + } + const DXGI_SAMPLE_DESC sampleDesc = rhiD->effectiveSampleDesc(m_sampleCount, format); struct { QD3D12PipelineStateSubObject rootSig; diff --git a/qtbase/src/plugins/platforms/windows/qwindowskeymapper.cpp b/qtbase/src/plugins/platforms/windows/qwindowskeymapper.cpp index 80a193d1..5c84b477 100644 --- a/qtbase/src/plugins/platforms/windows/qwindowskeymapper.cpp +++ b/qtbase/src/plugins/platforms/windows/qwindowskeymapper.cpp @@ -1359,6 +1359,11 @@ QList QWindowsKeyMapper::possibleKeyCombinations(const QKeyEven return result; } + // If Key_Tab+Shift is pressed we add Key_Backtab without + // shift modifier as a possible combination too + if (baseKey == Qt::Key_Tab && (keyMods & Qt::ShiftModifier)) + result << (Qt::Key_Backtab | (keyMods & ~Qt::ShiftModifier)); + // The base key is _always_ valid, of course result << QKeyCombination::fromCombined(int(baseKey) + int(keyMods)); diff --git a/qtbase/src/plugins/platforms/windows/qwindowsscreen.cpp b/qtbase/src/plugins/platforms/windows/qwindowsscreen.cpp index 3552e21d..24588473 100644 --- a/qtbase/src/plugins/platforms/windows/qwindowsscreen.cpp +++ b/qtbase/src/plugins/platforms/windows/qwindowsscreen.cpp @@ -132,12 +132,12 @@ namespace { struct DiRegKeyHandleTraits { using Type = HKEY; - static Type invalidValue() + static Type invalidValue() noexcept { // The setupapi.h functions return INVALID_HANDLE_VALUE when failing to open a registry key return reinterpret_cast(INVALID_HANDLE_VALUE); } - static bool close(Type handle) { return RegCloseKey(handle) == ERROR_SUCCESS; } + static bool close(Type handle) noexcept { return RegCloseKey(handle) == ERROR_SUCCESS; } }; using DiRegKeyHandle = QUniqueHandle; @@ -145,11 +145,11 @@ using DiRegKeyHandle = QUniqueHandle; struct DevInfoHandleTraits { using Type = HDEVINFO; - static Type invalidValue() + static Type invalidValue() noexcept { return reinterpret_cast(INVALID_HANDLE_VALUE); } - static bool close(Type handle) { return SetupDiDestroyDeviceInfoList(handle) == TRUE; } + static bool close(Type handle) noexcept { return SetupDiDestroyDeviceInfoList(handle) == TRUE; } }; using DevInfoHandle = QUniqueHandle; diff --git a/qtbase/src/plugins/platforms/windows/qwindowstheme.cpp b/qtbase/src/plugins/platforms/windows/qwindowstheme.cpp index 139c002b..cb68df33 100644 --- a/qtbase/src/plugins/platforms/windows/qwindowstheme.cpp +++ b/qtbase/src/plugins/platforms/windows/qwindowstheme.cpp @@ -843,7 +843,6 @@ QPixmap QWindowsTheme::standardPixmap(StandardPixmap sp, const QSizeF &pixmapSiz { int resourceId = -1; SHSTOCKICONID stockId = SIID_INVALID; - UINT stockFlags = 0; LPCTSTR iconName = nullptr; switch (sp) { case DriveCDIcon: @@ -867,14 +866,12 @@ QPixmap QWindowsTheme::standardPixmap(StandardPixmap sp, const QSizeF &pixmapSiz resourceId = 7; break; case FileLinkIcon: - stockFlags = SHGSI_LINKOVERLAY; Q_FALLTHROUGH(); case FileIcon: stockId = SIID_DOCNOASSOC; resourceId = 1; break; case DirLinkIcon: - stockFlags = SHGSI_LINKOVERLAY; Q_FALLTHROUGH(); case DirClosedIcon: case DirIcon: @@ -888,7 +885,6 @@ QPixmap QWindowsTheme::standardPixmap(StandardPixmap sp, const QSizeF &pixmapSiz resourceId = 16; break; case DirLinkOpenIcon: - stockFlags = SHGSI_LINKOVERLAY; Q_FALLTHROUGH(); case DirOpenIcon: stockId = SIID_FOLDEROPEN; @@ -928,18 +924,34 @@ QPixmap QWindowsTheme::standardPixmap(StandardPixmap sp, const QSizeF &pixmapSiz break; } + // Even with SHGSI_LINKOVERLAY flag set, loaded Icon with SHDefExtractIcon doesn't have + // any overlay, so we avoid SHGSI_LINKOVERLAY flag and draw it manually (QTBUG-131843) + const auto drawLinkOverlayIconIfNeeded = [](StandardPixmap sp, QPixmap &pixmap, QSizeF pixmapSize) { + if (sp == FileLinkIcon || sp == DirLinkIcon || sp == DirLinkOpenIcon) { + QPainter painter(&pixmap); + const QSizeF linkSize = pixmapSize / (pixmapSize.height() >= 48 ? 3 : 2); + static constexpr auto LinkOverlayIconId = 16769; + const QPixmap link = loadIconFromShell32(LinkOverlayIconId, linkSize.toSize()); + const int yPos = pixmap.height() - link.size().height(); + painter.drawPixmap(0, yPos, int(linkSize.width()), int(linkSize.height()), link); + } + }; + if (stockId != SIID_INVALID) { SHSTOCKICONINFO iconInfo; memset(&iconInfo, 0, sizeof(iconInfo)); iconInfo.cbSize = sizeof(iconInfo); - stockFlags |= SHGSI_ICONLOCATION; + constexpr UINT stockFlags = SHGSI_ICONLOCATION; if (SHGetStockIconInfo(stockId, stockFlags, &iconInfo) == S_OK) { const auto iconSize = pixmapSize.width(); HICON icon; if (SHDefExtractIcon(iconInfo.szPath, iconInfo.iIcon, 0, &icon, nullptr, iconSize) == S_OK) { QPixmap pixmap = qt_pixmapFromWinHICON(icon); DestroyIcon(icon); - return pixmap; + if (!pixmap.isNull()) { + drawLinkOverlayIconIfNeeded(sp, pixmap, pixmap.size()); + return pixmap; + } } } } @@ -947,11 +959,7 @@ QPixmap QWindowsTheme::standardPixmap(StandardPixmap sp, const QSizeF &pixmapSiz if (resourceId != -1) { QPixmap pixmap = loadIconFromShell32(resourceId, pixmapSize); if (!pixmap.isNull()) { - if (sp == FileLinkIcon || sp == DirLinkIcon || sp == DirLinkOpenIcon) { - QPainter painter(&pixmap); - QPixmap link = loadIconFromShell32(30, pixmapSize); - painter.drawPixmap(0, 0, int(pixmapSize.width()), int(pixmapSize.height()), link); - } + drawLinkOverlayIconIfNeeded(sp, pixmap, pixmapSize); return pixmap; } } diff --git a/qtbase/src/plugins/platforms/windows/qwindowswindow.cpp b/qtbase/src/plugins/platforms/windows/qwindowswindow.cpp index e7b3bc4b..6d6409c7 100644 --- a/qtbase/src/plugins/platforms/windows/qwindowswindow.cpp +++ b/qtbase/src/plugins/platforms/windows/qwindowswindow.cpp @@ -1405,7 +1405,7 @@ void QWindowsForeignWindow::setParent(const QPlatformWindow *newParentWindow) qCDebug(lcQpaWindow) << __FUNCTION__ << window() << "newParent=" << newParentWindow << newParent << "oldStyle=" << debugWinStyle(oldStyle); - auto updateWindowFlags = [=]{ + auto updateWindowFlags = [&]{ // Top level window flags need to be set/cleared manually. DWORD newStyle = oldStyle; if (isTopLevel) { diff --git a/qtbase/src/plugins/platforms/windows/uiautomation/qwindowsuiamainprovider.cpp b/qtbase/src/plugins/platforms/windows/uiautomation/qwindowsuiamainprovider.cpp index b1e43639..02e853da 100644 --- a/qtbase/src/plugins/platforms/windows/uiautomation/qwindowsuiamainprovider.cpp +++ b/qtbase/src/plugins/platforms/windows/uiautomation/qwindowsuiamainprovider.cpp @@ -363,7 +363,7 @@ void QWindowsUiaMainProvider::fillVariantArrayForRelation(QAccessibleInterface* { Q_ASSERT(accessible); - typedef QPair RelationPair; + typedef std::pair RelationPair; const QList relationInterfaces = accessible->relations(relation); if (relationInterfaces.empty()) return;