aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/raweditor/RawEditorWindow.cpp
diff options
context:
space:
mode:
authorGravatar Fabio Bas2012-02-26 14:57:49 +0000
committerGravatar Fabio Bas2012-02-26 14:57:49 +0000
commitb2891fe17c395b885b4fac8634fa8cca1a45fbb6 (patch)
treee9fcfdebc14137188b3cf02376fe90145d52943d /src/modules/raweditor/RawEditorWindow.cpp
parentSome mixed changes, mostly related to osx development: (diff)
downloadKVIrc-b2891fe17c395b885b4fac8634fa8cca1a45fbb6.tar.gz
KVIrc-b2891fe17c395b885b4fac8634fa8cca1a45fbb6.tar.bz2
KVIrc-b2891fe17c395b885b4fac8634fa8cca1a45fbb6.zip
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
Diffstat (limited to 'src/modules/raweditor/RawEditorWindow.cpp')
-rw-r--r--src/modules/raweditor/RawEditorWindow.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/modules/raweditor/RawEditorWindow.cpp b/src/modules/raweditor/RawEditorWindow.cpp
index 6d3d67386..71755bfdf 100644
--- a/src/modules/raweditor/RawEditorWindow.cpp
+++ b/src/modules/raweditor/RawEditorWindow.cpp
@@ -40,7 +40,7 @@
#include "KviKvsEventManager.h"
#include "KviKvsEventHandler.h"
#include "KviTalVBox.h"
-#include "KviTalPopupMenu.h"
+#include "QMenu.h"
#include <QMessageBox>
#include <QSplitter>
@@ -91,7 +91,7 @@ RawEditorWidget::RawEditorWidget(QWidget * par)
m_pTreeWidget->setSelectionMode(QAbstractItemView::SingleSelection);
// m_pTreeWidget->setShowSortIndicator(true);
m_pTreeWidget->setRootIsDecorated(true);
- m_pContextPopup = new KviTalPopupMenu(this);
+ m_pContextPopup = new QMenu(this);
m_pTreeWidget->setContextMenuPolicy(Qt::CustomContextMenu);
connect(m_pTreeWidget,SIGNAL(currentItemChanged(QTreeWidgetItem *,QTreeWidgetItem *)),this,SLOT(currentItemChanged(QTreeWidgetItem *,QTreeWidgetItem *)));
@@ -151,32 +151,32 @@ void RawEditorWidget::customContextMenuRequested(const QPoint &pos)
if(it->parent())
{
if(!(((RawHandlerTreeWidgetItem *)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(addHandlerForCurrentRaw()));
}
}
- m_pContextPopup->insertSeparator();
- m_pContextPopup->insertItem(
+ m_pContextPopup->addSeparator();
+ m_pContextPopup->addAction(
*(g_pIconManager->getSmallIcon(KviIconManager::RawEvent)),
__tr2qs_ctx("&Add Raw Event...","editor"),
this,SLOT(addRaw()));