Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/keepassxreboot/keepassxc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan White <support@dmapps.us>2018-03-20 06:16:22 +0300
committerJonathan White <support@dmapps.us>2018-11-17 16:49:02 +0300
commitd8d758f0e17d616840d2321476733b497a5c1b3a (patch)
treeec4286ddd7d578860381e9b9164510a8b099d80f /tests/TestEntrySearcher.cpp
parenta5e7da67d89b5433d6880824ef7605b9f5d17151 (diff)
Streamlined searcher code
* Remove searching of group title and notes * End search when selecting a new group * Correct entry searcher tests to align with new code
Diffstat (limited to 'tests/TestEntrySearcher.cpp')
-rw-r--r--tests/TestEntrySearcher.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/tests/TestEntrySearcher.cpp b/tests/TestEntrySearcher.cpp
index 659f7a489..0c0a2c3e4 100644
--- a/tests/TestEntrySearcher.cpp
+++ b/tests/TestEntrySearcher.cpp
@@ -53,7 +53,6 @@ void TestEntrySearcher::testSearch()
group2111->setParent(group211);
group1->setSearchingEnabled(Group::Disable);
- group11->setSearchingEnabled(Group::Enable);
Entry* eRoot = new Entry();
eRoot->setNotes("test search term test");
@@ -88,15 +87,13 @@ void TestEntrySearcher::testSearch()
e3b->setGroup(group3);
m_searchResult = m_entrySearcher.search("search term", m_groupRoot, Qt::CaseInsensitive);
- QCOMPARE(m_searchResult.count(), 3);
+ QCOMPARE(m_searchResult.count(), 2);
m_searchResult = m_entrySearcher.search("search term", group211, Qt::CaseInsensitive);
QCOMPARE(m_searchResult.count(), 1);
+ // Parent group disabled search
m_searchResult = m_entrySearcher.search("search term", group11, Qt::CaseInsensitive);
- QCOMPARE(m_searchResult.count(), 1);
-
- m_searchResult = m_entrySearcher.search("search term", group1, Qt::CaseInsensitive);
QCOMPARE(m_searchResult.count(), 0);
}