diff options
author | Liang Qi <liang.qi@qt.io> | 2017-11-21 14:34:31 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-11-23 09:36:03 +0100 |
commit | 153e8b49adfe210cb00490284a14c94c08e03c3f (patch) | |
tree | 59d9522d6dc96215cc2cb1d19b3e8a0e580bcb41 /src/gui | |
parent | ef7c0594bf9e41813c9c841e00c3a52269d363f5 (diff) | |
parent | a4113d0c644edba1c39d9d268a259e95ae51c61e (diff) |
Merge remote-tracking branch 'origin/5.10' into dev
Conflicts:
src/network/access/qhttp2protocolhandler_p.h
src/network/kernel/kernel.pri
src/network/ssl/qsslkey_qt.cpp
src/plugins/platforms/cocoa/qcocoascreen.mm
src/plugins/platforms/windows/accessible/iaccessible2.cpp
src/plugins/platforms/windows/accessible/iaccessible2.h
src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp
src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp
src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.h
src/widgets/widgets/qmenu_p.h
tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
tests/auto/other/qaccessibility/tst_qaccessibility.cpp
tests/auto/testlib/selftests/expected_cmptest.lightxml
tests/auto/testlib/selftests/expected_cmptest.teamcity
tests/auto/testlib/selftests/expected_cmptest.txt
tests/auto/testlib/selftests/expected_cmptest.xml
Done-with: Edward Welbourne <edward.welbourne@qt.io>
Change-Id: I4217cc7d840cbae3e3dd28574741544469c4c6b9
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/image/qimagereader.cpp | 10 | ||||
-rw-r--r-- | src/gui/image/qpixmap_blitter.cpp | 3 | ||||
-rw-r--r-- | src/gui/kernel/qhighdpiscaling_p.h | 3 | ||||
-rw-r--r-- | src/gui/kernel/qopenglcontext.cpp | 1 | ||||
-rw-r--r-- | src/gui/kernel/qwindow.cpp | 7 | ||||
-rw-r--r-- | src/gui/opengl/qopenglgradientcache.cpp | 3 | ||||
-rw-r--r-- | src/gui/painting/qcoregraphics.mm | 1 | ||||
-rw-r--r-- | src/gui/painting/qpaintengine_raster.cpp | 3 | ||||
-rw-r--r-- | src/gui/painting/qtextureglyphcache.cpp | 3 | ||||
-rw-r--r-- | src/gui/text/qfont.cpp | 22 | ||||
-rw-r--r-- | src/gui/text/qtexttable.cpp | 4 | ||||
-rw-r--r-- | src/gui/vulkan/qvulkaninstance.h | 4 | ||||
-rw-r--r-- | src/gui/vulkan/qvulkanwindow.cpp | 44 | ||||
-rw-r--r-- | src/gui/vulkan/qvulkanwindow.h | 4 |
14 files changed, 75 insertions, 37 deletions
diff --git a/src/gui/image/qimagereader.cpp b/src/gui/image/qimagereader.cpp index 7a5a630495..7086e102ea 100644 --- a/src/gui/image/qimagereader.cpp +++ b/src/gui/image/qimagereader.cpp @@ -72,6 +72,11 @@ that occurred, or errorString() to get a human readable description of what went wrong. + \note QImageReader assumes exclusive control over the file or + device that is assigned. Any attempts to modify the assigned file + or device during the lifetime of the QImageReader object will + yield undefined results. + \section1 Formats Call supportedImageFormats() for a list of formats that @@ -1220,10 +1225,13 @@ float QImageReader::gamma() const see if the image data is valid. read() may still return false after canRead() returns \c true, if the image data is corrupt. + \note A QMimeDatabase lookup is normally a better approach than this + function for identifying potentially non-image files or data. + For images that support animation, canRead() returns \c false when all frames have been read. - \sa read(), supportedImageFormats() + \sa read(), supportedImageFormats(), QMimeDatabase */ bool QImageReader::canRead() const { diff --git a/src/gui/image/qpixmap_blitter.cpp b/src/gui/image/qpixmap_blitter.cpp index de32327071..d694352fc1 100644 --- a/src/gui/image/qpixmap_blitter.cpp +++ b/src/gui/image/qpixmap_blitter.cpp @@ -41,6 +41,7 @@ #include <qpainter.h> #include <qimage.h> +#include <qrandom.h> #include <qscreen.h> #include <private/qguiapplication_p.h> @@ -252,7 +253,7 @@ QImage *QBlittablePlatformPixmap::overlay() m_rasterOverlay->size() != QSize(w,h)){ m_rasterOverlay = new QImage(w,h,QImage::Format_ARGB32_Premultiplied); m_rasterOverlay->fill(0x00000000); - uint color = (qrand() % 11)+7; + uint color = QRandomGenerator::global()->bounded(11)+7; m_overlayColor = QColor(Qt::GlobalColor(color)); m_overlayColor.setAlpha(0x88); diff --git a/src/gui/kernel/qhighdpiscaling_p.h b/src/gui/kernel/qhighdpiscaling_p.h index 0a060a2d2c..83fc9452c5 100644 --- a/src/gui/kernel/qhighdpiscaling_p.h +++ b/src/gui/kernel/qhighdpiscaling_p.h @@ -402,7 +402,8 @@ inline QRegion fromNativeLocalExposedRegion(const QRegion &pixelRegion, const QW const QPointF topLeftP = rect.topLeft() / scaleFactor; const QSizeF sizeP = rect.size() / scaleFactor; pointRegion += QRect(QPoint(qFloor(topLeftP.x()), qFloor(topLeftP.y())), - QSize(qCeil(sizeP.width()), qCeil(sizeP.height()))); + QPoint(qCeil(topLeftP.x() + sizeP.width() - 1.0), + qCeil(topLeftP.y() + sizeP.height() - 1.0))); } return pointRegion; } diff --git a/src/gui/kernel/qopenglcontext.cpp b/src/gui/kernel/qopenglcontext.cpp index 406fcdd226..6298dd5f45 100644 --- a/src/gui/kernel/qopenglcontext.cpp +++ b/src/gui/kernel/qopenglcontext.cpp @@ -1008,6 +1008,7 @@ bool QOpenGLContext::makeCurrent(QSurface *surface) || qstrncmp(rendererString, "Adreno 4xx", 8) == 0 // Same as above but without the '(TM)' || qstrcmp(rendererString, "GC800 core") == 0 || qstrcmp(rendererString, "GC1000 core") == 0 + || strstr(rendererString, "GC2000") != 0 || qstrcmp(rendererString, "Immersion.16") == 0; } needsWorkaroundSet = true; diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp index 9969124339..fea55e459d 100644 --- a/src/gui/kernel/qwindow.cpp +++ b/src/gui/kernel/qwindow.cpp @@ -55,6 +55,7 @@ # include "qaccessible.h" #endif #include "qhighdpiscaling_p.h" +#include "qshapedpixmapdndwindow_p.h" #include <private/qevent_p.h> @@ -379,7 +380,9 @@ void QWindowPrivate::setVisible(bool visible) QGuiApplicationPrivate::showModalWindow(q); else QGuiApplicationPrivate::hideModalWindow(q); - } else if (visible && QGuiApplication::modalWindow()) { + // QShapedPixmapWindow is used on some platforms for showing a drag pixmap, so don't block + // input to this window as it is performing a drag - QTBUG-63846 + } else if (visible && QGuiApplication::modalWindow() && !qobject_cast<QShapedPixmapWindow *>(q)) { QGuiApplicationPrivate::updateBlockedStatus(q); } @@ -2575,7 +2578,7 @@ QPoint QWindowPrivate::globalPosition() const QPoint offset = q->position(); for (const QWindow *p = q->parent(); p; p = p->parent()) { QPlatformWindow *pw = p->handle(); - if (pw && pw->isForeignWindow()) { + if (pw && (pw->isForeignWindow() || pw->isEmbedded())) { // Use mapToGlobal() for foreign windows offset += p->mapToGlobal(QPoint(0, 0)); break; diff --git a/src/gui/opengl/qopenglgradientcache.cpp b/src/gui/opengl/qopenglgradientcache.cpp index 58dcbed50a..3aa4c0d2e6 100644 --- a/src/gui/opengl/qopenglgradientcache.cpp +++ b/src/gui/opengl/qopenglgradientcache.cpp @@ -42,6 +42,7 @@ #include <private/qopenglcontext_p.h> #include <private/qrgba64_p.h> #include <QtCore/qmutex.h> +#include <QtCore/qrandom.h> #include "qopenglfunctions.h" #include "qopenglextensions_p.h" @@ -137,7 +138,7 @@ GLuint QOpenGL2GradientCache::addCacheElement(quint64 hash_val, const QGradient { QOpenGLFunctions *funcs = QOpenGLContext::currentContext()->functions(); if (cache.size() == maxCacheSize()) { - int elem_to_remove = qrand() % maxCacheSize(); + int elem_to_remove = QRandomGenerator::global()->bounded(maxCacheSize()); quint64 key = cache.keys()[elem_to_remove]; // need to call glDeleteTextures on each removed cache entry: diff --git a/src/gui/painting/qcoregraphics.mm b/src/gui/painting/qcoregraphics.mm index a234a12bf0..e1601d87dc 100644 --- a/src/gui/painting/qcoregraphics.mm +++ b/src/gui/painting/qcoregraphics.mm @@ -110,6 +110,7 @@ NSImage *qt_mac_create_nsimage(const QPixmap &pm) QImage image = pm.toImage(); CGImageRef cgImage = qt_mac_toCGImage(image); NSImage *nsImage = qt_mac_cgimage_to_nsimage(cgImage); + nsImage.size = (pm.size() / pm.devicePixelRatioF()).toCGSize(); CGImageRelease(cgImage); return nsImage; } diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp index 68554c6579..d0d948bbb7 100644 --- a/src/gui/painting/qpaintengine_raster.cpp +++ b/src/gui/painting/qpaintengine_raster.cpp @@ -50,6 +50,7 @@ #include <qdebug.h> #include <qbitmap.h> #include <qmath.h> +#include <qrandom.h> // #include <private/qdatabuffer_p.h> // #include <private/qpainter_p.h> @@ -4229,7 +4230,7 @@ protected: QSharedPointer<const CacheInfo> addCacheElement(quint64 hash_val, const QGradient &gradient, int opacity) { if (cache.size() == maxCacheSize()) { // may remove more than 1, but OK - cache.erase(cache.begin() + (qrand() % maxCacheSize())); + cache.erase(cache.begin() + QRandomGenerator::global()->bounded(maxCacheSize())); } auto cache_entry = QSharedPointer<CacheInfo>::create(gradient.stops(), opacity, gradient.interpolationMode()); generateGradientColorTable(gradient, cache_entry->buffer64, paletteSize(), opacity); diff --git a/src/gui/painting/qtextureglyphcache.cpp b/src/gui/painting/qtextureglyphcache.cpp index 86a53c21a3..2a7e0eaa0c 100644 --- a/src/gui/painting/qtextureglyphcache.cpp +++ b/src/gui/painting/qtextureglyphcache.cpp @@ -318,11 +318,12 @@ void QImageTextureGlyphCache::fillTexture(const Coord &c, glyph_t g, QFixed subP return; } #endif + Q_ASSERT(mask.width() <= c.w && mask.height() <= c.h); if (m_format == QFontEngine::Format_A32 || m_format == QFontEngine::Format_ARGB) { QImage ref(m_image.bits() + (c.x * 4 + c.y * m_image.bytesPerLine()), - qMax(mask.width(), c.w), qMax(mask.height(), c.h), m_image.bytesPerLine(), + qMin(mask.width(), c.w), qMin(mask.height(), c.h), m_image.bytesPerLine(), m_image.format()); QPainter p(&ref); p.setCompositionMode(QPainter::CompositionMode_Source); diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp index 0c72ac3019..220e89a0c4 100644 --- a/src/gui/text/qfont.cpp +++ b/src/gui/text/qfont.cpp @@ -727,11 +727,9 @@ void QFont::setFamily(const QString &family) /*! \since 4.8 - Returns the requested font style name, it will be used to match the + Returns the requested font style name. This can be used to match the font with irregular styles (that can't be normalized in other style - properties). It depends on system font support, thus only works for - \macos and X11 so far. On Windows irregular styles will be added - as separate font families so there is no need for this. + properties). \sa setFamily(), setStyle() */ @@ -744,7 +742,12 @@ QString QFont::styleName() const \since 4.8 Sets the style name of the font to \a styleName. When set, other style properties - like \l style() and \l weight() will be ignored for font matching. + like \l style() and \l weight() will be ignored for font matching, though they may be + simulated afterwards if supported by the platform's font engine. + + Due to the lower quality of artificially simulated styles, and the lack of full cross + platform support, it is not recommended to use matching by style name together with + matching by style properties \sa styleName() */ @@ -985,6 +988,10 @@ int QFont::pixelSize() const Sets the style() of the font to QFont::StyleItalic if \a enable is true; otherwise the style is set to QFont::StyleNormal. + \note If styleName() is set, this value may be ignored, or if supported + on the platform, the font may be rendered tilted instead of picking a + designed italic font-variant. + \sa italic(), QFontInfo */ @@ -1050,6 +1057,8 @@ int QFont::weight() const Sets the weight of the font to \a weight, using the scale defined by \l QFont::Weight enumeration. + \note If styleName() is set, this value may be ignored for font selection. + \sa weight(), QFontInfo */ void QFont::setWeight(int weight) @@ -1083,6 +1092,9 @@ void QFont::setWeight(int weight) For finer boldness control use setWeight(). + \note If styleName() is set, this value may be ignored, or if supported + on the platform, the font artificially embolded. + \sa bold(), setWeight() */ diff --git a/src/gui/text/qtexttable.cpp b/src/gui/text/qtexttable.cpp index e4a3c2b915..9639c18d2b 100644 --- a/src/gui/text/qtexttable.cpp +++ b/src/gui/text/qtexttable.cpp @@ -1048,7 +1048,7 @@ void QTextTable::mergeCells(int row, int column, int numRows, int numCols) QFragmentFindHelper helper(origCellPosition, p->fragmentMap()); const auto begin = d->cells.cbegin(); const auto it = std::lower_bound(begin, d->cells.cend(), helper); - Q_ASSERT(it != d->cells.end()); + Q_ASSERT(it != d->cells.cend()); Q_ASSERT(!(helper < *it)); Q_ASSERT(*it == cellFragment); const int insertCellIndex = it - begin; @@ -1082,7 +1082,7 @@ void QTextTable::mergeCells(int row, int column, int numRows, int numCols) QFragmentFindHelper helper(pos, p->fragmentMap()); const auto begin = d->cells.cbegin(); const auto it = std::lower_bound(begin, d->cells.cend(), helper); - Q_ASSERT(it != d->cells.end()); + Q_ASSERT(it != d->cells.cend()); Q_ASSERT(!(helper < *it)); Q_ASSERT(*it == fragment); firstCellIndex = cellIndex = it - begin; diff --git a/src/gui/vulkan/qvulkaninstance.h b/src/gui/vulkan/qvulkaninstance.h index ada297be43..57459e458c 100644 --- a/src/gui/vulkan/qvulkaninstance.h +++ b/src/gui/vulkan/qvulkaninstance.h @@ -42,6 +42,10 @@ #include <QtGui/qtguiglobal.h> +#if 0 +#pragma qt_no_master_include +#endif + #if QT_CONFIG(vulkan) || defined(Q_CLANG_QDOC) #ifndef VK_NO_PROTOTYPES diff --git a/src/gui/vulkan/qvulkanwindow.cpp b/src/gui/vulkan/qvulkanwindow.cpp index bc82f5df08..7dea743ea8 100644 --- a/src/gui/vulkan/qvulkanwindow.cpp +++ b/src/gui/vulkan/qvulkanwindow.cpp @@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE -Q_LOGGING_CATEGORY(lcVk, "qt.vulkan") +Q_LOGGING_CATEGORY(lcGuiVk, "qt.vulkan") /*! \class QVulkanWindow @@ -357,7 +357,7 @@ QVector<VkPhysicalDeviceProperties> QVulkanWindow::availablePhysicalDevices() return d->physDevProps; } - qCDebug(lcVk, "%d physical devices", count); + qCDebug(lcGuiVk, "%d physical devices", count); if (!count) return d->physDevProps; @@ -373,7 +373,7 @@ QVector<VkPhysicalDeviceProperties> QVulkanWindow::availablePhysicalDevices() for (uint32_t i = 0; i < count; ++i) { VkPhysicalDeviceProperties *p = &d->physDevProps[i]; f->vkGetPhysicalDeviceProperties(d->physDevs.at(i), p); - qCDebug(lcVk, "Physical device [%d]: name '%s' version %d.%d.%d", i, p->deviceName, + qCDebug(lcGuiVk, "Physical device [%d]: name '%s' version %d.%d.%d", i, p->deviceName, VK_VERSION_MAJOR(p->driverVersion), VK_VERSION_MINOR(p->driverVersion), VK_VERSION_PATCH(p->driverVersion)); } @@ -442,7 +442,7 @@ QVulkanInfoVector<QVulkanExtension> QVulkanWindow::supportedDeviceExtensions() exts.append(ext); } d->supportedDevExtensions.insert(physDev, exts); - qDebug(lcVk) << "Supported device extensions:" << exts; + qDebug(lcGuiVk) << "Supported device extensions:" << exts; return exts; } } @@ -615,7 +615,7 @@ void QVulkanWindowPrivate::init() Q_Q(QVulkanWindow); Q_ASSERT(status == StatusUninitialized); - qCDebug(lcVk, "QVulkanWindow init"); + qCDebug(lcGuiVk, "QVulkanWindow init"); inst = q->vulkanInstance(); if (!inst) { @@ -648,7 +648,7 @@ void QVulkanWindowPrivate::init() qWarning("QVulkanWindow: Invalid physical device index; defaulting to 0"); physDevIndex = 0; } - qCDebug(lcVk, "Using physical device [%d]", physDevIndex); + qCDebug(lcGuiVk, "Using physical device [%d]", physDevIndex); // Give a last chance to do decisions based on the physical device and the surface. if (renderer) @@ -665,7 +665,7 @@ void QVulkanWindowPrivate::init() presQueueFamilyIdx = uint32_t(-1); for (int i = 0; i < queueFamilyProps.count(); ++i) { const bool supportsPresent = inst->supportsPresent(physDev, i, q); - qCDebug(lcVk, "queue family %d: flags=0x%x count=%d supportsPresent=%d", i, + qCDebug(lcGuiVk, "queue family %d: flags=0x%x count=%d supportsPresent=%d", i, queueFamilyProps[i].queueFlags, queueFamilyProps[i].queueCount, supportsPresent); if (gfxQueueFamilyIdx == uint32_t(-1) && (queueFamilyProps[i].queueFlags & VK_QUEUE_GRAPHICS_BIT) @@ -675,7 +675,7 @@ void QVulkanWindowPrivate::init() if (gfxQueueFamilyIdx != uint32_t(-1)) { presQueueFamilyIdx = gfxQueueFamilyIdx; } else { - qCDebug(lcVk, "No queue with graphics+present; trying separate queues"); + qCDebug(lcGuiVk, "No queue with graphics+present; trying separate queues"); for (int i = 0; i < queueFamilyProps.count(); ++i) { if (gfxQueueFamilyIdx == uint32_t(-1) && (queueFamilyProps[i].queueFlags & VK_QUEUE_GRAPHICS_BIT)) gfxQueueFamilyIdx = i; @@ -698,7 +698,7 @@ void QVulkanWindowPrivate::init() if (qEnvironmentVariableIsSet("QT_VK_PRESENT_QUEUE_INDEX")) presQueueFamilyIdx = qEnvironmentVariableIntValue("QT_VK_PRESENT_QUEUE_INDEX"); #endif - qCDebug(lcVk, "Using queue families: graphics = %u present = %u", gfxQueueFamilyIdx, presQueueFamilyIdx); + qCDebug(lcGuiVk, "Using queue families: graphics = %u present = %u", gfxQueueFamilyIdx, presQueueFamilyIdx); VkDeviceQueueCreateInfo queueInfo[2]; const float prio[] = { 0 }; @@ -724,7 +724,7 @@ void QVulkanWindowPrivate::init() if (supportedExtensions.contains(ext)) devExts.append(ext.constData()); } - qCDebug(lcVk) << "Enabling device extensions:" << devExts; + qCDebug(lcGuiVk) << "Enabling device extensions:" << devExts; VkDeviceCreateInfo devInfo; memset(&devInfo, 0, sizeof(devInfo)); @@ -774,7 +774,7 @@ void QVulkanWindowPrivate::init() physDevs.clear(); physDevProps.clear(); status = StatusUninitialized; - qCDebug(lcVk, "Attempting to restart in 2 seconds"); + qCDebug(lcGuiVk, "Attempting to restart in 2 seconds"); QTimer::singleShot(2000, q, [this]() { ensureStarted(); }); return; } @@ -819,7 +819,7 @@ void QVulkanWindowPrivate::init() f->vkGetPhysicalDeviceMemoryProperties(physDev, &physDevMemProps); for (uint32_t i = 0; i < physDevMemProps.memoryTypeCount; ++i) { const VkMemoryType *memType = physDevMemProps.memoryTypes; - qCDebug(lcVk, "memtype %d: flags=0x%x", i, memType[i].propertyFlags); + qCDebug(lcGuiVk, "memtype %d: flags=0x%x", i, memType[i].propertyFlags); // Find a host visible, host coherent memtype. If there is one that is // cached as well (in addition to being coherent), prefer that. const int hostVisibleAndCoherent = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT; @@ -831,7 +831,7 @@ void QVulkanWindowPrivate::init() } } } - qCDebug(lcVk, "Picked memtype %d for host visible memory", hostVisibleMemIndex); + qCDebug(lcGuiVk, "Picked memtype %d for host visible memory", hostVisibleMemIndex); deviceLocalMemIndex = 0; for (uint32_t i = 0; i < physDevMemProps.memoryTypeCount; ++i) { const VkMemoryType *memType = physDevMemProps.memoryTypes; @@ -841,7 +841,7 @@ void QVulkanWindowPrivate::init() break; } } - qCDebug(lcVk, "Picked memtype %d for device local memory", deviceLocalMemIndex); + qCDebug(lcGuiVk, "Picked memtype %d for device local memory", deviceLocalMemIndex); if (!vkGetPhysicalDeviceSurfaceCapabilitiesKHR || !vkGetPhysicalDeviceSurfaceFormatsKHR) { vkGetPhysicalDeviceSurfaceCapabilitiesKHR = reinterpret_cast<PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR>( @@ -906,7 +906,7 @@ void QVulkanWindowPrivate::init() if (dsFormatIdx == dsFormatCandidateCount) qWarning("QVulkanWindow: Failed to find an optimal depth-stencil format"); - qCDebug(lcVk, "Color format: %d Depth-stencil format: %d", colorFormat, dsFormat); + qCDebug(lcGuiVk, "Color format: %d Depth-stencil format: %d", colorFormat, dsFormat); if (!createDefaultRenderPass()) return; @@ -922,7 +922,7 @@ void QVulkanWindowPrivate::reset() if (!dev) // do not rely on 'status', a half done init must be cleaned properly too return; - qCDebug(lcVk, "QVulkanWindow reset"); + qCDebug(lcGuiVk, "QVulkanWindow reset"); devFuncs->vkDeviceWaitIdle(dev); @@ -1118,7 +1118,7 @@ void QVulkanWindowPrivate::recreateSwapChain() swapChainInfo.clipped = true; swapChainInfo.oldSwapchain = oldSwapChain; - qCDebug(lcVk, "Creating new swap chain of %d buffers, size %dx%d", reqBufferCount, bufferSize.width, bufferSize.height); + qCDebug(lcGuiVk, "Creating new swap chain of %d buffers, size %dx%d", reqBufferCount, bufferSize.width, bufferSize.height); VkSwapchainKHR newSwapChain; VkResult err = vkCreateSwapchainKHR(dev, &swapChainInfo, nullptr, &newSwapChain); @@ -1139,7 +1139,7 @@ void QVulkanWindowPrivate::recreateSwapChain() return; } - qCDebug(lcVk, "Actual swap chain buffer count: %d (supportsReadback=%d)", + qCDebug(lcGuiVk, "Actual swap chain buffer count: %d (supportsReadback=%d)", actualSwapChainBufferCount, swapChainSupportsReadBack); if (actualSwapChainBufferCount > MAX_SWAPCHAIN_BUFFER_COUNT) { qWarning("QVulkanWindow: Too many swapchain buffers (%d)", actualSwapChainBufferCount); @@ -1389,7 +1389,7 @@ bool QVulkanWindowPrivate::createTransientImage(VkFormat format, return false; } startIndex = memInfo.memoryTypeIndex + 1; - qCDebug(lcVk, "Allocating %u bytes for transient image (memtype %u)", + qCDebug(lcGuiVk, "Allocating %u bytes for transient image (memtype %u)", uint32_t(memInfo.allocationSize), memInfo.memoryTypeIndex); err = devFuncs->vkAllocateMemory(dev, &memInfo, nullptr, mem); if (err != VK_SUCCESS && err != VK_ERROR_OUT_OF_DEVICE_MEMORY) { @@ -1435,7 +1435,7 @@ void QVulkanWindowPrivate::releaseSwapChain() if (!dev || !swapChain) // do not rely on 'status', a half done init must be cleaned properly too return; - qCDebug(lcVk, "Releasing swapchain"); + qCDebug(lcGuiVk, "Releasing swapchain"); devFuncs->vkDeviceWaitIdle(dev); @@ -2059,10 +2059,10 @@ bool QVulkanWindowPrivate::checkDeviceLost(VkResult err) qWarning("QVulkanWindow: Device lost"); if (renderer) renderer->logicalDeviceLost(); - qCDebug(lcVk, "Releasing all resources due to device lost"); + qCDebug(lcGuiVk, "Releasing all resources due to device lost"); releaseSwapChain(); reset(); - qCDebug(lcVk, "Restarting"); + qCDebug(lcGuiVk, "Restarting"); ensureStarted(); return true; } diff --git a/src/gui/vulkan/qvulkanwindow.h b/src/gui/vulkan/qvulkanwindow.h index 65249ecbfc..927c81042f 100644 --- a/src/gui/vulkan/qvulkanwindow.h +++ b/src/gui/vulkan/qvulkanwindow.h @@ -42,6 +42,10 @@ #include <QtGui/qtguiglobal.h> +#if 0 +#pragma qt_no_master_include +#endif + #if QT_CONFIG(vulkan) || defined(Q_CLANG_QDOC) #include <QtGui/qvulkaninstance.h> |