mirror of
				https://github.com/saitohirga/WSJT-X.git
				synced 2025-11-03 21:40:52 -05:00 
			
		
		
		
	Avoid MainWindow methods being called via the event loop during construction
This commit is contained in:
		
							parent
							
								
									5bfb629b84
								
							
						
					
					
						commit
						9322b1a8c7
					
				@ -115,7 +115,6 @@ MainWindow::MainWindow(QWidget *parent) :
 | 
			
		||||
 | 
			
		||||
  QTimer *guiTimer = new QTimer(this);
 | 
			
		||||
  connect(guiTimer, SIGNAL(timeout()), this, SLOT(guiUpdate()));
 | 
			
		||||
  guiTimer->start(100);                            //Don't change the 100 ms!
 | 
			
		||||
 | 
			
		||||
  m_auto=false;
 | 
			
		||||
  m_waterfallAvg = 1;
 | 
			
		||||
@ -291,7 +290,11 @@ MainWindow::MainWindow(QWidget *parent) :
 | 
			
		||||
  if(ui->actionCuteSDR->isChecked()) on_actionCuteSDR_triggered();
 | 
			
		||||
  if(ui->actionAFMHot->isChecked()) on_actionAFMHot_triggered();
 | 
			
		||||
  if(ui->actionBlue->isChecked()) on_actionBlue_triggered();
 | 
			
		||||
                                             // End of MainWindow constructor
 | 
			
		||||
 | 
			
		||||
  // only start the guiUpdate timer after this constructor has finished
 | 
			
		||||
  QTimer::singleShot (0, [=] {
 | 
			
		||||
                           guiTimer->start(100); //Don't change the 100 ms!
 | 
			
		||||
                         });
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
  //--------------------------------------------------- MainWindow destructor
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user