diff options
author | Tobias Hunger <tobias.hunger@qt.io> | 2016-05-26 12:12:01 +0200 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@qt.io> | 2016-05-26 11:50:03 +0000 |
commit | 5d3823ac4727fb426915b468a031346e5f9ab929 (patch) | |
tree | 5ce95d25b8028fa82174d0a0f41bdc3b53a66e75 /src/plugins/texteditor/generichighlighter | |
parent | 179153829a7bf2d72ffa290b2e1da4bdb58eea90 (diff) | |
download | qt-creator-5d3823ac4727fb426915b468a031346e5f9ab929.tar.gz |
Use SynchronousProcess::runBlocking
Use SynchronousProcess::runBlocking in favor of SychronousProcess::run.
This avoid nested event loops which can produce really strange crashes
if not use carefully.
This patch only converts those processes that have a timeout of less
than 5 seconds or use the default timeout.
Change-Id: I9de8899dcc946af7049ea357a91972996c0256a1
Reviewed-by: Vikas Pachdha <vikas.pachdha@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Diffstat (limited to 'src/plugins/texteditor/generichighlighter')
-rw-r--r-- | src/plugins/texteditor/generichighlighter/highlightersettings.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/texteditor/generichighlighter/highlightersettings.cpp b/src/plugins/texteditor/generichighlighter/highlightersettings.cpp index 545d04101c..dcfa90593f 100644 --- a/src/plugins/texteditor/generichighlighter/highlightersettings.cpp +++ b/src/plugins/texteditor/generichighlighter/highlightersettings.cpp @@ -72,7 +72,7 @@ QString findFallbackDefinitionsLocation() Utils::SynchronousProcess process; process.setTimeoutS(5); Utils::SynchronousProcessResponse response - = process.run(program, QStringList(QLatin1String("--prefix"))); + = process.runBlocking(program, QStringList(QLatin1String("--prefix"))); if (response.result == Utils::SynchronousProcessResponse::Finished) { QString output = response.stdOut; output.remove(QLatin1Char('\n')); |