MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / checkForUpdates

Method checkForUpdates

lib/QSimpleUpdater/tutorial/src/Window.cpp:84–101  ·  view source on GitHub ↗

* @brief Reads the UI settings and triggers an update check. */

Source from the content-addressed store, hash-verified

82 * @brief Reads the UI settings and triggers an update check.
83 */
84void Window::checkForUpdates()
85{
86 QString version = m_ui->installedVersion->text();
87 bool customAppcast = m_ui->customAppcast->isChecked();
88 bool downloaderEnabled = m_ui->enableDownloader->isChecked();
89 bool notifyOnFinish = m_ui->showAllNotifcations->isChecked();
90 bool notifyOnUpdate = m_ui->showUpdateNotifications->isChecked();
91 bool mandatoryUpdate = m_ui->mandatoryUpdate->isChecked();
92
93 m_updater->setModuleVersion(DEFS_URL, version);
94 m_updater->setNotifyOnFinish(DEFS_URL, notifyOnFinish);
95 m_updater->setNotifyOnUpdate(DEFS_URL, notifyOnUpdate);
96 m_updater->setUseCustomAppcast(DEFS_URL, customAppcast);
97 m_updater->setDownloaderEnabled(DEFS_URL, downloaderEnabled);
98 m_updater->setMandatoryUpdate(DEFS_URL, mandatoryUpdate);
99
100 m_updater->checkForUpdates(DEFS_URL);
101}
102
103/**
104 * @brief Displays the changelog in the text browser when checking finishes.

Callers

nothing calls this directly

Calls 8

isCheckedMethod · 0.80
textMethod · 0.45
setModuleVersionMethod · 0.45
setNotifyOnFinishMethod · 0.45
setNotifyOnUpdateMethod · 0.45
setUseCustomAppcastMethod · 0.45
setDownloaderEnabledMethod · 0.45
setMandatoryUpdateMethod · 0.45

Tested by

no test coverage detected