[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kdev-upload] /: Port away from KDELibs4Support
From: Jakub Caban <kuba () whyblack ! pl>
Date: 2015-10-29 11:23:16
Message-ID: E1ZrlIa-0005Tf-Ol () scm ! kde ! org
[Download RAW message or body]
Git commit db1fe5cb6cab9e9350c3fce9f4194ae826dd6268 by Jakub Caban.
Committed on 28/10/2015 at 22:25.
Pushed by jcaban into branch 'master'.
Port away from KDELibs4Support
REVIEW: 125854
M +1 -1 CMakeLists.txt
M +7 -3 allprofilesmodel.cpp
M +4 -2 uploadprojectmodel.cpp
http://commits.kde.org/kdev-upload/db1fe5cb6cab9e9350c3fce9f4194ae826dd6268
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c56ded4..0c685b4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -20,7 +20,7 @@ include(KDECMakeSettings)
include(FeatureSummary)
find_package(Qt5 REQUIRED Core Widgets Test)
-find_package(KF5 REQUIRED COMPONENTS KDELibs4Support TextEditor I18n KCMUtils \
JobWidgets Service Parts KIO CoreAddons) +find_package(KF5 REQUIRED COMPONENTS \
TextEditor I18n KCMUtils JobWidgets Service Parts KIO CoreAddons ItemModels) \
find_package(KDevPlatform ${KDEVPLATFORM_VERSION} REQUIRED)
include_directories(${KDEVPLATFORM_INCLUDE_DIR})
diff --git a/allprofilesmodel.cpp b/allprofilesmodel.cpp
index e4d93be..326058b 100644
--- a/allprofilesmodel.cpp
+++ b/allprofilesmodel.cpp
@@ -58,6 +58,8 @@ int AllProfilesModel::rowCount(const QModelIndex & parent) const
void AllProfilesModel::addModel(UploadProfileModel* model)
{
+ beginResetModel();
+
connect(model, SIGNAL(modelReset()), this, SLOT(sourceReset()));
connect(model, SIGNAL(dataChanged(QModelIndex, QModelIndex)),
this, SLOT(sourceDataChanged(QModelIndex, QModelIndex)));
@@ -71,18 +73,20 @@ void AllProfilesModel::addModel(UploadProfileModel* model)
this, SLOT(sourceRowsRemoved()));
m_sourceModels.append(model);
- reset();
+ endResetModel();
}
void AllProfilesModel::removeModel(UploadProfileModel* model)
{
+ beginResetModel();
m_sourceModels.removeAt(m_sourceModels.indexOf(model));
- reset();
+ endResetModel();
}
void AllProfilesModel::sourceReset()
{
- reset();
+ beginResetModel();
+ endResetModel();
}
void AllProfilesModel::sourceDataChanged(const QModelIndex& topLeft, const \
QModelIndex& bottomRight)
diff --git a/uploadprojectmodel.cpp b/uploadprojectmodel.cpp
index c44748f..da195d5 100644
--- a/uploadprojectmodel.cpp
+++ b/uploadprojectmodel.cpp
@@ -161,9 +161,10 @@ bool UploadProjectModel::setData ( const QModelIndex & indx, \
const QVariant & va
void UploadProjectModel::setProfileConfigGroup(const KConfigGroup& group)
{
+ beginResetModel();
m_profileConfigGroup = group;
m_checkStates.clear();
- reset();
+ endResetModel();
}
KConfigGroup UploadProjectModel::profileConfigGroup() const
@@ -207,8 +208,9 @@ QModelIndex UploadProjectModel::nextRecursionIndex(const \
QModelIndex& current, c
void UploadProjectModel::setRootItem(KDevelop::ProjectBaseItem* item)
{
+ beginResetModel();
m_rootItem = item;
- reset();
+ endResetModel();
}
QString UploadProjectModel::currentProfileName()
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic