logic: fixed Searchbutton not searching and wrong destruction order in ComponentManager
This commit is contained in:
@@ -28,6 +28,12 @@ void QtQueryElement::onChecked(bool)
|
||||
}
|
||||
|
||||
|
||||
void QtSmartSearchBox::search()
|
||||
{
|
||||
editTextToElement();
|
||||
MessageSearch(utility::join(m_tokens, "") + text().toStdString()).dispatch();
|
||||
}
|
||||
|
||||
QtSmartSearchBox::QtSmartSearchBox(QWidget* parent)
|
||||
: QLineEdit(parent)
|
||||
, m_allowTextChange(false)
|
||||
@@ -82,12 +88,6 @@ void QtSmartSearchBox::setFocus()
|
||||
layoutElements();
|
||||
}
|
||||
|
||||
void QtSmartSearchBox::search()
|
||||
{
|
||||
editTextToElement();
|
||||
MessageSearch(utility::join(m_tokens, "") + text().toStdString()).dispatch();
|
||||
}
|
||||
|
||||
bool QtSmartSearchBox::event(QEvent *event)
|
||||
{
|
||||
if (event->type() == QEvent::KeyPress)
|
||||
|
||||
@@ -31,6 +31,9 @@ class QtSmartSearchBox
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public slots:
|
||||
void search();
|
||||
|
||||
public:
|
||||
QtSmartSearchBox(QWidget* parent);
|
||||
virtual ~QtSmartSearchBox();
|
||||
@@ -38,7 +41,6 @@ public:
|
||||
void setAutocompletionList(const std::vector<SearchMatch>& autocompletionList);
|
||||
void setQuery(const std::string& text);
|
||||
void setFocus();
|
||||
void search();
|
||||
|
||||
protected:
|
||||
virtual bool event(QEvent *event);
|
||||
|
||||
Reference in New Issue
Block a user