diff options
author | Friedemann Kleint <[email protected]> | 2025-03-12 10:04:29 +0100 |
---|---|---|
committer | Friedemann Kleint <[email protected]> | 2025-03-14 14:12:41 +0100 |
commit | de40120707dc4b039b47db79fb0ac4af5212673d (patch) | |
tree | aeb6a411db947f8d2a4dee53511a0dbfc09207e3 /sources/shiboken6 | |
parent | 07c092e751abb2e3431a925c005238f8860df6f9 (diff) |
shiboken6: Log the command line arguments into mjb_shiboken.log
Complements 91d0ec1e864c5c657e351c32af1f8d78a26c543d.
Change-Id: I7f86d6723680b582011549d7fb30b6d17c6a10f4
Reviewed-by: Cristian Maureira-Fredes <[email protected]>
Diffstat (limited to 'sources/shiboken6')
-rw-r--r-- | sources/shiboken6/ApiExtractor/messages.cpp | 16 | ||||
-rw-r--r-- | sources/shiboken6/ApiExtractor/messages.h | 2 | ||||
-rw-r--r-- | sources/shiboken6/generator/main.cpp | 3 |
3 files changed, 19 insertions, 2 deletions
diff --git a/sources/shiboken6/ApiExtractor/messages.cpp b/sources/shiboken6/ApiExtractor/messages.cpp index 29cf6d091..a36ebcac3 100644 --- a/sources/shiboken6/ApiExtractor/messages.cpp +++ b/sources/shiboken6/ApiExtractor/messages.cpp @@ -1069,3 +1069,19 @@ QString msgRemoveRedundantOverload(const AbstractMetaFunctionCPtr &func, + "\" due to presence of an overload taking a \""_L1 + type + "\" parameter."_L1; } + +QString msgCommandLineArguments(const QStringList &argv) +{ + QString result = "Command line:\n "_L1; + for (const QString &arg : argv) { + result.append(u' '); + const bool quote = arg.contains(u' '); + if (quote) + result.append(u'"'); + result.append(arg); + if (quote) + result.append(u'"'); + } + result.append(u'\n'); + return result; +} diff --git a/sources/shiboken6/ApiExtractor/messages.h b/sources/shiboken6/ApiExtractor/messages.h index 5519c65b6..6309f539f 100644 --- a/sources/shiboken6/ApiExtractor/messages.h +++ b/sources/shiboken6/ApiExtractor/messages.h @@ -281,4 +281,6 @@ QString msgCannotCall(const AbstractMetaFunctionCPtr &func, QString msgRemoveRedundantOverload(const AbstractMetaFunctionCPtr &func, const QString &type); +QString msgCommandLineArguments(const QStringList &argv); + #endif // MESSAGES_H diff --git a/sources/shiboken6/generator/main.cpp b/sources/shiboken6/generator/main.cpp index 9d9265d14..111f7a430 100644 --- a/sources/shiboken6/generator/main.cpp +++ b/sources/shiboken6/generator/main.cpp @@ -252,8 +252,7 @@ int shibokenMain(const QStringList &argV) QHashSeed::setDeterministicGlobalSeed(); ReportHandler::install(); - if (ReportHandler::isDebug(ReportHandler::SparseDebug)) - qCInfo(lcShiboken()).noquote().nospace() << appName << ' ' << argV.join(u' '); + ReportHandler::addGeneralMessage(msgCommandLineArguments(argV)); Options options; options.setOptions(argV); |