aboutsummaryrefslogtreecommitdiff
path: root/tests/GenerateSipBindings/cpplib.h
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2017-01-10 08:44:21 +0000
committerStephen Kelly <steveire@gmail.com>2017-01-10 08:44:21 +0000
commit51b7b494213643c9808efecf6a7372d3b63c6f50 (patch)
tree2142c7029e8964b677febca1a7bc61e2ed5dfbaf /tests/GenerateSipBindings/cpplib.h
parentb5a18440f45d8218dbdd76d76f7fd1e54d352712 (diff)
downloadextra-cmake-modules-51b7b494213643c9808efecf6a7372d3b63c6f50.tar.gz
extra-cmake-modules-51b7b494213643c9808efecf6a7372d3b63c6f50.tar.bz2
Bindings: Correctly handle access specifiers within macros
The Q_DECLARE_TR_FUNCTIONS macro contains a `public:` access specifier, but the sip_generator just pastes the entire macro name. Adjust the generator to extract the correct access specifier.
Diffstat (limited to 'tests/GenerateSipBindings/cpplib.h')
-rw-r--r--tests/GenerateSipBindings/cpplib.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/GenerateSipBindings/cpplib.h b/tests/GenerateSipBindings/cpplib.h
index ba8e9f27..81ad2038 100644
--- a/tests/GenerateSipBindings/cpplib.h
+++ b/tests/GenerateSipBindings/cpplib.h
@@ -5,6 +5,7 @@
#include <QtCore/QString>
#include <QtCore/QStringList>
#include <QtCore/QMap>
+#include <QtCore/QCoreApplication>
#include <functional>
@@ -85,12 +86,13 @@ private:
int* const mNum;
};
-
class NonCopyableByMacro
{
public:
NonCopyableByMacro();
+ Q_DECLARE_TR_FUNCTIONS(NonCopyableByMacro)
+
private:
Q_DISABLE_COPY(NonCopyableByMacro)
};