summaryrefslogtreecommitdiff
path: root/share/qtcreator/cplusplus/examples/icontest.cpp
diff options
context:
space:
mode:
authorAlessandro Portale <alessandro.portale@qt.io>2022-02-04 12:15:45 +0100
committerAlessandro Portale <alessandro.portale@qt.io>2022-02-04 16:21:21 +0000
commit08535a7e6308c688924ea503a00cb807812197a8 (patch)
tree04f21d2354f6af47892febdc96667bdbaea53e38 /share/qtcreator/cplusplus/examples/icontest.cpp
parent96ec295fc6393770e91802ab5824333792369527 (diff)
downloadqt-creator-08535a7e6308c688924ea503a00cb807812197a8.tar.gz
Make share/qtcreator/cplusplus/examples compilable
Builds now, but does not link (which is fine). And unrelated, unintentional warnings were removed. Change-Id: I6ece33933bc20e6e36fb3859de7c2b774b0e67d5 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Diffstat (limited to 'share/qtcreator/cplusplus/examples/icontest.cpp')
-rw-r--r--share/qtcreator/cplusplus/examples/icontest.cpp22
1 files changed, 12 insertions, 10 deletions
diff --git a/share/qtcreator/cplusplus/examples/icontest.cpp b/share/qtcreator/cplusplus/examples/icontest.cpp
index 2aea615fd2..764c920b93 100644
--- a/share/qtcreator/cplusplus/examples/icontest.cpp
+++ b/share/qtcreator/cplusplus/examples/icontest.cpp
@@ -27,12 +27,13 @@
#define Macro
-class Class {
+class Class : public QObject {
Q_OBJECT
+
public:
- Q_PROPERTY(bool property READ readProperty CONSTANT);
- void publicFunction();
- void static publicStaticFunction();
+ Q_PROPERTY(int property READ publicStaticFunction CONSTANT)
+ int publicFunction() { return 0; }
+ int static publicStaticFunction() { return 0; }
template<int> void publicTemplateFunction();
template<int> void static publicStaticTemplateFunction();
@@ -43,8 +44,8 @@ signals:
void signal();
public slots:
- void publicSlot();
- template<int> void publicTemplateSlot();
+ void publicSlot() {}
+ // template<int> void publicTemplateSlot() {}
protected:
void protectedFunction();
@@ -56,8 +57,8 @@ protected:
int static protectedStaticVariable;
protected slots:
- void protectedSlot();
- template<int> void protectedTemplateSlot();
+ void protectedSlot() {}
+ // template<int> void protectedTemplateSlot() {}
private:
void privateFunction();
@@ -67,9 +68,10 @@ private:
template<int> void static privateStaticTemplateFunction();
private slots:
- void privateSlot();
- template<int> void privateTemplateSlot();
+ void privateSlot() {}
+ // template<int> void privateTemplateSlot() {}
+private:
int privateVariable;
int static privateStaticVariable;
};