* @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. */
| 475 | * CI stamp first, runtime probing second, the legacy per-OS keys as the last tier. |
| 476 | */ |
| 477 | void 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 |
no test coverage detected