diff --git a/widgets/itemview.cpp b/widgets/itemview.cpp index 0057d725a..79f8ea4b5 100644 --- a/widgets/itemview.cpp +++ b/widgets/itemview.cpp @@ -32,6 +32,9 @@ #include #include #include +#ifdef ENABLE_KDE_SUPPORT +#include +#endif static QPainterPath buildPath(const QRectF &r, double radius) { @@ -327,7 +330,11 @@ void ItemView::init(QAction *a1, QAction *a2) connect(listSearch, SIGNAL(returnPressed()), this, SIGNAL(searchItems())); connect(listSearch, SIGNAL(textChanged(const QString)), this, SIGNAL(searchItems())); connect(treeView, SIGNAL(itemsSelected(bool)), this, SIGNAL(itemsSelected(bool))); -// connect(treeView, SIGNAL(activated(const QModelIndex &)), this, SLOT(itemActivated(const QModelIndex &))); +#ifdef ENABLE_KDE_SUPPORT + if (KGlobalSettings::singleClick()) { + connect(treeView, SIGNAL(activated(const QModelIndex &)), this, SLOT(itemActivated(const QModelIndex &))); + } +#endif connect(treeView, SIGNAL(doubleClicked(const QModelIndex &)), this, SIGNAL(doubleClicked(const QModelIndex &))); connect(treeView, SIGNAL(clicked(const QModelIndex &)), this, SLOT(itemClicked(const QModelIndex &))); connect(listView, SIGNAL(itemsSelected(bool)), this, SIGNAL(itemsSelected(bool)));