fix(MSAStep): tighten isSchemeHandlerRegistered check

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
This commit is contained in:
Octol1ttle 2026-01-23 01:00:01 +05:00
parent b276ede6e5
commit 87b3a2ef99
No known key found for this signature in database
GPG key ID: B77C34313AEE1FFF

View file

@ -56,13 +56,14 @@ bool isSchemeHandlerRegistered()
process.waitForFinished();
QString output = process.readAllStandardOutput().trimmed();
return output.contains(BuildConfig.LAUNCHER_APP_BINARY_NAME);
return output.contains(APPLICATION->desktopFileName());
#elif defined(Q_OS_WIN)
QString regPath = QString("HKEY_CURRENT_USER\\Software\\Classes\\%1").arg(BuildConfig.LAUNCHER_APP_BINARY_NAME);
QSettings settings(regPath, QSettings::NativeFormat);
return settings.contains("shell/open/command/.");
const QString registeredRunCommand = settings.value("shell/open/command/.").toString().replace("\\", "/");
return registeredRunCommand.contains(QCoreApplication::applicationFilePath());
#endif
return true;
}