- ClientSyncer *syncer = new ClientSyncer();
- Client::registerClientSyncer(syncer);
- connect(syncer, SIGNAL(syncFinished()), syncer, SLOT(deleteLater()), Qt::QueuedConnection);
- syncer->useInternalCore();
+
+}
+
+void MainWin::showCoreConnectionDlg() {
+ CoreConnectDlg dlg(this);
+ if(dlg.exec() == QDialog::Accepted) {
+ AccountId accId = dlg.selectedAccount();
+ if(accId.isValid())
+ Client::coreConnection()->connectToCore(accId);
+ }
+}
+
+void MainWin::userAuthenticationRequired(CoreAccount *account, bool *valid, const QString &errorMessage) {
+ Q_UNUSED(errorMessage)
+ CoreConnectAuthDlg dlg(account, this);
+ *valid = (dlg.exec() == QDialog::Accepted);