Refactor code, create abstract class ExternalUpdater
(Hopefully) this makes implementing updaters using external libraries easier on other platforms. To implement an updater on a new platform, create a new class that implements the pure virtual methods from `ExternalUpdater` and add code in the `UpdateChecker` initializer to initialize the new class.
This commit is contained in:
@ -1028,12 +1028,13 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new MainWindow
|
||||
updater->checkForUpdate(APPLICATION->settings()->get("UpdateChannel").toString(), false);
|
||||
}
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
connect(APPLICATION->updateChecker()->getSparkleUpdater(),
|
||||
&SparkleUpdater::canCheckForUpdatesChanged,
|
||||
this,
|
||||
&MainWindow::updatesAllowedChanged);
|
||||
#endif
|
||||
if (APPLICATION->updateChecker()->getExternalUpdater())
|
||||
{
|
||||
connect(APPLICATION->updateChecker()->getExternalUpdater(),
|
||||
&ExternalUpdater::canCheckForUpdatesChanged,
|
||||
this,
|
||||
&MainWindow::updatesAllowedChanged);
|
||||
}
|
||||
}
|
||||
|
||||
setSelectedInstanceById(APPLICATION->settings()->get("SelectedInstance").toString());
|
||||
|
Reference in New Issue
Block a user