Added clang-format/tidy for additional rules. Adjusted inbranch cpp files.
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#include <QObject>
|
||||
#include <QStringList>
|
||||
#include <QVariantMap>
|
||||
#include <cstdint>
|
||||
#include <qqmlintegration.h>
|
||||
|
||||
namespace ZShell {
|
||||
@@ -15,11 +16,8 @@ class LidWatcher : public QObject {
|
||||
Q_PROPERTY(bool available READ available NOTIFY availableChanged)
|
||||
Q_PROPERTY(LidState state READ state NOTIFY stateChanged)
|
||||
|
||||
public:
|
||||
enum LidState {
|
||||
Opened,
|
||||
Closed
|
||||
};
|
||||
public:
|
||||
enum LidState : std::uint8_t{ Opened, Closed };
|
||||
Q_ENUM(LidState)
|
||||
|
||||
explicit LidWatcher(QObject* parent = nullptr);
|
||||
@@ -27,16 +25,19 @@ public:
|
||||
[[nodiscard]] bool available() const;
|
||||
[[nodiscard]] LidState state() const;
|
||||
|
||||
private:
|
||||
private:
|
||||
void queryInitialState();
|
||||
|
||||
bool m_available;
|
||||
LidState m_state = Opened;
|
||||
|
||||
private Q_SLOTS:
|
||||
void onPropertiesChanged(const QString& interface, const QVariantMap& changed, const QStringList& invalidated);
|
||||
|
||||
Q_SIGNALS:
|
||||
void extracted();
|
||||
void onPropertiesChanged(const QString& interface,
|
||||
const QVariantMap& changed,
|
||||
const QStringList& invalidated);
|
||||
|
||||
Q_SIGNALS:
|
||||
void availableChanged();
|
||||
void stateChanged();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user