aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2022-01-06 09:54:37 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-01-06 19:20:32 +0000
commitae1f2a6cd4e877e50d185db857c9aaa70aee8b86 (patch)
treee7a8c6db27d2d7d94c0a7080216158a7d2951f1b /tools
parent048a913934996936c59b464a79107459098fb765 (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) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/qmlimportscanner/main.cpp6
-rw-r--r--tools/qmlplugindump/main.cpp12
2 files changed, 4 insertions, 14 deletions
diff --git a/tools/qmlimportscanner/main.cpp b/tools/qmlimportscanner/main.cpp
index 15ff387486..605ea03400 100644
--- a/tools/qmlimportscanner/main.cpp
+++ b/tools/qmlimportscanner/main.cpp
@@ -79,14 +79,14 @@ inline QString preferLiteral() { return QStringLiteral("prefer"); }
void printUsage(const QString &appNameIn)
{
- const std::wstring appName = appNameIn.toStdWString();
+ const std::string appName = appNameIn.toStdString();
const QString qmlPath = QLibraryInfo::path(QLibraryInfo::QmlImportsPath);
- 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 d594736c76..de1e03695e 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.
}