// Update legacy core info for Quassel cores earlier than 0.13. This does nothing on modern
// cores.
- Client::refreshLegacyCoreInfo();
+ refreshLegacyCoreInfo();
// Display existing core info, set up signal handlers
coreInfoResynchronized();
}
+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
void timerEvent(QTimerEvent *) override { updateUptime(); }
private slots:
+ /**
+ * Requests resynchronization of CoreInfo object for legacy (pre-0.13) cores
+ *
+ * This provides compatibility with updating core information for legacy cores, and can be
+ * removed after protocol break.
+ */
+ void refreshLegacyCoreInfo();
+
/**
* Handler for recreation of CoreInfo object, including first-time setup
*