diff --git a/src/panels/filter/filterpanel.cpp b/src/panels/filter/filterpanel.cpp index c1a0755e25..b6c683dd08 100644 --- a/src/panels/filter/filterpanel.cpp +++ b/src/panels/filter/filterpanel.cpp @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -44,6 +45,7 @@ FilterPanel::FilterPanel(QWidget* parent) : Panel(parent), m_initialized(false), + m_nepomukEnabled(false), m_lastSetUrlStatJob(0), m_removeFolderRestrictionButton(0), m_facetWidget(0), @@ -57,7 +59,7 @@ FilterPanel::~FilterPanel() bool FilterPanel::urlChanged() { - if (isVisible()) { + if (isVisible() && m_nepomukEnabled) { setQuery(Nepomuk::Query::Query()); delete m_lastSetUrlStatJob; @@ -129,6 +131,9 @@ void FilterPanel::showEvent(QShowEvent* event) connect(m_facetWidget, SIGNAL(queryTermChanged(Nepomuk::Query::Term)), this, SLOT(slotQueryTermChanged(Nepomuk::Query::Term))); + m_nepomukEnabled = (Nepomuk::ResourceManager::instance()->init() == 0); + m_facetWidget->setEnabled(m_nepomukEnabled); + m_initialized = true; } diff --git a/src/panels/filter/filterpanel.h b/src/panels/filter/filterpanel.h index 14fcee8477..aaf51046cd 100644 --- a/src/panels/filter/filterpanel.h +++ b/src/panels/filter/filterpanel.h @@ -63,6 +63,7 @@ private: private: bool m_initialized; + bool m_nepomukEnabled; KJob* m_lastSetUrlStatJob; QPushButton* m_removeFolderRestrictionButton;