Preferences: correctly hook up the signals to enable/disable cloud storage

This way the menu state matches the actual verification state again.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2015-11-10 13:45:13 -08:00
parent 77d7e773b9
commit 111a153295
4 changed files with 11 additions and 5 deletions

View file

@ -96,7 +96,7 @@ void PreferencesNetwork::syncSettings()
report_error(qPrintable(tr("Cloud storage email and password can only consist of letters, numbers, and '.', '-', '_', and '+'.")));
} else {
CloudStorageAuthenticate *cloudAuth = new CloudStorageAuthenticate(this);
connect(cloudAuth, SIGNAL(finishedAuthenticate()), this, SLOT(cloudPinNeeded()));
connect(cloudAuth, &CloudStorageAuthenticate::finishedAuthenticate, this, &PreferencesNetwork::cloudPinNeeded);
cloudAuth->backend(email, password);
}
}
@ -146,8 +146,7 @@ void PreferencesNetwork::cloudPinNeeded()
} else {
ui->cloudStorageGroupBox->setTitle(tr("Subsurface cloud storage"));
}
//TODO: Do not call mainWindow here. Verify things on SettingsChanged.
//MainWindow::instance()->enableDisableCloudActions();
emit settingsChanged();
}
void PreferencesNetwork::proxyType_changed(int idx)