]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Fix clazy writing-to-temporary warning
authorElvis Angelaccio <elvis.angelaccio@kde.org>
Sat, 9 Nov 2019 18:50:01 +0000 (19:50 +0100)
committerElvis Angelaccio <elvis.angelaccio@kde.org>
Sat, 9 Nov 2019 21:09:16 +0000 (22:09 +0100)
src/tests/placesitemmodeltest.cpp

index d066b2ec907ffda80f6a02b2cece3c461954f889..ef8d265f9bbe438fc485f4ce33c9ccb71cb6ccf6 100644 (file)
@@ -719,8 +719,8 @@ void PlacesItemModelTest::testEditMetadata()
     schedulePlaceRemoval(tempDirIndex);
 
     // modify place metadata
-    PlacesItem *item = m_model->placesItem(tempDirIndex);
-    item->bookmark().setMetaDataItem(QStringLiteral("OnlyInApp"), KAboutData::applicationData().componentName());
+    auto bookmark = m_model->placesItem(tempDirIndex)->bookmark();
+    bookmark.setMetaDataItem(QStringLiteral("OnlyInApp"), KAboutData::applicationData().componentName());
     m_model->refresh();
 
     // check if the place was modified in both models