forked from qt-creator/qt-creator
Utils: Make FilePathAspect::setDefaultValue take a QString
This sets the unexpanded value, so going to a "cooked" FilePath can at least theoretically break. On the user side it saves a roundtrip in a few cases, but is more ugly when the input is already a proper FilePath. Change-Id: I8a7e8f6d46fcc34c96b55e41d656dca933fbef4e Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
@@ -50,16 +50,16 @@ static int defaultFontSize()
|
||||
return 10;
|
||||
}
|
||||
|
||||
static FilePath defaultShell()
|
||||
static QString defaultShell()
|
||||
{
|
||||
if (HostOsInfo::isWindowsHost())
|
||||
return FilePath::fromUserInput(qtcEnvironmentVariable("COMSPEC"));
|
||||
return qtcEnvironmentVariable("COMSPEC");
|
||||
|
||||
FilePath defaultShell = FilePath::fromUserInput(qtcEnvironmentVariable("SHELL"));
|
||||
if (defaultShell.isExecutableFile())
|
||||
return defaultShell;
|
||||
return defaultShell.toUserOutput();
|
||||
|
||||
return Environment::systemEnvironment().searchInPath("sh");
|
||||
return Environment::systemEnvironment().searchInPath("sh").toUserOutput();
|
||||
}
|
||||
|
||||
void setupColor(TerminalSettings *settings,
|
||||
|
||||
Reference in New Issue
Block a user