+void CoreInfoDlg::refreshLegacyCoreInfo() {
+ if (!Client::isConnected() || Client::isCoreFeatureEnabled(Quassel::Feature::SyncedCoreInfo)) {
+ // If we're not connected, or the core supports SyncedCoreInfo (0.13+), bail out
+ return;
+ }
+
+ // Request legacy (pre-0.13) CoreInfo object to be resynchronized (does nothing on modern cores)
+ Client::refreshLegacyCoreInfo();
+
+ // On legacy cores, CoreInfo data does not send signals. Periodically poll for information.
+ // 15 seconds seems like a reasonable trade-off as this only happens while the dialog is open.
+ QTimer::singleShot(15 * 1000, this, SLOT(refreshLegacyCoreInfo()));
+}
+
+
+void CoreInfoDlg::coreInfoResynchronized() {
+ // CoreInfo object has been recreated, or this is the first time the dialog's been shown
+
+ CoreInfo *coreInfo = Client::coreInfo();
+ // Listen for changes to core information
+ connect(coreInfo, SIGNAL(coreDataChanged(const QVariantMap &)),
+ this, SLOT(coreInfoChanged(const QVariantMap &)));
+
+ // Update with any known core information set before connecting the signal. This is needed for
+ // both modern (0.13+) and legacy cores.
+ coreInfoChanged(coreInfo->coreData());
+}
+
+