[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kdiff3] src: Cleanup context menu event
From: Michael Reeves <null () kde ! org>
Date: 2018-09-27 22:41:48
Message-ID: E1g5eyi-0002Tl-1W () code ! kde ! org
[Download RAW message or body]
Git commit 9a721e5bfcc60c272efd276a7ecf74d768eda263 by Michael Reeves.
Committed on 27/09/2018 at 00:19.
Pushed by mreeves into branch 'master'.
Cleanup context menu event
*removed comment out Q_WIN_OS code. Never needed.
*add QT_NO_CONTEXTMENU check
M +4 -12 src/directorymergewindow.cpp
https://commits.kde.org/kdiff3/9a721e5bfcc60c272efd276a7ecf74d768eda263
diff --git a/src/directorymergewindow.cpp b/src/directorymergewindow.cpp
index c34131c..1d53a81 100644
--- a/src/directorymergewindow.cpp
+++ b/src/directorymergewindow.cpp
@@ -14,11 +14,7 @@
* (at your option) any later version. *
* *
***************************************************************************/
-#include <qglobal.h>
-
-#ifdef Q_OS_WIN
-#include <qt_windows.h>
-#endif
+#include <QGlobal>
#include "directorymergewindow.h"
#include "guiutils.h"
@@ -2264,6 +2260,7 @@ void DirectoryMergeWindow::mousePressEvent(QMouseEvent* e)
}
}
+#ifndef QT_NO_CONTEXTMENU
void DirectoryMergeWindow::contextMenuEvent(QContextMenuEvent* e)
{
QModelIndex mi = indexAt(e->pos());
@@ -2294,17 +2291,12 @@ void DirectoryMergeWindow::contextMenuEvent(QContextMenuEvent* e)
QMenu m(this);
m.addAction(d->m_pDirCompareExplicit);
m.addAction(d->m_pDirMergeExplicit);
-
- // TODO: Do we need the special Windows implementation?! -- Disabled for now.
-//#ifndef Q_OS_WIN
+
m.exec(p);
-// #else
-// void showShellContextMenu(const QString&, QPoint, QWidget*, QMenu*);
-// showShellContextMenu(itemPath, p, this, &m);
-// #endif
}
}
}
+#endif
QString DirectoryMergeWindow::Data::getFileName(const QModelIndex& mi)
{
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic