summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/componentmodel.cpp
diff options
context:
space:
mode:
authorkh1 <karsten.heimrich@nokia.com>2012-04-23 17:27:46 +0200
committerKarsten Heimrich <karsten.heimrich@nokia.com>2012-04-25 14:23:56 +0200
commit3eb3be2e042a6c93007f8bf4a1b6079b4961d919 (patch)
tree98d9b55d91bdfe65718e5dc9506e9a75e9a0df72 /src/libs/installer/componentmodel.cpp
parentc6821e8dc0b1c4724f158d4714b7b25e60bd6638 (diff)
Move the models inside core engine.
Improves the situation for qml based installer. Change-Id: Ia7198f0720a1268c7918517228c13255cccce4ea Reviewed-by: Niels Weber <niels.2.weber@nokia.com> Reviewed-by: Tim Jenssen <tim.jenssen@nokia.com>
Diffstat (limited to 'src/libs/installer/componentmodel.cpp')
-rw-r--r--src/libs/installer/componentmodel.cpp76
1 files changed, 38 insertions, 38 deletions
diff --git a/src/libs/installer/componentmodel.cpp b/src/libs/installer/componentmodel.cpp
index ec61ee84e..42e381c0d 100644
--- a/src/libs/installer/componentmodel.cpp
+++ b/src/libs/installer/componentmodel.cpp
@@ -229,44 +229,6 @@ Qt::ItemFlags ComponentModel::flags(const QModelIndex &index) const
}
/*!
- Set's the passed \a rootComponents to be list of currently shown components. The model is repopulated and
- the individual component checked state is used to show the check mark in front of the visual component
- representation. The modelAboutToBeReset() and modelReset() signals are emitted.
-*/
-void ComponentModel::setRootComponents(QList<Component*> rootComponents)
-{
- beginResetModel();
-
- m_indexByNameCache.clear();
- m_rootComponentList.clear();
- m_initialCheckedSet.clear();
- m_currentCheckedSet.clear();
-
- m_rootIndex = 0;
- m_rootComponentList = rootComponents;
-
- endResetModel();
-}
-
-/*!
- Appends the passed \a rootComponents to the currently shown list of components. The model is repopulated
- and the individual component checked state is used to show the check mark in front of the visual component
- representation. Already changed check states on the previous model are preserved. The modelAboutToBeReset()
- and modelReset() signals are emitted.
-*/
-void ComponentModel::appendRootComponents(QList<Component*> rootComponents)
-{
- beginResetModel();
-
- m_indexByNameCache.clear();
-
- m_rootIndex = m_rootComponentList.count() - 1;
- m_rootComponentList += rootComponents;
-
- endResetModel();
-}
-
-/*!
Returns a pointer to the PackageManagerCore this model belongs to.
*/
PackageManagerCore *ComponentModel::packageManagerCore() const
@@ -363,6 +325,44 @@ void ComponentModel::selectDefault()
emit defaultCheckStateChanged(m_initialCheckedSet != m_currentCheckedSet);
}
+/*!
+ Set's the passed \a rootComponents to be list of currently shown components. The model is repopulated and
+ the individual component checked state is used to show the check mark in front of the visual component
+ representation. The modelAboutToBeReset() and modelReset() signals are emitted.
+*/
+void ComponentModel::setRootComponents(QList<QInstaller::Component*> rootComponents)
+{
+ beginResetModel();
+
+ m_indexByNameCache.clear();
+ m_rootComponentList.clear();
+ m_initialCheckedSet.clear();
+ m_currentCheckedSet.clear();
+
+ m_rootIndex = 0;
+ m_rootComponentList = rootComponents;
+
+ endResetModel();
+}
+
+/*!
+ Appends the passed \a rootComponents to the currently shown list of components. The model is repopulated
+ and the individual component checked state is used to show the check mark in front of the visual component
+ representation. Already changed check states on the previous model are preserved. The modelAboutToBeReset()
+ and modelReset() signals are emitted.
+*/
+void ComponentModel::appendRootComponents(QList<QInstaller::Component*> rootComponents)
+{
+ beginResetModel();
+
+ m_indexByNameCache.clear();
+
+ m_rootIndex = m_rootComponentList.count() - 1;
+ m_rootComponentList += rootComponents;
+
+ endResetModel();
+}
+
// -- private slots
void ComponentModel::slotModelReset()