mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-28 08:49:42 -05:00
Use line edit widget for search edit.
This commit is contained in:
parent
e5e7e5e406
commit
9faf550fa1
@ -122,7 +122,6 @@ DatabaseWidget::DatabaseWidget(Database* db, QWidget* parent)
|
||||
connect(m_searchUi->searchEdit, SIGNAL(textChanged(QString)), this, SLOT(startSearchTimer()));
|
||||
connect(m_searchTimer, SIGNAL(timeout()), this, SLOT(search()));
|
||||
connect(closeAction, SIGNAL(triggered()), this, SLOT(closeSearch()));
|
||||
connect(m_searchUi->clearSearchButton, SIGNAL(clicked()), this, SLOT(clearSearchEdit()));
|
||||
|
||||
setCurrentIndex(0);
|
||||
}
|
||||
@ -384,12 +383,6 @@ void DatabaseWidget::showSearch()
|
||||
m_searchUi->searchEdit->setFocus();
|
||||
}
|
||||
|
||||
void DatabaseWidget::clearSearchEdit()
|
||||
{
|
||||
m_searchUi->searchEdit->clear();
|
||||
m_searchUi->searchEdit->setFocus();
|
||||
}
|
||||
|
||||
void DatabaseWidget::search()
|
||||
{
|
||||
Group* searchGroup = m_db->rootGroup();
|
||||
|
@ -83,7 +83,6 @@ private Q_SLOTS:
|
||||
void updateMasterKey(bool accepted);
|
||||
void emitCurrentModeChanged();
|
||||
void clearLastGroup(Group* group);
|
||||
void clearSearchEdit();
|
||||
void search();
|
||||
void startSearchTimer();
|
||||
void showSearch();
|
||||
|
@ -32,17 +32,17 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="searchEdit"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="clearSearchButton">
|
||||
<property name="text">
|
||||
<string>Clear</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="LineEdit" name="searchEdit"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>LineEdit</class>
|
||||
<extends>QLineEdit</extends>
|
||||
<header>gui/LineEdit.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include <QtGui/QLineEdit>
|
||||
#include <QtGui/QPushButton>
|
||||
#include <QtGui/QToolBar>
|
||||
#include <QtGui/QToolButton>
|
||||
|
||||
#include "config-keepassx-tests.h"
|
||||
#include "tests.h"
|
||||
@ -166,7 +167,7 @@ void TestGui::testSearch()
|
||||
|
||||
EntryView* entryView = dbWidget->findChild<EntryView*>("entryView");
|
||||
QLineEdit* searchEdit = dbWidget->findChild<QLineEdit*>("searchEdit");
|
||||
QPushButton* clearSearch = dbWidget->findChild<QPushButton*>("clearSearchButton");
|
||||
QToolButton* clearSearch = dbWidget->findChild<QToolButton*>("clearButton");
|
||||
|
||||
QTest::keyClicks(searchEdit, "ZZZ");
|
||||
QTest::qWait(120);
|
||||
|
Loading…
Reference in New Issue
Block a user