+void MainWin::syncToCore() {
+ if(global->getData("CoreReady").toBool()) return;
+ // ok, apparently we are running as standalone GUI
+ coreConnectDlg = new CoreConnectDlg(this);
+ if(coreConnectDlg->exec() != QDialog::Accepted) {
+ //qApp->quit();
+ exit(1);
+ }
+ VarMap state = coreConnectDlg->getCoreState().toMap()["CoreData"].toMap();
+ delete coreConnectDlg;
+ QString key;
+ foreach(key, state.keys()) {
+ global->updateData(key, state[key]);
+ }
+ if(!global->getData("CoreReady").toBool()) {
+ QMessageBox::critical(this, tr("Fatal Error"), tr("<b>Could not synchronize with Quassel Core!</b><br>Quassel GUI will be aborted."), QMessageBox::Abort);
+ //qApp->quit();
+ exit(1);
+ }