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 /tools/qmlcachegen/qmlcachegen.cpp | |
| parent | 10fa5f6bfe07c26e33e9284bdec753fde0436fc2 (diff) | |
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 'tools/qmlcachegen/qmlcachegen.cpp')
| -rw-r--r-- | tools/qmlcachegen/qmlcachegen.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/qmlcachegen/qmlcachegen.cpp b/tools/qmlcachegen/qmlcachegen.cpp index f3fc06bec5..6ade0987f9 100644 --- a/tools/qmlcachegen/qmlcachegen.cpp +++ b/tools/qmlcachegen/qmlcachegen.cpp @@ -241,8 +241,8 @@ int main(int argc, char **argv) QQmlJSLogger logger; // Always trigger the qFatal() on "pragma Strict" violations. - logger.setCategoryLevel(Log_Compiler, QtCriticalMsg); - logger.setCategoryIgnored(Log_Compiler, false); + logger.setCategoryLevel(qmlCompiler, QtCriticalMsg); + logger.setCategoryIgnored(qmlCompiler, false); // By default, we're completely silent, // as the lcAotCompiler category default is QtFatalMsg @@ -265,8 +265,8 @@ int main(int argc, char **argv) if (!warnings.isEmpty()) { logger.log(QStringLiteral("Type warnings occurred while compiling file:"), - Log_Import, QQmlJS::SourceLocation()); - logger.processMessages(warnings, Log_Import); + qmlImport, QQmlJS::SourceLocation()); + logger.processMessages(warnings, qmlImport); } } } else if (inputFile.endsWith(QLatin1String(".js")) || inputFile.endsWith(QLatin1String(".mjs"))) { |
