Port to new connect api

Change-Id: I873a36601d54065b61d0666558b93dc839ad0dfc
Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
Montel Laurent
2015-01-30 11:02:24 +01:00
committed by hjk
parent f1ac9cd56d
commit 063251ebbc
39 changed files with 287 additions and 240 deletions

View File

@@ -89,8 +89,8 @@ Core::BaseFileWizard *QmlApplicationWizard::create(QWidget *parent, const Wizard
{
QmlApplicationWizardDialog *wizardDialog = new QmlApplicationWizardDialog(parent, parameters);
connect(wizardDialog, SIGNAL(projectParametersChanged(QString,QString)), m_qmlApp,
SLOT(setProjectNameAndBaseDirectory(QString,QString)));
connect(wizardDialog, &QmlApplicationWizardDialog::projectParametersChanged,
m_qmlApp, &QmlApp::setProjectNameAndBaseDirectory);
wizardDialog->setPath(parameters.defaultPath());

View File

@@ -100,7 +100,7 @@ void QmlProject::addedTarget(ProjectExplorer::Target *target)
void QmlProject::onActiveTargetChanged(ProjectExplorer::Target *target)
{
if (m_activeTarget)
disconnect(m_activeTarget, SIGNAL(kitChanged()), this, SLOT(onKitChanged()));
disconnect(m_activeTarget, &ProjectExplorer::Target::kitChanged, this, &QmlProject::onKitChanged);
m_activeTarget = target;
if (m_activeTarget)
connect(target, SIGNAL(kitChanged()), this, SLOT(onKitChanged()));
@@ -397,11 +397,9 @@ bool QmlProject::fromMap(const QVariantMap &map)
foreach (Target *t, targets())
addedTarget(t);
connect(this, SIGNAL(addedTarget(ProjectExplorer::Target*)),
this, SLOT(addedTarget(ProjectExplorer::Target*)));
connect(this, &QmlProject::addedTarget, this, &QmlProject::addedTarget);
connect(this, SIGNAL(activeTargetChanged(ProjectExplorer::Target*)),
this, SLOT(onActiveTargetChanged(ProjectExplorer::Target*)));
connect(this, &QmlProject::activeTargetChanged, this, &QmlProject::onActiveTargetChanged);
onActiveTargetChanged(activeTarget());

View File

@@ -71,13 +71,15 @@ QmlProjectRunConfigurationWidget::QmlProjectRunConfigurationWidget(QmlProjectRun
m_fileListCombo = new QComboBox;
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()),
SLOT(updateFileComboBox()));
QLineEdit *qmlViewerArgs = new QLineEdit;
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("Main QML file:"), m_fileListCombo);