┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/panels
diff options
context:
space:
mode:
Diffstat (limited to 'src/panels')
-rw-r--r--src/panels/panel.cpp5
-rw-r--r--src/panels/panel.h5
-rw-r--r--src/panels/places/placesitemmodel.cpp4
-rw-r--r--src/panels/places/placespanel.cpp13
-rw-r--r--src/panels/places/placespanel.h3
5 files changed, 28 insertions, 2 deletions
diff --git a/src/panels/panel.cpp b/src/panels/panel.cpp
index c2681ecfb..14b7c0230 100644
--- a/src/panels/panel.cpp
+++ b/src/panels/panel.cpp
@@ -71,4 +71,9 @@ void Panel::setUrl(const KUrl& url)
}
}
+void Panel::readSettings()
+{
+
+}
+
#include "panel.moc"
diff --git a/src/panels/panel.h b/src/panels/panel.h
index 064e1f362..a0b25d6cc 100644
--- a/src/panels/panel.h
+++ b/src/panels/panel.h
@@ -60,6 +60,11 @@ public slots:
*/
void setUrl(const KUrl& url);
+ /**
+ * Refreshes the view to get synchronized with the settings.
+ */
+ virtual void readSettings();
+
protected:
/**
* Must be implemented by derived classes and is invoked when
diff --git a/src/panels/places/placesitemmodel.cpp b/src/panels/places/placesitemmodel.cpp
index 706092bc7..4770c6b10 100644
--- a/src/panels/places/placesitemmodel.cpp
+++ b/src/panels/places/placesitemmodel.cpp
@@ -54,7 +54,7 @@
#include <Nepomuk/ResourceManager>
#include <Nepomuk/Query/ComparisonTerm>
#include <Nepomuk/Query/LiteralTerm>
- #include <Nepomuk/Query/Query>
+ #include <Nepomuk/Query/FileQuery>
#include <Nepomuk/Query/ResourceTypeTerm>
#include <Nepomuk/Vocabulary/NFO>
#include <Nepomuk/Vocabulary/NIE>
@@ -1172,7 +1172,7 @@ KUrl PlacesItemModel::createSearchUrl(const KUrl& url)
#ifdef HAVE_NEPOMUK
KUrl PlacesItemModel::searchUrlForTerm(const Nepomuk::Query::Term& term)
{
- const Nepomuk::Query::Query query(term);
+ const Nepomuk::Query::FileQuery query(term);
return query.toSearchUrl();
}
#endif
diff --git a/src/panels/places/placespanel.cpp b/src/panels/places/placespanel.cpp
index 4b28c8510..e483f9b83 100644
--- a/src/panels/places/placespanel.cpp
+++ b/src/panels/places/placespanel.cpp
@@ -23,6 +23,8 @@
#include "placespanel.h"
+#include "dolphin_generalsettings.h"
+
#include <KDebug>
#include <KDirNotify>
#include <KIcon>
@@ -78,6 +80,14 @@ bool PlacesPanel::urlChanged()
return true;
}
+void PlacesPanel::readSettings()
+{
+ if (m_controller) {
+ const int delay = GeneralSettings::autoExpandFolders() ? 750 : -1;
+ m_controller->setAutoActivationDelay(delay);
+ }
+}
+
void PlacesPanel::showEvent(QShowEvent* event)
{
if (event->spontaneous()) {
@@ -101,6 +111,9 @@ void PlacesPanel::showEvent(QShowEvent* event)
m_controller = new KItemListController(m_model, view, this);
m_controller->setSelectionBehavior(KItemListController::SingleSelection);
m_controller->setSingleClickActivation(true);
+
+ readSettings();
+
connect(m_controller, SIGNAL(itemActivated(int)), this, SLOT(slotItemActivated(int)));
connect(m_controller, SIGNAL(itemMiddleClicked(int)), this, SLOT(slotItemMiddleClicked(int)));
connect(m_controller, SIGNAL(itemContextMenuRequested(int,QPointF)), this, SLOT(slotItemContextMenuRequested(int,QPointF)));
diff --git a/src/panels/places/placespanel.h b/src/panels/places/placespanel.h
index 989a0916b..7951cdd9c 100644
--- a/src/panels/places/placespanel.h
+++ b/src/panels/places/placespanel.h
@@ -50,6 +50,9 @@ protected:
virtual bool urlChanged();
virtual void showEvent(QShowEvent* event);
+public slots:
+ virtual void readSettings();
+
private slots:
void slotItemActivated(int index);
void slotItemMiddleClicked(int index);