-#include <QMenuBar>
-#include <QMimeDatabase>
-
-DolphinContextMenu::DolphinContextMenu(DolphinMainWindow* parent,
- const QPoint& pos,
- const KFileItem& fileInfo,
- const QUrl& baseUrl,
- KFileItemActions *fileItemActions) :
- QMenu(parent),
- m_pos(pos),
- m_mainWindow(parent),
- m_fileInfo(fileInfo),
- m_baseUrl(baseUrl),
- m_baseFileItem(nullptr),
- m_selectedItems(),
- m_selectedItemsProperties(nullptr),
- m_context(NoContext),
- m_copyToMenu(parent),
- m_customActions(),
- m_command(None),
- m_removeAction(nullptr),
- m_fileItemActions(fileItemActions)
-{
- // The context menu either accesses the URLs of the selected items
- // or the items itself. To increase the performance both lists are cached.
- const DolphinView* view = m_mainWindow->activeViewContainer()->view();
- m_selectedItems = view->selectedItems();