Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions src/controllers/engine/controllerengine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,8 @@ bool ControllerEngine::loadScriptFiles(const QList<QString>& scriptPaths,
}
}

connect(&m_scriptWatcher, SIGNAL(fileChanged(QString)),
this, SLOT(scriptHasChanged(QString)));
connect(&m_scriptWatcher, &QFileSystemWatcher::fileChanged,
this, &ControllerEngine::scriptHasChanged);

emit(initialized());

Expand All @@ -248,8 +248,8 @@ bool ControllerEngine::loadScriptFiles(const QList<QString>& scriptPaths,
// Slot to run when a script file has changed
void ControllerEngine::scriptHasChanged(const QString& scriptFilename) {
Q_UNUSED(scriptFilename);
disconnect(&m_scriptWatcher, SIGNAL(fileChanged(QString)),
this, SLOT(scriptHasChanged(QString)));
disconnect(&m_scriptWatcher, &QFileSystemWatcher::fileChanged,
this, &ControllerEngine::scriptHasChanged);
reloadScripts();
}

Expand Down Expand Up @@ -402,8 +402,8 @@ void ControllerEngine::scriptErrorDialog(const QString& detailedError) {
if (ErrorDialogHandler::instance()->requestErrorDialog(props)) {
m_bDisplayingExceptionDialog = true;
// Enable custom handling of the dialog buttons
connect(ErrorDialogHandler::instance(), SIGNAL(stdButtonClicked(QString, QMessageBox::StandardButton)),
this, SLOT(errorDialogButton(QString, QMessageBox::StandardButton)));
connect(ErrorDialogHandler::instance(), &ErrorDialogHandler::stdButtonClicked,
this, &ControllerEngine::errorDialogButton);
}
}

Expand All @@ -417,10 +417,8 @@ void ControllerEngine::errorDialogButton(const QString& key, QMessageBox::Standa

m_bDisplayingExceptionDialog = false;
// Something was clicked, so disable this signal now
disconnect(ErrorDialogHandler::instance(),
SIGNAL(stdButtonClicked(QString, QMessageBox::StandardButton)),
this,
SLOT(errorDialogButton(QString, QMessageBox::StandardButton)));
disconnect(ErrorDialogHandler::instance(), &ErrorDialogHandler::stdButtonClicked,
this, &ControllerEngine::errorDialogButton);

if (button == QMessageBox::Retry) {
reloadScripts();
Expand Down