summaryrefslogtreecommitdiff
path: root/plugin/src/Caelestia/toaster.hpp
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-10-14 16:00:17 +1100
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-10-14 16:00:17 +1100
commit27953a89d1110d6cc82ff198e1c28f698104d554 (patch)
tree69b302d1f8c0150c9a61e57dad9b0dd80ff11e48 /plugin/src/Caelestia/toaster.hpp
parenttoasts: add toast for kb layout change (diff)
downloadcaelestia-shell-27953a89d1110d6cc82ff198e1c28f698104d554.tar.gz
caelestia-shell-27953a89d1110d6cc82ff198e1c28f698104d554.tar.bz2
caelestia-shell-27953a89d1110d6cc82ff198e1c28f698104d554.zip
internal: use QQmlListProperty
Fix lsp errors
Diffstat (limited to 'plugin/src/Caelestia/toaster.hpp')
-rw-r--r--plugin/src/Caelestia/toaster.hpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugin/src/Caelestia/toaster.hpp b/plugin/src/Caelestia/toaster.hpp
index 0197aa1..1f61734 100644
--- a/plugin/src/Caelestia/toaster.hpp
+++ b/plugin/src/Caelestia/toaster.hpp
@@ -2,6 +2,7 @@
#include <qobject.h>
#include <qqmlintegration.h>
+#include <qqmllist.h>
#include <qset.h>
namespace caelestia {
@@ -61,12 +62,12 @@ class Toaster : public QObject {
QML_ELEMENT
QML_SINGLETON
- Q_PROPERTY(QList<Toast*> toasts READ toasts NOTIFY toastsChanged)
+ Q_PROPERTY(QQmlListProperty<caelestia::Toast> toasts READ toasts NOTIFY toastsChanged)
public:
explicit Toaster(QObject* parent = nullptr);
- [[nodiscard]] QList<Toast*> toasts() const;
+ [[nodiscard]] QQmlListProperty<Toast> toasts();
Q_INVOKABLE void toast(const QString& title, const QString& message, const QString& icon = QString(),
caelestia::Toast::Type type = Toast::Type::Info, int timeout = 5000);