all: fix clang 18 lints

This commit is contained in:
outfoxxed 2024-11-24 02:27:49 -08:00
parent e957e88ccb
commit 2571766d3b
Signed by untrusted user: outfoxxed
GPG key ID: 4C88A185FB89301E
27 changed files with 47 additions and 35 deletions

View file

@ -5,6 +5,7 @@
#include <qqmlintegration.h>
#include <qtimer.h>
#include <qtmetamacros.h>
#include <qtypes.h>
#include "util.hpp"
@ -27,7 +28,7 @@ class SystemClock: public QObject {
public:
// must be named enum until docgen is ready to handle member enums better
enum Enum {
enum Enum : quint8 {
Hours = 1,
Minutes = 2,
Seconds = 3,

View file

@ -10,6 +10,7 @@
#include <qlogging.h>
#include <qloggingcategory.h>
#include <qstringview.h>
#include <qtypes.h>
namespace qs::log {
Q_DECLARE_LOGGING_CATEGORY(logLogging);
@ -22,7 +23,7 @@ public:
QLoggingRule(QStringView pattern, bool enabled);
[[nodiscard]] int pass(QLatin1StringView categoryName, QtMsgType type) const;
enum PatternFlag {
enum PatternFlag : quint8 {
FullText = 0x1,
LeftFilter = 0x2,
RightFilter = 0x4,

View file

@ -1,6 +1,7 @@
#pragma once
#include <qdatetime.h>
#include <qdir.h>
#include <qtypes.h>
#include "instanceinfo.hpp"
@ -31,7 +32,7 @@ public:
void createLock();
private:
enum class DirState {
enum class DirState : quint8 {
Unknown = 0,
Ready = 1,
Failed = 2,

View file

@ -10,6 +10,7 @@
#include <qsize.h>
#include <qtclasshelpermacros.h>
#include <qtmetamacros.h>
#include <qtypes.h>
#include <qwindow.h>
#include "../window/proxywindow.hpp"
@ -26,7 +27,7 @@ namespace PopupAdjustment { // NOLINT
Q_NAMESPACE;
QML_ELEMENT;
enum Enum {
enum Enum : quint8 {
None = 0,
/// If the X axis is constrained, the popup will slide along the X axis until it fits onscreen.
SlideX = 1,

View file

@ -20,7 +20,7 @@ class QsMenuButtonType: public QObject {
QML_SINGLETON;
public:
enum Enum {
enum Enum : quint8 {
/// This menu item does not have a checkbox or a radiobutton associated with it.
None = 0,
/// This menu item should draw a checkbox.

View file

@ -15,7 +15,7 @@ namespace RegionShape { // NOLINT
Q_NAMESPACE;
QML_ELEMENT;
enum Enum {
enum Enum : quint8 {
Rect = 0,
Ellipse = 1,
};
@ -29,7 +29,7 @@ namespace Intersection { // NOLINT
Q_NAMESPACE;
QML_ELEMENT;
enum Enum {
enum Enum : quint8 {
/// Combine this region, leaving a union of this and the other region. (opposite of `Subtract`)
Combine = 0,
/// Subtract this region, cutting this region out of the other. (opposite of `Combine`)

View file

@ -6,6 +6,7 @@
#include <qqmlintegration.h>
#include <qrect.h>
#include <qtmetamacros.h>
#include <qtypes.h>
class Box {
Q_GADGET;
@ -53,7 +54,7 @@ namespace Edges { // NOLINT
Q_NAMESPACE;
QML_NAMED_ELEMENT(Edges);
enum Enum {
enum Enum : quint8 {
None = 0,
Top = Qt::TopEdge,
Left = Qt::LeftEdge,