QmakePM: Use Qt5-style connects

The heavy lifting was done by clazy.

Change-Id: Ibcc1bc772c6cc4413ae5834a442f7d270dc4cd75
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Orgad Shaneh
2016-05-24 23:21:57 +03:00
committed by Orgad Shaneh
parent 1d4f0ccd5c
commit 547d18c0b9
23 changed files with 94 additions and 101 deletions

View File

@@ -91,9 +91,9 @@ ClassList::ClassList(QWidget *parent) :
m_model(new ClassModel)
{
setModel(m_model);
connect(itemDelegate(), SIGNAL(closeEditor(QWidget*,QAbstractItemDelegate::EndEditHint)), SLOT(classEdited()));
connect(selectionModel(), SIGNAL(currentRowChanged(QModelIndex,QModelIndex)),
this, SLOT(slotCurrentRowChanged(QModelIndex,QModelIndex)));
connect(itemDelegate(), &QAbstractItemDelegate::closeEditor, this, &ClassList::classEdited);
connect(selectionModel(), &QItemSelectionModel::currentRowChanged,
this, &ClassList::slotCurrentRowChanged);
}
void ClassList::startEditingNewClassItem()

View File

@@ -50,11 +50,11 @@ signals:
void classDeleted(int index);
void currentRowChanged(int);
public slots:
public:
void removeCurrentClass();
void startEditingNewClassItem();
private slots:
private:
void classEdited();
void slotCurrentRowChanged(const QModelIndex &,const QModelIndex &);

View File

@@ -39,8 +39,8 @@ CustomWidgetPluginWizardPage::CustomWidgetPluginWizardPage(QWidget *parent) :
m_complete(false)
{
m_ui->setupUi(this);
connect(m_ui->collectionClassEdit, SIGNAL(textEdited(QString)), this, SLOT(slotCheckCompleteness()));
connect(m_ui->pluginNameEdit, SIGNAL(textEdited(QString)), this, SLOT(slotCheckCompleteness()));
connect(m_ui->collectionClassEdit, &QLineEdit::textEdited, this, &CustomWidgetPluginWizardPage::slotCheckCompleteness);
connect(m_ui->pluginNameEdit, &QLineEdit::textEdited, this, &CustomWidgetPluginWizardPage::slotCheckCompleteness);
setProperty(Utils::SHORT_TITLE_PROPERTY, tr("Plugin Details"));
}

View File

@@ -48,9 +48,9 @@ CustomWidgetWidgetsWizardPage::CustomWidgetWidgetsWizardPage(QWidget *parent) :
m_ui->setupUi(this);
m_ui->tabStackWidget->setLayout(m_tabStackLayout);
m_ui->addButton->setIcon(Core::Icons::PLUS.icon());
connect(m_ui->addButton, SIGNAL(clicked()), m_ui->classList, SLOT(startEditingNewClassItem()));
connect(m_ui->addButton, &QAbstractButton::clicked, m_ui->classList, &ClassList::startEditingNewClassItem);
m_ui->deleteButton->setIcon(Core::Icons::MINUS.icon());
connect(m_ui->deleteButton, SIGNAL(clicked()), m_ui->classList, SLOT(removeCurrentClass()));
connect(m_ui->deleteButton, &QAbstractButton::clicked, m_ui->classList, &ClassList::removeCurrentClass);
m_ui->deleteButton->setEnabled(false);
// Disabled dummy for <new class> column>.
@@ -59,8 +59,8 @@ CustomWidgetWidgetsWizardPage::CustomWidgetWidgetsWizardPage(QWidget *parent) :
dummy->setEnabled(false);
m_tabStackLayout->addWidget(dummy);
connect(m_ui->classList, SIGNAL(currentRowChanged(int)),
this, SLOT(slotCurrentRowChanged(int)));
connect(m_ui->classList, &ClassList::currentRowChanged,
this, &CustomWidgetWidgetsWizardPage::slotCurrentRowChanged);
setProperty(Utils::SHORT_TITLE_PROPERTY, tr("Custom Widgets"));
}
@@ -78,7 +78,7 @@ bool CustomWidgetWidgetsWizardPage::isComplete() const
void CustomWidgetWidgetsWizardPage::initializePage()
{
// Takes effect only if visible.
QTimer::singleShot(0, m_ui->classList, SLOT(startEditingNewClassItem()));
QTimer::singleShot(0, m_ui->classList, &ClassList::startEditingNewClassItem);
}
void CustomWidgetWidgetsWizardPage::slotCurrentRowChanged(int row)