mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-26 23:28:14 +03:00
parent
69915ab594
commit
552427ffc3
2 changed files with 5 additions and 2 deletions
|
@ -94,7 +94,7 @@ void setLaunchOnStartup_private(const QString &appName, const QString &guiName,
|
|||
QString runPath = QLatin1String(runPathC);
|
||||
QSettings settings(runPath, QSettings::NativeFormat);
|
||||
if (enable) {
|
||||
settings.setValue(appName, QCoreApplication::applicationFilePath().replace(QLatin1Char('/'), QLatin1Char('\\')));
|
||||
settings.setValue(appName, QDir::toNativeSeparators(QCoreApplication::applicationFilePath()));
|
||||
} else {
|
||||
settings.remove(appName);
|
||||
}
|
||||
|
|
|
@ -161,7 +161,10 @@ GeneralSettings::GeneralSettings(QWidget *parent)
|
|||
_ui->autostartCheckBox->setDisabled(true);
|
||||
_ui->autostartCheckBox->setToolTip(tr("You cannot disable autostart because system-wide autostart is enabled."));
|
||||
} else {
|
||||
_ui->autostartCheckBox->setChecked(Utility::hasLaunchOnStartup(Theme::instance()->appName()));
|
||||
const bool hasAutoStart = Utility::hasLaunchOnStartup(Theme::instance()->appName());
|
||||
// make sure the binary location is correctly set
|
||||
slotToggleLaunchOnStartup(hasAutoStart);
|
||||
_ui->autostartCheckBox->setChecked(hasAutoStart);
|
||||
connect(_ui->autostartCheckBox, &QAbstractButton::toggled, this, &GeneralSettings::slotToggleLaunchOnStartup);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue