]> cloud.milkyroute.net Git - dolphin.git/commitdiff
PlacesItemModel: remove redundant set of properties
authorElvis Angelaccio <elvis.angelaccio@kde.org>
Sat, 9 Nov 2019 21:45:11 +0000 (22:45 +0100)
committerElvis Angelaccio <elvis.angelaccio@kde.org>
Sun, 10 Nov 2019 09:03:25 +0000 (10:03 +0100)
Summary:
The text, icon and url properties are already set in
`PlacesItem::setBookmark()`, so there is no need to set them here.

The `OnlyInApp` property is part of the KBookmark object that we are
going to set to the place item, so there is no need to set it here either.

Test Plan:
- Open both dolphin and the Plasma file dialog in some app
- Edit the text, url, icon and the "Only show when using this application" checkbox in some place item from the file dialog
- Check whether the place in dolphin keeps getting updated accordingly

Reviewers: #dolphin, meven, ngraham

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D25230

src/panels/places/placesitemmodel.cpp

index 9dbfe7f91efd1cb61dae863ccead4c32cd04b89a..a1223b5fd269df41d531e5a9de44c2a77a655741 100644 (file)
@@ -588,11 +588,6 @@ void PlacesItemModel::onSourceModelDataChanged(const QModelIndex &topLeft, const
         }
 
         if (placeItem && !m_sourceModel->isDevice(sourceIndex)) {
-            placeItem->setText(bookmark.text());
-            placeItem->setIcon(sourceIndex.data(KFilePlacesModel::IconNameRole).toString());
-            placeItem->setUrl(m_sourceModel->url(sourceIndex));
-            placeItem->bookmark().setMetaDataItem(QStringLiteral("OnlyInApp"),
-                                                  bookmark.metaDataItem(QStringLiteral("OnlyInApp")));
             // must update the bookmark object
             placeItem->setBookmark(bookmark);
         }