mirror of
https://invent.kde.org/plasma/plasma-desktop.git
synced 2026-11-03 14:49:44 -09:00
Reformat code with clang-format
This commit is contained in:
parent
920b327cf8
commit
1e8dacf6ba
9 changed files with 45 additions and 14 deletions
|
|
@ -24,7 +24,11 @@ class RemoveAction : public QAction
|
|||
public:
|
||||
explicit RemoveAction(KActionCollection *collection, QObject *parent = nullptr);
|
||||
|
||||
enum class ShiftState { Unknown, Pressed, Released };
|
||||
enum class ShiftState {
|
||||
Unknown,
|
||||
Pressed,
|
||||
Released
|
||||
};
|
||||
|
||||
/**
|
||||
* Updates this action key based on @p shiftState.
|
||||
|
|
|
|||
|
|
@ -19,7 +19,10 @@ class AbstractEmojiModel : public QAbstractListModel
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
enum EmojiRole { CategoryRole = Qt::UserRole + 1, AnnotationsRole };
|
||||
enum EmojiRole {
|
||||
CategoryRole = Qt::UserRole + 1,
|
||||
AnnotationsRole
|
||||
};
|
||||
|
||||
int rowCount(const QModelIndex &parent = {}) const override;
|
||||
|
||||
|
|
@ -35,7 +38,9 @@ class EmojiModel : public AbstractEmojiModel
|
|||
QML_ELEMENT
|
||||
Q_PROPERTY(QStringList categories MEMBER m_categories CONSTANT)
|
||||
public:
|
||||
enum EmojiRole { CategoryRole = Qt::UserRole + 1 };
|
||||
enum EmojiRole {
|
||||
CategoryRole = Qt::UserRole + 1
|
||||
};
|
||||
|
||||
EmojiModel();
|
||||
|
||||
|
|
|
|||
|
|
@ -496,7 +496,7 @@ void KAccessApp::xkbBellNotify(xcb_xkb_bell_notify_event_t *event)
|
|||
QPixmap screen = QGuiApplication::primaryScreen()->grabWindow(id, 0, 0, window.size.width, window.size.height);
|
||||
|
||||
// is this the best way to invert a pixmap?
|
||||
|
||||
|
||||
// QPixmap invert(window.size.width, window.size.height);
|
||||
QPalette pal = overlay->palette();
|
||||
{
|
||||
|
|
|
|||
|
|
@ -17,7 +17,12 @@ class ClockHelper : public QObject
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
enum { CallError = 1 << 0, TimezoneError = 1 << 1, NTPError = 1 << 2, DateError = 1 << 3 };
|
||||
enum {
|
||||
CallError = 1 << 0,
|
||||
TimezoneError = 1 << 1,
|
||||
NTPError = 1 << 2,
|
||||
DateError = 1 << 3
|
||||
};
|
||||
|
||||
public Q_SLOTS:
|
||||
ActionReply save(const QVariantMap &map);
|
||||
|
|
|
|||
|
|
@ -42,9 +42,15 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
enum Columns { CityColumn = 0, RegionColumn, CommentColumn };
|
||||
enum Columns {
|
||||
CityColumn = 0,
|
||||
RegionColumn,
|
||||
CommentColumn
|
||||
};
|
||||
|
||||
enum Roles { ZoneRole = Qt::UserRole + 0xF3A3CB1 };
|
||||
enum Roles {
|
||||
ZoneRole = Qt::UserRole + 0xF3A3CB1
|
||||
};
|
||||
|
||||
bool itemsCheckable;
|
||||
bool singleSelection;
|
||||
|
|
|
|||
|
|
@ -244,7 +244,11 @@ public:
|
|||
static QList<LayoutUnit> getLayoutsList();
|
||||
static QStringList getLayoutsListAsString(const QList<LayoutUnit> &layoutsList);
|
||||
|
||||
enum FetchType { ALL, LAYOUTS_ONLY, MODEL_ONLY };
|
||||
enum FetchType {
|
||||
ALL,
|
||||
LAYOUTS_ONLY,
|
||||
MODEL_ONLY
|
||||
};
|
||||
static bool getGroupNames(Display *dpy, XkbConfig *xkbConfig, FetchType fetchType);
|
||||
|
||||
static unsigned int getGroup();
|
||||
|
|
|
|||
|
|
@ -33,7 +33,9 @@ class MostUsedModel : public QSortFilterProxyModel
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
enum Roles { KcmPluginRole = Qt::UserRole + 1000 };
|
||||
enum Roles {
|
||||
KcmPluginRole = Qt::UserRole + 1000
|
||||
};
|
||||
|
||||
explicit MostUsedModel(QObject *parent = nullptr);
|
||||
void setResultModel(KActivities::Stats::ResultModel *model);
|
||||
|
|
|
|||
|
|
@ -41,8 +41,14 @@ public:
|
|||
QString actionName;
|
||||
|
||||
private:
|
||||
enum DesktopAction { DesktopRead = 0, DesktopWrite = 1 };
|
||||
enum GroupType { GroupDesktop = 0, GroupAction = 1 };
|
||||
enum DesktopAction {
|
||||
DesktopRead = 0,
|
||||
DesktopWrite = 1
|
||||
};
|
||||
enum GroupType {
|
||||
GroupDesktop = 0,
|
||||
GroupAction = 1
|
||||
};
|
||||
|
||||
QString readKey(GroupType keyGroup, const QString &keyName, const QString &defaultValue) const;
|
||||
void setKey(GroupType keyGroup, const QString &keyName, const QString &keyContents);
|
||||
|
|
|
|||
|
|
@ -78,9 +78,8 @@ void KCMWorkspaceOptions::save()
|
|||
}
|
||||
|
||||
if (smoothScrollSaved) {
|
||||
QDBusMessage message = QDBusMessage::createSignal(QStringLiteral("/SmoothScroll"),
|
||||
QStringLiteral("org.kde.SmoothScroll"),
|
||||
QStringLiteral("notifyChange"));
|
||||
QDBusMessage message =
|
||||
QDBusMessage::createSignal(QStringLiteral("/SmoothScroll"), QStringLiteral("org.kde.SmoothScroll"), QStringLiteral("notifyChange"));
|
||||
bool enabled = m_data->workspaceOptionsGlobalsSettings()->smoothScroll();
|
||||
message.setArguments({QVariant(enabled)});
|
||||
QDBusConnection::sessionBus().send(message);
|
||||
|
|
|
|||
Loading…
Reference in a new issue