From b2891fe17c395b885b4fac8634fa8cca1a45fbb6 Mon Sep 17 00:00:00 2001 From: Fabio Bas Date: Sun, 26 Feb 2012 14:57:49 +0000 Subject: Dropped the KviTalPopupMenu layer, ported the involved code to QAction. This fixes most of the random crashes on osx, and is the base for a next change in the menubar. Addiotional fix: "disconnect" menu entry was broken since the 3.x era git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@6072 17fca916-40b9-46aa-a4ea-0a15b648b75c --- src/modules/eventeditor/EventEditorWindow.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/modules/eventeditor/EventEditorWindow.cpp') diff --git a/src/modules/eventeditor/EventEditorWindow.cpp b/src/modules/eventeditor/EventEditorWindow.cpp index 7991f5c80..3ae064075 100644 --- a/src/modules/eventeditor/EventEditorWindow.cpp +++ b/src/modules/eventeditor/EventEditorWindow.cpp @@ -40,7 +40,7 @@ #include "KviFileDialog.h" #include "KviKvsEventManager.h" #include "KviTalVBox.h" -#include "KviTalPopupMenu.h" +#include "QMenu.h" #include #include @@ -155,7 +155,7 @@ void EventEditor::oneTimeSetup() connect(m_pTreeWidget,SIGNAL(rightButtonPressed(QTreeWidgetItem *,QPoint)), this,SLOT(itemPressed(QTreeWidgetItem *,QPoint))); connect(KviKvsEventManager::instance(),SIGNAL(eventHandlerDisabled(const QString &)),this,SLOT(eventHandlerDisabled(const QString &))); - m_pContextPopup = new KviTalPopupMenu(this); + m_pContextPopup = new QMenu(this); m_pTreeWidget->sortItems(0,Qt::AscendingOrder); } void EventEditor::eventHandlerDisabled(const QString &szHandler) @@ -212,24 +212,24 @@ void EventEditor::itemPressed(QTreeWidgetItem *it,const QPoint &pnt) { QString tmp; if(!(((EventEditorHandlerTreeWidgetItem *)it)->m_bEnabled)) - m_pContextPopup->insertItem( + m_pContextPopup->addAction( *(g_pIconManager->getSmallIcon(KviIconManager::Handler)), __tr2qs_ctx("&Enable Handler","editor"),this,SLOT(toggleCurrentHandlerEnabled())); else - m_pContextPopup->insertItem( + m_pContextPopup->addAction( *(g_pIconManager->getSmallIcon(KviIconManager::HandlerDisabled)), __tr2qs_ctx("&Disable Handler","editor"),this,SLOT(toggleCurrentHandlerEnabled())); - m_pContextPopup->insertItem( + m_pContextPopup->addAction( *(g_pIconManager->getSmallIcon(KviIconManager::Quit)), __tr2qs_ctx("Re&move Handler","editor"), this,SLOT(removeCurrentHandler())); - m_pContextPopup->insertItem( + m_pContextPopup->addAction( *(g_pIconManager->getSmallIcon(KviIconManager::Folder)), __tr2qs_ctx("&Export Handler To...","editor"), this,SLOT(exportCurrentHandler())); } else { - m_pContextPopup->insertItem( + m_pContextPopup->addAction( *(g_pIconManager->getSmallIcon(KviIconManager::Handler)), __tr2qs_ctx("&New Handler","editor"), this,SLOT(addHandlerForCurrentEvent())); -- cgit v1.3.1-10-gc9f91