From 8048ef1d36ad198374096a1ae2dbfc84fabdca21 Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Thu, 25 Apr 2024 17:39:17 +0800 Subject: [PATCH] old version compatibility --- RedPandaIDE/settings.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/RedPandaIDE/settings.cpp b/RedPandaIDE/settings.cpp index 95366d3e..4645014b 100644 --- a/RedPandaIDE/settings.cpp +++ b/RedPandaIDE/settings.cpp @@ -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);