diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2022-01-07 09:59:47 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2022-01-07 21:04:27 +0100 |
commit | 709e78842567fa464f158bfba609a0b149bb54bb (patch) | |
tree | b5fca9324d1e28626bccfa3c5812cea23f4da365 | |
parent | 9dce073372e6fc66987a577a03d88d0ad6e3a2c7 (diff) |
qml{plugindump|importscanner}: Don't mix std::cerr and std::wcerr
Apparently that causes output to be suppressed.
Fixes: QTBUG-99400
Change-Id: I4ac6a66a10c7d2c27dfc1efa6d52afa60bdc58d6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 5fa9093191c8a0fbf765f3b51a68dea996fed76e)
-rw-r--r-- | tools/qmlimportscanner/main.cpp | 6 | ||||
-rw-r--r-- | tools/qmlplugindump/main.cpp | 12 |
2 files changed, 4 insertions, 14 deletions
diff --git a/tools/qmlimportscanner/main.cpp b/tools/qmlimportscanner/main.cpp index e9b4577318..49f4674fa0 100644 --- a/tools/qmlimportscanner/main.cpp +++ b/tools/qmlimportscanner/main.cpp @@ -76,18 +76,18 @@ inline QString linkTargetLiteral() void printUsage(const QString &appNameIn) { - const std::wstring appName = appNameIn.toStdWString(); + const std::string appName = appNameIn.toStdString(); #ifndef QT_BOOTSTRAPPED const QString qmlPath = QLibraryInfo::path(QLibraryInfo::QmlImportsPath); #else const QString qmlPath = QStringLiteral("/home/user/dev/qt-install/qml"); #endif - std::wcerr + std::cerr << "Usage: " << appName << " -rootPath path/to/app/qml/directory -importPath path/to/qt/qml/directory\n" " " << appName << " -qmlFiles file1 file2 -importPath path/to/qt/qml/directory\n" " " << appName << " -qrcFiles file1.qrc file2.qrc -importPath path/to/qt/qml/directory\n\n" "Example: " << appName << " -rootPath . -importPath " - << QDir::toNativeSeparators(qmlPath).toStdWString() + << QDir::toNativeSeparators(qmlPath).toStdString() << '\n'; } diff --git a/tools/qmlplugindump/main.cpp b/tools/qmlplugindump/main.cpp index 9ee6db39da..9354ac548c 100644 --- a/tools/qmlplugindump/main.cpp +++ b/tools/qmlplugindump/main.cpp @@ -991,19 +991,9 @@ void compactDependencies(QStringList *dependencies) } } -inline std::wostream &operator<<(std::wostream &str, const QString &s) -{ -#ifdef Q_OS_WIN - str << reinterpret_cast<const wchar_t *>(s.utf16()); -#else - str << s.toStdWString(); -#endif - return str; -} - void printDebugMessage(QtMsgType, const QMessageLogContext &, const QString &msg) { - std::wcerr << msg << std::endl; + std::cerr << msg.toStdString() << std::endl; // In case of QtFatalMsg the calling code will abort() when appropriate. } |