From ee4757a8e84336de1f53e9b6a528916313a355fd Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Wed, 23 Feb 2022 17:35:51 +0100 Subject: [PATCH] QmlDesigner: Use LoggingCategory in ImageContainer Change-Id: Ibdce399fc2df19883d6ffd12e9441c58d46035ec Reviewed-by: Qt CI Bot Reviewed-by: Thomas Hartmann --- share/qtcreator/qml/qmlpuppet/container/imagecontainer.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/share/qtcreator/qml/qmlpuppet/container/imagecontainer.cpp b/share/qtcreator/qml/qmlpuppet/container/imagecontainer.cpp index d2a9ee219fc..b556620c54f 100644 --- a/share/qtcreator/qml/qmlpuppet/container/imagecontainer.cpp +++ b/share/qtcreator/qml/qmlpuppet/container/imagecontainer.cpp @@ -28,6 +28,7 @@ #include "sharedmemory.h" #include #include +#include #include @@ -36,6 +37,8 @@ #define QTC_ASSERT_STRING(cond) qDebug("SOFT ASSERT: \"" cond"\" in file " __FILE__ ", line " QTC_ASSERT_STRINGIFY(__LINE__)) #define QTC_ASSERT(cond, action) if (cond) {} else { QTC_ASSERT_STRING(#cond); action; } do {} while (0) +static Q_LOGGING_CATEGORY(imageContainerDebug, "qtc.imagecontainer.debug", QtDebugMsg) + namespace QmlDesigner { // using cache as a container which deletes sharedmemory pointers at process exit @@ -202,7 +205,7 @@ static void readSharedMemory(qint32 key, ImageContainer &container) image.setDevicePixelRatio(pixelRatio); if (image.isNull()) - qDebug() << Q_FUNC_INFO << "Not able to create image:" << imageWidth << imageHeight << imageFormat; + qCInfo(imageContainerDebug()) << Q_FUNC_INFO << "Not able to create image:" << imageWidth << imageHeight << imageFormat; else std::memcpy(image.bits(), reinterpret_cast(sharedMemory.constData()) + 6, byteCount);