Switch all plugins to QLoggingCategory

This commit is contained in:
Mirco Miranda
2025-09-19 10:00:26 +02:00
parent a4e18734bd
commit fda751c641
17 changed files with 372 additions and 286 deletions

View File

@ -12,6 +12,7 @@
#include <QColorSpace>
#include <QDateTime>
#include <QImage>
#include <QLoggingCategory>
#include <QSet>
#include <QTimeZone>
@ -41,6 +42,12 @@
// #define EXCLUDE_LibRaw_QIODevice // Uncomment this code if you think that the problem is LibRaw_QIODevice (default commented)
#endif
#ifdef QT_DEBUG
Q_LOGGING_CATEGORY(LOG_RAWPLUGIN, "kf.imageformats.plugins.raw", QtDebugMsg)
#else
Q_LOGGING_CATEGORY(LOG_RAWPLUGIN, "kf.imageformats.plugins.raw", QtWarningMsg)
#endif
namespace // Private.
{
@ -1010,7 +1017,7 @@ int RAWHandler::currentImageNumber() const
bool RAWHandler::canRead(QIODevice *device)
{
if (!device) {
qWarning("RAWHandler::canRead() called with no device");
qCWarning(LOG_RAWPLUGIN) << "RAWHandler::canRead() called with no device";
return false;
}
if (device->isSequential()) {