diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-08-20 14:15:28 -0600 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-08-20 14:15:28 -0600 |
commit | c2bdb67ea93327ceb06b04dc3083d350d5694dc2 (patch) | |
tree | 6f5a64d90dd7b8eafa3745ddfcff4935834df557 | |
parent | f6e6cd8a5c8ef2d8d7e331834dff026646be543e (diff) | |
download | kube-c2bdb67ea93327ceb06b04dc3083d350d5694dc2.tar.gz kube-c2bdb67ea93327ceb06b04dc3083d350d5694dc2.zip |
Avoid warning messages
-rw-r--r-- | framework/src/domain/folderlistmodel.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/framework/src/domain/folderlistmodel.cpp b/framework/src/domain/folderlistmodel.cpp index 1fe2abe6..c25e8bd6 100644 --- a/framework/src/domain/folderlistmodel.cpp +++ b/framework/src/domain/folderlistmodel.cpp | |||
@@ -33,12 +33,14 @@ FolderListModel::FolderListModel(QObject *parent) : KRecursiveFilterProxyModel() | |||
33 | 33 | ||
34 | //Automatically fetch all folders, otherwise the recursive filtering does not work. | 34 | //Automatically fetch all folders, otherwise the recursive filtering does not work. |
35 | QObject::connect(this, &QSortFilterProxyModel::sourceModelChanged, [this] () { | 35 | QObject::connect(this, &QSortFilterProxyModel::sourceModelChanged, [this] () { |
36 | QObject::connect(sourceModel(), &QAbstractItemModel::rowsInserted, sourceModel(), [this] (QModelIndex parent, int first, int last) { | 36 | if (sourceModel()) { |
37 | for (int row = first; row <= last; row++) { | 37 | QObject::connect(sourceModel(), &QAbstractItemModel::rowsInserted, sourceModel(), [this] (QModelIndex parent, int first, int last) { |
38 | auto idx = sourceModel()->index(row, 0, parent); | 38 | for (int row = first; row <= last; row++) { |
39 | sourceModel()->fetchMore(idx); | 39 | auto idx = sourceModel()->index(row, 0, parent); |
40 | } | 40 | sourceModel()->fetchMore(idx); |
41 | }); | 41 | } |
42 | }); | ||
43 | } | ||
42 | }); | 44 | }); |
43 | } | 45 | } |
44 | 46 | ||