]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/panels/folders/treeviewcontextmenu.cpp
Fix mouse back/forward buttons
[dolphin.git] / src / panels / folders / treeviewcontextmenu.cpp
index f8cb0b4d65573f94a3b340cb0b2451412ac973b4..e6cef5441383fd56eee8c54723e8ec207df66586 100644 (file)
@@ -1,22 +1,9 @@
-/***************************************************************************
- *   Copyright (C) 2006-2010 by Peter Penz <peter.penz19@gmail.com>        *
- *   Copyright (C) 2006 by Cvetoslav Ludmiloff <ludmiloff@gmail.com>       *
- *                                                                         *
- *   This program is free software; you can redistribute it and/or modify  *
- *   it under the terms of the GNU General Public License as published by  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- *                                                                         *
- *   This program is distributed in the hope that it will be useful,       *
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
- *   GNU General Public License for more details.                          *
- *                                                                         *
- *   You should have received a copy of the GNU General Public License     *
- *   along with this program; if not, write to the                         *
- *   Free Software Foundation, Inc.,                                       *
- *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA            *
- ***************************************************************************/
+/*
+ * SPDX-FileCopyrightText: 2006-2010 Peter Penz <peter.penz19@gmail.com>
+ * SPDX-FileCopyrightText: 2006 Cvetoslav Ludmiloff <ludmiloff@gmail.com>
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
 
 #include "treeviewcontextmenu.h"
 
@@ -55,7 +42,7 @@ TreeViewContextMenu::~TreeViewContextMenu()
 {
 }
 
-void TreeViewContextMenu::open()
+void TreeViewContextMenu::open(const QPoint& pos)
 {
     QMenu* popup = new QMenu(m_parent);
 
@@ -161,7 +148,7 @@ void TreeViewContextMenu::open()
     }
 
     QPointer<QMenu> popupPtr = popup;
-    popup->exec(QCursor::pos());
+    popup->exec(pos);
     if (popupPtr.data()) {
         popupPtr.data()->deleteLater();
     }
@@ -173,7 +160,7 @@ void TreeViewContextMenu::populateMimeData(QMimeData* mimeData, bool cut)
     kdeUrls.append(m_fileItem.url());
     QList<QUrl> mostLocalUrls;
     bool dummy;
-    mostLocalUrls.append(m_fileItem.mostLocalUrl(dummy));
+    mostLocalUrls.append(m_fileItem.mostLocalUrl(&dummy));
     KIO::setClipboardDataCut(mimeData, cut);
     KUrlMimeData::setUrls(kdeUrls, mostLocalUrls, mimeData);
 }