nodiscard

This commit is contained in:
2026-06-04 22:57:45 +02:00
parent d8f047dbc9
commit b4716d25c0
29 changed files with 332 additions and 329 deletions
+2 -2
View File
@@ -10,7 +10,7 @@
#include <thread>
#include <vector>
namespace ZShell::services {
namespace ZShell::Services {
namespace ac {
@@ -59,7 +59,7 @@ quint32 readChunk(double* out, quint32 count = 0);
private:
explicit AudioCollector(QObject* parent = nullptr);
~AudioCollector();
~AudioCollector() override;
std::jthread m_thread;
std::vector<float> m_buffer1;
+3 -4
View File
@@ -4,18 +4,17 @@
#include <qqmlintegration.h>
#include <qtimer.h>
namespace ZShell::services {
namespace ZShell::Services {
class AudioProcessor : public QObject {
Q_OBJECT
public:
explicit AudioProcessor(QObject* parent = nullptr);
~AudioProcessor();
~AudioProcessor() override;
void init();
public slots:
void start();
void stop();
@@ -31,7 +30,7 @@ Q_OBJECT
public:
explicit AudioProvider(QObject* parent = nullptr);
~AudioProvider();
~AudioProvider() override;
protected:
AudioProcessor* m_processor;
+1 -1
View File
@@ -11,7 +11,7 @@ Q_OBJECT
public:
explicit BeatProcessor(QObject* parent = nullptr);
~BeatProcessor();
~BeatProcessor() override;
signals:
void beat(smpl_t bpm);
+1 -1
View File
@@ -11,7 +11,7 @@ Q_OBJECT
public:
explicit CavaProcessor(QObject* parent = nullptr);
~CavaProcessor();
~CavaProcessor() override;
void setBars(int bars);
+7 -6
View File
@@ -4,8 +4,9 @@
#include <QList>
#include <QString>
#include <QQmlEngine>
#include <cstdint>
namespace ZShell::services {
namespace ZShell::Services {
struct DesktopItem {
QString fileName;
@@ -20,7 +21,7 @@ Q_OBJECT
QML_ELEMENT
public:
enum DesktopRoles {
enum DesktopRoles: std::uint16_t {
FileNameRole = Qt::UserRole + 1,
FilePathRole,
IsDirRole,
@@ -30,9 +31,9 @@ enum DesktopRoles {
explicit DesktopModel(QObject *parent = nullptr);
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
QHash<int, QByteArray> roleNames() const override;
[[nodiscard]] int rowCount(const QModelIndex &parent = QModelIndex()) const override;
[[nodiscard]] QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
[[nodiscard]] QHash<int, QByteArray> roleNames() const override;
Q_INVOKABLE void loadDirectory(const QString &path);
Q_INVOKABLE void moveIcon(int index, int newX, int newY);
@@ -43,4 +44,4 @@ QList<DesktopItem> m_items;
void saveCurrentLayout();
};
} // namespace ZShell::services
} // namespace ZShell::Services
@@ -4,7 +4,7 @@
#include <QVariantMap>
#include <QQmlEngine>
namespace ZShell::services {
namespace ZShell::Services {
class DesktopStateManager : public QObject {
Q_OBJECT
@@ -18,7 +18,7 @@ Q_INVOKABLE void saveLayout(const QVariantMap& layout);
Q_INVOKABLE QVariantMap getLayout();
private:
QString getConfigFilePath() const;
[[nodiscard]] QString getConfigFilePath() const;
};
} // namespace ZShell::services
@@ -7,7 +7,7 @@
#include <qqmlintegration.h>
#include <qtmetamacros.h>
namespace ZShell::services {
namespace ZShell::Services {
class HyprsunsetManager : public QObject {
Q_OBJECT
+1 -1
View File
@@ -3,7 +3,7 @@
#include <qobject.h>
#include <qset.h>
namespace ZShell::services {
namespace ZShell::Services {
class Service : public QObject {
Q_OBJECT