From 676aa3c78ec9a28bf9a81681a352798583d760e6 Mon Sep 17 00:00:00 2001 From: Jordan Sherer Date: Sun, 7 Oct 2018 11:01:01 -0400 Subject: [PATCH] Don't close the app when expired...just be really annoying --- mainwindow.cpp | 12 ++++++------ mainwindow.h | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index d09987c..61361aa 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1087,7 +1087,7 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple, */ // TODO: jsherer - need to remove this eventually... - QTimer::singleShot (0, this, SLOT (not_GA_warning_message ())); + QTimer::singleShot (0, this, SLOT (checkStartupWarnings ())); if(!ui->cbMenus->isChecked()) { ui->cbMenus->setChecked(true); @@ -1420,19 +1420,16 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple, QDate eol(2018, 10, 31); -void MainWindow::expiry_warning_message() +void MainWindow::checkExpiryWarningMessage() { if(QDateTime::currentDateTimeUtc().date() > eol){ MessageBox::critical_message (this, QString("This pre-release development build of JS8Call has expired. Please upgrade to the latest version.")); - close(); return; } } -void MainWindow::not_GA_warning_message () +void MainWindow::checkStartupWarnings () { - expiry_warning_message(); - MessageBox::critical_message (this, QString("This version of %1 is a pre-release development\n" "build and will expire after %2 (UTC), upon which you\n" @@ -1441,6 +1438,8 @@ void MainWindow::not_GA_warning_message () "and carry a responsiblity to report any problems to:\n" "Jordan Sherer (KN4CRD) kn4crd@gmail.com\n\n").arg(QApplication::applicationName()).arg(eol.toString())); + checkExpiryWarningMessage(); + ensureCallsignSet(false); } @@ -6412,6 +6411,7 @@ QString MainWindow::calculateDistance(QString const& value, int *pDistance) void MainWindow::on_startTxButton_toggled(bool checked) { if(checked){ + checkExpiryWarningMessage(); createMessage(ui->extFreeTextMsgEdit->toPlainText()); startTx(); } else { diff --git a/mainwindow.h b/mainwindow.h index b752371..f0f7021 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -385,8 +385,8 @@ private slots: void on_cbCQTx_toggled(bool b); void splash_done (); void on_measure_check_box_stateChanged (int); - void expiry_warning_message (); - void not_GA_warning_message (); + void checkExpiryWarningMessage (); + void checkStartupWarnings (); void clearCallsignSelected(); void refreshTextDisplay();