aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/popupeditor/popupeditor.cpp
diff options
context:
space:
mode:
authorGravatar Fabio Bas2009-11-17 09:27:07 +0000
committerGravatar Fabio Bas2009-11-17 09:27:07 +0000
commit294c79c72a9af1adaa446cd4b04d274320a22c64 (patch)
tree8a2f994338cb641632a485cea81c9c66af235dd6 /src/modules/popupeditor/popupeditor.cpp
parentquick fixes (diff)
downloadKVIrc-294c79c72a9af1adaa446cd4b04d274320a22c64.tar.gz
KVIrc-294c79c72a9af1adaa446cd4b04d274320a22c64.tar.bz2
KVIrc-294c79c72a9af1adaa446cd4b04d274320a22c64.zip
fix for popupeditor
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@3617 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src/modules/popupeditor/popupeditor.cpp')
-rw-r--r--src/modules/popupeditor/popupeditor.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/modules/popupeditor/popupeditor.cpp b/src/modules/popupeditor/popupeditor.cpp
index 04054086a..7a48627b6 100644
--- a/src/modules/popupeditor/popupeditor.cpp
+++ b/src/modules/popupeditor/popupeditor.cpp
@@ -215,10 +215,11 @@ KviSinglePopupEditor::KviSinglePopupEditor(QWidget * par)
m_pTreeWidget->setRootIsDecorated(true);
m_pTreeWidget->header()->setSortIndicatorShown(false);
m_pTreeWidget->setSortingEnabled(false);
-
+ m_pTreeWidget->setContextMenuPolicy(Qt::CustomContextMenu);
+
connect(m_pTreeWidget,SIGNAL(itemSelectionChanged()),this,SLOT(selectionChanged()));
- connect(m_pTreeWidget,SIGNAL(itemPressed(QTreeWidgetItem *, int)),
- this,SLOT(itemPressed(QTreeWidgetItem *, int)));
+ connect(m_pTreeWidget,SIGNAL(customContextMenuRequested(const QPoint &)),
+ this,SLOT(customContextMenuRequested(const QPoint &)));
m_pEditor = KviScriptEditor::createInstance(spl);
@@ -363,10 +364,9 @@ void KviSinglePopupEditor::testModeMenuItemClicked(KviKvsPopupMenuItem * it)
}
-void KviSinglePopupEditor::itemPressed(QTreeWidgetItem * it, int)
+void KviSinglePopupEditor::customContextMenuRequested(const QPoint &pos)
{
- if (QApplication::mouseButtons() != Qt::RightButton)
- return;
+ QTreeWidgetItem *it=m_pTreeWidget->itemAt(pos);
m_pContextPopup->clear();