X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/64cfc43b97e0216caf8b7b71dd5168eaedb3068c..8cea647ce11dbc8bb009f8a16adaaa94be3dcfb1:/src/dolphincontextmenu.cpp diff --git a/src/dolphincontextmenu.cpp b/src/dolphincontextmenu.cpp index 881ef34b4..af3878e1f 100644 --- a/src/dolphincontextmenu.cpp +++ b/src/dolphincontextmenu.cpp @@ -66,14 +66,14 @@ DolphinContextMenu::DolphinContextMenu(DolphinMainWindow* parent, m_mainWindow(parent), m_fileInfo(fileInfo), m_baseUrl(baseUrl), - m_baseFileItem(0), + m_baseFileItem(nullptr), m_selectedItems(), - m_selectedItemsProperties(0), + m_selectedItemsProperties(nullptr), m_context(NoContext), m_copyToMenu(parent), m_customActions(), m_command(None), - m_removeAction(0) + m_removeAction(nullptr) { // The context menu either accesses the URLs of the selected items // or the items itself. To increase the performance both lists are cached. @@ -84,7 +84,7 @@ DolphinContextMenu::DolphinContextMenu(DolphinMainWindow* parent, DolphinContextMenu::~DolphinContextMenu() { delete m_selectedItemsProperties; - m_selectedItemsProperties = 0; + m_selectedItemsProperties = nullptr; } void DolphinContextMenu::setCustomActions(const QList& actions) @@ -195,10 +195,10 @@ void DolphinContextMenu::openItemContextMenu() { Q_ASSERT(!m_fileInfo.isNull()); - QAction* openParentAction = 0; - QAction* openParentInNewWindowAction = 0; - QAction* openParentInNewTabAction = 0; - QAction* addToPlacesAction = 0; + QAction* openParentAction = nullptr; + QAction* openParentInNewWindowAction = nullptr; + QAction* openParentInNewTabAction = nullptr; + QAction* addToPlacesAction = nullptr; const KFileItemListProperties& selectedItemsProps = selectedItemsProperties(); if (m_selectedItems.count() == 1) { @@ -337,7 +337,7 @@ void DolphinContextMenu::openViewportContextMenu() addAction(m_mainWindow->actionCollection()->action(QStringLiteral("new_tab"))); // Insert 'Add to Places' entry if exactly one item is selected - QAction* addToPlacesAction = 0; + QAction* addToPlacesAction = nullptr; if (!placeExists(m_mainWindow->activeViewContainer()->url())) { addToPlacesAction = addAction(QIcon::fromTheme(QStringLiteral("bookmark-new")), i18nc("@action:inmenu Add current folder to places", "Add to Places")); @@ -408,7 +408,7 @@ void DolphinContextMenu::insertDefaultItemActions(const KFileItemListProperties& if (showDeleteAction && showMoveToTrashAction) { delete m_removeAction; - m_removeAction = 0; + m_removeAction = nullptr; addAction(m_mainWindow->actionCollection()->action(KStandardAction::name(KStandardAction::MoveToTrash))); addAction(m_mainWindow->actionCollection()->action(KStandardAction::name(KStandardAction::DeleteFile))); } else if (showDeleteAction && !showMoveToTrashAction) { @@ -445,7 +445,7 @@ bool DolphinContextMenu::placeExists(const QUrl& url) const QAction* DolphinContextMenu::createPasteAction() { - QAction* action = 0; + QAction* action = nullptr; const bool isDir = !m_fileInfo.isNull() && m_fileInfo.isDir(); if (isDir && (m_selectedItems.count() == 1)) { const QMimeData *mimeData = QApplication::clipboard()->mimeData();