From b022735506e448b1ffdfedcb5c11b27152516b18 Mon Sep 17 00:00:00 2001 From: selsta Date: Fri, 24 Apr 2020 03:54:42 +0200 Subject: main: add --disable-check-updates flag --- src/main/main.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/main/main.cpp') diff --git a/src/main/main.cpp b/src/main/main.cpp index 2a64abdd..85539ec7 100644 --- a/src/main/main.cpp +++ b/src/main/main.cpp @@ -231,6 +231,8 @@ Verify update binary using 'shasum'-compatible (SHA256 algo) output signed by tw (i.e. 'gpg -b hashes.txt') generated by another maintainer.", "update-binary"); parser.addOption(verifyUpdateOption); + QCommandLineOption disableCheckUpdatesOption("disable-check-updates", "Disable automatic check for updates."); + parser.addOption(disableCheckUpdatesOption); QCommandLineOption testQmlOption("test-qml"); testQmlOption.setFlags(QCommandLineOption::HiddenFromHelp); parser.addOption(logPathOption); @@ -466,6 +468,7 @@ Verify update binary using 'shasum'-compatible (SHA256 algo) output signed by tw engine.rootContext()->setContextProperty("homePath", QDir::homePath()); engine.rootContext()->setContextProperty("applicationDirectory", QApplication::applicationDirPath()); engine.rootContext()->setContextProperty("idealThreadCount", QThread::idealThreadCount()); + engine.rootContext()->setContextProperty("disableCheckUpdatesFlag", parser.isSet(disableCheckUpdatesOption)); bool builtWithScanner = false; #ifdef WITH_SCANNER -- cgit v1.2.3