]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/tests/kitemlistcontrollertest.cpp
Dolphin: port from KonqOperations::doDrop to the new KIO::DropJob
[dolphin.git] / src / tests / kitemlistcontrollertest.cpp
index 42c0a8ed2c3410fea2f383f8e25a0633959ca8f0..cd4d0a681b43dae9838f2f176def2ae5300442ff 100644 (file)
  *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA            *
  ***************************************************************************/
 
-#include <qtest.h>
-#include <qtestmouse.h>
-#include <qtestkeyboard.h>
-
 #include "kitemviews/kitemlistcontainer.h"
 #include "kitemviews/kfileitemlistview.h"
 #include "kitemviews/kfileitemmodel.h"
 #include <KConfigGroup>
 #include <KGlobalSettings>
 
+#include <QTest>
 #include <QGraphicsSceneMouseEvent>
 #include <QSignalSpy>
 
-namespace {
-    const int DefaultTimeout = 2000;
-};
-
 Q_DECLARE_METATYPE(KFileItemListView::ItemLayout);
 Q_DECLARE_METATYPE(Qt::Orientation);
 Q_DECLARE_METATYPE(KItemListController::SelectionBehavior);
@@ -104,7 +97,7 @@ void KItemListControllerTest::initTestCase()
     m_testDir->createFiles(files);
     m_model->loadDirectory(m_testDir->url());
     QSignalSpy spyDirectoryLoadingCompleted(m_model, SIGNAL(directoryLoadingCompleted()));
-    QVERIFY(spyDirectoryLoadingCompleted.wait(DefaultTimeout));
+    QVERIFY(spyDirectoryLoadingCompleted.wait());
 
     m_container->show();
     QTest::qWaitForWindowShown(m_container);
@@ -567,7 +560,7 @@ void KItemListControllerTest::testMouseClickActivation()
 
     if (!KGlobalSettings::singleClick()) {
         // TODO: Try to find a way to make sure that changing the global setting works.
-        QSKIP("Failed to change the KGlobalSettings::singleClick() setting!", SkipSingle);
+        QSKIP("Failed to change the KGlobalSettings::singleClick() setting!");
     }
 
     m_view->event(&mousePressEvent);
@@ -588,7 +581,7 @@ void KItemListControllerTest::testMouseClickActivation()
 
     if (KGlobalSettings::singleClick()) {
         // TODO: Try to find a way to make sure that changing the global setting works.
-        QSKIP("Failed to change the KGlobalSettings::singleClick() setting!", SkipSingle);
+        QSKIP("Failed to change the KGlobalSettings::singleClick() setting!");
     }
 
     m_view->event(&mousePressEvent);
@@ -623,7 +616,7 @@ void KItemListControllerTest::testMouseClickActivation()
 
     if (!KGlobalSettings::singleClick()) {
         // TODO: Try to find a way to make sure that changing the global setting works.
-        QSKIP("Failed to change the KGlobalSettings::singleClick() setting!", SkipSingle);
+        QSKIP("Failed to change the KGlobalSettings::singleClick() setting!");
     }
 
     m_view->event(&mousePressEvent);
@@ -652,7 +645,7 @@ void KItemListControllerTest::testMouseClickActivation()
 
     if (KGlobalSettings::singleClick() != restoreKGlobalSettingsSingleClick) {
         // TODO: Try to find a way to make sure that changing the global setting works.
-        QSKIP("Failed to change the KGlobalSettings::singleClick() setting!", SkipSingle);
+        QSKIP("Failed to change the KGlobalSettings::singleClick() setting!");
     }
 }