diff options
author | Maximilian Goldstein <max.goldstein@qt.io> | 2022-05-30 14:52:03 +0200 |
---|---|---|
committer | Maximilian Goldstein <max.goldstein@qt.io> | 2022-06-30 11:23:36 +0200 |
commit | a9038a6cc6ba79feefa38213b89d9b5ce73cb12d (patch) | |
tree | 280ccc9682fc37d6914cf58130b4f728dc5fb236 /src/qmlcompiler/qqmljscompiler.cpp | |
parent | 10fa5f6bfe07c26e33e9284bdec753fde0436fc2 (diff) | |
download | qtdeclarative-a9038a6cc6ba79feefa38213b89d9b5ce73cb12d.tar.gz |
QQmlJSLogger: Switch to an ID based system
This change makes qmljslogger use an ID based system for categorizing
logging entries instead of using an enum. This allows plugins to
register their own logging categories after the fact.
It's also necessary for us to later show the warning ID when
printing warnings and for creating documentation for each ID entry.
Currently not every ID maps cleanly to only one type of warning,
this has to be cleaned up in a follow-up change.
Task-number: QTBUG-103453
Change-Id: I4cac6be7ca165b938e0ea032d077823bf17baf75
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qmlcompiler/qqmljscompiler.cpp')
-rw-r--r-- | src/qmlcompiler/qqmljscompiler.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qmlcompiler/qqmljscompiler.cpp b/src/qmlcompiler/qqmljscompiler.cpp index 227966bed2..af60aa8dbb 100644 --- a/src/qmlcompiler/qqmljscompiler.cpp +++ b/src/qmlcompiler/qqmljscompiler.cpp @@ -649,8 +649,8 @@ QQmlJS::DiagnosticMessage QQmlJSAotCompiler::diagnose( { if (isStrict(m_document) && (type == QtWarningMsg || type == QtCriticalMsg || type == QtFatalMsg) - && !m_logger->isCategoryIgnored(Log_Compiler) - && m_logger->categoryLevel(Log_Compiler) == QtCriticalMsg) { + && !m_logger->isCategoryIgnored(qmlCompiler) + && m_logger->categoryLevel(qmlCompiler) == QtCriticalMsg) { qFatal("%s:%d: (strict mode) %s", qPrintable(QFileInfo(m_resourcePath).fileName()), location.startLine, qPrintable(message)); @@ -658,7 +658,7 @@ QQmlJS::DiagnosticMessage QQmlJSAotCompiler::diagnose( // TODO: this is a special place that explicitly sets the severity through // logger's private function - m_logger->log(message, Log_Compiler, location, type); + m_logger->log(message, qmlCompiler, location, type); return QQmlJS::DiagnosticMessage { message, |