diff options
20 files changed, 87 insertions, 74 deletions
diff --git a/src/plugins/beautifier/artisticstyle/artisticstyle.cpp b/src/plugins/beautifier/artisticstyle/artisticstyle.cpp index 31ff9b0311..5eb2c0b218 100644 --- a/src/plugins/beautifier/artisticstyle/artisticstyle.cpp +++ b/src/plugins/beautifier/artisticstyle/artisticstyle.cpp @@ -84,7 +84,7 @@ bool ArtisticStyle::initialize() Constants::ArtisticStyle::ACTION_FORMATFILE, Core::Context(Core::Constants::C_GLOBAL)); menu->addAction(cmd); - connect(m_formatFile, SIGNAL(triggered()), this, SLOT(formatFile())); + connect(m_formatFile, &QAction::triggered, this, &ArtisticStyle::formatFile); Core::ActionManager::actionContainer(Constants::MENU_ID)->addMenu(menu); diff --git a/src/plugins/beautifier/beautifierplugin.cpp b/src/plugins/beautifier/beautifierplugin.cpp index a398dbb75e..020007fe0b 100644 --- a/src/plugins/beautifier/beautifierplugin.cpp +++ b/src/plugins/beautifier/beautifierplugin.cpp @@ -74,7 +74,7 @@ BeautifierPlugin::BeautifierPlugin() : { connect(m_asyncFormatMapper, SIGNAL(mapped(QObject*)), this, SLOT(formatCurrentFileContinue(QObject*))); - connect(this, SIGNAL(pipeError(QString)), this, SLOT(showError(QString))); + connect(this, &BeautifierPlugin::pipeError, this, &BeautifierPlugin::showError); } BeautifierPlugin::~BeautifierPlugin() diff --git a/src/plugins/beautifier/clangformat/clangformat.cpp b/src/plugins/beautifier/clangformat/clangformat.cpp index cb356f0287..24fd26c45b 100644 --- a/src/plugins/beautifier/clangformat/clangformat.cpp +++ b/src/plugins/beautifier/clangformat/clangformat.cpp @@ -80,14 +80,14 @@ bool ClangFormat::initialize() Constants::ClangFormat::ACTION_FORMATFILE, Core::Context(Core::Constants::C_GLOBAL)); menu->addAction(cmd); - connect(m_formatFile, SIGNAL(triggered()), this, SLOT(formatFile())); + connect(m_formatFile, &QAction::triggered, this, &ClangFormat::formatFile); m_formatRange = new QAction(BeautifierPlugin::msgFormatSelectedText(), this); cmd = Core::ActionManager::registerAction(m_formatRange, Constants::ClangFormat::ACTION_FORMATSELECTED, Core::Context(Core::Constants::C_GLOBAL)); menu->addAction(cmd); - connect(m_formatRange, SIGNAL(triggered()), this, SLOT(formatSelectedText())); + connect(m_formatRange, &QAction::triggered, this, &ClangFormat::formatSelectedText); Core::ActionManager::actionContainer(Constants::MENU_ID)->addMenu(menu); diff --git a/src/plugins/beautifier/configurationdialog.cpp b/src/plugins/beautifier/configurationdialog.cpp index b59d2b5ba0..b99eb00f9a 100644 --- a/src/plugins/beautifier/configurationdialog.cpp +++ b/src/plugins/beautifier/configurationdialog.cpp @@ -55,7 +55,7 @@ ConfigurationDialog::ConfigurationDialog(QWidget *parent) : ui->name->setValidator(fileNameValidator); updateDocumentation(); - connect(ui->name, SIGNAL(textChanged(QString)), this, SLOT(updateOkButton())); + connect(ui->name, &QLineEdit::textChanged, this, &ConfigurationDialog::updateOkButton); updateOkButton(); // force initial test. connect(ui->editor, SIGNAL(documentationChanged(QString,QString)), this, SLOT(updateDocumentation(QString,QString))); diff --git a/src/plugins/beautifier/configurationeditor.cpp b/src/plugins/beautifier/configurationeditor.cpp index 046c45fd7b..5fd0213ddb 100644 --- a/src/plugins/beautifier/configurationeditor.cpp +++ b/src/plugins/beautifier/configurationeditor.cpp @@ -112,8 +112,10 @@ ConfigurationEditor::ConfigurationEditor(QWidget *parent) m_completer->setCaseSensitivity(Qt::CaseInsensitive); m_completer->popup()->installEventFilter(this); - connect(m_completer, SIGNAL(activated(QString)), this, SLOT(insertCompleterText(QString))); - connect(this, SIGNAL(cursorPositionChanged()), this, SLOT(updateDocumentation())); + connect(m_completer, static_cast<void (QCompleter::*)(const QString &)>(&QCompleter::activated), + this, &ConfigurationEditor::insertCompleterText); + connect(this, &ConfigurationEditor::cursorPositionChanged, + this, &ConfigurationEditor::updateDocumentation); } void ConfigurationEditor::setSettings(AbstractSettings *settings) diff --git a/src/plugins/beautifier/configurationpanel.cpp b/src/plugins/beautifier/configurationpanel.cpp index d79c8eaac0..6953ad6e82 100644 --- a/src/plugins/beautifier/configurationpanel.cpp +++ b/src/plugins/beautifier/configurationpanel.cpp @@ -45,10 +45,11 @@ ConfigurationPanel::ConfigurationPanel(QWidget *parent) : m_settings(0) { ui->setupUi(this); - connect(ui->add, SIGNAL(clicked()), this, SLOT(add())); - connect(ui->edit, SIGNAL(clicked()), this, SLOT(edit())); - connect(ui->remove, SIGNAL(clicked()), this, SLOT(remove())); - connect(ui->configurations, SIGNAL(currentIndexChanged(int)), this, SLOT(updateButtons())); + connect(ui->add, &QPushButton::clicked, this, &ConfigurationPanel::add); + connect(ui->edit, &QPushButton::clicked, this, &ConfigurationPanel::edit); + connect(ui->remove, &QPushButton::clicked, this, &ConfigurationPanel::remove); + connect(ui->configurations, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), + this, &ConfigurationPanel::updateButtons); } ConfigurationPanel::~ConfigurationPanel() diff --git a/src/plugins/beautifier/uncrustify/uncrustify.cpp b/src/plugins/beautifier/uncrustify/uncrustify.cpp index 9a092ff7d3..7efadf4f64 100644 --- a/src/plugins/beautifier/uncrustify/uncrustify.cpp +++ b/src/plugins/beautifier/uncrustify/uncrustify.cpp @@ -83,7 +83,7 @@ bool Uncrustify::initialize() Constants::Uncrustify::ACTION_FORMATFILE, Core::Context(Core::Constants::C_GLOBAL)); menu->addAction(cmd); - connect(m_formatFile, SIGNAL(triggered()), this, SLOT(formatFile())); + connect(m_formatFile, &QAction::triggered, this, &Uncrustify::formatFile); Core::ActionManager::actionContainer(Constants::MENU_ID)->addMenu(menu); diff --git a/src/plugins/clearcase/activityselector.cpp b/src/plugins/clearcase/activityselector.cpp index 1268d00b90..b2d4020212 100644 --- a/src/plugins/clearcase/activityselector.cpp +++ b/src/plugins/clearcase/activityselector.cpp @@ -70,10 +70,11 @@ ActivitySelector::ActivitySelector(QWidget *parent) : lblActivity->setBuddy(m_cmbActivity); - connect(btnAdd, SIGNAL(clicked()), this, SLOT(newActivity())); + connect(btnAdd, &QToolButton::clicked, this, &ActivitySelector::newActivity); refresh(); - connect(m_cmbActivity, SIGNAL(currentIndexChanged(int)), this, SLOT(userChanged())); + connect(m_cmbActivity, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), + this, &ActivitySelector::userChanged); } void ActivitySelector::userChanged() @@ -109,9 +110,11 @@ void ActivitySelector::setActivity(const QString &act) { int index = m_cmbActivity->findData(act); if (index != -1) { - disconnect(m_cmbActivity, SIGNAL(currentIndexChanged(int)), this, SLOT(userChanged())); + disconnect(m_cmbActivity, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), + this, &ActivitySelector::userChanged); m_cmbActivity->setCurrentIndex(index); - connect(m_cmbActivity, SIGNAL(currentIndexChanged(int)), this, SLOT(userChanged())); + connect(m_cmbActivity, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), + this, &ActivitySelector::userChanged); } } diff --git a/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp b/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp index 64fed2f3d1..afcd533a07 100644 --- a/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp +++ b/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp @@ -245,8 +245,7 @@ CMakeRunConfigurationWidget::CMakeRunConfigurationWidget(CMakeRunConfiguration * fl->setFieldGrowthPolicy(QFormLayout::ExpandingFieldsGrow); QLineEdit *argumentsLineEdit = new QLineEdit(); argumentsLineEdit->setText(cmakeRunConfiguration->commandLineArguments()); - connect(argumentsLineEdit, SIGNAL(textChanged(QString)), - this, SLOT(setArguments(QString))); + connect(argumentsLineEdit, &QLineEdit::textChanged, this, &CMakeRunConfigurationWidget::setArguments); fl->addRow(tr("Arguments:"), argumentsLineEdit); m_workingDirectoryEdit = new Utils::PathChooser(); @@ -257,7 +256,8 @@ CMakeRunConfigurationWidget::CMakeRunConfigurationWidget(CMakeRunConfiguration * EnvironmentAspect *aspect = m_cmakeRunConfiguration->extraAspect<EnvironmentAspect>(); if (aspect) { - connect(aspect, SIGNAL(environmentChanged()), this, SLOT(environmentWasChanged())); + connect(aspect, &EnvironmentAspect::environmentChanged, + this, &CMakeRunConfigurationWidget::environmentWasChanged); environmentWasChanged(); } m_workingDirectoryEdit->setPromptDialogTitle(tr("Select Working Directory")); @@ -286,17 +286,17 @@ CMakeRunConfigurationWidget::CMakeRunConfigurationWidget(CMakeRunConfiguration * vbx->setMargin(0); vbx->addWidget(m_detailsContainer); - connect(m_workingDirectoryEdit, SIGNAL(changed(QString)), - this, SLOT(setWorkingDirectory())); + connect(m_workingDirectoryEdit, &Utils::PathChooser::changed, + this, &CMakeRunConfigurationWidget::setWorkingDirectory); - connect(resetButton, SIGNAL(clicked()), - this, SLOT(resetWorkingDirectory())); + connect(resetButton, &QToolButton::clicked, + this, &CMakeRunConfigurationWidget::resetWorkingDirectory); - connect(runInTerminal, SIGNAL(toggled(bool)), - this, SLOT(runInTerminalToggled(bool))); + connect(runInTerminal, &QCheckBox::toggled, + this, &CMakeRunConfigurationWidget::runInTerminalToggled); - connect(m_cmakeRunConfiguration, SIGNAL(baseWorkingDirectoryChanged(QString)), - this, SLOT(workingDirectoryChanged(QString))); + connect(m_cmakeRunConfiguration, &CMakeRunConfiguration::baseWorkingDirectoryChanged, + this, &CMakeRunConfigurationWidget::workingDirectoryChanged); setEnabled(m_cmakeRunConfiguration->isEnabled()); } diff --git a/src/plugins/cmakeprojectmanager/cmaketool.cpp b/src/plugins/cmakeprojectmanager/cmaketool.cpp index eba955a0cf..8975d5195d 100644 --- a/src/plugins/cmakeprojectmanager/cmaketool.cpp +++ b/src/plugins/cmakeprojectmanager/cmaketool.cpp @@ -64,8 +64,7 @@ void CMakeTool::setCMakeExecutable(const QString &executable) { cancel(); m_process = new QProcess(); - connect(m_process, SIGNAL(finished(int)), - this, SLOT(finished(int))); + connect(m_process, static_cast<void (QProcess::*)(int)>(&QProcess::finished), this, &CMakeTool::finished); m_executable = executable; QFileInfo fi(m_executable); diff --git a/src/plugins/help/filtersettingspage.cpp b/src/plugins/help/filtersettingspage.cpp index 33aea38e89..39da450ae2 100644 --- a/src/plugins/help/filtersettingspage.cpp +++ b/src/plugins/help/filtersettingspage.cpp @@ -60,14 +60,14 @@ QWidget *FilterSettingsPage::widget() updateFilterPage(); - connect(m_ui.attributeWidget, SIGNAL(itemChanged(QTreeWidgetItem*,int)), - this, SLOT(updateFilterMap())); - connect(m_ui.filterWidget, - SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)), this, - SLOT(updateAttributes(QListWidgetItem*))); - connect(m_ui.filterAddButton, SIGNAL(clicked()), this, SLOT(addFilter())); - connect(m_ui.filterRemoveButton, SIGNAL(clicked()), this, - SLOT(removeFilter())); + connect(m_ui.attributeWidget, &QTreeWidget::itemChanged, + this, &FilterSettingsPage::updateFilterMap); + connect(m_ui.filterWidget, &QListWidget::currentItemChanged, + this, &FilterSettingsPage::updateAttributes); + connect(m_ui.filterAddButton, &QPushButton::clicked, + this, &FilterSettingsPage::addFilter); + connect(m_ui.filterRemoveButton, &QPushButton::clicked, + this, &FilterSettingsPage::removeFilter); connect(HelpManager::instance(), SIGNAL(documentationChanged()), this, SLOT(updateFilterPage())); } diff --git a/src/plugins/help/generalsettingspage.cpp b/src/plugins/help/generalsettingspage.cpp index 184360e54b..a2fdc44b65 100644 --- a/src/plugins/help/generalsettingspage.cpp +++ b/src/plugins/help/generalsettingspage.cpp @@ -102,17 +102,22 @@ QWidget *GeneralSettingsPage::widget() Core::HelpManager::SideBySideIfPossible).toInt(); m_ui->contextHelpComboBox->setCurrentIndex(m_contextOption); - connect(m_ui->currentPageButton, SIGNAL(clicked()), this, SLOT(setCurrentPage())); - connect(m_ui->blankPageButton, SIGNAL(clicked()), this, SLOT(setBlankPage())); - connect(m_ui->defaultPageButton, SIGNAL(clicked()), this, SLOT(setDefaultPage())); + connect(m_ui->currentPageButton, &QPushButton::clicked, + this, &GeneralSettingsPage::setCurrentPage); + connect(m_ui->blankPageButton, &QPushButton::clicked, + this, &GeneralSettingsPage::setBlankPage); + connect(m_ui->defaultPageButton, &QPushButton::clicked, + this, &GeneralSettingsPage::setDefaultPage); HelpViewer *viewer = CentralWidget::instance()->currentViewer(); if (!viewer) m_ui->currentPageButton->setEnabled(false); m_ui->errorLabel->setVisible(false); - connect(m_ui->importButton, SIGNAL(clicked()), this, SLOT(importBookmarks())); - connect(m_ui->exportButton, SIGNAL(clicked()), this, SLOT(exportBookmarks())); + connect(m_ui->importButton, &QPushButton::clicked, + this, &GeneralSettingsPage::importBookmarks); + connect(m_ui->exportButton, &QPushButton::clicked, + this, &GeneralSettingsPage::exportBookmarks); m_returnOnClose = HelpManager::customValue(QLatin1String("ReturnOnClose"), false).toBool(); diff --git a/src/plugins/help/openpagesmodel.cpp b/src/plugins/help/openpagesmodel.cpp index 441160f03f..fb2e05d472 100644 --- a/src/plugins/help/openpagesmodel.cpp +++ b/src/plugins/help/openpagesmodel.cpp @@ -75,7 +75,8 @@ void OpenPagesModel::addPage(const QUrl &url, qreal zoom) { beginInsertRows(QModelIndex(), rowCount(), rowCount()); HelpViewer *page = HelpPlugin::createHelpViewer(zoom); - connect(page, SIGNAL(titleChanged()), this, SLOT(handleTitleChanged())); + connect(page, &HelpViewer::titleChanged, + this, &OpenPagesModel::handleTitleChanged); m_pages << page; endInsertRows(); if (url.isValid()) diff --git a/src/plugins/help/openpagesswitcher.cpp b/src/plugins/help/openpagesswitcher.cpp index c38bb3eb99..3bfbb2f72e 100644 --- a/src/plugins/help/openpagesswitcher.cpp +++ b/src/plugins/help/openpagesswitcher.cpp @@ -67,10 +67,10 @@ OpenPagesSwitcher::OpenPagesSwitcher(OpenPagesModel *model) layout->setMargin(0); layout->addWidget(m_openPagesWidget); - connect(m_openPagesWidget, SIGNAL(closePage(QModelIndex)), this, - SIGNAL(closePage(QModelIndex))); - connect(m_openPagesWidget, SIGNAL(setCurrentPage(QModelIndex)), this, - SIGNAL(setCurrentPage(QModelIndex))); + connect(m_openPagesWidget, &OpenPagesWidget::closePage, + this, &OpenPagesSwitcher::closePage); + connect(m_openPagesWidget, &OpenPagesWidget::setCurrentPage, + this, &OpenPagesSwitcher::setCurrentPage); } OpenPagesSwitcher::~OpenPagesSwitcher() diff --git a/src/plugins/help/remotehelpfilter.cpp b/src/plugins/help/remotehelpfilter.cpp index c3a15e1735..1145fa299c 100644 --- a/src/plugins/help/remotehelpfilter.cpp +++ b/src/plugins/help/remotehelpfilter.cpp @@ -49,8 +49,10 @@ RemoteFilterOptions::RemoteFilterOptions(RemoteHelpFilter *filter, QWidget *pare item->setFlags(item->flags() | Qt::ItemIsEditable); } - connect(m_ui.add, SIGNAL(clicked()), this, SLOT(addNewItem())); - connect(m_ui.remove, SIGNAL(clicked()), this, SLOT(removeItem())); + connect(m_ui.add, &QPushButton::clicked, + this, &RemoteFilterOptions::addNewItem); + connect(m_ui.remove, &QPushButton::clicked, + this, &RemoteFilterOptions::removeItem); connect(m_ui.listWidget, SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)), SLOT(updateRemoveButton())); updateRemoveButton(); } diff --git a/src/plugins/imageviewer/imageviewer.cpp b/src/plugins/imageviewer/imageviewer.cpp index ab3b264899..218de0c1f9 100644 --- a/src/plugins/imageviewer/imageviewer.cpp +++ b/src/plugins/imageviewer/imageviewer.cpp @@ -105,8 +105,8 @@ ImageViewer::ImageViewer(QWidget *parent) d->imageView, SLOT(setViewBackground(bool))); connect(d->ui_toolbar.toolButtonOutline, SIGNAL(toggled(bool)), d->imageView, SLOT(setViewOutline(bool))); - connect(d->ui_toolbar.toolButtonPlayPause, SIGNAL(clicked()), - this, SLOT(playToggled())); + connect(d->ui_toolbar.toolButtonPlayPause, &Core::CommandButton::clicked, + this, &ImageViewer::playToggled); connect(d->imageView, SIGNAL(imageSizeChanged(QSize)), this, SLOT(imageSizeUpdated(QSize))); connect(d->imageView, SIGNAL(scaleFactorChanged(qreal)), diff --git a/src/plugins/imageviewer/imageviewerfile.cpp b/src/plugins/imageviewer/imageviewerfile.cpp index c7963b7bf3..0a2e207078 100644 --- a/src/plugins/imageviewer/imageviewerfile.cpp +++ b/src/plugins/imageviewer/imageviewerfile.cpp @@ -43,7 +43,7 @@ ImageViewerFile::ImageViewerFile(ImageViewer *parent) { setId(Constants::IMAGEVIEWER_ID); m_editor = parent; - connect(this, SIGNAL(mimeTypeChanged()), this, SIGNAL(changed())); + connect(this, &ImageViewerFile::mimeTypeChanged, this, &ImageViewerFile::changed); } Core::IDocument::ReloadBehavior ImageViewerFile::reloadBehavior(ChangeTrigger state, ChangeType type) const diff --git a/src/plugins/macros/findmacrohandler.cpp b/src/plugins/macros/findmacrohandler.cpp index 4ccb9f605f..931317504f 100644 --- a/src/plugins/macros/findmacrohandler.cpp +++ b/src/plugins/macros/findmacrohandler.cpp @@ -205,18 +205,18 @@ void FindMacroHandler::changeEditor(Core::IEditor *editor) aggregate->add(macroFind); // Connect all signals - connect(macroFind, SIGNAL(allReplaced(QString,QString,Core::FindFlags)), - this, SLOT(replaceAll(QString,QString,Core::FindFlags))); - connect(macroFind, SIGNAL(incrementalFound(QString,Core::FindFlags)), - this, SLOT(findIncremental(QString,Core::FindFlags))); - connect(macroFind, SIGNAL(incrementalSearchReseted()), - this, SLOT(resetIncrementalSearch())); - connect(macroFind, SIGNAL(replaced(QString,QString,Core::FindFlags)), - this, SLOT(replace(QString,QString,Core::FindFlags))); - connect(macroFind, SIGNAL(stepFound(QString,Core::FindFlags)), - this, SLOT(findStep(QString,Core::FindFlags))); - connect(macroFind, SIGNAL(stepReplaced(QString,QString,Core::FindFlags)), - this, SLOT(replaceStep(QString,QString,Core::FindFlags))); + connect(macroFind, &MacroTextFind::allReplaced, + this, &FindMacroHandler::replaceAll); + connect(macroFind, &MacroTextFind::incrementalFound, + this, &FindMacroHandler::findIncremental); + connect(macroFind, &MacroTextFind::incrementalSearchReseted, + this, &FindMacroHandler::resetIncrementalSearch); + connect(macroFind, &MacroTextFind::replaced, + this, &FindMacroHandler::replace); + connect(macroFind, &MacroTextFind::stepFound, + this, &FindMacroHandler::findStep); + connect(macroFind, &MacroTextFind::stepReplaced, + this, &FindMacroHandler::replaceStep); } } } diff --git a/src/plugins/macros/macrooptionswidget.cpp b/src/plugins/macros/macrooptionswidget.cpp index 0f95b9e647..0050c9aeaa 100644 --- a/src/plugins/macros/macrooptionswidget.cpp +++ b/src/plugins/macros/macrooptionswidget.cpp @@ -61,12 +61,12 @@ MacroOptionsWidget::MacroOptionsWidget(QWidget *parent) : { m_ui->setupUi(this); - connect(m_ui->treeWidget, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)), - this, SLOT(changeCurrentItem(QTreeWidgetItem*))); - connect(m_ui->removeButton, SIGNAL(clicked()), - this, SLOT(remove())); - connect(m_ui->description, SIGNAL(textChanged(QString)), - this, SLOT(changeDescription(QString))); + connect(m_ui->treeWidget, &QTreeWidget::currentItemChanged, + this, &MacroOptionsWidget::changeCurrentItem); + connect(m_ui->removeButton, &QPushButton::clicked, + this, &MacroOptionsWidget::remove); + connect(m_ui->description, &QLineEdit::textChanged, + this, &MacroOptionsWidget::changeDescription); m_ui->treeWidget->header()->setSortIndicator(0, Qt::AscendingOrder); diff --git a/src/plugins/macros/macrosplugin.cpp b/src/plugins/macros/macrosplugin.cpp index dcc0f390b8..ec1e064bee 100644 --- a/src/plugins/macros/macrosplugin.cpp +++ b/src/plugins/macros/macrosplugin.cpp @@ -86,26 +86,26 @@ bool MacrosPlugin::initialize(const QStringList &arguments, QString *errorMessag Core::Command *command = Core::ActionManager::registerAction(startMacro, Constants::START_MACRO, textContext); command->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Ctrl+(") : tr("Alt+("))); mmacrotools->addAction(command); - connect(startMacro, SIGNAL(triggered()), m_macroManager, SLOT(startMacro())); + connect(startMacro, &QAction::triggered, m_macroManager, &MacroManager::startMacro); QAction *endMacro = new QAction(tr("Stop Recording Macro"), this); endMacro->setEnabled(false); command = Core::ActionManager::registerAction(endMacro, Constants::END_MACRO, globalcontext); command->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Ctrl+)") : tr("Alt+)"))); mmacrotools->addAction(command); - connect(endMacro, SIGNAL(triggered()), m_macroManager, SLOT(endMacro())); + connect(endMacro, &QAction::triggered, m_macroManager, &MacroManager::endMacro); QAction *executeLastMacro = new QAction(tr("Play Last Macro"), this); command = Core::ActionManager::registerAction(executeLastMacro, Constants::EXECUTE_LAST_MACRO, textContext); command->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Meta+R") : tr("Alt+R"))); mmacrotools->addAction(command); - connect(executeLastMacro, SIGNAL(triggered()), m_macroManager, SLOT(executeLastMacro())); + connect(executeLastMacro, &QAction::triggered, m_macroManager, &MacroManager::executeLastMacro); QAction *saveLastMacro = new QAction(tr("Save Last Macro"), this); saveLastMacro->setEnabled(false); command = Core::ActionManager::registerAction(saveLastMacro, Constants::SAVE_LAST_MACRO, textContext); mmacrotools->addAction(command); - connect(saveLastMacro, SIGNAL(triggered()), m_macroManager, SLOT(saveLastMacro())); + connect(saveLastMacro, &QAction::triggered, m_macroManager, &MacroManager::saveLastMacro); return true; } |