Use new qt5 connect api

Change-Id: I6c0d4ec60759b3c2fedac3e6649b7ec5102a6487
Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
Montel Laurent
2015-01-29 14:32:36 +01:00
committed by hjk
parent 1eb507afbd
commit 0d0a6d119a
20 changed files with 87 additions and 74 deletions

View File

@@ -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);
}
}
}

View File

@@ -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);

View File

@@ -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;
}