File tree 27 files changed +47
-35
lines changed
hyprland/global_shortcuts
27 files changed +47
-35
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ Checks: >
6
6
bugprone-*,
7
7
-bugprone-easily-swappable-parameters,
8
8
-bugprone-forward-declararion-namespace,
9
+ -bugprone-forward-declararion-namespace,
9
10
concurrency-*,
10
11
cppcoreguidelines-*,
11
12
-cppcoreguidelines-owning-memory,
@@ -42,6 +43,7 @@ Checks: >
42
43
-readability-else-after-return,
43
44
-readability-container-data-pointer,
44
45
-readability-implicit-bool-conversion,
46
+ -readability-avoid-nested-conditional-operator,
45
47
tidyfox-*,
46
48
CheckOptions :
47
49
performance-for-range-copy.WarnOnAllAutoCopies : true
Original file line number Diff line number Diff line change 1
1
name : Build
2
- on : [push, pull_request]
2
+ on : [push, pull_request, workflow_dispatch ]
3
3
4
4
jobs :
5
5
nix :
Original file line number Diff line number Diff line change 1
1
name : Lint
2
- on : [push, pull_request]
2
+ on : [push, pull_request, workflow_dispatch ]
3
3
4
4
jobs :
5
5
lint :
22
22
just build
23
23
24
24
- name : Run lints
25
- run : just lint 2>&1
25
+ run : just lint-ci
Original file line number Diff line number Diff line change 4
4
find src -type f \( -name " *.cpp" -o -name " *.hpp" \) -print0 | xargs -0 clang-format -i
5
5
6
6
lint :
7
- find src -type f -name " *.cpp" -print0 | parallel -q0 --bar clang-tidy --use-color --load={{ env_var (" TIDYFOX" ) }}
7
+ find src -type f -name " *.cpp" -print0 | parallel -q0 --no-notice --will-cite --tty --bar clang-tidy --load={{ env_var (" TIDYFOX" ) }}
8
+
9
+ lint-ci :
10
+ find src -type f -name " *.cpp" -print0 | parallel -q0 --no-notice --will-cite --tty clang-tidy --load={{ env_var (" TIDYFOX" ) }}
8
11
9
12
configure target = ' debug' * FLAGS = ' ':
10
13
cmake -GNinja -B {{ builddir}} \
Original file line number Diff line number Diff line change 5
5
#include < qqmlintegration.h>
6
6
#include < qtimer.h>
7
7
#include < qtmetamacros.h>
8
+ #include < qtypes.h>
8
9
9
10
#include " util.hpp"
10
11
@@ -27,7 +28,7 @@ class SystemClock: public QObject {
27
28
28
29
public:
29
30
// must be named enum until docgen is ready to handle member enums better
30
- enum Enum {
31
+ enum Enum : quint8 {
31
32
Hours = 1 ,
32
33
Minutes = 2 ,
33
34
Seconds = 3 ,
Original file line number Diff line number Diff line change 10
10
#include < qlogging.h>
11
11
#include < qloggingcategory.h>
12
12
#include < qstringview.h>
13
+ #include < qtypes.h>
13
14
14
15
namespace qs ::log {
15
16
Q_DECLARE_LOGGING_CATEGORY (logLogging);
@@ -22,7 +23,7 @@ class QLoggingRule {
22
23
QLoggingRule (QStringView pattern, bool enabled);
23
24
[[nodiscard]] int pass (QLatin1StringView categoryName, QtMsgType type) const ;
24
25
25
- enum PatternFlag {
26
+ enum PatternFlag : quint8 {
26
27
FullText = 0x1 ,
27
28
LeftFilter = 0x2 ,
28
29
RightFilter = 0x4 ,
Original file line number Diff line number Diff line change 1
1
#pragma once
2
2
#include < qdatetime.h>
3
3
#include < qdir.h>
4
+ #include < qtypes.h>
4
5
5
6
#include " instanceinfo.hpp"
6
7
@@ -31,7 +32,7 @@ class QsPaths {
31
32
void createLock ();
32
33
33
34
private:
34
- enum class DirState {
35
+ enum class DirState : quint8 {
35
36
Unknown = 0 ,
36
37
Ready = 1 ,
37
38
Failed = 2 ,
Original file line number Diff line number Diff line change 10
10
#include < qsize.h>
11
11
#include < qtclasshelpermacros.h>
12
12
#include < qtmetamacros.h>
13
+ #include < qtypes.h>
13
14
#include < qwindow.h>
14
15
15
16
#include " ../window/proxywindow.hpp"
@@ -26,7 +27,7 @@ namespace PopupAdjustment { // NOLINT
26
27
Q_NAMESPACE;
27
28
QML_ELEMENT;
28
29
29
- enum Enum {
30
+ enum Enum : quint8 {
30
31
None = 0 ,
31
32
// / If the X axis is constrained, the popup will slide along the X axis until it fits onscreen.
32
33
SlideX = 1 ,
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ class QsMenuButtonType: public QObject {
20
20
QML_SINGLETON;
21
21
22
22
public:
23
- enum Enum {
23
+ enum Enum : quint8 {
24
24
// / This menu item does not have a checkbox or a radiobutton associated with it.
25
25
None = 0 ,
26
26
// / This menu item should draw a checkbox.
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ namespace RegionShape { // NOLINT
15
15
Q_NAMESPACE;
16
16
QML_ELEMENT;
17
17
18
- enum Enum {
18
+ enum Enum : quint8 {
19
19
Rect = 0 ,
20
20
Ellipse = 1 ,
21
21
};
@@ -29,7 +29,7 @@ namespace Intersection { // NOLINT
29
29
Q_NAMESPACE;
30
30
QML_ELEMENT;
31
31
32
- enum Enum {
32
+ enum Enum : quint8 {
33
33
// / Combine this region, leaving a union of this and the other region. (opposite of `Subtract`)
34
34
Combine = 0 ,
35
35
// / Subtract this region, cutting this region out of the other. (opposite of `Combine`)
Original file line number Diff line number Diff line change 6
6
#include < qqmlintegration.h>
7
7
#include < qrect.h>
8
8
#include < qtmetamacros.h>
9
+ #include < qtypes.h>
9
10
10
11
class Box {
11
12
Q_GADGET;
@@ -53,7 +54,7 @@ namespace Edges { // NOLINT
53
54
Q_NAMESPACE;
54
55
QML_NAMED_ELEMENT (Edges);
55
56
56
- enum Enum {
57
+ enum Enum : quint8 {
57
58
None = 0 ,
58
59
Top = Qt::TopEdge,
59
60
Left = Qt::LeftEdge,
Original file line number Diff line number Diff line change 6
6
#include < qobject.h>
7
7
#include < qqmlintegration.h>
8
8
#include < qtmetamacros.h>
9
+ #include < qtypes.h>
9
10
10
11
// /! State of the Greetd connection.
11
12
// / See @@Greetd.state.
@@ -15,7 +16,7 @@ class GreetdState: public QObject {
15
16
QML_SINGLETON;
16
17
17
18
public:
18
- enum Enum {
19
+ enum Enum : quint8 {
19
20
Inactive = 0 ,
20
21
Authenticating = 1 ,
21
22
ReadyToLaunch = 2 ,
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ class MprisPlaybackState: public QObject {
23
23
QML_SINGLETON;
24
24
25
25
public:
26
- enum Enum {
26
+ enum Enum : quint8 {
27
27
Stopped = 0 ,
28
28
Playing = 1 ,
29
29
Paused = 2 ,
@@ -41,7 +41,7 @@ class MprisLoopState: public QObject {
41
41
QML_SINGLETON;
42
42
43
43
public:
44
- enum Enum {
44
+ enum Enum : quint8 {
45
45
None = 0 ,
46
46
Track = 1 ,
47
47
Playlist = 2 ,
Original file line number Diff line number Diff line change 8
8
#include < qobject.h>
9
9
#include < qqmlintegration.h>
10
10
#include < qtmetamacros.h>
11
+ #include < qtypes.h>
11
12
12
13
#include " ../../core/retainable.hpp"
13
14
#include " ../../core/util.hpp"
@@ -24,7 +25,7 @@ class NotificationUrgency: public QObject {
24
25
QML_SINGLETON;
25
26
26
27
public:
27
- enum Enum {
28
+ enum Enum : quint8 {
28
29
Low = 0 ,
29
30
Normal = 1 ,
30
31
Critical = 2 ,
@@ -42,7 +43,7 @@ class NotificationCloseReason: public QObject {
42
43
QML_SINGLETON;
43
44
44
45
public:
45
- enum Enum {
46
+ enum Enum : quint8 {
46
47
// / The notification expired due to a timeout.
47
48
Expired = 1 ,
48
49
// / The notification was explicitly dismissed by the user.
Original file line number Diff line number Diff line change @@ -124,7 +124,7 @@ void NotificationServer::tryRegister() {
124
124
}
125
125
void NotificationServer::onServiceUnregistered (const QString& /* unused*/ ) {
126
126
qCDebug (logNotifications) << " Active notification server unregistered, attempting registration" ;
127
- this -> tryRegister ();
127
+ NotificationServer:: tryRegister ();
128
128
}
129
129
130
130
void NotificationServer::CloseNotification (uint id) {
Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ class NotificationServer: public QObject {
63
63
// NOLINTEND
64
64
65
65
private slots:
66
- void onServiceUnregistered (const QString& service);
66
+ static void onServiceUnregistered (const QString& service);
67
67
68
68
private:
69
69
explicit NotificationServer ();
Original file line number Diff line number Diff line change 1
1
#pragma once
2
2
3
- #include < utility>
4
-
5
3
#include < qloggingcategory.h>
6
4
#include < qobject.h>
7
5
#include < qqmlintegration.h>
8
6
#include < qsocketnotifier.h>
9
7
#include < qtclasshelpermacros.h>
10
8
#include < qtmetamacros.h>
9
+ #include < qtypes.h>
11
10
12
11
#include " ipc.hpp"
13
12
@@ -21,7 +20,7 @@ class PamResult: public QObject {
21
20
QML_SINGLETON;
22
21
23
22
public:
24
- enum Enum {
23
+ enum Enum : quint8 {
25
24
// / Authentication was successful.
26
25
Success = 0 ,
27
26
// / Authentication failed.
@@ -44,7 +43,7 @@ class PamError: public QObject {
44
43
QML_SINGLETON;
45
44
46
45
public:
47
- enum Enum {
46
+ enum Enum : quint8 {
48
47
// / Failed to start the pam session.
49
48
StartFailed = 1 ,
50
49
// / Failed to try to authenticate the user.
Original file line number Diff line number Diff line change 1
1
#pragma once
2
2
3
- #include < iostream>
3
+ #include < iostream> // NOLINT std::cout
4
4
5
5
#include < security/pam_appl.h>
6
6
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ class PwLinkState: public QObject {
21
21
QML_SINGLETON;
22
22
23
23
public:
24
- enum Enum {
24
+ enum Enum : qint8 {
25
25
Error = PW_LINK_STATE_ERROR,
26
26
Unlinked = PW_LINK_STATE_UNLINKED,
27
27
Init = PW_LINK_STATE_INIT,
Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ class PwAudioChannel: public QObject {
87
87
Q_INVOKABLE static QString toString (qs::service::pipewire::PwAudioChannel::Enum value);
88
88
};
89
89
90
- enum class PwNodeType {
90
+ enum class PwNodeType : quint8 {
91
91
Untracked,
92
92
Audio,
93
93
};
Original file line number Diff line number Diff line change 7
7
#include < qlogging.h>
8
8
#include < qmetatype.h>
9
9
#include < qsysinfo.h>
10
+ #include < qtversionchecks.h>
10
11
#include < qtypes.h>
11
12
12
13
bool DBusSniIconPixmap::operator ==(const DBusSniIconPixmap& other) const {
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ namespace Status { // NOLINT
26
26
Q_NAMESPACE;
27
27
QML_ELEMENT;
28
28
29
- enum Enum {
29
+ enum Enum : quint8 {
30
30
// / A passive item does not convey important information and can be considered idle. You may want to hide these.
31
31
Passive = 0 ,
32
32
// / An active item may have information more important than a passive one and you probably do not want to hide it.
@@ -43,7 +43,7 @@ namespace Category { // NOLINT
43
43
Q_NAMESPACE;
44
44
QML_ELEMENT;
45
45
46
- enum Enum {
46
+ enum Enum : quint8 {
47
47
// / The fallback category for general applications or anything that does
48
48
// / not fit into a different category.
49
49
ApplicationStatus = 0 ,
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ class UPowerDeviceState: public QObject {
20
20
QML_SINGLETON;
21
21
22
22
public:
23
- enum Enum {
23
+ enum Enum : quint8 {
24
24
Unknown = 0 ,
25
25
Charging = 1 ,
26
26
Discharging = 2 ,
@@ -44,7 +44,7 @@ class UPowerDeviceType: public QObject {
44
44
QML_SINGLETON;
45
45
46
46
public:
47
- enum Enum {
47
+ enum Enum : quint8 {
48
48
Unknown = 0 ,
49
49
LinePower = 1 ,
50
50
Battery = 2 ,
Original file line number Diff line number Diff line change 6
6
#include < qtmetamacros.h>
7
7
8
8
#include " manager.hpp"
9
- #include " shortcut.hpp"
10
9
11
10
namespace qs ::hyprland::global_shortcuts {
12
11
using impl::GlobalShortcutManager;
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ namespace WlrLayer { // NOLINT
15
15
Q_NAMESPACE;
16
16
QML_ELEMENT;
17
17
18
- enum Enum {
18
+ enum Enum : quint8 {
19
19
// / Below bottom
20
20
Background = 0 ,
21
21
// / Above background, usually below windows
@@ -36,7 +36,7 @@ namespace WlrKeyboardFocus { // NOLINT
36
36
Q_NAMESPACE;
37
37
QML_ELEMENT;
38
38
39
- enum Enum {
39
+ enum Enum : quint8 {
40
40
// / No keyboard input will be accepted.
41
41
None = 0 ,
42
42
// / Exclusive access to the keyboard, locking out all other windows.
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ void WrapperManager::componentComplete() {
33
33
if (childItems.length () == 1 ) {
34
34
this ->mDefaultChild = childItems.first ();
35
35
if (!child) child = this ->mDefaultChild ;
36
- } else if (childItems.length () != 0 ) {
36
+ } else if (! childItems.empty () ) {
37
37
this ->flags .setFlag (WrapperManager::HasMultipleChildren);
38
38
39
39
if (!child && !this ->flags .testFlags (WrapperManager::NullChild)) {
Original file line number Diff line number Diff line change 2
2
3
3
#include < qqmlintegration.h>
4
4
#include < qtmetamacros.h>
5
+ #include < qtypes.h>
5
6
6
7
#include " ../core/doc.hpp"
7
8
#include " windowinterface.hpp"
@@ -63,7 +64,7 @@ namespace ExclusionMode { // NOLINT
63
64
Q_NAMESPACE;
64
65
QML_ELEMENT;
65
66
66
- enum Enum {
67
+ enum Enum : quint8 {
67
68
// / Respect the exclusion zone of other shell layers and optionally set one
68
69
Normal = 0 ,
69
70
// / Ignore exclusion zones of other shell layers. You cannot set an exclusion zone in this mode.
You can’t perform that action at this time.
0 commit comments