Don't close the app when expired...just be really annoying
This commit is contained in:
		
							parent
							
								
									4e8a65b5ee
								
							
						
					
					
						commit
						676aa3c78e
					
				@ -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 {
 | 
			
		||||
 | 
			
		||||
@ -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();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user