diff options
Diffstat (limited to 'src/gui/generalsettings.cpp')
-rw-r--r-- | src/gui/generalsettings.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/gui/generalsettings.cpp b/src/gui/generalsettings.cpp index d298b6cae..5a035c4c2 100644 --- a/src/gui/generalsettings.cpp +++ b/src/gui/generalsettings.cpp @@ -42,11 +42,11 @@ GeneralSettings::GeneralSettings(QWidget *parent) { _ui->setupUi(this); - connect(_ui->desktopNotificationsCheckBox, SIGNAL(toggled(bool)), - SLOT(slotToggleOptionalDesktopNotifications(bool))); + connect(_ui->desktopNotificationsCheckBox, &QAbstractButton::toggled, + this, &GeneralSettings::slotToggleOptionalDesktopNotifications); _ui->autostartCheckBox->setChecked(Utility::hasLaunchOnStartup(Theme::instance()->appName())); - connect(_ui->autostartCheckBox, SIGNAL(toggled(bool)), SLOT(slotToggleLaunchOnStartup(bool))); + connect(_ui->autostartCheckBox, &QAbstractButton::toggled, this, &GeneralSettings::slotToggleLaunchOnStartup); // setup about section QString about = Theme::instance()->about(); @@ -63,11 +63,11 @@ GeneralSettings::GeneralSettings(QWidget *parent) slotUpdateInfo(); // misc - connect(_ui->monoIconsCheckBox, SIGNAL(toggled(bool)), SLOT(saveMiscSettings())); - connect(_ui->crashreporterCheckBox, SIGNAL(toggled(bool)), SLOT(saveMiscSettings())); - connect(_ui->newFolderLimitCheckBox, SIGNAL(toggled(bool)), SLOT(saveMiscSettings())); + connect(_ui->monoIconsCheckBox, &QAbstractButton::toggled, this, &GeneralSettings::saveMiscSettings); + connect(_ui->crashreporterCheckBox, &QAbstractButton::toggled, this, &GeneralSettings::saveMiscSettings); + connect(_ui->newFolderLimitCheckBox, &QAbstractButton::toggled, this, &GeneralSettings::saveMiscSettings); connect(_ui->newFolderLimitSpinBox, SIGNAL(valueChanged(int)), SLOT(saveMiscSettings())); - connect(_ui->newExternalStorage, SIGNAL(toggled(bool)), SLOT(saveMiscSettings())); + connect(_ui->newExternalStorage, &QAbstractButton::toggled, this, &GeneralSettings::saveMiscSettings); #ifndef WITH_CRASHREPORTER _ui->crashreporterCheckBox->setVisible(false); @@ -84,10 +84,10 @@ GeneralSettings::GeneralSettings(QWidget *parent) // is no point in offering an option _ui->monoIconsCheckBox->setVisible(Theme::instance()->monoIconsAvailable()); - connect(_ui->ignoredFilesButton, SIGNAL(clicked()), SLOT(slotIgnoreFilesEditor())); + connect(_ui->ignoredFilesButton, &QAbstractButton::clicked, this, &GeneralSettings::slotIgnoreFilesEditor); // accountAdded means the wizard was finished and the wizard might change some options. - connect(AccountManager::instance(), SIGNAL(accountAdded(AccountState *)), this, SLOT(loadMiscSettings())); + connect(AccountManager::instance(), &AccountManager::accountAdded, this, &GeneralSettings::loadMiscSettings); } GeneralSettings::~GeneralSettings() @@ -124,8 +124,8 @@ void GeneralSettings::slotUpdateInfo() } if (updater) { - connect(updater, SIGNAL(downloadStateChanged()), SLOT(slotUpdateInfo()), Qt::UniqueConnection); - connect(_ui->restartButton, SIGNAL(clicked()), updater, SLOT(slotStartInstaller()), Qt::UniqueConnection); + connect(updater, &OCUpdater::downloadStateChanged, this, &GeneralSettings::slotUpdateInfo, Qt::UniqueConnection); + connect(_ui->restartButton, &QAbstractButton::clicked, updater, &OCUpdater::slotStartInstaller, Qt::UniqueConnection); connect(_ui->restartButton, SIGNAL(clicked()), qApp, SLOT(quit()), Qt::UniqueConnection); _ui->updateStateLabel->setText(updater->statusString()); _ui->restartButton->setVisible(updater->downloadState() == OCUpdater::DownloadComplete); |