main: add --disable-check-updates flag

This commit is contained in:
selsta 2020-04-24 03:54:42 +02:00
parent 585fb2810d
commit b022735506
No known key found for this signature in database
GPG key ID: 2EA0A99A8B07AE5E
2 changed files with 7 additions and 3 deletions

View file

@ -1321,8 +1321,6 @@ ApplicationWindow {
openWallet("wizard");
}
checkUpdates();
if(persistentSettings.fiatPriceEnabled){
appWindow.fiatApiRefresh();
appWindow.fiatTimerStart();
@ -1994,7 +1992,10 @@ ApplicationWindow {
Timer {
id: updatesTimer
interval: 3600*1000; running: true; repeat: true
interval: 3600 * 1000
repeat: true
running: !disableCheckUpdatesFlag
triggeredOnStart: true
onTriggered: checkUpdates()
}

View file

@ -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