Skip to content

Commit de40120

Browse files
shiboken6: Log the command line arguments into mjb_shiboken.log
Complements 91d0ec1. Change-Id: I7f86d6723680b582011549d7fb30b6d17c6a10f4 Reviewed-by: Cristian Maureira-Fredes <[email protected]>
1 parent 07c092e commit de40120

File tree

3 files changed

+19
-2
lines changed

3 files changed

+19
-2
lines changed

sources/shiboken6/ApiExtractor/messages.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1069,3 +1069,19 @@ QString msgRemoveRedundantOverload(const AbstractMetaFunctionCPtr &func,
10691069
+ "\" due to presence of an overload taking a \""_L1
10701070
+ type + "\" parameter."_L1;
10711071
}
1072+
1073+
QString msgCommandLineArguments(const QStringList &argv)
1074+
{
1075+
QString result = "Command line:\n "_L1;
1076+
for (const QString &arg : argv) {
1077+
result.append(u' ');
1078+
const bool quote = arg.contains(u' ');
1079+
if (quote)
1080+
result.append(u'"');
1081+
result.append(arg);
1082+
if (quote)
1083+
result.append(u'"');
1084+
}
1085+
result.append(u'\n');
1086+
return result;
1087+
}

sources/shiboken6/ApiExtractor/messages.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,4 +281,6 @@ QString msgCannotCall(const AbstractMetaFunctionCPtr &func,
281281
QString msgRemoveRedundantOverload(const AbstractMetaFunctionCPtr &func,
282282
const QString &type);
283283

284+
QString msgCommandLineArguments(const QStringList &argv);
285+
284286
#endif // MESSAGES_H

sources/shiboken6/generator/main.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,8 +252,7 @@ int shibokenMain(const QStringList &argV)
252252
QHashSeed::setDeterministicGlobalSeed();
253253

254254
ReportHandler::install();
255-
if (ReportHandler::isDebug(ReportHandler::SparseDebug))
256-
qCInfo(lcShiboken()).noquote().nospace() << appName << ' ' << argV.join(u' ');
255+
ReportHandler::addGeneralMessage(msgCommandLineArguments(argV));
257256

258257
Options options;
259258
options.setOptions(argV);

0 commit comments

Comments
 (0)