gpsbabelfe_do-not-check-for-newer-version
authorDebian GPS team <gpsbabel@packages.debian.org>
Sat, 17 Oct 2020 10:37:40 +0000 (11:37 +0100)
committerJochen Sprickerhof <jspricke@debian.org>
Sat, 17 Oct 2020 10:37:40 +0000 (11:37 +0100)
Disable check for newer versions on start.

Gbp-Pq: Name gpsbabelfe_do-not-check-for-newer-version

gui/babeldata.h
gui/mainwindow.cc
gui/mainwinui.ui
gui/preferences.cc
gui/preferences.ui

index 5164de478b857910263d3c06360d8e1ebf431d5c..4e483ae2811f58c4ba06ab25bb638688b3431789 100644 (file)
@@ -64,7 +64,7 @@ public:
     upgradeErrors_(0),
     upgradeOffers_(0),
     runCount_(0),
-    startupVersionCheck_(true),
+    startupVersionCheck_(false),
     reportStatistics_(false),
     allowBetaUpgrades_(false),
     ignoreVersionMismatch_(true),
index 22b2b449c2a9552a413462824df253cb1d7e5031..46b6d2cec920e93c6f1751b5da8ac17d374869b9 100644 (file)
@@ -174,7 +174,6 @@ MainWindow::MainWindow(QWidget* parent): QMainWindow(parent)
   connect(ui_.actionAbout, SIGNAL(triggered()), this, SLOT(aboutActionX()));
   connect(ui_.actionVisit_Website, SIGNAL(triggered()), this, SLOT(visitWebsiteActionX()));
   connect(ui_.actionMake_a_Donation, SIGNAL(triggered()), this, SLOT(donateActionX()));
-  connect(ui_.actionUpgradeCheck, SIGNAL(triggered()), this, SLOT(upgradeCheckActionX()));
   connect(ui_.actionPreferences, SIGNAL(triggered()), this, SLOT(preferencesActionX()));
 
   connect(ui_.inputFormatCombo,  SIGNAL(currentIndexChanged(int)),
@@ -231,19 +230,7 @@ MainWindow::MainWindow(QWidget* parent): QMainWindow(parent)
 
   //--- Restore from registry
   restoreSettings();
-
   upgrade = new UpgradeCheck(parent, formatList_, babelData_);
-  if (babelData_.startupVersionCheck_) {
-    upgrade->checkForUpgrade(babelVersion_, babelData_.upgradeCheckTime_,
-                             allowBetaUpgrades());
-  }
-
-  if (!babelData_.ignoreVersionMismatch_ && babelVersion_ != VERSION) {
-    VersionMismatch vm(nullptr, babelVersion_, QString(VERSION));
-
-    vm.exec();
-    babelData_.ignoreVersionMismatch_ = vm.neverAgain();
-  }
 }
 
 //------------------------------------------------------------------------
@@ -1068,10 +1055,6 @@ void MainWindow::applyActionX()
 //------------------------------------------------------------------------
 void MainWindow::closeActionX()
 {
-  QDateTime wt= upgrade->getUpgradeWarningTime();
-  if (wt.isValid()) {
-    babelData_.upgradeCheckTime_ = wt;
-  }
   babelData_.runCount_++;
 
   QDateTime now = QDateTime::currentDateTime();
index f5765e104d997973a3bc802596e66d3a2b249593..4533f23457dc2abd51b897509f9a5b216e738b5b 100644 (file)
     <addaction name="actionHelp"/>
     <addaction name="separator"/>
     <addaction name="actionAbout"/>
-    <addaction name="actionUpgradeCheck"/>
     <addaction name="separator"/>
     <addaction name="actionVisit_Website"/>
     <addaction name="actionMake_a_Donation"/>
     <string>Preferences...</string>
    </property>
   </action>
-  <action name="actionUpgradeCheck">
-   <property name="text">
-    <string>Check for Upgrade</string>
-   </property>
-  </action>
   <action name="actionVisit_Website">
    <property name="text">
     <string>Visit Website...</string>
index e1da2bec7f11f5494cc2a7d1e5e04ea7780c85cb..a7ff0d624fde2023b32c9b38f77291b26bca6b8a 100644 (file)
@@ -41,7 +41,6 @@ Preferences::Preferences(QWidget* parent, QList<Format>& formatList,
 {
   ui_.setupUi(this);
 
-  ui_.startupCheck->setChecked(babelData_.startupVersionCheck_);
   ui_.reportStatisticsCheck->setChecked(babelData_.reportStatistics_);
   // Because of an unfortunate bug in 1.4.0, we turn this off in 1.4.1.
   if (VERSION == QString("1.4.1")) {
@@ -84,7 +83,6 @@ void Preferences::acceptClicked()
     formatList_[i].setHidden(item->checkState() == Qt::Unchecked);
   }
 
-  babelData_.startupVersionCheck_ = ui_.startupCheck->isChecked();
   babelData_.reportStatistics_ = ui_.reportStatisticsCheck->isChecked();
   accept();
 }
index ac671d7d9357d98d07ac68eb8e680f0aab570bda..d0b1f72dde7bd90caa1507841d07d1c52d5090a3 100644 (file)
         </rect>
        </property>
        <layout class="QVBoxLayout" name="verticalLayout_4">
-        <item>
-         <widget class="QCheckBox" name="startupCheck">
-          <property name="text">
-           <string>Check for newer version on start.</string>
-          </property>
-         </widget>
-        </item>
         <item>
          <widget class="QCheckBox" name="reportStatisticsCheck">
           <property name="text">