diff options
author | Thomas Hartmann <thomas.hartmann@qt.io> | 2022-02-23 17:35:51 +0100 |
---|---|---|
committer | Thomas Hartmann <thomas.hartmann@qt.io> | 2022-02-23 20:47:09 +0000 |
commit | ee4757a8e84336de1f53e9b6a528916313a355fd (patch) | |
tree | 45390e136fdf2c2434f899dced05a463175919bc | |
parent | 787bbfaf1c99adb7e079145a544b94be87a24e80 (diff) |
QmlDesigner: Use LoggingCategory in ImageContainer
Change-Id: Ibdce399fc2df19883d6ffd12e9441c58d46035ec
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
-rw-r--r-- | share/qtcreator/qml/qmlpuppet/container/imagecontainer.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/share/qtcreator/qml/qmlpuppet/container/imagecontainer.cpp b/share/qtcreator/qml/qmlpuppet/container/imagecontainer.cpp index d2a9ee219f..b556620c54 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 <QCache> #include <QDebug> +#include <QLoggingCategory> #include <cstring> @@ -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<const qint32*>(sharedMemory.constData()) + 6, byteCount); |