old version compatibility

This commit is contained in:
Roy Qu 2024-04-25 17:39:17 +08:00
parent 3caf54ff34
commit 8048ef1d36
1 changed files with 4 additions and 1 deletions

View File

@ -3791,7 +3791,10 @@ void Settings::Environment::doLoad()
checkAndSetTerminal();
mAStylePath = stringValue("astyle_path","");
if (mAStylePath.isEmpty()) {
if (mAStylePath.isEmpty()
/* compatibily for old configuration */
|| ( mAStylePath == includeTrailingPathDelimiter(pSettings->dirs().appLibexecDir())+"astyle")
) {
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
QString path = env.value("PATH");
QStringList pathList = path.split(PATH_SEPARATOR);