diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2020-01-30 12:45:10 +0100 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2020-01-30 12:43:25 +0000 |
commit | 8b117bcd86a222c8a1ada6b3a182f4c488ff8d38 (patch) | |
tree | 800d04b40b5977dc230cd0c3b84abd34d8a1fa78 /src/plugins/projectexplorer/gcctoolchain.cpp | |
parent | 03801e29efe5c2054a39b36a6872b1ec3d134ebe (diff) |
MessageManager: Allow messages from non-UI threads
This relieves the caller of the burden of dispatching the call to the UI
thread.
Change-Id: Ic6455fb7f393d0e21c7e527c693ebf2441f0c028
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'src/plugins/projectexplorer/gcctoolchain.cpp')
-rw-r--r-- | src/plugins/projectexplorer/gcctoolchain.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/plugins/projectexplorer/gcctoolchain.cpp b/src/plugins/projectexplorer/gcctoolchain.cpp index da9d03ae74a..1dc211c7c55 100644 --- a/src/plugins/projectexplorer/gcctoolchain.cpp +++ b/src/plugins/projectexplorer/gcctoolchain.cpp @@ -94,11 +94,9 @@ static QByteArray runGcc(const FilePath &gcc, const QStringList &arguments, cons SynchronousProcessResponse response = cpp.runBlocking(cmdLine); if (response.result != SynchronousProcessResponse::Finished || response.exitCode != 0) { - QTimer::singleShot(0, Core::MessageManager::instance(), [cmdLine, response] { - Core::MessageManager::write("Compiler feature detection failure!"); - Core::MessageManager::write(response.exitMessage(cmdLine.toUserOutput(), 10)); - Core::MessageManager::write(QString::fromUtf8(response.allRawOutput())); - }); + Core::MessageManager::writeMessages({"Compiler feature detection failure!", + response.exitMessage(cmdLine.toUserOutput(), 10), + QString::fromUtf8(response.allRawOutput())}); return QByteArray(); } |