Commit 063251eb authored by Montel Laurent's avatar Montel Laurent Committed by hjk
Browse files

Port to new connect api



Change-Id: I873a36601d54065b61d0666558b93dc839ad0dfc
Reviewed-by: default avatarhjk <hjk@theqtcompany.com>
parent f1ac9cd5
...@@ -37,8 +37,8 @@ static const char settingsSuffixKey[] = "CodeStyleSettings"; ...@@ -37,8 +37,8 @@ static const char settingsSuffixKey[] = "CodeStyleSettings";
CppCodeStylePreferences::CppCodeStylePreferences(QObject *parent) : CppCodeStylePreferences::CppCodeStylePreferences(QObject *parent) :
ICodeStylePreferences(parent) ICodeStylePreferences(parent)
{ {
connect(this, SIGNAL(currentValueChanged(QVariant)), connect(this, &CppCodeStylePreferences::currentValueChanged,
this, SLOT(slotCurrentValueChanged(QVariant))); this, &CppCodeStylePreferences::slotCurrentValueChanged);
} }
QVariant CppCodeStylePreferences::value() const QVariant CppCodeStylePreferences::value() const
......
...@@ -282,48 +282,48 @@ CppCodeStylePreferencesWidget::CppCodeStylePreferencesWidget(QWidget *parent) ...@@ -282,48 +282,48 @@ CppCodeStylePreferencesWidget::CppCodeStylePreferencesWidget(QWidget *parent)
setVisualizeWhitespace(true); setVisualizeWhitespace(true);
connect(m_ui->tabSettingsWidget, SIGNAL(settingsChanged(TextEditor::TabSettings)), connect(m_ui->tabSettingsWidget, &TextEditor::TabSettingsWidget::settingsChanged,
this, SLOT(slotTabSettingsChanged(TextEditor::TabSettings))); this, &CppCodeStylePreferencesWidget::slotTabSettingsChanged);
connect(m_ui->indentBlockBraces, SIGNAL(toggled(bool)), connect(m_ui->indentBlockBraces, &QCheckBox::toggled,
this, SLOT(slotCodeStyleSettingsChanged())); this, &CppCodeStylePreferencesWidget::slotCodeStyleSettingsChanged);
connect(m_ui->indentBlockBody, SIGNAL(toggled(bool)), connect(m_ui->indentBlockBody, &QCheckBox::toggled,
this, SLOT(slotCodeStyleSettingsChanged())); this, &CppCodeStylePreferencesWidget::slotCodeStyleSettingsChanged);
connect(m_ui->indentClassBraces, SIGNAL(toggled(bool)), connect(m_ui->indentClassBraces, &QCheckBox::toggled,
this, SLOT(slotCodeStyleSettingsChanged())); this, &CppCodeStylePreferencesWidget::slotCodeStyleSettingsChanged);
connect(m_ui->indentNamespaceBraces, SIGNAL(toggled(bool)), connect(m_ui->indentNamespaceBraces, &QCheckBox::toggled,
this, SLOT(slotCodeStyleSettingsChanged())); this, &CppCodeStylePreferencesWidget::slotCodeStyleSettingsChanged);
connect(m_ui->indentEnumBraces, SIGNAL(toggled(bool)), connect(m_ui->indentEnumBraces, &QCheckBox::toggled,
this, SLOT(slotCodeStyleSettingsChanged())); this, &CppCodeStylePreferencesWidget::slotCodeStyleSettingsChanged);
connect(m_ui->indentNamespaceBody, SIGNAL(toggled(bool)), connect(m_ui->indentNamespaceBody, &QCheckBox::toggled,
this, SLOT(slotCodeStyleSettingsChanged())); this, &CppCodeStylePreferencesWidget::slotCodeStyleSettingsChanged);
connect(m_ui->indentSwitchLabels, SIGNAL(toggled(bool)), connect(m_ui->indentSwitchLabels, &QCheckBox::toggled,
this, SLOT(slotCodeStyleSettingsChanged())); this, &CppCodeStylePreferencesWidget::slotCodeStyleSettingsChanged);
connect(m_ui->indentCaseStatements, SIGNAL(toggled(bool)), connect(m_ui->indentCaseStatements, &QCheckBox::toggled,
this, SLOT(slotCodeStyleSettingsChanged())); this, &CppCodeStylePreferencesWidget::slotCodeStyleSettingsChanged);
connect(m_ui->indentCaseBlocks, SIGNAL(toggled(bool)), connect(m_ui->indentCaseBlocks, &QCheckBox::toggled,
this, SLOT(slotCodeStyleSettingsChanged())); this, &CppCodeStylePreferencesWidget::slotCodeStyleSettingsChanged);
connect(m_ui->indentCaseBreak, SIGNAL(toggled(bool)), connect(m_ui->indentCaseBreak, &QCheckBox::toggled,
this, SLOT(slotCodeStyleSettingsChanged())); this, &CppCodeStylePreferencesWidget::slotCodeStyleSettingsChanged);
connect(m_ui->indentAccessSpecifiers, SIGNAL(toggled(bool)), connect(m_ui->indentAccessSpecifiers, &QCheckBox::toggled,
this, SLOT(slotCodeStyleSettingsChanged())); this, &CppCodeStylePreferencesWidget::slotCodeStyleSettingsChanged);
connect(m_ui->indentDeclarationsRelativeToAccessSpecifiers, SIGNAL(toggled(bool)), connect(m_ui->indentDeclarationsRelativeToAccessSpecifiers, &QCheckBox::toggled,
this, SLOT(slotCodeStyleSettingsChanged())); this, &CppCodeStylePreferencesWidget::slotCodeStyleSettingsChanged);
connect(m_ui->indentFunctionBody, SIGNAL(toggled(bool)), connect(m_ui->indentFunctionBody, &QCheckBox::toggled,
this, SLOT(slotCodeStyleSettingsChanged())); this, &CppCodeStylePreferencesWidget::slotCodeStyleSettingsChanged);
connect(m_ui->indentFunctionBraces, SIGNAL(toggled(bool)), connect(m_ui->indentFunctionBraces, &QCheckBox::toggled,
this, SLOT(slotCodeStyleSettingsChanged())); this, &CppCodeStylePreferencesWidget::slotCodeStyleSettingsChanged);
connect(m_ui->extraPaddingConditions, SIGNAL(toggled(bool)), connect(m_ui->extraPaddingConditions, &QCheckBox::toggled,
this, SLOT(slotCodeStyleSettingsChanged())); this, &CppCodeStylePreferencesWidget::slotCodeStyleSettingsChanged);
connect(m_ui->alignAssignments, SIGNAL(toggled(bool)), connect(m_ui->alignAssignments, &QCheckBox::toggled,
this, SLOT(slotCodeStyleSettingsChanged())); this, &CppCodeStylePreferencesWidget::slotCodeStyleSettingsChanged);
connect(m_ui->bindStarToIdentifier, SIGNAL(toggled(bool)), connect(m_ui->bindStarToIdentifier, &QCheckBox::toggled,
this, SLOT(slotCodeStyleSettingsChanged())); this, &CppCodeStylePreferencesWidget::slotCodeStyleSettingsChanged);
connect(m_ui->bindStarToTypeName, SIGNAL(toggled(bool)), connect(m_ui->bindStarToTypeName, &QCheckBox::toggled,
this, SLOT(slotCodeStyleSettingsChanged())); this, &CppCodeStylePreferencesWidget::slotCodeStyleSettingsChanged);
connect(m_ui->bindStarToLeftSpecifier, SIGNAL(toggled(bool)), connect(m_ui->bindStarToLeftSpecifier, &QCheckBox::toggled,
this, SLOT(slotCodeStyleSettingsChanged())); this, &CppCodeStylePreferencesWidget::slotCodeStyleSettingsChanged);
connect(m_ui->bindStarToRightSpecifier, SIGNAL(toggled(bool)), connect(m_ui->bindStarToRightSpecifier, &QCheckBox::toggled,
this, SLOT(slotCodeStyleSettingsChanged())); this, &CppCodeStylePreferencesWidget::slotCodeStyleSettingsChanged);
m_ui->categoryTab->setCurrentIndex(0); m_ui->categoryTab->setCurrentIndex(0);
...@@ -340,8 +340,8 @@ void CppCodeStylePreferencesWidget::setCodeStyle(CppTools::CppCodeStylePreferenc ...@@ -340,8 +340,8 @@ void CppCodeStylePreferencesWidget::setCodeStyle(CppTools::CppCodeStylePreferenc
// code preferences // code preferences
m_preferences = codeStylePreferences; m_preferences = codeStylePreferences;
connect(m_preferences, SIGNAL(currentTabSettingsChanged(TextEditor::TabSettings)), connect(m_preferences, &CppCodeStylePreferences::currentTabSettingsChanged,
this, SLOT(setTabSettings(TextEditor::TabSettings))); this, &CppCodeStylePreferencesWidget::setTabSettings);
connect(m_preferences, SIGNAL(currentCodeStyleSettingsChanged(CppTools::CppCodeStyleSettings)), connect(m_preferences, SIGNAL(currentCodeStyleSettingsChanged(CppTools::CppCodeStyleSettings)),
this, SLOT(setCodeStyleSettings(CppTools::CppCodeStyleSettings))); this, SLOT(setCodeStyleSettings(CppTools::CppCodeStyleSettings)));
connect(m_preferences, SIGNAL(currentPreferencesChanged(TextEditor::ICodeStylePreferences*)), connect(m_preferences, SIGNAL(currentPreferencesChanged(TextEditor::ICodeStylePreferences*)),
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
using namespace Core; using namespace Core;
using namespace CppTools; using namespace CppTools;
using namespace CppTools::Internal; using namespace CppTools::Internal;
using namespace ProjectExplorer;
namespace CppTools { namespace CppTools {
namespace Internal { namespace Internal {
...@@ -140,8 +140,7 @@ CppIncludesFilter::CppIncludesFilter() ...@@ -140,8 +140,7 @@ CppIncludesFilter::CppIncludesFilter()
setIncludedByDefault(true); setIncludedByDefault(true);
setPriority(ILocatorFilter::Low); setPriority(ILocatorFilter::Low);
connect(ProjectExplorer::ProjectExplorerPlugin::instance(), connect(ProjectExplorerPlugin::instance(), &ProjectExplorerPlugin::fileListChanged,
&ProjectExplorer::ProjectExplorerPlugin::fileListChanged,
this, &CppIncludesFilter::markOutdated); this, &CppIncludesFilter::markOutdated);
connect(CppModelManager::instance(), &CppModelManager::documentUpdated, connect(CppModelManager::instance(), &CppModelManager::documentUpdated,
this, &CppIncludesFilter::markOutdated); this, &CppIncludesFilter::markOutdated);
......
...@@ -152,11 +152,11 @@ bool CppToolsPlugin::initialize(const QStringList &arguments, QString *error) ...@@ -152,11 +152,11 @@ bool CppToolsPlugin::initialize(const QStringList &arguments, QString *error)
JsExpander::registerQObjectForJs(QLatin1String("Cpp"), new CppToolsJsExtension); JsExpander::registerQObjectForJs(QLatin1String("Cpp"), new CppToolsJsExtension);
CppLocatorData *locatorData = new CppLocatorData; CppLocatorData *locatorData = new CppLocatorData;
connect(modelManager, SIGNAL(documentUpdated(CPlusPlus::Document::Ptr)), connect(modelManager, &CppModelManager::documentUpdated,
locatorData, SLOT(onDocumentUpdated(CPlusPlus::Document::Ptr))); locatorData, &CppLocatorData::onDocumentUpdated);
connect(modelManager, SIGNAL(aboutToRemoveFiles(QStringList)), connect(modelManager, &CppModelManager::aboutToRemoveFiles,
locatorData, SLOT(onAboutToRemoveFiles(QStringList))); locatorData, &CppLocatorData::onAboutToRemoveFiles);
addAutoReleasedObject(locatorData); addAutoReleasedObject(locatorData);
addAutoReleasedObject(new CppLocatorFilter(locatorData)); addAutoReleasedObject(new CppLocatorFilter(locatorData));
...@@ -184,7 +184,8 @@ bool CppToolsPlugin::initialize(const QStringList &arguments, QString *error) ...@@ -184,7 +184,8 @@ bool CppToolsPlugin::initialize(const QStringList &arguments, QString *error)
Command *command = ActionManager::registerAction(switchAction, Constants::SWITCH_HEADER_SOURCE, context, true); Command *command = ActionManager::registerAction(switchAction, Constants::SWITCH_HEADER_SOURCE, context, true);
command->setDefaultKeySequence(QKeySequence(Qt::Key_F4)); command->setDefaultKeySequence(QKeySequence(Qt::Key_F4));
mcpptools->addAction(command); mcpptools->addAction(command);
connect(switchAction, SIGNAL(triggered()), this, SLOT(switchHeaderSource())); connect(switchAction, &QAction::triggered,
this, &CppToolsPlugin::switchHeaderSource);
QAction *openInNextSplitAction = new QAction(tr("Open Corresponding Header/Source in Next Split"), this); QAction *openInNextSplitAction = new QAction(tr("Open Corresponding Header/Source in Next Split"), this);
command = ActionManager::registerAction(openInNextSplitAction, Constants::OPEN_HEADER_SOURCE_IN_NEXT_SPLIT, context, true); command = ActionManager::registerAction(openInNextSplitAction, Constants::OPEN_HEADER_SOURCE_IN_NEXT_SPLIT, context, true);
...@@ -192,7 +193,8 @@ bool CppToolsPlugin::initialize(const QStringList &arguments, QString *error) ...@@ -192,7 +193,8 @@ bool CppToolsPlugin::initialize(const QStringList &arguments, QString *error)
? tr("Meta+E, F4") ? tr("Meta+E, F4")
: tr("Ctrl+E, F4"))); : tr("Ctrl+E, F4")));
mcpptools->addAction(command); mcpptools->addAction(command);
connect(openInNextSplitAction, SIGNAL(triggered()), this, SLOT(switchHeaderSourceInNextSplit())); connect(openInNextSplitAction, &QAction::triggered,
this, &CppToolsPlugin::switchHeaderSourceInNextSplit);
Utils::MacroExpander *expander = Utils::globalMacroExpander(); Utils::MacroExpander *expander = Utils::globalMacroExpander();
expander->registerVariable("Cpp:LicenseTemplate", expander->registerVariable("Cpp:LicenseTemplate",
......
...@@ -60,13 +60,14 @@ ModelManagerTestHelper::ModelManagerTestHelper(QObject *parent) : ...@@ -60,13 +60,14 @@ ModelManagerTestHelper::ModelManagerTestHelper(QObject *parent) :
CppModelManager *mm = CppModelManager::instance(); CppModelManager *mm = CppModelManager::instance();
assert(mm); assert(mm);
connect(this, SIGNAL(aboutToRemoveProject(ProjectExplorer::Project*)), connect(this, &ModelManagerTestHelper::aboutToRemoveProject,
mm, SLOT(onAboutToRemoveProject(ProjectExplorer::Project*))); mm, &CppModelManager::onAboutToRemoveProject);
connect(this, SIGNAL(projectAdded(ProjectExplorer::Project*)), connect(this, &ModelManagerTestHelper::projectAdded,
mm, SLOT(onProjectAdded(ProjectExplorer::Project*))); mm, &CppModelManager::onProjectAdded);
connect(mm, SIGNAL(sourceFilesRefreshed(QSet<QString>)), connect(mm, &CppModelManager::sourceFilesRefreshed,
this, SLOT(sourceFilesRefreshed(QSet<QString>))); this, &ModelManagerTestHelper::sourceFilesRefreshed);
connect(mm, SIGNAL(gcFinished()), this, SLOT(gcFinished())); connect(mm, &CppModelManager::gcFinished,
this, &ModelManagerTestHelper::gcFinished);
cleanup(); cleanup();
Tests::VerifyCleanCppModelManager::verify(); Tests::VerifyCleanCppModelManager::verify();
......
...@@ -53,8 +53,7 @@ StringTable::StringTable() ...@@ -53,8 +53,7 @@ StringTable::StringTable()
m_gcCountDown.setObjectName(QLatin1String("StringTable::m_gcCountDown")); m_gcCountDown.setObjectName(QLatin1String("StringTable::m_gcCountDown"));
m_gcCountDown.setSingleShot(true); m_gcCountDown.setSingleShot(true);
m_gcCountDown.setInterval(GCTimeOut); m_gcCountDown.setInterval(GCTimeOut);
connect(&m_gcCountDown, SIGNAL(timeout()), connect(&m_gcCountDown, &QTimer::timeout, this, &StringTable::startGC);
this, SLOT(startGC()));
} }
QString StringTable::insert(const QString &string) QString StringTable::insert(const QString &string)
......
...@@ -313,7 +313,8 @@ QWidget *QmlConsoleItemDelegate::createEditor(QWidget *parent, ...@@ -313,7 +313,8 @@ QWidget *QmlConsoleItemDelegate::createEditor(QWidget *parent,
{ {
QmlConsoleEdit *editor = new QmlConsoleEdit(index, parent); QmlConsoleEdit *editor = new QmlConsoleEdit(index, parent);
connect(editor, SIGNAL(editingFinished()), this, SLOT(commitAndCloseEditor())); connect(editor, &QmlConsoleEdit::editingFinished,
this, &QmlConsoleItemDelegate::commitAndCloseEditor);
return editor; return editor;
} }
......
...@@ -73,22 +73,23 @@ QmlConsolePane::QmlConsolePane(QObject *parent) ...@@ -73,22 +73,23 @@ QmlConsolePane::QmlConsolePane(QObject *parent)
m_proxyModel = new QmlConsoleProxyModel(this); m_proxyModel = new QmlConsoleProxyModel(this);
m_proxyModel->setSourceModel(QmlConsoleModel::qmlConsoleItemModel()); m_proxyModel->setSourceModel(QmlConsoleModel::qmlConsoleItemModel());
connect(QmlConsoleModel::qmlConsoleItemModel(), connect(QmlConsoleModel::qmlConsoleItemModel(),
SIGNAL(selectEditableRow(QModelIndex,QItemSelectionModel::SelectionFlags)), &QmlConsoleItemModel::selectEditableRow,
m_proxyModel, m_proxyModel,
SLOT(selectEditableRow(QModelIndex,QItemSelectionModel::SelectionFlags))); &QmlConsoleProxyModel::selectEditableRow);
//Scroll to bottom when rows matching current filter settings are inserted //Scroll to bottom when rows matching current filter settings are inserted
//Not connecting rowsRemoved as the only way to remove rows is to clear the //Not connecting rowsRemoved as the only way to remove rows is to clear the
//model which will automatically reset the view. //model which will automatically reset the view.
connect(QmlConsoleModel::qmlConsoleItemModel(), SIGNAL(rowsInserted(QModelIndex,int,int)), connect(QmlConsoleModel::qmlConsoleItemModel(), &QAbstractItemModel::rowsInserted,
m_proxyModel, SLOT(onRowsInserted(QModelIndex,int,int))); m_proxyModel, &QmlConsoleProxyModel::onRowsInserted);
m_consoleView->setModel(m_proxyModel); m_consoleView->setModel(m_proxyModel);
connect(m_proxyModel, connect(m_proxyModel,
SIGNAL(setCurrentIndex(QModelIndex,QItemSelectionModel::SelectionFlags)), SIGNAL(setCurrentIndex(QModelIndex,QItemSelectionModel::SelectionFlags)),
m_consoleView->selectionModel(), m_consoleView->selectionModel(),
SLOT(setCurrentIndex(QModelIndex,QItemSelectionModel::SelectionFlags))); SLOT(setCurrentIndex(QModelIndex,QItemSelectionModel::SelectionFlags)));
connect(m_proxyModel, SIGNAL(scrollToBottom()), m_consoleView, SLOT(onScrollToBottom())); connect(m_proxyModel, &QmlConsoleProxyModel::scrollToBottom,
m_consoleView, &QmlConsoleView::onScrollToBottom);
m_itemDelegate = new QmlConsoleItemDelegate(this); m_itemDelegate = new QmlConsoleItemDelegate(this);
connect(m_consoleView->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)), connect(m_consoleView->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)),
...@@ -111,7 +112,8 @@ QmlConsolePane::QmlConsolePane(QObject *parent) ...@@ -111,7 +112,8 @@ QmlConsolePane::QmlConsolePane(QObject *parent)
m_showDebugButtonAction->setToolTip(tr("Show debug, log, and info messages.")); m_showDebugButtonAction->setToolTip(tr("Show debug, log, and info messages."));
m_showDebugButtonAction->setCheckable(true); m_showDebugButtonAction->setCheckable(true);
m_showDebugButtonAction->setIcon(QIcon(QLatin1String(Core::Constants::ICON_INFO))); m_showDebugButtonAction->setIcon(QIcon(QLatin1String(Core::Constants::ICON_INFO)));
connect(m_showDebugButtonAction, SIGNAL(toggled(bool)), m_proxyModel, SLOT(setShowLogs(bool))); connect(m_showDebugButtonAction, &Utils::SavedAction::toggled,
m_proxyModel, &QmlConsoleProxyModel::setShowLogs);
m_showDebugButton->setDefaultAction(m_showDebugButtonAction); m_showDebugButton->setDefaultAction(m_showDebugButtonAction);
m_showWarningButton = new QToolButton(m_consoleWidget); m_showWarningButton = new QToolButton(m_consoleWidget);
...@@ -123,8 +125,8 @@ QmlConsolePane::QmlConsolePane(QObject *parent) ...@@ -123,8 +125,8 @@ QmlConsolePane::QmlConsolePane(QObject *parent)
m_showWarningButtonAction->setToolTip(tr("Show warning messages.")); m_showWarningButtonAction->setToolTip(tr("Show warning messages."));
m_showWarningButtonAction->setCheckable(true); m_showWarningButtonAction->setCheckable(true);
m_showWarningButtonAction->setIcon(QIcon(QLatin1String(Core::Constants::ICON_WARNING))); m_showWarningButtonAction->setIcon(QIcon(QLatin1String(Core::Constants::ICON_WARNING)));
connect(m_showWarningButtonAction, SIGNAL(toggled(bool)), m_proxyModel, connect(m_showWarningButtonAction, &Utils::SavedAction::toggled,
SLOT(setShowWarnings(bool))); m_proxyModel, &QmlConsoleProxyModel::setShowWarnings);
m_showWarningButton->setDefaultAction(m_showWarningButtonAction); m_showWarningButton->setDefaultAction(m_showWarningButtonAction);
m_showErrorButton = new QToolButton(m_consoleWidget); m_showErrorButton = new QToolButton(m_consoleWidget);
...@@ -136,8 +138,7 @@ QmlConsolePane::QmlConsolePane(QObject *parent) ...@@ -136,8 +138,7 @@ QmlConsolePane::QmlConsolePane(QObject *parent)
m_showErrorButtonAction->setToolTip(tr("Show error messages.")); m_showErrorButtonAction->setToolTip(tr("Show error messages."));
m_showErrorButtonAction->setCheckable(true); m_showErrorButtonAction->setCheckable(true);
m_showErrorButtonAction->setIcon(QIcon(QLatin1String(Core::Constants::ICON_ERROR))); m_showErrorButtonAction->setIcon(QIcon(QLatin1String(Core::Constants::ICON_ERROR)));
connect(m_showErrorButtonAction, SIGNAL(toggled(bool)), m_proxyModel, connect(m_showErrorButtonAction, &Utils::SavedAction::toggled, m_proxyModel, &QmlConsoleProxyModel::setShowErrors);
SLOT(setShowErrors(bool)));
m_showErrorButton->setDefaultAction(m_showErrorButtonAction); m_showErrorButton->setDefaultAction(m_showErrorButtonAction);
m_spacer = new QWidget(m_consoleWidget); m_spacer = new QWidget(m_consoleWidget);
......
...@@ -129,7 +129,7 @@ QmlConsoleView::QmlConsoleView(QWidget *parent) : ...@@ -129,7 +129,7 @@ QmlConsoleView::QmlConsoleView(QWidget *parent) :
horizontalScrollBar()->setSingleStep(20); horizontalScrollBar()->setSingleStep(20);
verticalScrollBar()->setSingleStep(20); verticalScrollBar()->setSingleStep(20);
connect(this, SIGNAL(activated(QModelIndex)), SLOT(onRowActivated(QModelIndex))); connect(this, &QmlConsoleView::activated, this, &QmlConsoleView::onRowActivated);
} }
void QmlConsoleView::onScrollToBottom() void QmlConsoleView::onScrollToBottom()
......
...@@ -88,8 +88,8 @@ void QmlJSCodeStylePreferencesWidget::setPreferences(TextEditor::ICodeStylePrefe ...@@ -88,8 +88,8 @@ void QmlJSCodeStylePreferencesWidget::setPreferences(TextEditor::ICodeStylePrefe
m_preferences = preferences; m_preferences = preferences;
m_ui->tabPreferencesWidget->setPreferences(preferences); m_ui->tabPreferencesWidget->setPreferences(preferences);
if (m_preferences) if (m_preferences)
connect(m_preferences, SIGNAL(currentTabSettingsChanged(TextEditor::TabSettings)), connect(m_preferences, &TextEditor::ICodeStylePreferences::currentTabSettingsChanged,
this, SLOT(slotSettingsChanged())); this, &QmlJSCodeStylePreferencesWidget::slotSettingsChanged);
updatePreview(); updatePreview();
} }
......
...@@ -46,10 +46,10 @@ LocatorData::LocatorData(QObject *parent) ...@@ -46,10 +46,10 @@ LocatorData::LocatorData(QObject *parent)
{ {
QmlJS::ModelManagerInterface *manager = QmlJS::ModelManagerInterface::instance(); QmlJS::ModelManagerInterface *manager = QmlJS::ModelManagerInterface::instance();
connect(manager, SIGNAL(documentUpdated(QmlJS::Document::Ptr)), connect(manager, &QmlJS::ModelManagerInterface::documentUpdated,
this, SLOT(onDocumentUpdated(QmlJS::Document::Ptr))); this, &LocatorData::onDocumentUpdated);
connect(manager, SIGNAL(aboutToRemoveFiles(QStringList)), connect(manager, &QmlJS::ModelManagerInterface::aboutToRemoveFiles,
this, SLOT(onAboutToRemoveFiles(QStringList))); this, &LocatorData::onAboutToRemoveFiles);
} }
LocatorData::~LocatorData() LocatorData::~LocatorData()
......
...@@ -108,7 +108,8 @@ bool QmlJSToolsPlugin::initialize(const QStringList &arguments, QString *error) ...@@ -108,7 +108,8 @@ bool QmlJSToolsPlugin::initialize(const QStringList &arguments, QString *error)
Context globalContext(Core::Constants::C_GLOBAL); Context globalContext(Core::Constants::C_GLOBAL);
Command *cmd = ActionManager::registerAction( Command *cmd = ActionManager::registerAction(
m_resetCodeModelAction, Constants::RESET_CODEMODEL, globalContext); m_resetCodeModelAction, Constants::RESET_CODEMODEL, globalContext);
connect(m_resetCodeModelAction, SIGNAL(triggered()), m_modelManager, SLOT(resetCodeModel())); connect(m_resetCodeModelAction, &QAction::triggered,
m_modelManager, &ModelManager::resetCodeModel);
mqmljstools->addAction(cmd); mqmljstools->addAction(cmd);
// watch task progress // watch task progress
......
...@@ -89,8 +89,8 @@ Core::BaseFileWizard *QmlApplicationWizard::create(QWidget *parent, const Wizard ...@@ -89,8 +89,8 @@ Core::BaseFileWizard *QmlApplicationWizard::create(QWidget *parent, const Wizard
{ {
QmlApplicationWizardDialog *wizardDialog = new QmlApplicationWizardDialog(parent, parameters); QmlApplicationWizardDialog *wizardDialog = new QmlApplicationWizardDialog(parent, parameters);
connect(wizardDialog, SIGNAL(projectParametersChanged(QString,QString)), m_qmlApp, connect(wizardDialog, &QmlApplicationWizardDialog::projectParametersChanged,
SLOT(setProjectNameAndBaseDirectory(QString,QString))); m_qmlApp, &QmlApp::setProjectNameAndBaseDirectory);
wizardDialog->setPath(parameters.defaultPath()); wizardDialog->setPath(parameters.defaultPath());
......
...@@ -100,7 +100,7 @@ void QmlProject::addedTarget(ProjectExplorer::Target *target) ...@@ -100,7 +100,7 @@ void QmlProject::addedTarget(ProjectExplorer::Target *target)
void QmlProject::onActiveTargetChanged(ProjectExplorer::Target *target) void QmlProject::onActiveTargetChanged(ProjectExplorer::Target *target)
{ {
if (m_activeTarget) if (m_activeTarget)
disconnect(m_activeTarget, SIGNAL(kitChanged()), this, SLOT(onKitChanged())); disconnect(m_activeTarget, &ProjectExplorer::Target::kitChanged, this, &QmlProject::onKitChanged);
m_activeTarget = target; m_activeTarget = target;
if (m_activeTarget) if (m_activeTarget)
connect(target, SIGNAL(kitChanged()), this, SLOT(onKitChanged())); connect(target, SIGNAL(kitChanged()), this, SLOT(onKitChanged()));
...@@ -397,11 +397,9 @@ bool QmlProject::fromMap(const QVariantMap &map) ...@@ -397,11 +397,9 @@ bool QmlProject::fromMap(const QVariantMap &map)
foreach (Target *t, targets()) foreach (Target *t, targets())
addedTarget(t); addedTarget(t);
connect(this, SIGNAL(addedTarget(ProjectExplorer::Target*)), connect(this, &QmlProject::addedTarget, this, &QmlProject::addedTarget);
this, SLOT(addedTarget(ProjectExplorer::Target*)));
connect(this, SIGNAL(activeTargetChanged(ProjectExplorer::Target*)), connect(this, &QmlProject::activeTargetChanged, this, &QmlProject::onActiveTargetChanged);
this, SLOT(onActiveTargetChanged(ProjectExplorer::Target*)));
onActiveTargetChanged(activeTarget()); onActiveTargetChanged(activeTarget());
......
...@@ -71,13 +71,15 @@ QmlProjectRunConfigurationWidget::QmlProjectRunConfigurationWidget(QmlProjectRun ...@@ -71,13 +71,15 @@ QmlProjectRunConfigurationWidget::QmlProjectRunConfigurationWidget(QmlProjectRun
m_fileListCombo = new QComboBox; m_fileListCombo = new QComboBox;
m_fileListCombo->setModel(m_fileListModel); m_fileListCombo->setModel(m_fileListModel);
connect(m_fileListCombo, SIGNAL(activated(int)), this, SLOT(setMainScript(int))); connect(m_fileListCombo, static_cast<void (QComboBox::*)(int)>(&QComboBox::activated),
this, &QmlProjectRunConfigurationWidget::setMainScript);
connect(ProjectExplorer::ProjectExplorerPlugin::instance(), SIGNAL(fileListChanged()), connect(ProjectExplorer::ProjectExplorerPlugin::instance(), SIGNAL(fileListChanged()),
SLOT(updateFileComboBox())); SLOT(updateFileComboBox()));
QLineEdit *qmlViewerArgs = new QLineEdit; QLineEdit *qmlViewerArgs = new QLineEdit;
qmlViewerArgs->setText(rc->m_qmlViewerArgs); qmlViewerArgs->setText(rc->m_qmlViewerArgs);
connect(qmlViewerArgs, SIGNAL(textChanged(QString)), this, SLOT(onViewerArgsChanged())); connect(qmlViewerArgs, &QLineEdit::textChanged,
this, &QmlProjectRunConfigurationWidget::onViewerArgsChanged);
form->addRow(tr("Arguments:"), qmlViewerArgs); form->addRow(tr("Arguments:"), qmlViewerArgs);
form->addRow(tr("Main QML file:"), m_fileListCombo); form->addRow(tr("Main QML file:"), m_fileListCombo);
......
...@@ -78,7 +78,8 @@ void AbstractPackagingStep::ctor() ...@@ -78,7 +78,8 @@ void AbstractPackagingStep::ctor()
connect(target(), SIGNAL(deploymentDataChanged()), SLOT(setDeploymentDataModified())); connect(target(), SIGNAL(deploymentDataChanged()), SLOT(setDeploymentDataModified()));
setDeploymentDataModified(); setDeploymentDataModified();
connect(this, SIGNAL(unmodifyDeploymentData()), this, SLOT(setDeploymentDataUnmodified())); connect(this, &AbstractPackagingStep::unmodifyDeploymentData,
this, &AbstractPackagingStep::setDeploymentDataUnmodified);
} }
AbstractPackagingStep::~AbstractPackagingStep() AbstractPackagingStep::~AbstractPackagingStep()
...@@ -92,8 +93,8 @@ void AbstractPackagingStep::handleBuildConfigurationChanged() ...@@ -92,8 +93,8 @@ void AbstractPackagingStep::handleBuildConfigurationChanged()
disconnect(d->currentBuildConfiguration, 0, this, 0); disconnect(d->currentBuildConfiguration, 0, this, 0);
d->currentBuildConfiguration = target()->activeBuildConfiguration(); d->currentBuildConfiguration = target()->activeBuildConfiguration();
if (d->currentBuildConfiguration) { if (d->currentBuildConfiguration) {
connect(d->currentBuildConfiguration, SIGNAL(buildDirectoryChanged()), this, connect(d->currentBuildConfiguration, &BuildConfiguration::buildDirectoryChanged,
SIGNAL(packageFilePathChanged())); this, &AbstractPackagingStep::packageFilePathChanged);
} }
emit packageFilePathChanged(); emit packageFilePathChanged();
} }
......
...@@ -274,12 +274,13 @@ void AbstractRemoteLinuxDeployService::handleDeviceSetupDone(bool success) ...@@ -274,12 +274,13 @@ void AbstractRemoteLinuxDeployService::handleDeviceSetupDone(bool success)
d->state = Connecting; d->state = Connecting;
d->connection = QSsh::acquireConnection(deviceConfiguration()->sshParameters()); d->connection = QSsh::acquireConnection(deviceConfiguration()->sshParameters());
connect(d->connection, SIGNAL(error(QSsh::SshError)), connect(d->connection, &SshConnection::error,
SLOT(handleConnectionFailure())); this, &AbstractRemoteLinuxDeployService::handleConnectionFailure);
if (d->connection->state() == SshConnection::Connected) { if (d->connection->state() == SshConnection::Connected) {
handleConnected(); handleConnected();
} else { } else {
connect(d->connection, SIGNAL(connected()), SLOT(handleConnected())); connect(d->connection, &SshConnection::connected,
this, &AbstractRemoteLinuxDeployService::handleConnected);
emit progressMessage(tr("Connecting to device...")); emit progressMessage(tr("Connecting to device..."));
if (d->connection->state() == SshConnection::Unconnected) if (d->connection->state() == SshConnection::Unconnected)
d->connection->connectToHost(); d->connection->connectToHost();
......