aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules
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
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')
-rw-r--r--src/modules/popupeditor/popupeditor.cpp12
-rw-r--r--src/modules/popupeditor/popupeditor.h2
2 files changed, 7 insertions, 7 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();
diff --git a/src/modules/popupeditor/popupeditor.h b/src/modules/popupeditor/popupeditor.h
index 8854c3748..0aaeb68bd 100644
--- a/src/modules/popupeditor/popupeditor.h
+++ b/src/modules/popupeditor/popupeditor.h
@@ -124,7 +124,7 @@ protected slots:
void contextNewPrologue();
void contextNewEpilogue();
void selectionChanged();
- void itemPressed(QTreeWidgetItem * item, int column);
+ void customContextMenuRequested(const QPoint &pnt);
void testPopup();
void testModeMenuItemClicked(KviKvsPopupMenuItem * it);
};