m_urlNavigator->setVisible(!enabled);
if (enabled) {
+ m_searchBox->clearText();
+
// Remember the most recent non-search URL as search path
// of the search-box, so that it can be restored
// when switching back to the URL navigator.
DolphinSearchBox::DolphinSearchBox(QWidget* parent) :
QWidget(parent),
m_startedSearching(false),
- m_nepomukActivated(false),
m_topLayout(0),
m_searchInput(0),
m_fileNameButton(0),
m_searchInput->selectAll();
}
+void DolphinSearchBox::clearText()
+{
+ m_searchInput->clear();
+}
+
bool DolphinSearchBox::event(QEvent* event)
{
if (event->type() == QEvent::Polish) {
void DolphinSearchBox::showEvent(QShowEvent* event)
{
if (!event->spontaneous()) {
-#ifdef HAVE_NEPOMUK
- m_nepomukActivated = (Nepomuk::ResourceManager::instance()->init() == 0);
-#endif
-
- m_searchInput->clear();
m_searchInput->setFocus();
m_startedSearching = false;
}
*/
void selectAll();
+ void clearText();
+
protected:
virtual bool event(QEvent* event);
virtual void showEvent(QShowEvent* event);
private:
bool m_startedSearching;
- bool m_nepomukActivated;
QVBoxLayout* m_topLayout;