┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/panels/folders
diff options
context:
space:
mode:
authorSerg Podtynnyi <[email protected]>2023-02-04 00:14:53 +0700
committerSerg Podtynnyi <[email protected]>2023-02-05 12:45:38 +0700
commit38c34eeca315c7be58e65d4d3fb72aaf7b866719 (patch)
tree886e53f20c9c43edc3eb7fe04789716a9bc98ebe /src/panels/folders
parentffff8af851e3a386c44438337779d0ce7ca98a61 (diff)
Add clang-format and format code as in Frameworks
Diffstat (limited to 'src/panels/folders')
-rw-r--r--src/panels/folders/foldersitemlistwidget.cpp5
-rw-r--r--src/panels/folders/foldersitemlistwidget.h4
-rw-r--r--src/panels/folders/folderspanel.cpp61
-rw-r--r--src/panels/folders/folderspanel.h31
-rw-r--r--src/panels/folders/treeviewcontextmenu.cpp51
-rw-r--r--src/panels/folders/treeviewcontextmenu.h9
6 files changed, 73 insertions, 88 deletions
diff --git a/src/panels/folders/foldersitemlistwidget.cpp b/src/panels/folders/foldersitemlistwidget.cpp
index 5d5fcbff6..1a3ba50ef 100644
--- a/src/panels/folders/foldersitemlistwidget.cpp
+++ b/src/panels/folders/foldersitemlistwidget.cpp
@@ -6,8 +6,8 @@
#include "foldersitemlistwidget.h"
-FoldersItemListWidget::FoldersItemListWidget(KItemListWidgetInformant* informant, QGraphicsItem* parent) :
- KFileItemListWidget(informant, parent)
+FoldersItemListWidget::FoldersItemListWidget(KItemListWidgetInformant *informant, QGraphicsItem *parent)
+ : KFileItemListWidget(informant, parent)
{
}
@@ -19,4 +19,3 @@ QPalette::ColorRole FoldersItemListWidget::normalTextColorRole() const
{
return QPalette::WindowText;
}
-
diff --git a/src/panels/folders/foldersitemlistwidget.h b/src/panels/folders/foldersitemlistwidget.h
index 5e437cd95..7c8eabf44 100644
--- a/src/panels/folders/foldersitemlistwidget.h
+++ b/src/panels/folders/foldersitemlistwidget.h
@@ -17,7 +17,7 @@ class FoldersItemListWidget : public KFileItemListWidget
Q_OBJECT
public:
- FoldersItemListWidget(KItemListWidgetInformant* informant, QGraphicsItem* parent);
+ FoldersItemListWidget(KItemListWidgetInformant *informant, QGraphicsItem *parent);
~FoldersItemListWidget() override;
protected:
@@ -25,5 +25,3 @@ protected:
};
#endif
-
-
diff --git a/src/panels/folders/folderspanel.cpp b/src/panels/folders/folderspanel.cpp
index d9cc6128c..914692000 100644
--- a/src/panels/folders/folderspanel.cpp
+++ b/src/panels/folders/folderspanel.cpp
@@ -19,12 +19,12 @@
#include "treeviewcontextmenu.h"
#include "views/draganddrophelper.h"
-#include <KJobWidgets>
-#include <KJobUiDelegate>
#include <KIO/CopyJob>
#include <KIO/DropJob>
#include <KIO/FileUndoManager>
#include <KIO/RenameFileDialog>
+#include <KJobUiDelegate>
+#include <KJobWidgets>
#include <QApplication>
#include <QBoxLayout>
@@ -33,11 +33,11 @@
#include <QPropertyAnimation>
#include <QTimer>
-FoldersPanel::FoldersPanel(QWidget* parent) :
- Panel(parent),
- m_updateCurrentItem(false),
- m_controller(nullptr),
- m_model(nullptr)
+FoldersPanel::FoldersPanel(QWidget *parent)
+ : Panel(parent)
+ , m_updateCurrentItem(false)
+ , m_controller(nullptr)
+ , m_model(nullptr)
{
setLayoutDirection(Qt::LeftToRight);
}
@@ -47,7 +47,7 @@ FoldersPanel::~FoldersPanel()
FoldersPanelSettings::self()->save();
if (m_controller) {
- KItemListView* view = m_controller->view();
+ KItemListView *view = m_controller->view();
m_controller->setView(nullptr);
delete view;
}
@@ -86,13 +86,13 @@ bool FoldersPanel::autoScrolling() const
return FoldersPanelSettings::autoScrolling();
}
-void FoldersPanel::rename(const KFileItem& item)
+void FoldersPanel::rename(const KFileItem &item)
{
if (GeneralSettings::renameInline()) {
const int index = m_model->index(item);
m_controller->view()->editRole(index, "text");
} else {
- KIO::RenameFileDialog* dialog = new KIO::RenameFileDialog(KFileItemList({item}), this);
+ KIO::RenameFileDialog *dialog = new KIO::RenameFileDialog(KFileItemList({item}), this);
dialog->open();
}
}
@@ -119,8 +119,7 @@ void FoldersPanel::reloadTree()
}
}
-
-void FoldersPanel::showEvent(QShowEvent* event)
+void FoldersPanel::showEvent(QShowEvent *event)
{
if (event->spontaneous()) {
Panel::showEvent(event);
@@ -131,7 +130,7 @@ void FoldersPanel::showEvent(QShowEvent* event)
// Postpone the creating of the controller to the first show event.
// This assures that no performance and memory overhead is given when the folders panel is not
// used at all and stays invisible.
- KFileItemListView* view = new KFileItemListView();
+ KFileItemListView *view = new KFileItemListView();
view->setScanDirectories(false);
view->setWidgetCreator(new KItemListWidgetCreator<FoldersItemListWidget>());
view->setSupportsItemExpanding(true);
@@ -140,8 +139,7 @@ void FoldersPanel::showEvent(QShowEvent* event)
// opening the folders panel.
view->setOpacity(0);
- connect(view, &KFileItemListView::roleEditingFinished,
- this, &FoldersPanel::slotRoleEditingFinished);
+ connect(view, &KFileItemListView::roleEditingFinished, this, &FoldersPanel::slotRoleEditingFinished);
m_model = new KFileItemModel(this);
m_model->setShowDirectoriesOnly(true);
@@ -163,10 +161,10 @@ void FoldersPanel::showEvent(QShowEvent* event)
connect(m_controller, &KItemListController::viewContextMenuRequested, this, &FoldersPanel::slotViewContextMenuRequested);
connect(m_controller, &KItemListController::itemDropEvent, this, &FoldersPanel::slotItemDropEvent);
- KItemListContainer* container = new KItemListContainer(m_controller, this);
+ KItemListContainer *container = new KItemListContainer(m_controller, this);
container->setEnabledFrame(false);
- QVBoxLayout* layout = new QVBoxLayout(this);
+ QVBoxLayout *layout = new QVBoxLayout(this);
layout->setContentsMargins(0, 0, 0, 0);
layout->addWidget(container);
}
@@ -175,7 +173,7 @@ void FoldersPanel::showEvent(QShowEvent* event)
Panel::showEvent(event);
}
-void FoldersPanel::keyPressEvent(QKeyEvent* event)
+void FoldersPanel::keyPressEvent(QKeyEvent *event)
{
const int key = event->key();
if ((key == Qt::Key_Enter) || (key == Qt::Key_Return)) {
@@ -219,7 +217,7 @@ void FoldersPanel::slotItemMiddleClicked(int index)
}
}
-void FoldersPanel::slotItemContextMenuRequested(int index, const QPointF& pos)
+void FoldersPanel::slotItemContextMenuRequested(int index, const QPointF &pos)
{
const KFileItem fileItem = m_model->fileItem(index);
@@ -230,7 +228,7 @@ void FoldersPanel::slotItemContextMenuRequested(int index, const QPointF& pos)
}
}
-void FoldersPanel::slotViewContextMenuRequested(const QPointF& pos)
+void FoldersPanel::slotViewContextMenuRequested(const QPointF &pos)
{
QPointer<TreeViewContextMenu> contextMenu = new TreeViewContextMenu(this, KFileItem());
contextMenu.data()->open(pos.toPoint());
@@ -239,7 +237,7 @@ void FoldersPanel::slotViewContextMenuRequested(const QPointF& pos)
}
}
-void FoldersPanel::slotItemDropEvent(int index, QGraphicsSceneDragDropEvent* event)
+void FoldersPanel::slotItemDropEvent(int index, QGraphicsSceneDragDropEvent *event)
{
if (index >= 0) {
KFileItem destItem = m_model->fileItem(index);
@@ -247,11 +245,7 @@ void FoldersPanel::slotItemDropEvent(int index, QGraphicsSceneDragDropEvent* eve
return;
}
- QDropEvent dropEvent(event->pos().toPoint(),
- event->possibleActions(),
- event->mimeData(),
- event->buttons(),
- event->modifiers());
+ QDropEvent dropEvent(event->pos().toPoint(), event->possibleActions(), event->mimeData(), event->buttons(), event->modifiers());
KIO::DropJob *job = DragAndDropHelper::dropUrls(destItem.mostLocalUrl(), &dropEvent, this);
if (job) {
@@ -264,7 +258,7 @@ void FoldersPanel::slotItemDropEvent(int index, QGraphicsSceneDragDropEvent* eve
}
}
-void FoldersPanel::slotRoleEditingFinished(int index, const QByteArray& role, const QVariant& value)
+void FoldersPanel::slotRoleEditingFinished(int index, const QByteArray &role, const QVariant &value)
{
if (role == "text") {
const KFileItem item = m_model->fileItem(index);
@@ -275,7 +269,7 @@ void FoldersPanel::slotRoleEditingFinished(int index, const QByteArray& role, co
QUrl newUrl = oldUrl.adjusted(QUrl::RemoveFilename);
newUrl.setPath(newUrl.path() + KIO::encodeFileName(newName));
- KIO::Job* job = KIO::moveAs(oldUrl, newUrl);
+ KIO::Job *job = KIO::moveAs(oldUrl, newUrl);
KJobWidgets::setWindow(job, this);
KIO::FileUndoManager::self()->recordJob(KIO::FileUndoManager::Rename, {oldUrl}, newUrl, job);
job->uiDelegate()->setAutoErrorHandlingEnabled(true);
@@ -306,7 +300,7 @@ void FoldersPanel::slotLoadingCompleted()
void FoldersPanel::startFadeInAnimation()
{
- QPropertyAnimation* anim = new QPropertyAnimation(m_controller->view(), "opacity", this);
+ QPropertyAnimation *anim = new QPropertyAnimation(m_controller->view(), "opacity", this);
anim->setStartValue(0);
anim->setEndValue(1);
anim->setEasingCurve(QEasingCurve::InOutQuad);
@@ -314,7 +308,7 @@ void FoldersPanel::startFadeInAnimation()
anim->setDuration(200);
}
-void FoldersPanel::loadTree(const QUrl& url, FoldersPanel::NavigationBehaviour navigationBehaviour)
+void FoldersPanel::loadTree(const QUrl &url, FoldersPanel::NavigationBehaviour navigationBehaviour)
{
Q_ASSERT(m_controller);
@@ -327,7 +321,7 @@ void FoldersPanel::loadTree(const QUrl& url, FoldersPanel::NavigationBehaviour n
baseUrl = url;
baseUrl.setPath(QStringLiteral("/"));
} else if (Dolphin::homeUrl().isParentOf(url) || (Dolphin::homeUrl() == url)) {
- if (FoldersPanelSettings::limitFoldersPanelToHome() ) {
+ if (FoldersPanelSettings::limitFoldersPanelToHome()) {
baseUrl = Dolphin::homeUrl();
} else {
// Use the root directory as base for local URLs (#150941)
@@ -348,7 +342,7 @@ void FoldersPanel::loadTree(const QUrl& url, FoldersPanel::NavigationBehaviour n
const int index = m_model->index(url);
if (jumpHome) {
- Q_EMIT folderActivated(baseUrl);
+ Q_EMIT folderActivated(baseUrl);
} else if (index >= 0) {
updateCurrentItem(index);
} else if (url == baseUrl) {
@@ -365,11 +359,10 @@ void FoldersPanel::loadTree(const QUrl& url, FoldersPanel::NavigationBehaviour n
void FoldersPanel::updateCurrentItem(int index)
{
- KItemListSelectionManager* selectionManager = m_controller->selectionManager();
+ KItemListSelectionManager *selectionManager = m_controller->selectionManager();
selectionManager->setCurrentItem(index);
selectionManager->clearSelection();
selectionManager->setSelected(index);
m_controller->view()->scrollToItem(index);
}
-
diff --git a/src/panels/folders/folderspanel.h b/src/panels/folders/folderspanel.h
index 3ce7870ff..1a482436a 100644
--- a/src/panels/folders/folderspanel.h
+++ b/src/panels/folders/folderspanel.h
@@ -27,7 +27,7 @@ class FoldersPanel : public Panel
Q_OBJECT
public:
- explicit FoldersPanel(QWidget* parent = nullptr);
+ explicit FoldersPanel(QWidget *parent = nullptr);
~FoldersPanel() override;
void setShowHiddenFiles(bool show);
@@ -38,31 +38,31 @@ public:
void setAutoScrolling(bool enable);
bool autoScrolling() const;
- void rename(const KFileItem& item);
+ void rename(const KFileItem &item);
Q_SIGNALS:
- void folderActivated(const QUrl& url);
+ void folderActivated(const QUrl &url);
void folderInNewTab(const QUrl &url);
void folderInNewActiveTab(const QUrl &url);
- void errorMessage(const QString& error);
+ void errorMessage(const QString &error);
protected:
/** @see Panel::urlChanged() */
bool urlChanged() override;
/** @see QWidget::showEvent() */
- void showEvent(QShowEvent* event) override;
+ void showEvent(QShowEvent *event) override;
/** @see QWidget::keyPressEvent() */
- void keyPressEvent(QKeyEvent* event) override;
+ void keyPressEvent(QKeyEvent *event) override;
private Q_SLOTS:
void slotItemActivated(int index);
void slotItemMiddleClicked(int index);
- void slotItemContextMenuRequested(int index, const QPointF& pos);
- void slotViewContextMenuRequested(const QPointF& pos);
- void slotItemDropEvent(int index, QGraphicsSceneDragDropEvent* event);
- void slotRoleEditingFinished(int index, const QByteArray& role, const QVariant& value);
+ void slotItemContextMenuRequested(int index, const QPointF &pos);
+ void slotViewContextMenuRequested(const QPointF &pos);
+ void slotItemDropEvent(int index, QGraphicsSceneDragDropEvent *event);
+ void slotRoleEditingFinished(int index, const QByteArray &role, const QVariant &value);
void slotLoadingCompleted();
@@ -72,14 +72,13 @@ private Q_SLOTS:
*/
void startFadeInAnimation();
-
private:
/**
* Indicate if it is allowed to leave current location.
*/
enum NavigationBehaviour {
- StayWhereYouAre, ///< Don't leave current location.
- AllowJumpHome ///< Go Home only when context menu option got checked.
+ StayWhereYouAre, ///< Don't leave current location.
+ AllowJumpHome ///< Go Home only when context menu option got checked.
};
/**
* Initializes the base URL of the tree and expands all
@@ -87,7 +86,7 @@ private:
* @param url URL of the leaf directory that should get expanded.
* @param navigationBehaviour Navigation behaviour \see NavigationBehaviour
*/
- void loadTree(const QUrl& url, NavigationBehaviour navigationBehaviour = StayWhereYouAre);
+ void loadTree(const QUrl &url, NavigationBehaviour navigationBehaviour = StayWhereYouAre);
void reloadTree();
@@ -99,8 +98,8 @@ private:
private:
bool m_updateCurrentItem;
- KItemListController* m_controller;
- KFileItemModel* m_model;
+ KItemListController *m_controller;
+ KFileItemModel *m_model;
};
#endif // FOLDERSPANEL_H
diff --git a/src/panels/folders/treeviewcontextmenu.cpp b/src/panels/folders/treeviewcontextmenu.cpp
index 893a494fb..f6cafcac5 100644
--- a/src/panels/folders/treeviewcontextmenu.cpp
+++ b/src/panels/folders/treeviewcontextmenu.cpp
@@ -36,11 +36,10 @@
#include <QMimeData>
#include <QPointer>
-TreeViewContextMenu::TreeViewContextMenu(FoldersPanel* parent,
- const KFileItem& fileInfo) :
- QObject(parent),
- m_parent(parent),
- m_fileItem(fileInfo)
+TreeViewContextMenu::TreeViewContextMenu(FoldersPanel *parent, const KFileItem &fileInfo)
+ : QObject(parent)
+ , m_parent(parent)
+ , m_fileItem(fileInfo)
{
}
@@ -48,25 +47,25 @@ TreeViewContextMenu::~TreeViewContextMenu()
{
}
-void TreeViewContextMenu::open(const QPoint& pos)
+void TreeViewContextMenu::open(const QPoint &pos)
{
- QMenu* popup = new QMenu(m_parent);
+ QMenu *popup = new QMenu(m_parent);
if (!m_fileItem.isNull()) {
KFileItemListProperties capabilities(KFileItemList() << m_fileItem);
// insert 'Cut', 'Copy' and 'Paste'
- QAction* cutAction = new QAction(QIcon::fromTheme(QStringLiteral("edit-cut")), i18nc("@action:inmenu", "Cut"), this);
+ QAction *cutAction = new QAction(QIcon::fromTheme(QStringLiteral("edit-cut")), i18nc("@action:inmenu", "Cut"), this);
cutAction->setEnabled(capabilities.supportsMoving());
connect(cutAction, &QAction::triggered, this, &TreeViewContextMenu::cut);
- QAction* copyAction = new QAction(QIcon::fromTheme(QStringLiteral("edit-copy")), i18nc("@action:inmenu", "Copy"), this);
+ QAction *copyAction = new QAction(QIcon::fromTheme(QStringLiteral("edit-copy")), i18nc("@action:inmenu", "Copy"), this);
connect(copyAction, &QAction::triggered, this, &TreeViewContextMenu::copy);
const QMimeData *mimeData = QApplication::clipboard()->mimeData();
bool canPaste;
const QString text = KIO::pasteActionText(mimeData, &canPaste, m_fileItem);
- QAction* pasteAction = new QAction(QIcon::fromTheme(QStringLiteral("edit-paste")), text, this);
+ QAction *pasteAction = new QAction(QIcon::fromTheme(QStringLiteral("edit-paste")), text, this);
connect(pasteAction, &QAction::triggered, this, &TreeViewContextMenu::paste);
pasteAction->setEnabled(canPaste);
@@ -76,7 +75,7 @@ void TreeViewContextMenu::open(const QPoint& pos)
popup->addSeparator();
// insert 'Rename'
- QAction* renameAction = new QAction(i18nc("@action:inmenu", "Rename..."), this);
+ QAction *renameAction = new QAction(i18nc("@action:inmenu", "Rename..."), this);
renameAction->setEnabled(capabilities.supportsMoving());
renameAction->setIcon(QIcon::fromTheme(QStringLiteral("edit-rename")));
connect(renameAction, &QAction::triggered, this, &TreeViewContextMenu::rename);
@@ -89,8 +88,7 @@ void TreeViewContextMenu::open(const QPoint& pos)
const QUrl url = m_fileItem.url();
if (url.isLocalFile()) {
- QAction* moveToTrashAction = new QAction(QIcon::fromTheme(QStringLiteral("user-trash")),
- i18nc("@action:inmenu", "Move to Trash"), this);
+ QAction *moveToTrashAction = new QAction(QIcon::fromTheme(QStringLiteral("user-trash")), i18nc("@action:inmenu", "Move to Trash"), this);
const bool enableMoveToTrash = capabilities.isLocal() && capabilities.supportsMoving();
moveToTrashAction->setEnabled(enableMoveToTrash);
connect(moveToTrashAction, &QAction::triggered, this, &TreeViewContextMenu::moveToTrash);
@@ -100,7 +98,7 @@ void TreeViewContextMenu::open(const QPoint& pos)
}
if (showDeleteCommand) {
- QAction* deleteAction = new QAction(QIcon::fromTheme(QStringLiteral("edit-delete")), i18nc("@action:inmenu", "Delete"), this);
+ QAction *deleteAction = new QAction(QIcon::fromTheme(QStringLiteral("edit-delete")), i18nc("@action:inmenu", "Delete"), this);
deleteAction->setEnabled(capabilities.supportsDeleting());
connect(deleteAction, &QAction::triggered, this, &TreeViewContextMenu::deleteItem);
popup->addAction(deleteAction);
@@ -110,7 +108,7 @@ void TreeViewContextMenu::open(const QPoint& pos)
}
// insert 'Show Hidden Files'
- QAction* showHiddenFilesAction = new QAction(i18nc("@action:inmenu", "Show Hidden Files"), this);
+ QAction *showHiddenFilesAction = new QAction(i18nc("@action:inmenu", "Show Hidden Files"), this);
showHiddenFilesAction->setCheckable(true);
showHiddenFilesAction->setChecked(m_parent->showHiddenFiles());
popup->addAction(showHiddenFilesAction);
@@ -120,7 +118,7 @@ void TreeViewContextMenu::open(const QPoint& pos)
// insert 'Limit to Home Directory'
const QUrl url = m_fileItem.url();
const bool enableLimitToHomeDirectory = url.isLocalFile();
- QAction* limitFoldersPanelToHomeAction = new QAction(i18nc("@action:inmenu", "Limit to Home Directory"), this);
+ QAction *limitFoldersPanelToHomeAction = new QAction(i18nc("@action:inmenu", "Limit to Home Directory"), this);
limitFoldersPanelToHomeAction->setCheckable(true);
limitFoldersPanelToHomeAction->setEnabled(enableLimitToHomeDirectory);
limitFoldersPanelToHomeAction->setChecked(m_parent->limitFoldersPanelToHome());
@@ -129,7 +127,7 @@ void TreeViewContextMenu::open(const QPoint& pos)
}
// insert 'Automatic Scrolling'
- QAction* autoScrollingAction = new QAction(i18nc("@action:inmenu", "Automatic Scrolling"), this);
+ QAction *autoScrollingAction = new QAction(i18nc("@action:inmenu", "Automatic Scrolling"), this);
autoScrollingAction->setCheckable(true);
autoScrollingAction->setChecked(m_parent->autoScrolling());
// TODO: Temporary disabled. Horizontal autoscrolling will be implemented later either
@@ -139,16 +137,16 @@ void TreeViewContextMenu::open(const QPoint& pos)
if (!m_fileItem.isNull()) {
// insert 'Properties' entry
- QAction* propertiesAction = new QAction(i18nc("@action:inmenu", "Properties"), this);
+ QAction *propertiesAction = new QAction(i18nc("@action:inmenu", "Properties"), this);
propertiesAction->setIcon(QIcon::fromTheme(QStringLiteral("document-properties")));
connect(propertiesAction, &QAction::triggered, this, &TreeViewContextMenu::showProperties);
popup->addAction(propertiesAction);
}
- const QList<QAction*> customActions = m_parent->customContextMenuActions();
+ const QList<QAction *> customActions = m_parent->customContextMenuActions();
if (!customActions.isEmpty()) {
popup->addSeparator();
- for (QAction* action : customActions) {
+ for (QAction *action : customActions) {
popup->addAction(action);
}
}
@@ -160,7 +158,7 @@ void TreeViewContextMenu::open(const QPoint& pos)
}
}
-void TreeViewContextMenu::populateMimeData(QMimeData* mimeData, bool cut)
+void TreeViewContextMenu::populateMimeData(QMimeData *mimeData, bool cut)
{
QList<QUrl> kdeUrls;
kdeUrls.append(m_fileItem.url());
@@ -174,14 +172,14 @@ void TreeViewContextMenu::populateMimeData(QMimeData* mimeData, bool cut)
void TreeViewContextMenu::cut()
{
- QMimeData* mimeData = new QMimeData();
+ QMimeData *mimeData = new QMimeData();
populateMimeData(mimeData, true);
QApplication::clipboard()->setMimeData(mimeData);
}
void TreeViewContextMenu::copy()
{
- QMimeData* mimeData = new QMimeData();
+ QMimeData *mimeData = new QMimeData();
populateMimeData(mimeData, false);
QApplication::clipboard()->setMimeData(mimeData);
}
@@ -208,7 +206,7 @@ void TreeViewContextMenu::moveToTrash()
KIO::JobUiDelegate uiDelegate;
uiDelegate.setWindow(m_parent);
if (uiDelegate.askDeleteConfirmation(list, KIO::JobUiDelegate::Trash, KIO::JobUiDelegate::DefaultConfirmation)) {
- KIO::Job* job = KIO::trash(list);
+ KIO::Job *job = KIO::trash(list);
KIO::FileUndoManager::self()->recordJob(KIO::FileUndoManager::Trash, list, QUrl(QStringLiteral("trash:/")), job);
KJobWidgets::setWindow(job, m_parent);
job->uiDelegate()->setAutoErrorHandlingEnabled(true);
@@ -227,7 +225,7 @@ void TreeViewContextMenu::deleteItem()
KIO::JobUiDelegate uiDelegate;
uiDelegate.setWindow(m_parent);
if (uiDelegate.askDeleteConfirmation(list, KIO::JobUiDelegate::Delete, KIO::JobUiDelegate::DefaultConfirmation)) {
- KIO::Job* job = KIO::del(list);
+ KIO::Job *job = KIO::del(list);
KJobWidgets::setWindow(job, m_parent);
job->uiDelegate()->setAutoErrorHandlingEnabled(true);
}
@@ -236,7 +234,7 @@ void TreeViewContextMenu::deleteItem()
void TreeViewContextMenu::showProperties()
{
- KPropertiesDialog* dialog = new KPropertiesDialog(m_fileItem.url(), m_parent);
+ KPropertiesDialog *dialog = new KPropertiesDialog(m_fileItem.url(), m_parent);
dialog->setAttribute(Qt::WA_DeleteOnClose);
dialog->show();
}
@@ -255,4 +253,3 @@ void TreeViewContextMenu::setAutoScrolling(bool enable)
{
m_parent->setAutoScrolling(enable);
}
-
diff --git a/src/panels/folders/treeviewcontextmenu.h b/src/panels/folders/treeviewcontextmenu.h
index 35f44e90b..2e9228b00 100644
--- a/src/panels/folders/treeviewcontextmenu.h
+++ b/src/panels/folders/treeviewcontextmenu.h
@@ -30,13 +30,12 @@ public:
* is applied. If 0 is passed, the context menu
* is above the viewport.
*/
- TreeViewContextMenu(FoldersPanel* parent,
- const KFileItem& fileInfo);
+ TreeViewContextMenu(FoldersPanel *parent, const KFileItem &fileInfo);
~TreeViewContextMenu() override;
/** Opens the context menu modal. */
- void open(const QPoint& pos);
+ void open(const QPoint &pos);
private Q_SLOTS:
/** Cuts the item m_fileItem. */
@@ -79,10 +78,10 @@ private Q_SLOTS:
void setAutoScrolling(bool enable);
private:
- void populateMimeData(QMimeData* mimeData, bool cut);
+ void populateMimeData(QMimeData *mimeData, bool cut);
private:
- FoldersPanel* m_parent;
+ FoldersPanel *m_parent;
KFileItem m_fileItem;
};