DolphinPart::DolphinPart(QWidget* parentWidget, QObject* parent, const QVariantList& args)
: KParts::ReadOnlyPart(parent)
- ,m_openTerminalAction(0)
- ,m_removeAction(0)
+ ,m_openTerminalAction(nullptr)
+ ,m_removeAction(nullptr)
{
Q_UNUSED(args)
setComponentData(*createAboutData(), false);
QAction* selectItemsMatching = actionCollection()->addAction(QStringLiteral("select_items_matching"));
selectItemsMatching->setText(i18nc("@action:inmenu Edit", "Select Items Matching..."));
- actionCollection()->setDefaultShortcut(selectItemsMatching, Qt::CTRL | Qt::Key_S);
+ actionCollection()->setDefaultShortcut(selectItemsMatching, Qt::CTRL + Qt::Key_S);
connect(selectItemsMatching, &QAction::triggered, this, &DolphinPart::slotSelectItemsMatchingPattern);
QAction* unselectItemsMatching = actionCollection()->addAction(QStringLiteral("unselect_items_matching"));
QAction* invertSelection = actionCollection()->addAction(QStringLiteral("invert_selection"));
invertSelection->setText(i18nc("@action:inmenu Edit", "Invert Selection"));
- actionCollection()->setDefaultShortcut(invertSelection, Qt::CTRL | Qt::SHIFT | Qt::Key_A);
+ actionCollection()->setDefaultShortcut(invertSelection, Qt::CTRL + Qt::SHIFT + Qt::Key_A);
connect(invertSelection, &QAction::triggered, m_view, &DolphinView::invertSelection);
// View menu: all done by DolphinViewActionHandler
// Tools menu
m_findFileAction = actionCollection()->addAction(QStringLiteral("find_file"));
m_findFileAction->setText(i18nc("@action:inmenu Tools", "Find File..."));
- actionCollection()->setDefaultShortcut(m_findFileAction, Qt::CTRL | Qt::Key_F);
+ actionCollection()->setDefaultShortcut(m_findFileAction, Qt::CTRL + Qt::Key_F);
m_findFileAction->setIcon(QIcon::fromTheme(QStringLiteral("edit-find")));
connect(m_findFileAction, &QAction::triggered, this, &DolphinPart::slotFindFile);
+#ifndef Q_OS_WIN
if (KAuthorized::authorize(QStringLiteral("shell_access"))) {
m_openTerminalAction = actionCollection()->addAction(QStringLiteral("open_terminal"));
m_openTerminalAction->setIcon(QIcon::fromTheme(QStringLiteral("utilities-terminal")));
connect(m_openTerminalAction, &QAction::triggered, this, &DolphinPart::slotOpenTerminal);
actionCollection()->setDefaultShortcut(m_openTerminalAction, Qt::Key_F4);
}
+#endif
}
void DolphinPart::createGoAction(const char* name, const char* iconName,
QString prettyUrl = visibleUrl.toDisplayString(QUrl::PreferLocalFile);
emit setWindowCaption(prettyUrl);
emit m_extension->setLocationBarUrl(prettyUrl);
- emit started(0); // get the wheel to spin
+ emit started(nullptr); // get the wheel to spin
m_view->setNameFilter(m_nameFilter);
m_view->setUrl(url);
updatePasteAction();
if (showDeleteAction && showMoveToTrashAction) {
delete m_removeAction;
- m_removeAction = 0;
+ m_removeAction = nullptr;
editActions.append(actionCollection()->action(KStandardAction::name(KStandardAction::MoveToTrash)));
editActions.append(actionCollection()->action(KStandardAction::name(KStandardAction::DeleteFile)));
} else if (showDeleteAction && !showMoveToTrashAction) {