X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/8679115552ec65ccfc6cbc1db68414d80e3a081b..41253c0c81bafb54a0b6c82e5282e3add85e8a50:/src/tests/kitemlistcontrollertest.cpp diff --git a/src/tests/kitemlistcontrollertest.cpp b/src/tests/kitemlistcontrollertest.cpp index dafb9f854..92d05c4d4 100644 --- a/src/tests/kitemlistcontrollertest.cpp +++ b/src/tests/kitemlistcontrollertest.cpp @@ -37,6 +37,7 @@ */ class KItemListControllerTestStyle : public QProxyStyle { + Q_OBJECT public: KItemListControllerTestStyle(QStyle* style) : QProxyStyle(style), @@ -71,10 +72,10 @@ private: bool m_activateItemOnSingleClick; }; -Q_DECLARE_METATYPE(KFileItemListView::ItemLayout); -Q_DECLARE_METATYPE(Qt::Orientation); -Q_DECLARE_METATYPE(KItemListController::SelectionBehavior); -Q_DECLARE_METATYPE(KItemSet); +Q_DECLARE_METATYPE(KFileItemListView::ItemLayout) +Q_DECLARE_METATYPE(Qt::Orientation) +Q_DECLARE_METATYPE(KItemListController::SelectionBehavior) +Q_DECLARE_METATYPE(KItemSet) class KItemListControllerTest : public QObject { @@ -142,7 +143,7 @@ void KItemListControllerTest::initTestCase() QVERIFY(spyDirectoryLoadingCompleted.wait()); m_container->show(); - QTest::qWaitForWindowShown(m_container); + QTest::qWaitForWindowExposed(m_container); } void KItemListControllerTest::cleanupTestCase() @@ -209,7 +210,7 @@ struct ViewState { // We have to define a typedef for the pair in order to make the test compile. typedef QPair keyPressViewStatePair; -Q_DECLARE_METATYPE(QList); +Q_DECLARE_METATYPE(QList) /** * This function provides the data for the actual test function @@ -460,7 +461,7 @@ void KItemListControllerTest::testKeyboardNavigation_data() selectionBehaviorNames[selectionBehavior] + ", " + groupingEnabledNames[groupingEnabled]; - const QByteArray testNameAscii = testName.toAscii(); + const QByteArray testNameAscii = testName.toLatin1(); QTest::newRow(testNameAscii.data()) << layout