]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/tests/kitemlistcontrollertest.cpp
Merge branch 'master' of git.kde.org:dolphin
[dolphin.git] / src / tests / kitemlistcontrollertest.cpp
index dafb9f854a744b2652362c834cccdf7c342eccd3..92d05c4d452d3d68ebf1b4fcf1f2d929db8bca08 100644 (file)
@@ -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<KeyPress, ViewState> keyPressViewStatePair;
-Q_DECLARE_METATYPE(QList<keyPressViewStatePair>);
+Q_DECLARE_METATYPE(QList<keyPressViewStatePair>)
 
 /**
  * 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