Commit c001e98d authored by Montel Laurent's avatar Montel Laurent Committed by hjk

Port to new connect api

Change-Id: I603fc2e3fda624c913e432d5059c86d96c3e2c3b
Reviewed-by: default avatarhjk <hjk@theqtcompany.com>
parent f567565d
......@@ -58,12 +58,13 @@ AnalyzerRunConfigWidget::AnalyzerRunConfigWidget(ProjectExplorer::IRunConfigurat
<< QApplication::translate("ProjectExplorer::Internal::EditorSettingsPropertiesPage", "Custom")
);
globalSettingLayout->addWidget(m_settingsCombo);
connect(m_settingsCombo, SIGNAL(activated(int)), this, SLOT(chooseSettings(int)));
connect(m_settingsCombo, static_cast<void (QComboBox::*)(int)>(&QComboBox::activated),
this, &AnalyzerRunConfigWidget::chooseSettings);
m_restoreButton = new QPushButton(
QApplication::translate("ProjectExplorer::Internal::EditorSettingsPropertiesPage", "Restore Global"),
globalSetting);
globalSettingLayout->addWidget(m_restoreButton);
connect(m_restoreButton, SIGNAL(clicked()), this, SLOT(restoreGlobal()));
connect(m_restoreButton, &QPushButton::clicked, this, &AnalyzerRunConfigWidget::restoreGlobal);
globalSettingLayout->addStretch(2);
QWidget *innerPane = new QWidget;
......
......@@ -56,7 +56,8 @@ AnalyzerRunControl::AnalyzerRunControl(const AnalyzerStartParameters &sp,
m_runConfig = runConfiguration;
m_sp = sp;
connect(this, SIGNAL(finished()), SLOT(runControlFinished()));
connect(this, &AnalyzerRunControl::finished,
this, &AnalyzerRunControl::runControlFinished);
connect(AnalyzerManager::stopAction(), SIGNAL(triggered()), SLOT(stopIt()));
}
......
......@@ -94,12 +94,12 @@ StartRemoteDialog::StartRemoteDialog(QWidget *parent)
d->arguments->setText(settings->value(QLatin1String("arguments")).toString());
settings->endGroup();
connect(d->kitChooser, SIGNAL(activated(int)), SLOT(validate()));
connect(d->executable, SIGNAL(textChanged(QString)), SLOT(validate()));
connect(d->workingDirectory, SIGNAL(textChanged(QString)), SLOT(validate()));
connect(d->arguments, SIGNAL(textChanged(QString)), SLOT(validate()));
connect(d->buttonBox, SIGNAL(accepted()), SLOT(accept()));
connect(d->buttonBox, SIGNAL(rejected()), SLOT(reject()));
connect(d->kitChooser, &KitChooser::activated, this, &StartRemoteDialog::validate);
connect(d->executable, &QLineEdit::textChanged, this, &StartRemoteDialog::validate);
connect(d->workingDirectory, &QLineEdit::textChanged, this, &StartRemoteDialog::validate);
connect(d->arguments, &QLineEdit::textChanged, this, &StartRemoteDialog::validate);
connect(d->buttonBox, &QDialogButtonBox::accepted, this, &StartRemoteDialog::accept);
connect(d->buttonBox, &QDialogButtonBox::rejected, this, &StartRemoteDialog::reject);
validate();
}
......
......@@ -57,10 +57,10 @@ DiffEditorGuiController::DiffEditorGuiController(
m_syncScrollBars).toBool();
s->endGroup();
connect(m_controller, SIGNAL(cleared(QString)),
this, SLOT(slotUpdateDiffFileIndex()));
connect(m_controller, SIGNAL(diffFilesChanged(QList<FileData>,QString)),
this, SLOT(slotUpdateDiffFileIndex()));
connect(m_controller, &DiffEditorController::cleared, this,
&DiffEditorGuiController::slotUpdateDiffFileIndex);
connect(m_controller, &DiffEditorController::diffFilesChanged, this,
&DiffEditorGuiController::slotUpdateDiffFileIndex);
slotUpdateDiffFileIndex();
}
......
......@@ -48,8 +48,8 @@ DiffEditorManager::DiffEditorManager(QObject *parent)
m_instance = this;
Core::EditorManager *editorManager = Core::EditorManager::instance();
connect(editorManager, SIGNAL(editorsClosed(QList<Core::IEditor*>)),
this, SLOT(slotEditorsClosed(QList<Core::IEditor*>)));
connect(editorManager, &Core::EditorManager::editorsClosed,
this, &DiffEditorManager::slotEditorsClosed);
}
DiffEditorManager::~DiffEditorManager()
......
......@@ -163,7 +163,7 @@ bool DiffEditorPlugin::initialize(const QStringList &arguments, QString *errorMe
QAction *diffAction = new QAction(tr("Diff..."), this);
Core::Command *diffCommand = Core::ActionManager::registerAction(diffAction,
"DiffEditor.Diff", globalcontext);
connect(diffAction, SIGNAL(triggered()), this, SLOT(diff()));
connect(diffAction, &QAction::triggered, this, &DiffEditorPlugin::diff);
toolsContainer->addAction(diffCommand, Constants::G_TOOLS_DIFF);
addAutoReleasedObject(new DiffEditorFactory(this));
......
......@@ -64,10 +64,10 @@ void DiffEditorReloader::setController(DiffEditorController *controller)
m_controller = controller;
if (m_controller) {
connect(m_controller, SIGNAL(ignoreWhitespaceChanged(bool)),
this, SLOT(requestReload()));
connect(m_controller, SIGNAL(contextLinesNumberChanged(int)),
this, SLOT(requestReload()));
connect(m_controller, &DiffEditorController::ignoreWhitespaceChanged,
this, &DiffEditorReloader::requestReload);
connect(m_controller, &DiffEditorController::contextLinesNumberChanged,
this, &DiffEditorReloader::requestReload);
}
}
......
......@@ -44,8 +44,8 @@ CppTodoItemsScanner::CppTodoItemsScanner(const KeywordList &keywordList, QObject
{
CppTools::CppModelManager *modelManager = CppTools::CppModelManager::instance();
connect(modelManager, SIGNAL(documentUpdated(CPlusPlus::Document::Ptr)), this,
SLOT(documentUpdated(CPlusPlus::Document::Ptr)), Qt::DirectConnection);
connect(modelManager, &CppTools::CppModelManager::documentUpdated,
this, &CppTodoItemsScanner::documentUpdated, Qt::DirectConnection);
}
void CppTodoItemsScanner::keywordListChanged()
......
......@@ -40,8 +40,8 @@ QmlJsTodoItemsScanner::QmlJsTodoItemsScanner(const KeywordList &keywordList, QOb
TodoItemsScanner(keywordList, parent)
{
QmlJS::ModelManagerInterface *model = QmlJS::ModelManagerInterface::instance();
connect(model, SIGNAL(documentUpdated(QmlJS::Document::Ptr)),
this, SLOT(documentUpdated(QmlJS::Document::Ptr)), Qt::DirectConnection);
connect(model, &QmlJS::ModelManagerInterface::documentUpdated,
this, &QmlJsTodoItemsScanner::documentUpdated, Qt::DirectConnection);
}
bool QmlJsTodoItemsScanner::shouldProcessFile(const QString &fileName)
......
......@@ -170,7 +170,7 @@ void TodoItemsProvider::setupUpdateListTimer()
{
m_shouldUpdateList = false;
QTimer *timer = new QTimer(this);
connect(timer, SIGNAL(timeout()), SLOT(updateListTimeoutElapsed()));
connect(timer, &QTimer::timeout, this, &TodoItemsProvider::updateListTimeoutElapsed);
timer->start(Constants::OUTPUT_PANE_UPDATE_INTERVAL);
}
......
......@@ -49,8 +49,10 @@ TodoOutputPane::TodoOutputPane(TodoItemsModel *todoItemsModel, QObject *parent)
createTreeView();
createScopeButtons();
setScanningScope(ScanningScopeCurrentFile); // default
connect(m_todoItemsModel, SIGNAL(layoutChanged()), SIGNAL(navigateStateUpdate()));
connect(m_todoItemsModel, SIGNAL(layoutChanged()), SLOT(updateTodoCount()));
connect(m_todoItemsModel, &TodoItemsModel::layoutChanged,
this, &TodoOutputPane::navigateStateUpdate);
connect(m_todoItemsModel, &TodoItemsModel::layoutChanged,
this, &TodoOutputPane::updateTodoCount);
}
TodoOutputPane::~TodoOutputPane()
......@@ -183,7 +185,7 @@ void TodoOutputPane::createTreeView()
m_todoTreeView = new TodoOutputTreeView();
m_todoTreeView->setModel(m_todoItemsModel);
connect(m_todoTreeView, SIGNAL(activated(QModelIndex)), SLOT(todoTreeViewClicked(QModelIndex)));
connect(m_todoTreeView, &TodoOutputTreeView::activated, this, &TodoOutputPane::todoTreeViewClicked);
}
void TodoOutputPane::freeTreeView()
......@@ -206,7 +208,8 @@ void TodoOutputPane::createScopeButtons()
m_scopeButtons = new QButtonGroup();
m_scopeButtons->addButton(m_wholeProjectButton);
m_scopeButtons->addButton(m_currentFileButton);
connect(m_scopeButtons, SIGNAL(buttonClicked(QAbstractButton*)), SLOT(scopeButtonClicked(QAbstractButton*)));
connect(m_scopeButtons, static_cast<void (QButtonGroup::*)(QAbstractButton *)>(&QButtonGroup::buttonClicked),
this, &TodoOutputPane::scopeButtonClicked);
m_spacer = new QWidget;
m_spacer->setMinimumWidth(Constants::OUTPUT_TOOLBAR_SPACER_WIDTH);
......
......@@ -114,15 +114,18 @@ void TodoPlugin::createTodoOutputPane()
m_todoOutputPane = new TodoOutputPane(m_todoItemsProvider->todoItemsModel());
addAutoReleasedObject(m_todoOutputPane);
m_todoOutputPane->setScanningScope(m_settings.scanningScope);
connect(m_todoOutputPane, SIGNAL(scanningScopeChanged(ScanningScope)), SLOT(scanningScopeChanged(ScanningScope)));
connect(m_todoOutputPane, SIGNAL(todoItemClicked(TodoItem)), SLOT(todoItemClicked(TodoItem)));
connect(m_todoOutputPane, &TodoOutputPane::scanningScopeChanged,
this, &TodoPlugin::scanningScopeChanged);
connect(m_todoOutputPane, &TodoOutputPane::todoItemClicked,
this, &TodoPlugin::todoItemClicked);
}
void TodoPlugin::createOptionsPage()
{
m_optionsPage = new OptionsPage(m_settings);
addAutoReleasedObject(m_optionsPage);
connect(m_optionsPage, SIGNAL(settingsChanged(Settings)), SLOT(settingsChanged(Settings)));
connect(m_optionsPage, &OptionsPage::settingsChanged,
this, &TodoPlugin::settingsChanged);
}
} // namespace Internal
......
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