summaryrefslogtreecommitdiff
path: root/tests/projects/qt/quickplugin/src/Foo.cpp
diff options
context:
space:
mode:
authorArthur LAURENT <[email protected]>2022-06-09 23:58:46 +0200
committerArthur LAURENT <[email protected]>2022-06-09 23:58:46 +0200
commit7b9a4f0ce02fc059e76fa9cba90425fd75f0326e (patch)
treee74bf06063f2daaf5b7f6ebc5a98a257c0c8745a /tests/projects/qt/quickplugin/src/Foo.cpp
parent50f55f6e0e7ce6a5474fb5dd784c90321371396c (diff)
Add qt.quickplugin test
Diffstat (limited to 'tests/projects/qt/quickplugin/src/Foo.cpp')
-rw-r--r--tests/projects/qt/quickplugin/src/Foo.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/projects/qt/quickplugin/src/Foo.cpp b/tests/projects/qt/quickplugin/src/Foo.cpp
new file mode 100644
index 000000000..83aceec6a
--- /dev/null
+++ b/tests/projects/qt/quickplugin/src/Foo.cpp
@@ -0,0 +1,16 @@
+#include "Foo.h"
+
+Foo::Foo(QObject *parent) : QObject { parent }, m_bar{ 0 } {
+}
+
+int Foo::bar() const noexcept {
+ return m_bar;
+}
+
+void Foo::setBar(int bar) noexcept {
+ if(bar == m_bar) return;
+
+ m_bar = bar;
+
+ Q_EMIT barChanged(m_bar);
+} \ No newline at end of file