diff options
| author | David Faure <[email protected]> | 2014-12-24 08:49:47 +0100 |
|---|---|---|
| committer | David Faure <[email protected]> | 2014-12-24 08:49:47 +0100 |
| commit | 7c695cd709aff2cc7cc5d36784ac53ad7b6435cf (patch) | |
| tree | fcc53819f76f876b7a6f796be5717eb7fa85c33c /src/tests/kitemlistkeyboardsearchmanagertest.cpp | |
| parent | 70dc3d06d928122ca5faff75d84f6238a78ea9b4 (diff) | |
Fix compilation with Qt 5.2 and 5.3; QSignalSpy can't take a function pointer yet
Diffstat (limited to 'src/tests/kitemlistkeyboardsearchmanagertest.cpp')
| -rw-r--r-- | src/tests/kitemlistkeyboardsearchmanagertest.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/tests/kitemlistkeyboardsearchmanagertest.cpp b/src/tests/kitemlistkeyboardsearchmanagertest.cpp index 41475660d..6720b9fc3 100644 --- a/src/tests/kitemlistkeyboardsearchmanagertest.cpp +++ b/src/tests/kitemlistkeyboardsearchmanagertest.cpp @@ -46,7 +46,8 @@ void KItemListKeyboardSearchManagerTest::init() void KItemListKeyboardSearchManagerTest::testBasicKeyboardSearch() { - QSignalSpy spy(&m_keyboardSearchManager, &KItemListKeyboardSearchManager::changeCurrentItem); + QSignalSpy spy(&m_keyboardSearchManager, SIGNAL(changeCurrentItem(QString, bool))); + QVERIFY(spy.isValid()); m_keyboardSearchManager.addKeys("f"); QCOMPARE(spy.count(), 1); @@ -71,7 +72,8 @@ void KItemListKeyboardSearchManagerTest::testAbortedKeyboardSearch() // to save time when running this test. m_keyboardSearchManager.setTimeout(100); - QSignalSpy spy(&m_keyboardSearchManager, &KItemListKeyboardSearchManager::changeCurrentItem); + QSignalSpy spy(&m_keyboardSearchManager, SIGNAL(changeCurrentItem(QString, bool))); + QVERIFY(spy.isValid()); m_keyboardSearchManager.addKeys("f"); QCOMPARE(spy.count(), 1); @@ -102,7 +104,8 @@ void KItemListKeyboardSearchManagerTest::testRepeatedKeyPress() // 1. the string contains the repeated key only once, and // 2. the bool searchFromNextItem is true. - QSignalSpy spy(&m_keyboardSearchManager, &KItemListKeyboardSearchManager::changeCurrentItem); + QSignalSpy spy(&m_keyboardSearchManager, SIGNAL(changeCurrentItem(QString, bool))); + QVERIFY(spy.isValid()); m_keyboardSearchManager.addKeys("p"); QCOMPARE(spy.count(), 1); @@ -129,7 +132,8 @@ void KItemListKeyboardSearchManagerTest::testPressShift() // string. Make sure that this does not reset the current search. See // https://bugs.kde.org/show_bug.cgi?id=321286 - QSignalSpy spy(&m_keyboardSearchManager, &KItemListKeyboardSearchManager::changeCurrentItem); + QSignalSpy spy(&m_keyboardSearchManager, SIGNAL(changeCurrentItem(QString, bool))); + QVERIFY(spy.isValid()); // Simulate that the user enters "a_b". m_keyboardSearchManager.addKeys("a"); |
