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
path: root/tests
diff options
context:
space:
mode:
authorJonathan White <support@dmapps.us>2020-10-08 04:14:32 +0300
committerJonathan White <support@dmapps.us>2020-10-15 06:55:01 +0300
commitb0e038e7891efbcab073ff66c72932aeb09cf687 (patch)
tree9d9d1bb55c51088f8bed127c35287a1db5e3aa11 /tests
parenta09acc86d07a46cff0516b25a53aba70bcf8734e (diff)
Improve default Qt widget icons
* Include new icons for toolbar overflow to ensure they are tinted correctly and fit in with the rest of the UI. * Replace custom code for clearing line edits by including a proper icon for the default action.
Diffstat (limited to 'tests')
-rw-r--r--tests/gui/TestGui.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/tests/gui/TestGui.cpp b/tests/gui/TestGui.cpp
index d323744b6..060a29520 100644
--- a/tests/gui/TestGui.cpp
+++ b/tests/gui/TestGui.cpp
@@ -855,8 +855,7 @@ void TestGui::testSearch()
auto* entryView = m_dbWidget->findChild<EntryView*>("entryView");
QVERIFY(entryView->isVisible());
- auto* clearButton = searchWidget->findChild<QAction*>("clearIcon");
- QVERIFY(!clearButton->isVisible());
+ QVERIFY(searchTextEdit->isClearButtonEnabled());
auto* helpButton = searchWidget->findChild<QAction*>("helpIcon");
auto* helpPanel = searchWidget->findChild<QWidget*>("SearchHelpWidget");
@@ -866,7 +865,6 @@ void TestGui::testSearch()
// Enter search
QTest::mouseClick(searchTextEdit, Qt::LeftButton);
QTRY_VERIFY(searchTextEdit->hasFocus());
- QTRY_VERIFY(!clearButton->isVisible());
// Show/Hide search help
helpButton->trigger();
QTRY_VERIFY(helpPanel->isVisible());
@@ -877,14 +875,12 @@ void TestGui::testSearch()
// Search for "ZZZ"
QTest::keyClicks(searchTextEdit, "ZZZ");
QTRY_COMPARE(searchTextEdit->text(), QString("ZZZ"));
- QTRY_VERIFY(clearButton->isVisible());
QTRY_VERIFY(m_dbWidget->isSearchActive());
QTRY_COMPARE(entryView->model()->rowCount(), 0);
// Press the search clear button
- clearButton->trigger();
+ searchTextEdit->clear();
QTRY_VERIFY(searchTextEdit->text().isEmpty());
QTRY_VERIFY(searchTextEdit->hasFocus());
- QTRY_VERIFY(!clearButton->isVisible());
// Escape clears searchedit and retains focus
QTest::keyClicks(searchTextEdit, "ZZZ");
QTest::keyClick(searchTextEdit, Qt::Key_Escape);