Commit 0d0a6d11 authored by Montel Laurent's avatar Montel Laurent Committed by hjk

Use new qt5 connect api

Change-Id: I6c0d4ec60759b3c2fedac3e6649b7ec5102a6487
Reviewed-by: default avatarhjk <hjk@theqtcompany.com>
parent 1eb507af
...@@ -84,7 +84,7 @@ bool ArtisticStyle::initialize() ...@@ -84,7 +84,7 @@ bool ArtisticStyle::initialize()
Constants::ArtisticStyle::ACTION_FORMATFILE, Constants::ArtisticStyle::ACTION_FORMATFILE,
Core::Context(Core::Constants::C_GLOBAL)); Core::Context(Core::Constants::C_GLOBAL));
menu->addAction(cmd); 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); Core::ActionManager::actionContainer(Constants::MENU_ID)->addMenu(menu);
......
...@@ -74,7 +74,7 @@ BeautifierPlugin::BeautifierPlugin() : ...@@ -74,7 +74,7 @@ BeautifierPlugin::BeautifierPlugin() :
{ {
connect(m_asyncFormatMapper, SIGNAL(mapped(QObject*)), connect(m_asyncFormatMapper, SIGNAL(mapped(QObject*)),
this, SLOT(formatCurrentFileContinue(QObject*))); this, SLOT(formatCurrentFileContinue(QObject*)));
connect(this, SIGNAL(pipeError(QString)), this, SLOT(showError(QString))); connect(this, &BeautifierPlugin::pipeError, this, &BeautifierPlugin::showError);
} }
BeautifierPlugin::~BeautifierPlugin() BeautifierPlugin::~BeautifierPlugin()
......
...@@ -80,14 +80,14 @@ bool ClangFormat::initialize() ...@@ -80,14 +80,14 @@ bool ClangFormat::initialize()
Constants::ClangFormat::ACTION_FORMATFILE, Constants::ClangFormat::ACTION_FORMATFILE,
Core::Context(Core::Constants::C_GLOBAL)); Core::Context(Core::Constants::C_GLOBAL));
menu->addAction(cmd); 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); m_formatRange = new QAction(BeautifierPlugin::msgFormatSelectedText(), this);
cmd = Core::ActionManager::registerAction(m_formatRange, cmd = Core::ActionManager::registerAction(m_formatRange,
Constants::ClangFormat::ACTION_FORMATSELECTED, Constants::ClangFormat::ACTION_FORMATSELECTED,
Core::Context(Core::Constants::C_GLOBAL)); Core::Context(Core::Constants::C_GLOBAL));
menu->addAction(cmd); 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); Core::ActionManager::actionContainer(Constants::MENU_ID)->addMenu(menu);
......
...@@ -55,7 +55,7 @@ ConfigurationDialog::ConfigurationDialog(QWidget *parent) : ...@@ -55,7 +55,7 @@ ConfigurationDialog::ConfigurationDialog(QWidget *parent) :
ui->name->setValidator(fileNameValidator); ui->name->setValidator(fileNameValidator);
updateDocumentation(); updateDocumentation();
connect(ui->name, SIGNAL(textChanged(QString)), this, SLOT(updateOkButton())); connect(ui->name, &QLineEdit::textChanged, this, &ConfigurationDialog::updateOkButton);
updateOkButton(); // force initial test. updateOkButton(); // force initial test.
connect(ui->editor, SIGNAL(documentationChanged(QString,QString)), connect(ui->editor, SIGNAL(documentationChanged(QString,QString)),
this, SLOT(updateDocumentation(QString,QString))); this, SLOT(updateDocumentation(QString,QString)));
......
...@@ -112,8 +112,10 @@ ConfigurationEditor::ConfigurationEditor(QWidget *parent) ...@@ -112,8 +112,10 @@ ConfigurationEditor::ConfigurationEditor(QWidget *parent)
m_completer->setCaseSensitivity(Qt::CaseInsensitive); m_completer->setCaseSensitivity(Qt::CaseInsensitive);
m_completer->popup()->installEventFilter(this); m_completer->popup()->installEventFilter(this);
connect(m_completer, SIGNAL(activated(QString)), this, SLOT(insertCompleterText(QString))); connect(m_completer, static_cast<void (QCompleter::*)(const QString &)>(&QCompleter::activated),
connect(this, SIGNAL(cursorPositionChanged()), this, SLOT(updateDocumentation())); this, &ConfigurationEditor::insertCompleterText);
connect(this, &ConfigurationEditor::cursorPositionChanged,
this, &ConfigurationEditor::updateDocumentation);
} }
void ConfigurationEditor::setSettings(AbstractSettings *settings) void ConfigurationEditor::setSettings(AbstractSettings *settings)
......
...@@ -45,10 +45,11 @@ ConfigurationPanel::ConfigurationPanel(QWidget *parent) : ...@@ -45,10 +45,11 @@ ConfigurationPanel::ConfigurationPanel(QWidget *parent) :
m_settings(0) m_settings(0)
{ {
ui->setupUi(this); ui->setupUi(this);
connect(ui->add, SIGNAL(clicked()), this, SLOT(add())); connect(ui->add, &QPushButton::clicked, this, &ConfigurationPanel::add);
connect(ui->edit, SIGNAL(clicked()), this, SLOT(edit())); connect(ui->edit, &QPushButton::clicked, this, &ConfigurationPanel::edit);
connect(ui->remove, SIGNAL(clicked()), this, SLOT(remove())); connect(ui->remove, &QPushButton::clicked, this, &ConfigurationPanel::remove);
connect(ui->configurations, SIGNAL(currentIndexChanged(int)), this, SLOT(updateButtons())); connect(ui->configurations, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
this, &ConfigurationPanel::updateButtons);
} }
ConfigurationPanel::~ConfigurationPanel() ConfigurationPanel::~ConfigurationPanel()
......
...@@ -83,7 +83,7 @@ bool Uncrustify::initialize() ...@@ -83,7 +83,7 @@ bool Uncrustify::initialize()
Constants::Uncrustify::ACTION_FORMATFILE, Constants::Uncrustify::ACTION_FORMATFILE,
Core::Context(Core::Constants::C_GLOBAL)); Core::Context(Core::Constants::C_GLOBAL));
menu->addAction(cmd); 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); Core::ActionManager::actionContainer(Constants::MENU_ID)->addMenu(menu);
......
...@@ -70,10 +70,11 @@ ActivitySelector::ActivitySelector(QWidget *parent) : ...@@ -70,10 +70,11 @@ ActivitySelector::ActivitySelector(QWidget *parent) :
lblActivity->setBuddy(m_cmbActivity); lblActivity->setBuddy(m_cmbActivity);
connect(btnAdd, SIGNAL(clicked()), this, SLOT(newActivity())); connect(btnAdd, &QToolButton::clicked, this, &ActivitySelector::newActivity);
refresh(); 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() void ActivitySelector::userChanged()
...@@ -109,9 +110,11 @@ void ActivitySelector::setActivity(const QString &act) ...@@ -109,9 +110,11 @@ void ActivitySelector::setActivity(const QString &act)
{ {
int index = m_cmbActivity->findData(act); int index = m_cmbActivity->findData(act);
if (index != -1) { 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); 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);
} }
} }
......
...@@ -245,8 +245,7 @@ CMakeRunConfigurationWidget::CMakeRunConfigurationWidget(CMakeRunConfiguration * ...@@ -245,8 +245,7 @@ CMakeRunConfigurationWidget::CMakeRunConfigurationWidget(CMakeRunConfiguration *
fl->setFieldGrowthPolicy(QFormLayout::ExpandingFieldsGrow); fl->setFieldGrowthPolicy(QFormLayout::ExpandingFieldsGrow);
QLineEdit *argumentsLineEdit = new QLineEdit(); QLineEdit *argumentsLineEdit = new QLineEdit();
argumentsLineEdit->setText(cmakeRunConfiguration->commandLineArguments()); argumentsLineEdit->setText(cmakeRunConfiguration->commandLineArguments());
connect(argumentsLineEdit, SIGNAL(textChanged(QString)), connect(argumentsLineEdit, &QLineEdit::textChanged, this, &CMakeRunConfigurationWidget::setArguments);
this, SLOT(setArguments(QString)));
fl->addRow(tr("Arguments:"), argumentsLineEdit); fl->addRow(tr("Arguments:"), argumentsLineEdit);
m_workingDirectoryEdit = new Utils::PathChooser(); m_workingDirectoryEdit = new Utils::PathChooser();
...@@ -257,7 +256,8 @@ CMakeRunConfigurationWidget::CMakeRunConfigurationWidget(CMakeRunConfiguration * ...@@ -257,7 +256,8 @@ CMakeRunConfigurationWidget::CMakeRunConfigurationWidget(CMakeRunConfiguration *
EnvironmentAspect *aspect EnvironmentAspect *aspect
= m_cmakeRunConfiguration->extraAspect<EnvironmentAspect>(); = m_cmakeRunConfiguration->extraAspect<EnvironmentAspect>();
if (aspect) { if (aspect) {
connect(aspect, SIGNAL(environmentChanged()), this, SLOT(environmentWasChanged())); connect(aspect, &EnvironmentAspect::environmentChanged,
this, &CMakeRunConfigurationWidget::environmentWasChanged);
environmentWasChanged(); environmentWasChanged();
} }
m_workingDirectoryEdit->setPromptDialogTitle(tr("Select Working Directory")); m_workingDirectoryEdit->setPromptDialogTitle(tr("Select Working Directory"));
...@@ -286,17 +286,17 @@ CMakeRunConfigurationWidget::CMakeRunConfigurationWidget(CMakeRunConfiguration * ...@@ -286,17 +286,17 @@ CMakeRunConfigurationWidget::CMakeRunConfigurationWidget(CMakeRunConfiguration *
vbx->setMargin(0); vbx->setMargin(0);
vbx->addWidget(m_detailsContainer); vbx->addWidget(m_detailsContainer);
connect(m_workingDirectoryEdit, SIGNAL(changed(QString)), connect(m_workingDirectoryEdit, &Utils::PathChooser::changed,
this, SLOT(setWorkingDirectory())); this, &CMakeRunConfigurationWidget::setWorkingDirectory);
connect(resetButton, SIGNAL(clicked()), connect(resetButton, &QToolButton::clicked,
this, SLOT(resetWorkingDirectory())); this, &CMakeRunConfigurationWidget::resetWorkingDirectory);
connect(runInTerminal, SIGNAL(toggled(bool)), connect(runInTerminal, &QCheckBox::toggled,
this, SLOT(runInTerminalToggled(bool))); this, &CMakeRunConfigurationWidget::runInTerminalToggled);
connect(m_cmakeRunConfiguration, SIGNAL(baseWorkingDirectoryChanged(QString)), connect(m_cmakeRunConfiguration, &CMakeRunConfiguration::baseWorkingDirectoryChanged,
this, SLOT(workingDirectoryChanged(QString))); this, &CMakeRunConfigurationWidget::workingDirectoryChanged);
setEnabled(m_cmakeRunConfiguration->isEnabled()); setEnabled(m_cmakeRunConfiguration->isEnabled());
} }
......
...@@ -64,8 +64,7 @@ void CMakeTool::setCMakeExecutable(const QString &executable) ...@@ -64,8 +64,7 @@ void CMakeTool::setCMakeExecutable(const QString &executable)
{ {
cancel(); cancel();
m_process = new QProcess(); m_process = new QProcess();
connect(m_process, SIGNAL(finished(int)), connect(m_process, static_cast<void (QProcess::*)(int)>(&QProcess::finished), this, &CMakeTool::finished);
this, SLOT(finished(int)));
m_executable = executable; m_executable = executable;
QFileInfo fi(m_executable); QFileInfo fi(m_executable);
......
...@@ -60,14 +60,14 @@ QWidget *FilterSettingsPage::widget() ...@@ -60,14 +60,14 @@ QWidget *FilterSettingsPage::widget()
updateFilterPage(); updateFilterPage();
connect(m_ui.attributeWidget, SIGNAL(itemChanged(QTreeWidgetItem*,int)), connect(m_ui.attributeWidget, &QTreeWidget::itemChanged,
this, SLOT(updateFilterMap())); this, &FilterSettingsPage::updateFilterMap);
connect(m_ui.filterWidget, connect(m_ui.filterWidget, &QListWidget::currentItemChanged,
SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)), this, this, &FilterSettingsPage::updateAttributes);
SLOT(updateAttributes(QListWidgetItem*))); connect(m_ui.filterAddButton, &QPushButton::clicked,
connect(m_ui.filterAddButton, SIGNAL(clicked()), this, SLOT(addFilter())); this, &FilterSettingsPage::addFilter);
connect(m_ui.filterRemoveButton, SIGNAL(clicked()), this, connect(m_ui.filterRemoveButton, &QPushButton::clicked,
SLOT(removeFilter())); this, &FilterSettingsPage::removeFilter);
connect(HelpManager::instance(), SIGNAL(documentationChanged()), connect(HelpManager::instance(), SIGNAL(documentationChanged()),
this, SLOT(updateFilterPage())); this, SLOT(updateFilterPage()));
} }
......
...@@ -102,17 +102,22 @@ QWidget *GeneralSettingsPage::widget() ...@@ -102,17 +102,22 @@ QWidget *GeneralSettingsPage::widget()
Core::HelpManager::SideBySideIfPossible).toInt(); Core::HelpManager::SideBySideIfPossible).toInt();
m_ui->contextHelpComboBox->setCurrentIndex(m_contextOption); m_ui->contextHelpComboBox->setCurrentIndex(m_contextOption);
connect(m_ui->currentPageButton, SIGNAL(clicked()), this, SLOT(setCurrentPage())); connect(m_ui->currentPageButton, &QPushButton::clicked,
connect(m_ui->blankPageButton, SIGNAL(clicked()), this, SLOT(setBlankPage())); this, &GeneralSettingsPage::setCurrentPage);
connect(m_ui->defaultPageButton, SIGNAL(clicked()), this, SLOT(setDefaultPage())); connect(m_ui->blankPageButton, &QPushButton::clicked,
this, &GeneralSettingsPage::setBlankPage);
connect(m_ui->defaultPageButton, &QPushButton::clicked,
this, &GeneralSettingsPage::setDefaultPage);
HelpViewer *viewer = CentralWidget::instance()->currentViewer(); HelpViewer *viewer = CentralWidget::instance()->currentViewer();
if (!viewer) if (!viewer)
m_ui->currentPageButton->setEnabled(false); m_ui->currentPageButton->setEnabled(false);
m_ui->errorLabel->setVisible(false); m_ui->errorLabel->setVisible(false);
connect(m_ui->importButton, SIGNAL(clicked()), this, SLOT(importBookmarks())); connect(m_ui->importButton, &QPushButton::clicked,
connect(m_ui->exportButton, SIGNAL(clicked()), this, SLOT(exportBookmarks())); this, &GeneralSettingsPage::importBookmarks);
connect(m_ui->exportButton, &QPushButton::clicked,
this, &GeneralSettingsPage::exportBookmarks);
m_returnOnClose = HelpManager::customValue(QLatin1String("ReturnOnClose"), m_returnOnClose = HelpManager::customValue(QLatin1String("ReturnOnClose"),
false).toBool(); false).toBool();
......
...@@ -75,7 +75,8 @@ void OpenPagesModel::addPage(const QUrl &url, qreal zoom) ...@@ -75,7 +75,8 @@ void OpenPagesModel::addPage(const QUrl &url, qreal zoom)
{ {
beginInsertRows(QModelIndex(), rowCount(), rowCount()); beginInsertRows(QModelIndex(), rowCount(), rowCount());
HelpViewer *page = HelpPlugin::createHelpViewer(zoom); HelpViewer *page = HelpPlugin::createHelpViewer(zoom);
connect(page, SIGNAL(titleChanged()), this, SLOT(handleTitleChanged())); connect(page, &HelpViewer::titleChanged,
this, &OpenPagesModel::handleTitleChanged);
m_pages << page; m_pages << page;
endInsertRows(); endInsertRows();
if (url.isValid()) if (url.isValid())
......
...@@ -67,10 +67,10 @@ OpenPagesSwitcher::OpenPagesSwitcher(OpenPagesModel *model) ...@@ -67,10 +67,10 @@ OpenPagesSwitcher::OpenPagesSwitcher(OpenPagesModel *model)
layout->setMargin(0); layout->setMargin(0);
layout->addWidget(m_openPagesWidget); layout->addWidget(m_openPagesWidget);
connect(m_openPagesWidget, SIGNAL(closePage(QModelIndex)), this, connect(m_openPagesWidget, &OpenPagesWidget::closePage,
SIGNAL(closePage(QModelIndex))); this, &OpenPagesSwitcher::closePage);
connect(m_openPagesWidget, SIGNAL(setCurrentPage(QModelIndex)), this, connect(m_openPagesWidget, &OpenPagesWidget::setCurrentPage,
SIGNAL(setCurrentPage(QModelIndex))); this, &OpenPagesSwitcher::setCurrentPage);
} }
OpenPagesSwitcher::~OpenPagesSwitcher() OpenPagesSwitcher::~OpenPagesSwitcher()
......
...@@ -49,8 +49,10 @@ RemoteFilterOptions::RemoteFilterOptions(RemoteHelpFilter *filter, QWidget *pare ...@@ -49,8 +49,10 @@ RemoteFilterOptions::RemoteFilterOptions(RemoteHelpFilter *filter, QWidget *pare
item->setFlags(item->flags() | Qt::ItemIsEditable); item->setFlags(item->flags() | Qt::ItemIsEditable);
} }
connect(m_ui.add, SIGNAL(clicked()), this, SLOT(addNewItem())); connect(m_ui.add, &QPushButton::clicked,
connect(m_ui.remove, SIGNAL(clicked()), this, SLOT(removeItem())); this, &RemoteFilterOptions::addNewItem);
connect(m_ui.remove, &QPushButton::clicked,
this, &RemoteFilterOptions::removeItem);
connect(m_ui.listWidget, SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)), SLOT(updateRemoveButton())); connect(m_ui.listWidget, SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)), SLOT(updateRemoveButton()));
updateRemoveButton(); updateRemoveButton();
} }
......
...@@ -105,8 +105,8 @@ ImageViewer::ImageViewer(QWidget *parent) ...@@ -105,8 +105,8 @@ ImageViewer::ImageViewer(QWidget *parent)
d->imageView, SLOT(setViewBackground(bool))); d->imageView, SLOT(setViewBackground(bool)));
connect(d->ui_toolbar.toolButtonOutline, SIGNAL(toggled(bool)), connect(d->ui_toolbar.toolButtonOutline, SIGNAL(toggled(bool)),
d->imageView, SLOT(setViewOutline(bool))); d->imageView, SLOT(setViewOutline(bool)));
connect(d->ui_toolbar.toolButtonPlayPause, SIGNAL(clicked()), connect(d->ui_toolbar.toolButtonPlayPause, &Core::CommandButton::clicked,
this, SLOT(playToggled())); this, &ImageViewer::playToggled);
connect(d->imageView, SIGNAL(imageSizeChanged(QSize)), connect(d->imageView, SIGNAL(imageSizeChanged(QSize)),
this, SLOT(imageSizeUpdated(QSize))); this, SLOT(imageSizeUpdated(QSize)));
connect(d->imageView, SIGNAL(scaleFactorChanged(qreal)), connect(d->imageView, SIGNAL(scaleFactorChanged(qreal)),
......
...@@ -43,7 +43,7 @@ ImageViewerFile::ImageViewerFile(ImageViewer *parent) ...@@ -43,7 +43,7 @@ ImageViewerFile::ImageViewerFile(ImageViewer *parent)
{ {
setId(Constants::IMAGEVIEWER_ID); setId(Constants::IMAGEVIEWER_ID);
m_editor = parent; 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 Core::IDocument::ReloadBehavior ImageViewerFile::reloadBehavior(ChangeTrigger state, ChangeType type) const
......
...@@ -205,18 +205,18 @@ void FindMacroHandler::changeEditor(Core::IEditor *editor) ...@@ -205,18 +205,18 @@ void FindMacroHandler::changeEditor(Core::IEditor *editor)
aggregate->add(macroFind); aggregate->add(macroFind);
// Connect all signals // Connect all signals
connect(macroFind, SIGNAL(allReplaced(QString,QString,Core::FindFlags)), connect(macroFind, &MacroTextFind::allReplaced,
this, SLOT(replaceAll(QString,QString,Core::FindFlags))); this, &FindMacroHandler::replaceAll);
connect(macroFind, SIGNAL(incrementalFound(QString,Core::FindFlags)), connect(macroFind, &MacroTextFind::incrementalFound,
this, SLOT(findIncremental(QString,Core::FindFlags))); this, &FindMacroHandler::findIncremental);
connect(macroFind, SIGNAL(incrementalSearchReseted()), connect(macroFind, &MacroTextFind::incrementalSearchReseted,
this, SLOT(resetIncrementalSearch())); this, &FindMacroHandler::resetIncrementalSearch);
connect(macroFind, SIGNAL(replaced(QString,QString,Core::FindFlags)), connect(macroFind, &MacroTextFind::replaced,
this, SLOT(replace(QString,QString,Core::FindFlags))); this, &FindMacroHandler::replace);
connect(macroFind, SIGNAL(stepFound(QString,Core::FindFlags)), connect(macroFind, &MacroTextFind::stepFound,
this, SLOT(findStep(QString,Core::FindFlags))); this, &FindMacroHandler::findStep);
connect(macroFind, SIGNAL(stepReplaced(QString,QString,Core::FindFlags)), connect(macroFind, &MacroTextFind::stepReplaced,
this, SLOT(replaceStep(QString,QString,Core::FindFlags))); this, &FindMacroHandler::replaceStep);
} }
} }
} }
......
...@@ -61,12 +61,12 @@ MacroOptionsWidget::MacroOptionsWidget(QWidget *parent) : ...@@ -61,12 +61,12 @@ MacroOptionsWidget::MacroOptionsWidget(QWidget *parent) :
{ {
m_ui->setupUi(this); m_ui->setupUi(this);
connect(m_ui->treeWidget, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)), connect(m_ui->treeWidget, &QTreeWidget::currentItemChanged,
this, SLOT(changeCurrentItem(QTreeWidgetItem*))); this, &MacroOptionsWidget::changeCurrentItem);
connect(m_ui->removeButton, SIGNAL(clicked()), connect(m_ui->removeButton, &QPushButton::clicked,
this, SLOT(remove())); this, &MacroOptionsWidget::remove);
connect(m_ui->description, SIGNAL(textChanged(QString)), connect(m_ui->description, &QLineEdit::textChanged,
this, SLOT(changeDescription(QString))); this, &MacroOptionsWidget::changeDescription);
m_ui->treeWidget->header()->setSortIndicator(0, Qt::AscendingOrder); m_ui->treeWidget->header()->setSortIndicator(0, Qt::AscendingOrder);
......
...@@ -86,26 +86,26 @@ bool MacrosPlugin::initialize(const QStringList &arguments, QString *errorMessag ...@@ -86,26 +86,26 @@ bool MacrosPlugin::initialize(const QStringList &arguments, QString *errorMessag
Core::Command *command = Core::ActionManager::registerAction(startMacro, Constants::START_MACRO, textContext); Core::Command *command = Core::ActionManager::registerAction(startMacro, Constants::START_MACRO, textContext);
command->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Ctrl+(") : tr("Alt+("))); command->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Ctrl+(") : tr("Alt+(")));
mmacrotools->addAction(command); 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); QAction *endMacro = new QAction(tr("Stop Recording Macro"), this);
endMacro->setEnabled(false); endMacro->setEnabled(false);
command = Core::ActionManager::registerAction(endMacro, Constants::END_MACRO, globalcontext); command = Core::ActionManager::registerAction(endMacro, Constants::END_MACRO, globalcontext);
command->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Ctrl+)") : tr("Alt+)"))); command->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Ctrl+)") : tr("Alt+)")));
mmacrotools->addAction(command); 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); QAction *executeLastMacro = new QAction(tr("Play Last Macro"), this);
command = Core::ActionManager::registerAction(executeLastMacro, Constants::EXECUTE_LAST_MACRO, textContext); command = Core::ActionManager::registerAction(executeLastMacro, Constants::EXECUTE_LAST_MACRO, textContext);
command->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Meta+R") : tr("Alt+R"))); command->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Meta+R") : tr("Alt+R")));
mmacrotools->addAction(command); 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); QAction *saveLastMacro = new QAction(tr("Save Last Macro"), this);
saveLastMacro->setEnabled(false); saveLastMacro->setEnabled(false);
command = Core::ActionManager::registerAction(saveLastMacro, Constants::SAVE_LAST_MACRO, textContext); command = Core::ActionManager::registerAction(saveLastMacro, Constants::SAVE_LAST_MACRO, textContext);
mmacrotools->addAction(command); mmacrotools->addAction(command);
connect(saveLastMacro, SIGNAL(triggered()), m_macroManager, SLOT(saveLastMacro())); connect(saveLastMacro, &QAction::triggered, m_macroManager, &MacroManager::saveLastMacro);
return true; return true;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment