diff options
author | Kai Koehne <kai.koehne@theqtcompany.com> | 2015-06-10 15:35:33 +0200 |
---|---|---|
committer | Kai Koehne <kai.koehne@theqtcompany.com> | 2015-06-15 13:48:13 +0000 |
commit | 90135a5b7a31c30322f19e403d697780b552bf19 (patch) | |
tree | d64bef2da4d0143c38167eca2ae32d47b7226ced /src/libs/installer/componentmodel.cpp | |
parent | 80b2694aede1ed736c619f76cb7b6250a913635b (diff) |
Convert to Qt 5 connect syntax
Convert to new signal/slot syntax where it does not make things more
complicated: connections where the signal or slot is an overloaded
method, or where the receiver method is not in a QObject, are left alone.
The new syntax allows compile-time checking of the connection.
Change-Id: I2cc3c93b9812797bd67f64a8728569491eeec668
Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
Diffstat (limited to 'src/libs/installer/componentmodel.cpp')
-rw-r--r-- | src/libs/installer/componentmodel.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libs/installer/componentmodel.cpp b/src/libs/installer/componentmodel.cpp index 682bc02c5..77ff5bfdb 100644 --- a/src/libs/installer/componentmodel.cpp +++ b/src/libs/installer/componentmodel.cpp @@ -107,7 +107,7 @@ ComponentModel::ComponentModel(int columns, PackageManagerCore *core) , m_modelState(DefaultChecked) { m_headerData.insert(0, columns, QVariant()); - connect(this, SIGNAL(modelReset()), this, SLOT(slotModelReset())); + connect(this, &QAbstractItemModel::modelReset, this, &ComponentModel::slotModelReset); } /*! @@ -413,7 +413,7 @@ void ComponentModel::setRootComponents(QList<QInstaller::Component*> rootCompone // show virtual components only in case we run as updater or if the core engine is set to show them const bool showVirtuals = m_core->isUpdater() || m_core->virtualComponentsVisible(); foreach (Component *const component, rootComponents) { - connect(component, SIGNAL(virtualStateChanged()), this, SLOT(onVirtualStateChanged())); + connect(component, &Component::virtualStateChanged, this, &ComponentModel::onVirtualStateChanged); if ((!showVirtuals) && component->isVirtual()) continue; m_rootComponentList.append(component); @@ -473,7 +473,7 @@ void ComponentModel::slotModelReset() foreach (Component *const component, components) { if (component->checkState() == Qt::Checked) checked.insert(component); - connect(component, SIGNAL(virtualStateChanged()), this, SLOT(onVirtualStateChanged())); + connect(component, &Component::virtualStateChanged, this, &ComponentModel::onVirtualStateChanged); } updateCheckedState(checked, Qt::Checked); |