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/global.h | |
| parent | ffff8af851e3a386c44438337779d0ce7ca98a61 (diff) | |
Add clang-format and format code as in Frameworks
Diffstat (limited to 'src/global.h')
| -rw-r--r-- | src/global.h | 67 |
1 files changed, 31 insertions, 36 deletions
diff --git a/src/global.h b/src/global.h index 80ec03fd0..dd07f9170 100644 --- a/src/global.h +++ b/src/global.h @@ -14,51 +14,46 @@ class KConfigGroup; class OrgKdeDolphinMainWindowInterface; -namespace Dolphin { - QList<QUrl> validateUris(const QStringList& uriList); +namespace Dolphin +{ +QList<QUrl> validateUris(const QStringList &uriList); - /** - * Returns the home url which is defined in General Settings - */ - QUrl homeUrl(); +/** + * Returns the home url which is defined in General Settings + */ +QUrl homeUrl(); - enum class OpenNewWindowFlag { - None = 0, - Select = 1<<1 - }; - Q_DECLARE_FLAGS(OpenNewWindowFlags, OpenNewWindowFlag) +enum class OpenNewWindowFlag { None = 0, Select = 1 << 1 }; +Q_DECLARE_FLAGS(OpenNewWindowFlags, OpenNewWindowFlag) - /** - * Opens a new Dolphin window - */ - void openNewWindow(const QList<QUrl> &urls = {}, QWidget *window = nullptr, const OpenNewWindowFlags &flags = OpenNewWindowFlag::None); +/** + * Opens a new Dolphin window + */ +void openNewWindow(const QList<QUrl> &urls = {}, QWidget *window = nullptr, const OpenNewWindowFlags &flags = OpenNewWindowFlag::None); - /** - * Attaches URLs to an existing Dolphin instance if possible. - * If @p preferredService is a valid dbus service, it will be tried first. - * @p preferredService needs to support the org.kde.dolphin.MainWindow dbus interface with the /dolphin/Dolphin_1 path. - * Returns true if the URLs were successfully attached. - */ - bool attachToExistingInstance(const QList<QUrl>& inputUrls, bool openFiles, bool splitView, const QString& preferredService, const QString &activationToken); +/** + * Attaches URLs to an existing Dolphin instance if possible. + * If @p preferredService is a valid dbus service, it will be tried first. + * @p preferredService needs to support the org.kde.dolphin.MainWindow dbus interface with the /dolphin/Dolphin_1 path. + * Returns true if the URLs were successfully attached. + */ +bool attachToExistingInstance(const QList<QUrl> &inputUrls, bool openFiles, bool splitView, const QString &preferredService, const QString &activationToken); - /** - * Returns a QVector with all GUI-capable Dolphin instances - */ - QVector<QPair<QSharedPointer<OrgKdeDolphinMainWindowInterface>, QStringList>> dolphinGuiInstances(const QString& preferredService); +/** + * Returns a QVector with all GUI-capable Dolphin instances + */ +QVector<QPair<QSharedPointer<OrgKdeDolphinMainWindowInterface>, QStringList>> dolphinGuiInstances(const QString &preferredService); - QPair<QString, Qt::SortOrder> sortOrderForUrl(QUrl &url); +QPair<QString, Qt::SortOrder> sortOrderForUrl(QUrl &url); - /** - * TODO: Move this somewhere global to all KDE apps, not just Dolphin - */ - const int VERTICAL_SPACER_HEIGHT = 12; - const int LAYOUT_SPACING_SMALL = 2; +/** + * TODO: Move this somewhere global to all KDE apps, not just Dolphin + */ +const int VERTICAL_SPACER_HEIGHT = 12; +const int LAYOUT_SPACING_SMALL = 2; } -enum Animated { - WithAnimation, - WithoutAnimation -}; +enum Animated { WithAnimation, WithoutAnimation }; class GlobalConfig : public QObject { |
