| 1 |
Disable check for newer versions on start. |
| 2 |
|
| 3 |
--- a/gui/preferences.ui |
| 4 |
+++ b/gui/preferences.ui |
| 5 |
@@ -39,13 +39,6 @@ |
| 6 |
</rect> |
| 7 |
</property> |
| 8 |
<layout class="QVBoxLayout" name="verticalLayout_4"> |
| 9 |
- <item> |
| 10 |
- <widget class="QCheckBox" name="startupCheck"> |
| 11 |
- <property name="text"> |
| 12 |
- <string>Check for newer version on start.</string> |
| 13 |
- </property> |
| 14 |
- </widget> |
| 15 |
- </item> |
| 16 |
<item> |
| 17 |
<widget class="QCheckBox" name="reportStatisticsCheck"> |
| 18 |
<property name="text"> |
| 19 |
--- a/gui/preferences.cc |
| 20 |
+++ b/gui/preferences.cc |
| 21 |
@@ -47,7 +47,6 @@ Preferences::Preferences(QWidget* parent, QList<Format>& formatList, |
| 22 |
{ |
| 23 |
ui_.setupUi(this); |
| 24 |
|
| 25 |
- ui_.startupCheck->setChecked(babelData_.startupVersionCheck_); |
| 26 |
ui_.reportStatisticsCheck->setChecked(babelData_.reportStatistics_); |
| 27 |
|
| 28 |
connect(ui_.buttonBox, &QDialogButtonBox::accepted, this, &Preferences::acceptClicked); |
| 29 |
@@ -86,7 +85,6 @@ void Preferences::acceptClicked() |
| 30 |
formatList_[i].setHidden(item->checkState() == Qt::Unchecked); |
| 31 |
} |
| 32 |
|
| 33 |
- babelData_.startupVersionCheck_ = ui_.startupCheck->isChecked(); |
| 34 |
babelData_.reportStatistics_ = ui_.reportStatisticsCheck->isChecked(); |
| 35 |
accept(); |
| 36 |
} |
| 37 |
--- a/gui/babeldata.h |
| 38 |
+++ b/gui/babeldata.h |
| 39 |
@@ -150,7 +150,7 @@ public: |
| 40 |
int runCount_{0}; |
| 41 |
|
| 42 |
// Global preferences. |
| 43 |
- bool startupVersionCheck_{true}; |
| 44 |
+ bool startupVersionCheck_{false}; |
| 45 |
bool reportStatistics_{false}; |
| 46 |
bool allowBetaUpgrades_{false}; |
| 47 |
bool ignoreVersionMismatch_{true}; |
| 48 |
--- a/gui/mainwinui.ui |
| 49 |
+++ b/gui/mainwinui.ui |
| 50 |
@@ -691,7 +691,6 @@ |
| 51 |
<addaction name="actionHelp"/> |
| 52 |
<addaction name="separator"/> |
| 53 |
<addaction name="actionAbout"/> |
| 54 |
- <addaction name="actionUpgradeCheck"/> |
| 55 |
<addaction name="separator"/> |
| 56 |
<addaction name="actionVisit_Website"/> |
| 57 |
<addaction name="actionMake_a_Donation"/> |
| 58 |
@@ -720,11 +719,6 @@ |
| 59 |
<string>Preferences...</string> |
| 60 |
</property> |
| 61 |
</action> |
| 62 |
- <action name="actionUpgradeCheck"> |
| 63 |
- <property name="text"> |
| 64 |
- <string>Check for Upgrade</string> |
| 65 |
- </property> |
| 66 |
- </action> |
| 67 |
<action name="actionVisit_Website"> |
| 68 |
<property name="text"> |
| 69 |
<string>Visit Website...</string> |
| 70 |
--- a/gui/mainwindow.cc |
| 71 |
+++ b/gui/mainwindow.cc |
| 72 |
@@ -170,7 +170,6 @@ MainWindow::MainWindow(QWidget* parent): QMainWindow(parent) |
| 73 |
connect(ui_.actionAbout, &QAction::triggered, this, &MainWindow::aboutActionX); |
| 74 |
connect(ui_.actionVisit_Website, &QAction::triggered, this, &MainWindow::visitWebsiteActionX); |
| 75 |
connect(ui_.actionMake_a_Donation, &QAction::triggered, this, &MainWindow::donateActionX); |
| 76 |
- connect(ui_.actionUpgradeCheck, &QAction::triggered, this, &MainWindow::upgradeCheckActionX); |
| 77 |
connect(ui_.actionPreferences, &QAction::triggered, this, &MainWindow::preferencesActionX); |
| 78 |
|
| 79 |
connect(ui_.inputFormatCombo, &QComboBox::currentIndexChanged, |
| 80 |
@@ -223,17 +222,6 @@ MainWindow::MainWindow(QWidget* parent): QMainWindow(parent) |
| 81 |
restoreSettings(); |
| 82 |
|
| 83 |
upgrade = new UpgradeCheck(this, formatList_, babelData_); |
| 84 |
- if (babelData_.startupVersionCheck_) { |
| 85 |
- upgrade->checkForUpgrade(babelVersion_, babelData_.upgradeCheckTime_, |
| 86 |
- allowBetaUpgrades()); |
| 87 |
- } |
| 88 |
- |
| 89 |
- if (!babelData_.ignoreVersionMismatch_ && babelVersion_ != VERSION) { |
| 90 |
- VersionMismatch vm(nullptr, babelVersion_, QString(VERSION)); |
| 91 |
- |
| 92 |
- vm.exec(); |
| 93 |
- babelData_.ignoreVersionMismatch_ = vm.neverAgain(); |
| 94 |
- } |
| 95 |
} |
| 96 |
|
| 97 |
void MainWindow::switchTranslator(QTranslator& translator, const QString& filename) |
| 98 |
@@ -1000,10 +988,6 @@ void MainWindow::applyActionX() |
| 99 |
//------------------------------------------------------------------------ |
| 100 |
void MainWindow::closeActionX() |
| 101 |
{ |
| 102 |
- QDateTime wt= upgrade->getUpgradeWarningTime(); |
| 103 |
- if (wt.isValid()) { |
| 104 |
- babelData_.upgradeCheckTime_ = wt; |
| 105 |
- } |
| 106 |
babelData_.runCount_++; |
| 107 |
|
| 108 |
QDateTime now = QDateTime::currentDateTime(); |