KDE/kdevplatform/plugins/projectmanagerview
Andreas Pakulat
apaku at gmx.de
Tue Jun 10 21:27:27 UTC 2008
SVN commit 819304 by apaku:
Revert my last change, unfortunately its even worse if you use singleClick mode
in KDE. Because QAbstractItemView::clicked() signal gets emitted no matter
which button is pressed. So to handle this properly we need so implement one of
the event handlers and I don't have time right now to do that, thus bring back
context menu by reverting the last commit
CCMAIL:kdevelop-devel at kdevelop.org
M +3 -10 projecttreeview.cpp
M +1 -1 projecttreeview.h
--- trunk/KDE/kdevplatform/plugins/projectmanagerview/projecttreeview.cpp #819303:819304
@@ -35,7 +35,6 @@
#include <kmenu.h>
#include <kdebug.h>
#include <kurl.h>
-#include <kglobalsettings.h>
#include <klocale.h>
#include <interfaces/contextmenuextension.h>
@@ -61,13 +60,7 @@
setSelectionMode( QAbstractItemView::ExtendedSelection );
connect( this, SIGNAL( customContextMenuRequested( QPoint ) ), this, SLOT( popupContextMenu( QPoint ) ) );
- if( KGlobalSettings::singleClick() )
- {
- connect( this, SIGNAL( clicked( QModelIndex ) ), this, SLOT( slotActivated( QModelIndex ) ) );
- } else
- {
- connect( this, SIGNAL( doubleClicked( QModelIndex ) ), this, SLOT( slotActivated( QModelIndex ) ) );
- }
+ connect( this, SIGNAL( doubleClicked( QModelIndex ) ), this, SLOT( slotActivated( QModelIndex ) ) );
}
void ProjectTreeView::setSelectionModel( QItemSelectionModel* newmodel )
@@ -161,7 +154,7 @@
KDevelop::ProjectModel *ret;
QAbstractProxyModel *proxy = qobject_cast<QAbstractProxyModel*>(model());
ret=qobject_cast<KDevelop::ProjectModel*>( proxy->sourceModel() );
-
+
// ret=qobject_cast<KDevelop::ProjectModel*>( model() );
Q_ASSERT(ret);
return ret;
@@ -273,8 +266,8 @@
{
menu.addAction( act );
}
+
-
menu.addSeparator();
--- trunk/KDE/kdevplatform/plugins/projectmanagerview/projecttreeview.h #819303:819304
@@ -70,8 +70,8 @@
void openProjectConfig();
private:
+ KDevelop::IProject* m_ctxProject;
class ProjectTreeViewPrivate* const d;
- KDevelop::IProject* m_ctxProject;
};
#endif // KDEVPROJECTMANAGER_H
More information about the KDevelop-devel
mailing list