forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user