Commit c0551be9 authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

GIT_SILENT Add trailing commas

This will result in cleaner diffs and serves as preparation for the clang-format reformatting
parent 3b25e32f
......@@ -25,7 +25,11 @@ class DiscoverObject : public QObject
Q_PROPERTY(QRect initialGeometry READ initialGeometry CONSTANT)
public:
enum CompactMode { Auto, Compact, Full };
enum CompactMode {
Auto,
Compact,
Full,
};
Q_ENUM(CompactMode)
explicit DiscoverObject(CompactMode mode, const QVariantMap &initialProperties);
......
......@@ -24,7 +24,7 @@ class DISCOVERCOMMON_EXPORT ApplicationAddonsModel : public QAbstractListModel
Q_PROPERTY(bool isEmpty READ isEmpty NOTIFY applicationChanged)
public:
enum Roles {
PackageNameRole = Qt::UserRole
PackageNameRole = Qt::UserRole,
};
explicit ApplicationAddonsModel(QObject* parent = nullptr);
......
......@@ -23,7 +23,7 @@ enum FilterType {
PkgSectionFilter,
PkgWildcardFilter,
PkgNameFilter,
AppstreamIdWildcardFilter
AppstreamIdWildcardFilter,
};
class DISCOVERCOMMON_EXPORT Category : public QObject
......
......@@ -33,12 +33,12 @@ class DISCOVERCOMMON_EXPORT ReviewsModel : public QAbstractListModel
Rating,
Summary,
Depth,
PackageVersion
PackageVersion,
};
enum UserChoice {
None,
Yes,
No
No,
};
Q_ENUM(UserChoice)
......
......@@ -19,7 +19,10 @@ class DISCOVERCOMMON_EXPORT ScreenshotsModel : public QAbstractListModel
Q_PROPERTY(AbstractResource* application READ resource WRITE setResource NOTIFY resourceChanged)
Q_PROPERTY(int count READ count NOTIFY countChanged)
public:
enum Roles { ThumbnailUrl=Qt::UserRole+1, ScreenshotUrl };
enum Roles {
ThumbnailUrl=Qt::UserRole+1,
ScreenshotUrl,
};
explicit ScreenshotsModel(QObject* parent = nullptr);
QHash<int, QByteArray> roleNames() const override;
......
......@@ -18,7 +18,7 @@ public:
enum State {
None,
ToInstall,
ToRemove
ToRemove,
};
AddonList();
AddonList(const AddonList &other) = default;
......
......@@ -57,7 +57,7 @@ public:
/// Transaction is done, but there was an error during transaction
DoneWithErrorStatus,
/// Transaction was cancelled
CancelledStatus
CancelledStatus,
};
Q_ENUM(Status)
......@@ -67,7 +67,7 @@ public:
///The transaction is going to remove a resource
RemoveRole,
///The transaction is going to change the addons of a resource
ChangeAddonsRole
ChangeAddonsRole,
};
Q_ENUM(Role)
......
......@@ -26,7 +26,7 @@ public:
ProgressRole,
StatusTextRole,
ResourceRole,
TransactionRole
TransactionRole,
};
explicit TransactionModel(QObject *parent = nullptr);
......
......@@ -34,7 +34,7 @@ public:
SectionResourceProgressRole,
ChangelogRole,
SectionRole,
UpgradeTextRole
UpgradeTextRole,
};
Q_ENUM(Roles)
......
......@@ -205,7 +205,7 @@ void OdrsReviewsBackend::submitReview(AbstractResource *res, const QString &summ
{QStringLiteral("user_display"), QJsonValue::fromVariant(KUser().property(KUser::FullName))},
{QStringLiteral("summary"), summary},
{QStringLiteral("description"), description},
{QStringLiteral("rating"), rating.toInt() * 10}};
{QStringLiteral("rating"), rating.toInt() * 10},};
const QJsonDocument document(map);
......@@ -261,7 +261,7 @@ void OdrsReviewsBackend::parseRatings()
appJsonObject.value(QLatin1String("star2")).toInt(),
appJsonObject.value(QLatin1String("star3")).toInt(),
appJsonObject.value(QLatin1String("star4")).toInt(),
appJsonObject.value(QLatin1String("star5")).toInt() };
appJsonObject.value(QLatin1String("star5")).toInt(), };
Rating *rating = new Rating(it.key(), ratingCount, ratingMap);
m_ratings.insert(it.key(), rating);
......
......@@ -30,7 +30,7 @@ public:
enum PropertyKind {
DownloadSize = 0,
InstalledSize,
RequiredRuntime
RequiredRuntime,
};
Q_ENUM(PropertyKind)
......@@ -46,7 +46,7 @@ public:
DesktopApp = 0,
Runtime,
Extension,
Source
Source,
};
Q_ENUM(ResourceType)
......
......@@ -26,7 +26,9 @@ public:
explicit FlatpakSourcesBackend(const QVector<FlatpakInstallation *>& installations, AbstractResourcesBackend *parent);
~FlatpakSourcesBackend() override;
enum Roles { IconUrlRole = LastRole + 1 };
enum Roles {
IconUrlRole = LastRole + 1,
};
QAbstractItemModel* sources() override;
bool addSource(const QString &id) override;
......
......@@ -200,7 +200,7 @@ KNSBackend::KNSBackend(QObject* parent, const QString& iconName, const QString &
QStringLiteral("comic.knsrc"), QStringLiteral("colorschemes.knsrc"),
QStringLiteral("emoticons.knsrc"), QStringLiteral("plymouth.knsrc"),
QStringLiteral("sddmtheme.knsrc"), QStringLiteral("wallpaperplugin.knsrc"),
QStringLiteral("ksplash.knsrc"), QStringLiteral("window-decorations.knsrc")
QStringLiteral("ksplash.knsrc"), QStringLiteral("window-decorations.knsrc"),
};
const auto iconName = knsrcPlasma.contains(fileName)? QStringLiteral("plasma") : QStringLiteral("applications-other");
auto actualCategory = new Category(m_displayName, iconName, filters, backendName, categories, QUrl(), true);
......
......@@ -28,7 +28,7 @@ int percentageWithStatus(PackageKit::Transaction::Status status, uint percentage
{ PackageKit::Transaction::Status::StatusInstall, 1},
{ PackageKit::Transaction::Status::StatusRemove, 1},
{ PackageKit::Transaction::Status::StatusLoadingCache, 1},
{ PackageKit::Transaction::Status::StatusUpdate, 1}
{ PackageKit::Transaction::Status::StatusUpdate, 1},
};
const auto idx = statuses.value(status, -1);
if (idx < 0) {
......
......@@ -315,7 +315,7 @@ public:
enum Roles {
PlugNameRole = Qt::UserRole + 1,
SlotSnapRole,
SlotNameRole
SlotNameRole,
};
PlugsModel(SnapResource* res, SnapBackend* backend, QObject* parent)
......
......@@ -44,7 +44,12 @@ class DISCOVERCOMMON_EXPORT AbstractBackendUpdater : public QObject
Q_PROPERTY(bool needsReboot READ needsReboot NOTIFY needsRebootChanged)
Q_PROPERTY(quint64 downloadSpeed READ downloadSpeed NOTIFY downloadSpeedChanged)
public:
enum State { None, Downloading, Installing, Done };
enum State {
None,
Downloading,
Installing,
Done,
};
Q_ENUM(State);
/**
......
......@@ -89,7 +89,7 @@ class DISCOVERCOMMON_EXPORT AbstractResource : public QObject
/**
* The resource is installed and an update is available
*/
Upgradeable
Upgradeable,
};
Q_ENUM(State)
......@@ -130,7 +130,11 @@ class DISCOVERCOMMON_EXPORT AbstractResource : public QObject
///@returns a URL that points to the place where you can donate money to the app developer
virtual QUrl donationURL();
enum Type { Application, Addon, Technical };
enum Type {
Application,
Addon,
Technical,
};
Q_ENUM(Type);
virtual Type type() const = 0;
......
......@@ -31,7 +31,7 @@ class DISCOVERCOMMON_EXPORT AbstractSourcesBackend : public QObject
enum Roles {
IdRole = Qt::UserRole,
LastRole
LastRole,
};
Q_ENUM(Roles)
......
......@@ -64,7 +64,7 @@ public:
SizeRole,
LongDescriptionRole,
SourceIconRole,
ReleaseDateRole
ReleaseDateRole,
};
Q_ENUM(Roles)
......
......@@ -21,7 +21,7 @@ class DISCOVERCOMMON_EXPORT SourcesModel : public KConcatenateRowsProxyModel
SourceNameRole = AbstractSourcesBackend::LastRole,
SourcesBackend,
ResourcesBackend,
EnabledRole
EnabledRole,
};
Q_ENUM(Roles)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment