diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2023-07-24 09:17:23 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2023-07-24 12:02:06 +0200 |
commit | 0853302d6177a561445516b3db29b2a6ade3bd83 (patch) | |
tree | 240aa8b412270b312ca8357fc982540a321f7ab8 | |
parent | af9daf4a2ab4684036de9ba56671b08aafaaf61d (diff) |
Remove remaining usage of QCoreApplication
Pass arguments to the error message.
Amends 0f0f732d91f8cf717283dbfbe67c8875bf191902.
Pick-to: 6.5
Change-Id: Ie40c272732468ff3d7b6b0636120710f26309347
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
-rw-r--r-- | sources/shiboken6/ApiExtractor/messages.cpp | 5 | ||||
-rw-r--r-- | sources/shiboken6/ApiExtractor/messages.h | 2 | ||||
-rw-r--r-- | sources/shiboken6/generator/main.cpp | 2 |
3 files changed, 4 insertions, 5 deletions
diff --git a/sources/shiboken6/ApiExtractor/messages.cpp b/sources/shiboken6/ApiExtractor/messages.cpp index 2f3faac8e..01fe08819 100644 --- a/sources/shiboken6/ApiExtractor/messages.cpp +++ b/sources/shiboken6/ApiExtractor/messages.cpp @@ -16,7 +16,6 @@ #include "qtcompat.h" -#include <QtCore/QCoreApplication> #include <QtCore/QDebug> #include <QtCore/QDir> #include <QtCore/QFile> @@ -685,7 +684,7 @@ QString msgMethodNotFound(const AbstractMetaClassCPtr &klass, const QString &nam // main.cpp -QString msgLeftOverArguments(const QVariantMap &remainingArgs) +QString msgLeftOverArguments(const QVariantMap &remainingArgs, const QStringList &argV) { QString message; QTextStream str(&message); @@ -696,7 +695,7 @@ QString msgLeftOverArguments(const QVariantMap &remainingArgs) if (!value.isEmpty()) str << ' ' << value; } - str << "\nCommand line: " << QCoreApplication::arguments().join(u' '); + str << "\nCommand line: " << argV.join(u' '); return message; } diff --git a/sources/shiboken6/ApiExtractor/messages.h b/sources/shiboken6/ApiExtractor/messages.h index 9fcae657d..6d12195d1 100644 --- a/sources/shiboken6/ApiExtractor/messages.h +++ b/sources/shiboken6/ApiExtractor/messages.h @@ -190,7 +190,7 @@ QString msgCannotFindSmartPointerMethod(const SmartPointerTypeEntryCPtr &te, con QString msgMethodNotFound(const AbstractMetaClassCPtr &klass, const QString &name); -QString msgLeftOverArguments(const QVariantMap &remainingArgs); +QString msgLeftOverArguments(const QVariantMap &remainingArgs, const QStringList &argV); QString msgInvalidVersion(const QString &package, const QString &version); diff --git a/sources/shiboken6/generator/main.cpp b/sources/shiboken6/generator/main.cpp index cc6abd875..9bc9d0be3 100644 --- a/sources/shiboken6/generator/main.cpp +++ b/sources/shiboken6/generator/main.cpp @@ -702,7 +702,7 @@ int shibokenMain(const QStringList &argV) } if (!args.options.isEmpty()) { - errorPrint(msgLeftOverArguments(args.options), argV); + errorPrint(msgLeftOverArguments(args.options, argV), argV); std::cout << helpHint; return EXIT_FAILURE; } |