CGeneratePropertyNamesDialog: Make use of Qt 5 signals and slots

This commit is contained in:
Lioncash 2020-07-03 06:59:52 -04:00
parent 9401275564
commit e7d5cacd0f
1 changed files with 2 additions and 2 deletions

View File

@ -162,12 +162,12 @@ void CGeneratePropertyNamesDialog::StartGeneration()
Params.PrintToLog = mpUI->LogOutputCheckBox->isChecked(); Params.PrintToLog = mpUI->LogOutputCheckBox->isChecked();
// Run the task and configure ourselves so we can update correctly // Run the task and configure ourselves so we can update correctly
connect( &mFutureWatcher, SIGNAL(finished()), this, SLOT(GenerationComplete()) ); connect(&mFutureWatcher, &QFutureWatcher<void>::finished, this, &CGeneratePropertyNamesDialog::GenerationComplete);
mFuture = QtConcurrent::run(&mGenerator, &CPropertyNameGenerator::Generate, Params, &mNotifier); mFuture = QtConcurrent::run(&mGenerator, &CPropertyNameGenerator::Generate, Params, &mNotifier);
mFutureWatcher.setFuture(mFuture); mFutureWatcher.setFuture(mFuture);
mUpdateTimer.start(500); mUpdateTimer.start(500);
connect( &mUpdateTimer, SIGNAL(timeout()), this, SLOT(CheckForNewResults()) ); connect( &mUpdateTimer, &QTimer::timeout, this, &CGeneratePropertyNamesDialog::CheckForNewResults);
UpdateUI(); UpdateUI();
} }