aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/logview/LogViewWindow.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/logview/LogViewWindow.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/logview/LogViewWindow.cpp')
-rw-r--r--src/modules/logview/LogViewWindow.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/modules/logview/LogViewWindow.cpp b/src/modules/logview/LogViewWindow.cpp
index 36dd8fcb4..c4c492e6a 100644
--- a/src/modules/logview/LogViewWindow.cpp
+++ b/src/modules/logview/LogViewWindow.cpp
@@ -37,7 +37,7 @@
#include "KviQString.h"
#include "KviApplication.h"
#include "KviFileUtils.h"
-#include "KviTalPopupMenu.h"
+#include "QMenu.h"
#include "KviControlCodes.h"
#include <QList>
@@ -186,11 +186,11 @@ LogViewWindow::LogViewWindow(KviModuleExtensionDescriptor * pDesc)
li.append(width()-110);
m_pSplitter->setSizes(li);
- m_pExportLogPopup = new KviTalPopupMenu(this,"exportlog");
- m_pExportLogPopup->insertItem(__tr2qs_ctx("plain text file","log"));
- m_pExportLogPopup->insertItem(__tr2qs_ctx("HTML archive","log"));
- //m_pExportLogPopup->insertItem(__tr2qs_ctx("XML file","log"));
- //m_pExportLogPopup->insertItem(__tr2qs_ctx("database file","log"));
+ m_pExportLogPopup = new QMenu("exportlog", this);
+ m_pExportLogPopup->addAction(__tr2qs_ctx("plain text file","log"));
+ m_pExportLogPopup->addAction(__tr2qs_ctx("HTML archive","log"));
+ //m_pExportLogPopup->addAction(__tr2qs_ctx("XML file","log"));
+ //m_pExportLogPopup->addAction(__tr2qs_ctx("database file","log"));
connect(m_pExportLogPopup,SIGNAL(activated(int)),this,SLOT(exportLog(int)));
m_pTimer = new QTimer(this);
@@ -433,14 +433,14 @@ void LogViewWindow::rightButtonClicked(QTreeWidgetItem * pItem, const QPoint &)
return;
m_pListView->setCurrentItem(pItem);
- KviTalPopupMenu * pPopup = new KviTalPopupMenu(this);
+ QMenu * pPopup = new QMenu(this);
if(((LogListViewItem *)pItem)->childCount())
{
- //pPopup->insertItem(*(g_pIconManager->getSmallIcon(KviIconManager::UserList)),__tr2qs_ctx("Export all log files to","log"),m_pExportLogPopup);
- pPopup->insertItem(*(g_pIconManager->getSmallIcon(KviIconManager::Quit)),__tr2qs_ctx("Remove all log files within this folder","log"),this,SLOT(deleteCurrent()));
+ //pPopup->addAction(*(g_pIconManager->getSmallIcon(KviIconManager::UserList)),__tr2qs_ctx("Export all log files to","log"),m_pExportLogPopup);
+ pPopup->addAction(*(g_pIconManager->getSmallIcon(KviIconManager::Quit)),__tr2qs_ctx("Remove all log files within this folder","log"),this,SLOT(deleteCurrent()));
} else {
- pPopup->insertItem(*(g_pIconManager->getSmallIcon(KviIconManager::UserList)),__tr2qs_ctx("Export log file to","log"),m_pExportLogPopup);
- pPopup->insertItem(*(g_pIconManager->getSmallIcon(KviIconManager::Quit)),__tr2qs_ctx("Remove log file","log"),this,SLOT(deleteCurrent()));
+ pPopup->addAction(*(g_pIconManager->getSmallIcon(KviIconManager::UserList)),__tr2qs_ctx("Export log file to","log"))->setMenu(m_pExportLogPopup);
+ pPopup->addAction(*(g_pIconManager->getSmallIcon(KviIconManager::Quit)),__tr2qs_ctx("Remove log file","log"),this,SLOT(deleteCurrent()));
}
pPopup->exec(QCursor::pos());