make return key press in search input trigger a new search

search
Marc Zinnschlag 10 years ago
parent 8e9365741f
commit 13a4fb3fdc

@ -74,7 +74,9 @@ CSVTools::SearchBox::SearchBox (QWidget *parent)
this, SLOT (textChanged (const QString&))); this, SLOT (textChanged (const QString&)));
connect (&mSearch, SIGNAL (clicked (bool)), this, SLOT (startSearch (bool))); connect (&mSearch, SIGNAL (clicked (bool)), this, SLOT (startSearch (bool)));
connect (&mText, SIGNAL (returnPressed()), this, SLOT (startSearch()));
modeSelected (0); modeSelected (0);
updateSearchButton(); updateSearchButton();
@ -141,5 +143,6 @@ void CSVTools::SearchBox::textChanged (const QString& text)
void CSVTools::SearchBox::startSearch (bool checked) void CSVTools::SearchBox::startSearch (bool checked)
{ {
emit startSearch (getSearch()); if (mSearch.isEnabled())
emit startSearch (getSearch());
} }

@ -46,7 +46,7 @@ namespace CSVTools
void textChanged (const QString& text); void textChanged (const QString& text);
void startSearch (bool checked); void startSearch (bool checked = true);
signals: signals:

Loading…
Cancel
Save