- // Create search label
- m_searchLabel = new QLabel(this);
-
- // Create search box
-#ifdef HAVE_BALOO
- m_queryParser.reset(new Baloo::NaturalFileQueryParser);
- m_searchInput = new Baloo::QueryBuilder(m_queryParser.data(), this);
- connect(m_searchInput, &Baloo::QueryBuilder::editingFinished,
- this, &DolphinSearchBox::slotReturnPressed);
- connect(m_searchInput, &Baloo::QueryBuilder::textChanged,
- this, &DolphinSearchBox::slotSearchTextChanged);
-#else
- m_searchInput = new KLineEdit(this);
- m_searchInput->installEventFilter(this);
- m_searchInput->setClearButtonShown(true);
- m_searchInput->setFont(KGlobalSettings::generalFont());
- connect(m_searchInput, &KLineEdit::returnPressed,
- this, &DolphinSearchBox::slotReturnPressed);
- connect(m_searchInput, &KLineEdit::textChanged,
- this, &DolphinSearchBox::slotSearchTextChanged);
-#endif
- setFocusProxy(m_searchInput);
-