forked from qt-creator/qt-creator
fix "Open Command Prompt Here" on windows with qt 5.8
qt 5.8 made QProcess::startDetached()'s behavior consistent with start(), which means it won't open a console any more. however, qtc relied on this (unspecified) behavior. the correct solution is to add a static function startTerminalEmulator() to ConsoleProcess, which already has most of the necessary code anyway. Task-number: QTCREATORBUG-17439 Change-Id: Icf04666869ce6593555302a54c49331a29846a99 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Robert Loehning <robert.loehning@qt.io>
This commit is contained in:
committed by
Robert Loehning
parent
4b0016fb2a
commit
ec50c146b3
@@ -395,4 +395,10 @@ QStringList ConsoleProcess::availableTerminalEmulators()
|
||||
return result;
|
||||
}
|
||||
|
||||
bool ConsoleProcess::startTerminalEmulator(QSettings *settings, const QString &workingDir)
|
||||
{
|
||||
const QString emu = QtcProcess::splitArgs(terminalEmulator(settings)).takeFirst();
|
||||
return QProcess::startDetached(emu, QStringList(), workingDir);
|
||||
}
|
||||
|
||||
} // namespace Utils
|
||||
|
||||
Reference in New Issue
Block a user