summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/componentmodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/installer/componentmodel.cpp')
-rw-r--r--src/libs/installer/componentmodel.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/libs/installer/componentmodel.cpp b/src/libs/installer/componentmodel.cpp
index ba4c2d238..88465b85b 100644
--- a/src/libs/installer/componentmodel.cpp
+++ b/src/libs/installer/componentmodel.cpp
@@ -77,6 +77,10 @@ class IconCache
{
public:
IconCache() {
+ m_icons.insert(ComponentModelHelper::Install, QIcon(QLatin1String(":/install.png")));
+ m_icons.insert(ComponentModelHelper::Uninstall, QIcon(QLatin1String(":/uninstall.png")));
+ m_icons.insert(ComponentModelHelper::KeepInstalled, QIcon(QLatin1String(":/keepinstalled.png")));
+ m_icons.insert(ComponentModelHelper::KeepUninstalled, QIcon(QLatin1String(":/keepuninstalled.png")));
}
QIcon icon(ComponentModelHelper::InstallAction action) const {
@@ -97,7 +101,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);
}
/*!
@@ -403,7 +407,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);
@@ -463,7 +467,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);