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

Method configureUpdater

app/src/Misc/ModuleManager.cpp:477–500  ·  view source on GitHub ↗

* @brief Configures QSimpleUpdater defaults and resolves the packaging-aware appcast key: * CI stamp first, runtime probing second, the legacy per-OS keys as the last tier. */

Source from the content-addressed store, hash-verified

475 * CI stamp first, runtime probing second, the legacy per-OS keys as the last tier.
476 */
477void Misc::ModuleManager::configureUpdater()
478{
479 if (!autoUpdaterEnabled())
480 return;
481
482 QSimpleUpdater::getInstance()->setNotifyOnUpdate(APP_UPDATER_URL, true);
483 QSimpleUpdater::getInstance()->setNotifyOnFinish(APP_UPDATER_URL, false);
484 QSimpleUpdater::getInstance()->setMandatoryUpdate(APP_UPDATER_URL, false);
485
486 QString key = packageStampKey();
487 if (key.isEmpty())
488 key = probedPackageKey();
489
490#if defined(Q_OS_LINUX)
491 if (key.isEmpty()) {
492 const auto suffix = updaterArchSuffix();
493 if (!suffix.isEmpty())
494 key = QStringLiteral("linux-%1").arg(suffix);
495 }
496#endif
497
498 if (!key.isEmpty())
499 QSimpleUpdater::getInstance()->setPlatformKey(APP_UPDATER_URL, key);
500}
501
502//--------------------------------------------------------------------------------------------------
503// Module registration

Callers 1

bootstrapModuleManagerFunction · 0.80

Calls 8

packageStampKeyFunction · 0.85
probedPackageKeyFunction · 0.85
updaterArchSuffixFunction · 0.85
isEmptyMethod · 0.80
setNotifyOnUpdateMethod · 0.45
setNotifyOnFinishMethod · 0.45
setMandatoryUpdateMethod · 0.45
setPlatformKeyMethod · 0.45

Tested by

no test coverage detected