X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/2b895e7e2bd096e55faa1032ebc6a355a72c2325..2e942237c9:/src/tests/kitemlistcontrollertest.cpp diff --git a/src/tests/kitemlistcontrollertest.cpp b/src/tests/kitemlistcontrollertest.cpp index dafb9f854..926a78167 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), @@ -57,7 +58,7 @@ public: int styleHint(StyleHint hint, const QStyleOption* option = nullptr, const QWidget* widget = nullptr, - QStyleHintReturn* returnData = nullptr) const Q_DECL_OVERRIDE + QStyleHintReturn* returnData = nullptr) const override { switch (hint) { case QStyle::SH_ItemView_ActivateItemOnSingleClick: @@ -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,16 +143,16 @@ void KItemListControllerTest::initTestCase() QVERIFY(spyDirectoryLoadingCompleted.wait()); m_container->show(); - QTest::qWaitForWindowShown(m_container); + QTest::qWaitForWindowExposed(m_container); } void KItemListControllerTest::cleanupTestCase() { delete m_container; - m_container = 0; + m_container = nullptr; delete m_testDir; - m_testDir = 0; + m_testDir = nullptr; } /** Before each test, the current item, selection, and item size are reset to the defaults. */ @@ -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