┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/tests/kitemlistkeyboardsearchmanagertest.cpp
diff options
context:
space:
mode:
authorElvis Angelaccio <[email protected]>2018-02-03 20:46:08 +0100
committerElvis Angelaccio <[email protected]>2018-02-03 20:46:08 +0100
commitcef4d96cc6ed30284815320b1f7ddb59f201589e (patch)
tree720a63cb1d0aa4004b0bbbf8988df3095134f74f /src/tests/kitemlistkeyboardsearchmanagertest.cpp
parent4709626a9b4557e77f99ed15353e80ffa608c75c (diff)
Port QSignalSpy to new signal syntax
More compile-time safety. Tests still pass. This also fixes a krazy warning about "normalised signal/slot signatures".
Diffstat (limited to 'src/tests/kitemlistkeyboardsearchmanagertest.cpp')
-rw-r--r--src/tests/kitemlistkeyboardsearchmanagertest.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tests/kitemlistkeyboardsearchmanagertest.cpp b/src/tests/kitemlistkeyboardsearchmanagertest.cpp
index 45fe112ce..c14ce87ac 100644
--- a/src/tests/kitemlistkeyboardsearchmanagertest.cpp
+++ b/src/tests/kitemlistkeyboardsearchmanagertest.cpp
@@ -46,7 +46,7 @@ void KItemListKeyboardSearchManagerTest::init()
void KItemListKeyboardSearchManagerTest::testBasicKeyboardSearch()
{
- QSignalSpy spy(&m_keyboardSearchManager, SIGNAL(changeCurrentItem(QString, bool)));
+ QSignalSpy spy(&m_keyboardSearchManager, &KItemListKeyboardSearchManager::changeCurrentItem);
QVERIFY(spy.isValid());
m_keyboardSearchManager.addKeys("f");
@@ -72,7 +72,7 @@ void KItemListKeyboardSearchManagerTest::testAbortedKeyboardSearch()
// to save time when running this test.
m_keyboardSearchManager.setTimeout(100);
- QSignalSpy spy(&m_keyboardSearchManager, SIGNAL(changeCurrentItem(QString, bool)));
+ QSignalSpy spy(&m_keyboardSearchManager, &KItemListKeyboardSearchManager::changeCurrentItem);
QVERIFY(spy.isValid());
m_keyboardSearchManager.addKeys("f");
@@ -104,7 +104,7 @@ void KItemListKeyboardSearchManagerTest::testRepeatedKeyPress()
// 1. the string contains the repeated key only once, and
// 2. the bool searchFromNextItem is true.
- QSignalSpy spy(&m_keyboardSearchManager, SIGNAL(changeCurrentItem(QString, bool)));
+ QSignalSpy spy(&m_keyboardSearchManager, &KItemListKeyboardSearchManager::changeCurrentItem);
QVERIFY(spy.isValid());
m_keyboardSearchManager.addKeys("p");
@@ -132,7 +132,7 @@ 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, SIGNAL(changeCurrentItem(QString, bool)));
+ QSignalSpy spy(&m_keyboardSearchManager, &KItemListKeyboardSearchManager::changeCurrentItem);
QVERIFY(spy.isValid());
// Simulate that the user enters "a_b".