]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/tests/placesitemmodeltest.cpp
Fix detaching
[dolphin.git] / src / tests / placesitemmodeltest.cpp
index a74b3ea6cbdf0a58019a9ddb650fe53d80733f17..fc21ce055f9c0d46c0ae59e4a088f6ab489b6aea 100644 (file)
 
 #include <QTest>
 #include <QSignalSpy>
-#include <QDebug>
-#include <QList>
-#include <QByteArray>
 #include <QStandardPaths>
 #include <QAction>
 #include <QDBusInterface>
-#include <QUrlQuery>
 
 #include <KBookmarkManager>
 #include <KConfig>
@@ -36,7 +32,6 @@
 #include "panels/places/placesitemmodel.h"
 #include "panels/places/placesitem.h"
 #include "views/viewproperties.h"
-#include "kitemviews/kitemrange.h"
 
 Q_DECLARE_METATYPE(KItemRangeList)
 Q_DECLARE_METATYPE(KItemRange)
@@ -233,7 +228,8 @@ void PlacesItemModelTest::init()
 
 void PlacesItemModelTest::cleanup()
 {
-    for (int i : m_tobeRemoved) {
+    const auto tobeRemoved = m_tobeRemoved;
+    for (const int i : tobeRemoved) {
         int before = m_model->count();
         m_model->deleteItem(i);
         QTRY_COMPARE(m_model->count(), before - 1);
@@ -546,7 +542,6 @@ void PlacesItemModelTest::testSystemItems()
 
 void PlacesItemModelTest::testEditBookmark()
 {
-    const QUrl tempUrl = QUrl::fromLocalFile(QStandardPaths::writableLocation(QStandardPaths::TempLocation));
     QScopedPointer<PlacesItemModel> other(new PlacesItemModel());
 
     createPlaceItem(QStringLiteral("Temporary Dir"), QUrl::fromLocalFile(QStandardPaths::writableLocation(QStandardPaths::TempLocation)), QString());