diff options
| author | Serg Podtynnyi <[email protected]> | 2023-02-04 00:14:53 +0700 |
|---|---|---|
| committer | Serg Podtynnyi <[email protected]> | 2023-02-05 12:45:38 +0700 |
| commit | 38c34eeca315c7be58e65d4d3fb72aaf7b866719 (patch) | |
| tree | 886e53f20c9c43edc3eb7fe04789716a9bc98ebe /src/panels/places | |
| parent | ffff8af851e3a386c44438337779d0ce7ca98a61 (diff) | |
Add clang-format and format code as in Frameworks
Diffstat (limited to 'src/panels/places')
| -rw-r--r-- | src/panels/places/placespanel.cpp | 21 | ||||
| -rw-r--r-- | src/panels/places/placespanel.h | 20 |
2 files changed, 20 insertions, 21 deletions
diff --git a/src/panels/places/placespanel.cpp b/src/panels/places/placespanel.cpp index de7137747..6467f9c23 100644 --- a/src/panels/places/placespanel.cpp +++ b/src/panels/places/placespanel.cpp @@ -11,12 +11,12 @@ #include "placespanel.h" -#include "dolphinplacesmodelsingleton.h" #include "dolphin_generalsettings.h" #include "dolphin_placespanelsettings.h" +#include "dolphinplacesmodelsingleton.h" #include "global.h" -#include "views/draganddrophelper.h" #include "settings/dolphinsettingsdialog.h" +#include "views/draganddrophelper.h" #include <KFilePlacesModel> #include <KIO/DropJob> @@ -31,12 +31,11 @@ #include <Solid/StorageAccess> -PlacesPanel::PlacesPanel(QWidget* parent) +PlacesPanel::PlacesPanel(QWidget *parent) : KFilePlacesView(parent) { setDropOnPlaceEnabled(true); - connect(this, &PlacesPanel::urlsDropped, - this, &PlacesPanel::slotUrlsDropped); + connect(this, &PlacesPanel::urlsDropped, this, &PlacesPanel::slotUrlsDropped); setAutoResizeItemsEnabled(false); @@ -57,7 +56,7 @@ PlacesPanel::PlacesPanel(QWidget* parent) // Don't store 0 size, let's keep -1 for default/small/automatic iconSize = -1; } - PlacesPanelSettings* settings = PlacesPanelSettings::self(); + PlacesPanelSettings *settings = PlacesPanelSettings::self(); settings->setIconSize(iconSize); settings->save(); }); @@ -73,7 +72,7 @@ void PlacesPanel::setUrl(const QUrl &url) KFilePlacesView::setUrl(url); } -QList<QAction*> PlacesPanel::customContextMenuActions() const +QList<QAction *> PlacesPanel::customContextMenuActions() const { return m_customContextMenuActions; } @@ -105,7 +104,7 @@ void PlacesPanel::readSettings() setIconSize(QSize(iconSize, iconSize)); } -void PlacesPanel::showEvent(QShowEvent* event) +void PlacesPanel::showEvent(QShowEvent *event) { if (!event->spontaneous() && !model()) { readSettings(); @@ -163,13 +162,13 @@ void PlacesPanel::slotConfigureTrash() { const QUrl url = currentIndex().data(KFilePlacesModel::UrlRole).toUrl(); - DolphinSettingsDialog* settingsDialog = new DolphinSettingsDialog(url, this); + DolphinSettingsDialog *settingsDialog = new DolphinSettingsDialog(url, this); settingsDialog->setCurrentPage(settingsDialog->trashSettings); settingsDialog->setAttribute(Qt::WA_DeleteOnClose); settingsDialog->show(); } -void PlacesPanel::slotUrlsDropped(const QUrl& dest, QDropEvent* event, QWidget* parent) +void PlacesPanel::slotUrlsDropped(const QUrl &dest, QDropEvent *event, QWidget *parent) { KIO::DropJob *job = DragAndDropHelper::dropUrls(dest, event, parent); if (job) { @@ -225,7 +224,7 @@ void PlacesPanel::slotTearDownRequested(const QModelIndex &index) void PlacesPanel::slotTearDownRequestedExternally(const QString &udi) { Q_UNUSED(udi); - auto *storageAccess = static_cast<Solid::StorageAccess*>(sender()); + auto *storageAccess = static_cast<Solid::StorageAccess *>(sender()); Q_EMIT storageTearDownExternallyRequested(storageAccess->filePath()); } diff --git a/src/panels/places/placespanel.h b/src/panels/places/placespanel.h index ef213ab30..2eb309483 100644 --- a/src/panels/places/placespanel.h +++ b/src/panels/places/placespanel.h @@ -11,8 +11,8 @@ #include "panels/panel.h" -#include <QUrl> #include <KFilePlacesView> +#include <QUrl> #include <Solid/SolidNamespace> // Solid::ErrorType @@ -30,15 +30,15 @@ class PlacesPanel : public KFilePlacesView Q_OBJECT public: - explicit PlacesPanel(QWidget* parent); + explicit PlacesPanel(QWidget *parent); ~PlacesPanel() override; void setUrl(const QUrl &url); // override // for compatibility with Panel, actions that are shown // on the view's context menu - QList<QAction*> customContextMenuActions() const; - void setCustomContextMenuActions(const QList<QAction*>& actions); + QList<QAction *> customContextMenuActions() const; + void setCustomContextMenuActions(const QList<QAction *> &actions); void requestTearDown(); void proceedWithTearDown(); @@ -47,18 +47,18 @@ public Q_SLOTS: void readSettings(); Q_SIGNALS: - void errorMessage(const QString& error); - void storageTearDownRequested(const QString& mountPath); - void storageTearDownExternallyRequested(const QString& mountPath); + void errorMessage(const QString &error); + void storageTearDownRequested(const QString &mountPath); + void storageTearDownExternallyRequested(const QString &mountPath); void storageTearDownSuccessful(); protected: - void showEvent(QShowEvent* event) override; + void showEvent(QShowEvent *event) override; void dragMoveEvent(QDragMoveEvent *event) override; private Q_SLOTS: void slotConfigureTrash(); - void slotUrlsDropped(const QUrl& dest, QDropEvent* event, QWidget* parent); + void slotUrlsDropped(const QUrl &dest, QDropEvent *event, QWidget *parent); void slotContextMenuAboutToShow(const QModelIndex &index, QMenu *menu); void slotTearDownRequested(const QModelIndex &index); void slotTearDownRequestedExternally(const QString &udi); @@ -70,7 +70,7 @@ private: void connectDeviceSignals(const QModelIndex &idx); QUrl m_url; // only used for initial setUrl - QList<QAction*> m_customContextMenuActions; + QList<QAction *> m_customContextMenuActions; QPersistentModelIndex m_indexToTearDown; |
