diff --git a/src/plugins/autotoolsprojectmanager/autotoolsbuildsettingswidget.cpp b/src/plugins/autotoolsprojectmanager/autotoolsbuildsettingswidget.cpp index 967a5feed97..eb6697d19a6 100644 --- a/src/plugins/autotoolsprojectmanager/autotoolsbuildsettingswidget.cpp +++ b/src/plugins/autotoolsprojectmanager/autotoolsbuildsettingswidget.cpp @@ -64,7 +64,8 @@ AutotoolsBuildSettingsWidget::AutotoolsBuildSettingsWidget(AutotoolsBuildConfigu m_pathChooser->setEnvironment(bc->environment()); m_pathChooser->setHistoryCompleter(QLatin1String("AutoTools.BuildDir.History")); fl->addRow(tr("Build directory:"), m_pathChooser); - connect(m_pathChooser, SIGNAL(changed(QString)), this, SLOT(buildDirectoryChanged())); + connect(m_pathChooser, &Utils::PathChooser::changed, + this, &AutotoolsBuildSettingsWidget::buildDirectoryChanged); m_pathChooser->setBaseFileName(bc->target()->project()->projectDirectory()); m_pathChooser->setPath(m_buildConfiguration->rawBuildDirectory().toString()); diff --git a/src/plugins/autotoolsprojectmanager/autotoolsopenprojectwizard.cpp b/src/plugins/autotoolsprojectmanager/autotoolsopenprojectwizard.cpp index 0d86127a9ee..4190ffbcefc 100644 --- a/src/plugins/autotoolsprojectmanager/autotoolsopenprojectwizard.cpp +++ b/src/plugins/autotoolsprojectmanager/autotoolsopenprojectwizard.cpp @@ -101,7 +101,7 @@ BuildPathPage::BuildPathPage(AutotoolsOpenProjectWizard *wizard) m_pc->setHistoryCompleter(QLatin1String("AutoTools.BuildDir.History")); m_pc->setBaseDirectory(m_wizard->sourceDirectory()); m_pc->setPath(m_wizard->buildDirectory()); - connect(m_pc, SIGNAL(changed(QString)), this, SLOT(buildDirectoryChanged())); + connect(m_pc, &Utils::PathChooser::changed, this, &BuildPathPage::buildDirectoryChanged); fl->addRow(tr("Build directory:"), m_pc); setTitle(tr("Build Location")); } diff --git a/src/plugins/autotoolsprojectmanager/autotoolsproject.cpp b/src/plugins/autotoolsprojectmanager/autotoolsproject.cpp index 2eaee72f6b7..f68785061cd 100644 --- a/src/plugins/autotoolsprojectmanager/autotoolsproject.cpp +++ b/src/plugins/autotoolsprojectmanager/autotoolsproject.cpp @@ -143,8 +143,8 @@ bool AutotoolsProject::fromMap(const QVariantMap &map) if (!Project::fromMap(map)) return false; - connect(m_fileWatcher, SIGNAL(fileChanged(QString)), - this, SLOT(onFileChanged(QString))); + connect(m_fileWatcher, &Utils::FileSystemWatcher::fileChanged, + this, &AutotoolsProject::onFileChanged); // Load the project tree structure. loadProjectTree(); @@ -172,11 +172,11 @@ void AutotoolsProject::loadProjectTree() // Parse the makefile asynchronously in a thread m_makefileParserThread = new MakefileParserThread(m_fileName); - connect(m_makefileParserThread, SIGNAL(started()), - this, SLOT(makefileParsingStarted())); + connect(m_makefileParserThread, &MakefileParserThread::started, + this, &AutotoolsProject::makefileParsingStarted); - connect(m_makefileParserThread, SIGNAL(finished()), - this, SLOT(makefileParsingFinished())); + connect(m_makefileParserThread, &MakefileParserThread::finished, + this, &AutotoolsProject::makefileParsingFinished); m_makefileParserThread->start(); } diff --git a/src/plugins/autotoolsprojectmanager/makefileparser.cpp b/src/plugins/autotoolsprojectmanager/makefileparser.cpp index f07a187f98b..b0369973eb3 100644 --- a/src/plugins/autotoolsprojectmanager/makefileparser.cpp +++ b/src/plugins/autotoolsprojectmanager/makefileparser.cpp @@ -292,7 +292,7 @@ void MakefileParser::parseSubDirs() continue; MakefileParser parser(subDirMakefile); - connect(&parser, SIGNAL(status(QString)), this, SIGNAL(status(QString))); + connect(&parser, &MakefileParser::status, this, &MakefileParser::status); const bool success = parser.parse(); // Don't return, try to parse as many sub directories diff --git a/src/plugins/autotoolsprojectmanager/makefileparserthread.cpp b/src/plugins/autotoolsprojectmanager/makefileparserthread.cpp index 2d8762f24a8..74f356833eb 100644 --- a/src/plugins/autotoolsprojectmanager/makefileparserthread.cpp +++ b/src/plugins/autotoolsprojectmanager/makefileparserthread.cpp @@ -46,7 +46,8 @@ MakefileParserThread::MakefileParserThread(const QString &makefile) : m_makefiles(), m_includePaths() { - connect(&m_parser, SIGNAL(status(QString)), this, SIGNAL(status(QString))); + connect(&m_parser, &MakefileParser::status, + this, &MakefileParserThread::status); } QStringList MakefileParserThread::sources() const diff --git a/src/plugins/bazaar/uncommitdialog.cpp b/src/plugins/bazaar/uncommitdialog.cpp index 9210de0f04d..c06d091dc55 100644 --- a/src/plugins/bazaar/uncommitdialog.cpp +++ b/src/plugins/bazaar/uncommitdialog.cpp @@ -48,7 +48,7 @@ UnCommitDialog::UnCommitDialog(QWidget *parent) auto dryRunBtn = new QPushButton(tr("Dry Run")); dryRunBtn->setToolTip(tr("Test the outcome of removing the last committed revision, without actually removing anything.")); m_ui->buttonBox->addButton(dryRunBtn, QDialogButtonBox::ApplyRole); - connect(dryRunBtn, SIGNAL(clicked()), this, SLOT(dryRun())); + connect(dryRunBtn, &QPushButton::clicked, this, &UnCommitDialog::dryRun); } UnCommitDialog::~UnCommitDialog() diff --git a/src/plugins/classview/classviewparser.cpp b/src/plugins/classview/classviewparser.cpp index e07369f3987..3dc19a12509 100644 --- a/src/plugins/classview/classviewparser.cpp +++ b/src/plugins/classview/classviewparser.cpp @@ -172,7 +172,7 @@ Parser::Parser(QObject *parent) // connect signal/slots // internal data reset - connect(this, SIGNAL(resetDataDone()), SLOT(onResetDataDone()), Qt::QueuedConnection); + connect(this, &Parser::resetDataDone, this, &Parser::onResetDataDone, Qt::QueuedConnection); // timer for emitting changes connect(d->timer, SIGNAL(timeout()), SLOT(requestCurrentState()), Qt::QueuedConnection); diff --git a/src/plugins/designer/formeditorplugin.cpp b/src/plugins/designer/formeditorplugin.cpp index 8a13cef2f2f..dd6aa84cbc5 100644 --- a/src/plugins/designer/formeditorplugin.cpp +++ b/src/plugins/designer/formeditorplugin.cpp @@ -114,7 +114,7 @@ void FormEditorPlugin::extensionsInitialized() mformtools->menu()->setTitle(tr("For&m Editor")); mtools->addMenu(mformtools); - connect(m_actionSwitchSource, SIGNAL(triggered()), this, SLOT(switchSourceForm())); + connect(m_actionSwitchSource, &QAction::triggered, this, &FormEditorPlugin::switchSourceForm); Core::Context context(Designer::Constants::C_FORMEDITOR, Core::Constants::C_EDITORMANAGER); Core::Command *cmd = Core::ActionManager::registerAction(m_actionSwitchSource, "FormEditor.FormSwitchSource", context); diff --git a/src/plugins/designer/formtemplatewizardpage.cpp b/src/plugins/designer/formtemplatewizardpage.cpp index f12c770ffa9..470accea43c 100644 --- a/src/plugins/designer/formtemplatewizardpage.cpp +++ b/src/plugins/designer/formtemplatewizardpage.cpp @@ -91,10 +91,10 @@ FormTemplateWizardPage::FormTemplateWizardPage(QWidget * parent) : setTitle(tr("Choose a Form Template")); QVBoxLayout *layout = new QVBoxLayout; - connect(m_newFormWidget, SIGNAL(currentTemplateChanged(bool)), - this, SLOT(slotCurrentTemplateChanged(bool))); - connect(m_newFormWidget, SIGNAL(templateActivated()), - this, SIGNAL(templateActivated())); + connect(m_newFormWidget, &QDesignerNewFormWidgetInterface::currentTemplateChanged, + this, &FormTemplateWizardPage::slotCurrentTemplateChanged); + connect(m_newFormWidget, &QDesignerNewFormWidgetInterface::templateActivated, + this, &FormTemplateWizardPage::templateActivated); layout->addWidget(m_newFormWidget); setLayout(layout); diff --git a/src/plugins/designer/qtcreatorintegration.cpp b/src/plugins/designer/qtcreatorintegration.cpp index 303fc32f8c0..bf3ab5d68c2 100644 --- a/src/plugins/designer/qtcreatorintegration.cpp +++ b/src/plugins/designer/qtcreatorintegration.cpp @@ -85,10 +85,10 @@ QtCreatorIntegration::QtCreatorIntegration(QDesignerFormEditorInterface *core, Q f |= SlotNavigationFeature; f &= ~ResourceEditorFeature; setFeatures(f); - connect(this, SIGNAL(navigateToSlot(QString,QString,QStringList)), - this, SLOT(slotNavigateToSlot(QString,QString,QStringList))); - connect(this, SIGNAL(helpRequested(QString,QString)), - this, SLOT(slotDesignerHelpRequested(QString,QString))); + connect(this, &QtCreatorIntegration::navigateToSlot, + this, &QtCreatorIntegration::slotNavigateToSlot); + connect(this, &QtCreatorIntegration::helpRequested, + this, &QtCreatorIntegration::slotDesignerHelpRequested); slotSyncSettingsToDesigner(); connect(Core::ICore::instance(), SIGNAL(saveSettingsRequested()), this, SLOT(slotSyncSettingsToDesigner())); diff --git a/src/plugins/genericprojectmanager/filesselectionwizardpage.cpp b/src/plugins/genericprojectmanager/filesselectionwizardpage.cpp index e32399d8838..c97c10312ef 100644 --- a/src/plugins/genericprojectmanager/filesselectionwizardpage.cpp +++ b/src/plugins/genericprojectmanager/filesselectionwizardpage.cpp @@ -115,7 +115,7 @@ void FilesSelectionWizardPage::createApplyButton(QVBoxLayout *layout) hbox->addWidget(m_applyFilterButton); layout->addLayout(hbox); - connect(m_applyFilterButton, SIGNAL(clicked()), this, SLOT(applyFilter())); + connect(m_applyFilterButton, &QPushButton::clicked, this, &FilesSelectionWizardPage::applyFilter); } void FilesSelectionWizardPage::initializePage() @@ -123,10 +123,10 @@ void FilesSelectionWizardPage::initializePage() m_view->setModel(0); delete m_model; m_model = new ProjectExplorer::SelectableFilesModel(this); - connect(m_model, SIGNAL(parsingProgress(QString)), - this, SLOT(parsingProgress(QString))); - connect(m_model, SIGNAL(parsingFinished()), - this, SLOT(parsingFinished())); + connect(m_model, &ProjectExplorer::SelectableFilesModel::parsingProgress, + this, &FilesSelectionWizardPage::parsingProgress); + connect(m_model, &ProjectExplorer::SelectableFilesModel::parsingFinished, + this, &FilesSelectionWizardPage::parsingFinished); m_model->startParsing(m_genericProjectWizardDialog->path()); m_hideFilesFilterLabel->setVisible(false); diff --git a/src/plugins/genericprojectmanager/genericbuildconfiguration.cpp b/src/plugins/genericprojectmanager/genericbuildconfiguration.cpp index db9cd2c040f..3ba87db76f7 100644 --- a/src/plugins/genericprojectmanager/genericbuildconfiguration.cpp +++ b/src/plugins/genericprojectmanager/genericbuildconfiguration.cpp @@ -215,7 +215,8 @@ GenericBuildSettingsWidget::GenericBuildSettingsWidget(GenericBuildConfiguration m_pathChooser->setHistoryCompleter(QLatin1String("Generic.BuildDir.History")); m_pathChooser->setEnabled(true); fl->addRow(tr("Build directory:"), m_pathChooser); - connect(m_pathChooser, SIGNAL(changed(QString)), this, SLOT(buildDirectoryChanged())); + connect(m_pathChooser, &Utils::PathChooser::changed, + this, &GenericBuildSettingsWidget::buildDirectoryChanged); m_buildConfiguration = bc; m_pathChooser->setBaseFileName(bc->target()->project()->projectDirectory()); @@ -223,7 +224,8 @@ GenericBuildSettingsWidget::GenericBuildSettingsWidget(GenericBuildConfiguration m_pathChooser->setPath(m_buildConfiguration->rawBuildDirectory().toString()); setDisplayName(tr("Generic Manager")); - connect(bc, SIGNAL(environmentChanged()), this, SLOT(environmentHasChanged())); + connect(bc, &GenericBuildConfiguration::environmentChanged, + this, &GenericBuildSettingsWidget::environmentHasChanged); } void GenericBuildSettingsWidget::buildDirectoryChanged() diff --git a/src/plugins/genericprojectmanager/genericmakestep.cpp b/src/plugins/genericprojectmanager/genericmakestep.cpp index 95f08b5ea5a..bb4f59be4a2 100644 --- a/src/plugins/genericprojectmanager/genericmakestep.cpp +++ b/src/plugins/genericprojectmanager/genericmakestep.cpp @@ -245,12 +245,12 @@ GenericMakeStepConfigWidget::GenericMakeStepConfigWidget(GenericMakeStep *makeSt updateMakeOverrrideLabel(); updateDetails(); - connect(m_ui->targetsList, SIGNAL(itemChanged(QListWidgetItem*)), - this, SLOT(itemChanged(QListWidgetItem*))); - connect(m_ui->makeLineEdit, SIGNAL(textEdited(QString)), - this, SLOT(makeLineEditTextEdited())); - connect(m_ui->makeArgumentsLineEdit, SIGNAL(textEdited(QString)), - this, SLOT(makeArgumentsLineEditTextEdited())); + connect(m_ui->targetsList, &QListWidget::itemChanged, + this, &GenericMakeStepConfigWidget::itemChanged); + connect(m_ui->makeLineEdit, &QLineEdit::textEdited, + this, &GenericMakeStepConfigWidget::makeLineEditTextEdited); + connect(m_ui->makeArgumentsLineEdit, &QLineEdit::textEdited, + this, &GenericMakeStepConfigWidget::makeArgumentsLineEditTextEdited); connect(ProjectExplorerPlugin::instance(), SIGNAL(settingsChanged()), this, SLOT(updateMakeOverrrideLabel())); @@ -260,10 +260,10 @@ GenericMakeStepConfigWidget::GenericMakeStepConfigWidget(GenericMakeStep *makeSt connect(m_makeStep->target(), SIGNAL(kitChanged()), this, SLOT(updateMakeOverrrideLabel())); - connect(pro, SIGNAL(environmentChanged()), - this, SLOT(updateMakeOverrrideLabel())); - connect(pro, SIGNAL(environmentChanged()), - this, SLOT(updateDetails())); + connect(pro, &GenericProject::environmentChanged, + this, &GenericMakeStepConfigWidget::updateMakeOverrrideLabel); + connect(pro, &GenericProject::environmentChanged, + this, &GenericMakeStepConfigWidget::updateDetails); } GenericMakeStepConfigWidget::~GenericMakeStepConfigWidget() diff --git a/src/plugins/genericprojectmanager/genericprojectplugin.cpp b/src/plugins/genericprojectmanager/genericprojectplugin.cpp index d282e1f2dec..08cb142c54d 100644 --- a/src/plugins/genericprojectmanager/genericprojectplugin.cpp +++ b/src/plugins/genericprojectmanager/genericprojectplugin.cpp @@ -82,8 +82,7 @@ bool GenericProjectPlugin::initialize(const QStringList &, QString *errorMessage command->setAttribute(Command::CA_Hide); mproject->addAction(command, ProjectExplorer::Constants::G_PROJECT_FILES); - connect(editFilesAction, &QAction::triggered, - this, &GenericProjectPlugin::editFiles); + connect(editFilesAction, &QAction::triggered, this, &GenericProjectPlugin::editFiles); connect(ProjectTree::instance(), &ProjectTree::aboutToShowContextMenu, [this] (Project *project, Node *) { m_contextMenuProject = project; }); diff --git a/src/plugins/perforce/perforcechecker.cpp b/src/plugins/perforce/perforcechecker.cpp index ccb515b1233..432b50ff779 100644 --- a/src/plugins/perforce/perforcechecker.cpp +++ b/src/plugins/perforce/perforcechecker.cpp @@ -51,10 +51,10 @@ PerforceChecker::PerforceChecker(QObject *parent) : m_useOverideCursor(false), m_isOverrideCursor(false) { - connect(&m_process, SIGNAL(error(QProcess::ProcessError)), - this, SLOT(slotError(QProcess::ProcessError))); - connect(&m_process, SIGNAL(finished(int,QProcess::ExitStatus)), - this, SLOT(slotFinished(int,QProcess::ExitStatus))); + connect(&m_process, static_cast(&QProcess::error), + this, &PerforceChecker::slotError); + connect(&m_process, static_cast(&QProcess::finished), + this, &PerforceChecker::slotFinished); } PerforceChecker::~PerforceChecker() diff --git a/src/plugins/perforce/settingspage.cpp b/src/plugins/perforce/settingspage.cpp index aa939b537c1..136e25c2ab9 100644 --- a/src/plugins/perforce/settingspage.cpp +++ b/src/plugins/perforce/settingspage.cpp @@ -51,7 +51,7 @@ SettingsPageWidget::SettingsPageWidget(QWidget *parent) : m_ui.pathChooser->setPromptDialogTitle(tr("Perforce Command")); m_ui.pathChooser->setHistoryCompleter(QLatin1String("Perforce.Command.History")); m_ui.pathChooser->setExpectedKind(PathChooser::Command); - connect(m_ui.testPushButton, SIGNAL(clicked()), this, SLOT(slotTest())); + connect(m_ui.testPushButton, &QPushButton::clicked, this, &SettingsPageWidget::slotTest); } void SettingsPageWidget::slotTest() diff --git a/src/plugins/qmldesigner/designmodewidget.cpp b/src/plugins/qmldesigner/designmodewidget.cpp index 3dadf47733f..5b344bf1bff 100644 --- a/src/plugins/qmldesigner/designmodewidget.cpp +++ b/src/plugins/qmldesigner/designmodewidget.cpp @@ -87,7 +87,7 @@ DocumentWarningWidget::DocumentWarningWidget(DesignModeWidget *parent) : m_errorMessage->setForegroundRole(QPalette::ToolTipText); m_goToError->setText(tr("Go to error")); m_goToError->setForegroundRole(QPalette::Link); - connect(m_goToError, SIGNAL(linkActivated(QString)), this, SLOT(goToError())); + connect(m_goToError, &QLabel::linkActivated, this, &DocumentWarningWidget::goToError); QVBoxLayout *layout = new QVBoxLayout(this); layout->setMargin(20); @@ -405,8 +405,8 @@ void DesignModeWidget::setup() m_toolBar->setToolbarCreationFlags(Core::EditorToolBar::FlagsStandalone); m_toolBar->setNavigationVisible(true); - connect(m_toolBar, SIGNAL(goForwardClicked()), this, SLOT(toolBarOnGoForwardClicked())); - connect(m_toolBar, SIGNAL(goBackClicked()), this, SLOT(toolBarOnGoBackClicked())); + connect(m_toolBar, &Core::EditorToolBar::goForwardClicked, this, &DesignModeWidget::toolBarOnGoForwardClicked); + connect(m_toolBar, &Core::EditorToolBar::goBackClicked, this, &DesignModeWidget::toolBarOnGoBackClicked); if (currentDesignDocument()) setupNavigatorHistory(currentDesignDocument()->textEditor()); diff --git a/src/plugins/qmldesigner/settingspage.cpp b/src/plugins/qmldesigner/settingspage.cpp index d23d85b20cc..35b8c2bc862 100644 --- a/src/plugins/qmldesigner/settingspage.cpp +++ b/src/plugins/qmldesigner/settingspage.cpp @@ -45,7 +45,8 @@ SettingsPageWidget::SettingsPageWidget(QWidget *parent) : QWidget(parent) { m_ui.setupUi(this); - connect(m_ui.designerEnableDebuggerCheckBox, SIGNAL(toggled(bool)), this, SLOT(debugViewEnabledToggled(bool))); + connect(m_ui.designerEnableDebuggerCheckBox, &QCheckBox::toggled, + this, &SettingsPageWidget::debugViewEnabledToggled); } DesignerSettings SettingsPageWidget::settings() const