┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/tests/kitemlistcontrollertest.cpp
diff options
context:
space:
mode:
authorEmmanuel Pescosta <[email protected]>2014-12-18 14:56:46 +0100
committerEmmanuel Pescosta <[email protected]>2014-12-18 14:56:46 +0100
commitd19d94e60a778d4c19f646224e3b269da515c8fb (patch)
treec634267e074b59bfce8e9f4c9ea90bb85c56089b /src/tests/kitemlistcontrollertest.cpp
parent95220eebae1be024b84b069ce9ae4be35c9e6a5f (diff)
Ported tests away from KRandomSequence, QTest::kWaitForSignal and KTempDir.
All tests passed!
Diffstat (limited to 'src/tests/kitemlistcontrollertest.cpp')
-rw-r--r--src/tests/kitemlistcontrollertest.cpp19
1 files changed, 6 insertions, 13 deletions
diff --git a/src/tests/kitemlistcontrollertest.cpp b/src/tests/kitemlistcontrollertest.cpp
index 42c0a8ed2..cd4d0a681 100644
--- a/src/tests/kitemlistcontrollertest.cpp
+++ b/src/tests/kitemlistcontrollertest.cpp
@@ -17,10 +17,6 @@
* 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"
@@ -32,13 +28,10 @@
#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!");
}
}