forked from qt-creator/qt-creator
Utils: Fix determining default terminal
Change-Id: Id39ef638a184a7cc593e1e6127f87814b9ca6381 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
committed by
Christian Stenger
parent
27b24218f6
commit
2926114b92
@@ -167,14 +167,15 @@ TerminalCommand ConsoleProcess::defaultTerminalEmulator()
|
|||||||
else
|
else
|
||||||
defaultTerm = {"/usr/X11/bin/xterm", "", "-e"};
|
defaultTerm = {"/usr/X11/bin/xterm", "", "-e"};
|
||||||
|
|
||||||
} else if (HostOsInfo::isAnyUnixHost()) {
|
} else if (HostOsInfo::isAnyUnixHost()) {
|
||||||
|
defaultTerm = {"xterm", "", "-e"};
|
||||||
const Environment env = Environment::systemEnvironment();
|
const Environment env = Environment::systemEnvironment();
|
||||||
for (const TerminalCommand &term : *knownTerminals) {
|
for (const TerminalCommand &term : *knownTerminals) {
|
||||||
const QString result = env.searchInPath(term.command).toString();
|
const QString result = env.searchInPath(term.command).toString();
|
||||||
if (!result.isEmpty())
|
if (!result.isEmpty()) {
|
||||||
defaultTerm = {result, term.openArgs, term.executeArgs};
|
defaultTerm = {result, term.openArgs, term.executeArgs};
|
||||||
else
|
break;
|
||||||
defaultTerm = {"xterm", "", "-e"};
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user