forked from qt-creator/qt-creator
windows: stub out terminal-related functions of ConsoleProcess more thoroughly
... as the concept really doesn't make any sense on windows. Change-Id: I5fa970d17e6f4c1724250b8ee8cf0fd4eafc10ca Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QSettings>
|
||||
#include <QTimer>
|
||||
|
||||
#include <sys/stat.h>
|
||||
@@ -395,6 +396,21 @@ QStringList ConsoleProcess::availableTerminalEmulators()
|
||||
return result;
|
||||
}
|
||||
|
||||
QString ConsoleProcess::terminalEmulator(const QSettings *settings, bool nonEmpty)
|
||||
{
|
||||
if (settings) {
|
||||
const QString value = settings->value(QLatin1String("General/TerminalEmulator")).toString();
|
||||
if (!nonEmpty || !value.isEmpty())
|
||||
return value;
|
||||
}
|
||||
return defaultTerminalEmulator();
|
||||
}
|
||||
|
||||
void ConsoleProcess::setTerminalEmulator(QSettings *settings, const QString &term)
|
||||
{
|
||||
return settings->setValue(QLatin1String("General/TerminalEmulator"), term);
|
||||
}
|
||||
|
||||
bool ConsoleProcess::startTerminalEmulator(QSettings *settings, const QString &workingDir)
|
||||
{
|
||||
const QString emu = QtcProcess::splitArgs(terminalEmulator(settings)).takeFirst();
|
||||
|
||||
Reference in New Issue
Block a user