aboutsummaryrefslogtreecommitdiff
path: root/tests/GenerateSipBindings/cpplib.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/GenerateSipBindings/cpplib.h')
-rw-r--r--tests/GenerateSipBindings/cpplib.h113
1 files changed, 113 insertions, 0 deletions
diff --git a/tests/GenerateSipBindings/cpplib.h b/tests/GenerateSipBindings/cpplib.h
new file mode 100644
index 00000000..f8db75b5
--- /dev/null
+++ b/tests/GenerateSipBindings/cpplib.h
@@ -0,0 +1,113 @@
+
+#pragma once
+
+#include <QtCore/QObject>
+#include <QtCore/QMap>
+
+#include <functional>
+
+class FwdDecl;
+
+class MyObject : public QObject
+{
+ Q_OBJECT
+public:
+ MyObject(QObject* parent = nullptr);
+
+ enum LocalEnum {
+ Val1 = 1,
+ Val2
+ };
+ Q_DECLARE_FLAGS(LocalEnums, LocalEnum)
+
+ enum {
+ AnonVal1,
+ AnonVal2
+ };
+
+ double unnamedParameters(int, double);
+
+ int addThree(int input) const;
+ QList<int> addThree(QList<int> input) const;
+
+ const QString addThree(const QString& input, const QString& prefix = QStringLiteral("Default")) const;
+
+ int findNeedle(QStringList list, QString needle, Qt::MatchFlags flags = Qt::MatchFlags(Qt::MatchStartsWith | Qt::MatchWrap)) const;
+
+ int qtEnumTest(QFlags<Qt::MatchFlag> flags);
+ int localEnumTest(QFlags<MyObject::LocalEnum> flags);
+
+ int functionParam(std::function<int()> fn);
+ int groups(unsigned int maxCount = std::numeric_limits<uint>::max()) const;
+
+ int const_parameters(const int input, QObject* const obj = 0) const;
+
+ int fwdDecl(const FwdDecl& f);
+ int fwdDeclRef(FwdDecl& f);
+
+signals:
+ void publicSlotCalled();
+
+Q_SIGNALS:
+ void privateSlotCalled();
+ void protectedSlotCalled();
+
+public slots:
+ void publicSlot1();
+
+public Q_SLOTS:
+ void publicSlot2();
+
+protected slots:
+ void protectedSlot1();
+
+protected Q_SLOTS:
+ void protectedSlot2();
+
+private slots:
+ void privateSlot1();
+
+private Q_SLOTS:
+ void privateSlot2();
+};
+
+class NonCopyable
+{
+public:
+ NonCopyable();
+ ~NonCopyable();
+
+private:
+ int* const mNum;
+};
+
+
+class NonCopyableByMacro
+{
+public:
+ NonCopyableByMacro();
+
+private:
+ Q_DISABLE_COPY(NonCopyableByMacro)
+};
+
+class HasPrivateDefaultCtor
+{
+public:
+private:
+ HasPrivateDefaultCtor(int param = 0);
+};
+
+namespace SomeNS {
+
+class NonCopyableInNS
+{
+public:
+ NonCopyableInNS();
+ ~NonCopyableInNS();
+
+private:
+ int* const mNum;
+};
+
+}