aboutsummaryrefslogtreecommitdiffstats
path: root/shibokengenerator.cpp
diff options
context:
space:
mode:
authorHugo Lima <hugo.lima@openbossa.org>2009-12-15 12:21:34 -0200
committerHugo Lima <hugo.lima@openbossa.org>2009-12-16 15:39:12 -0200
commit0133a99f71e88c9e0642f05a7d55ef798275260a (patch)
treed75b59340f94e9add0825eda50070e0f55c87896 /shibokengenerator.cpp
parentf41cf0af8ed705d342ea448acac89659eea64bfd (diff)
Added the option --enable-pyside-extensions to enable PySide extensions.
You need to enable these extensions if you are generating a binding for a Qt-based library and need to pass some types through the signal slots mechanism. If you turn this flag on, you also need to link the generated bindings with the libpyside, besides add libpyside include path to your project. Reviewed by Marcelo Lira <marcelo.lira@openbossa.org>
Diffstat (limited to 'shibokengenerator.cpp')
-rw-r--r--shibokengenerator.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/shibokengenerator.cpp b/shibokengenerator.cpp
index 79a4a7f4e..d8b4aefb2 100644
--- a/shibokengenerator.cpp
+++ b/shibokengenerator.cpp
@@ -30,6 +30,7 @@
#define NULL_VALUE "NULL"
#define PARENT_CTOR_HEURISTIC "enable-parent-ctor-heuristic"
+#define ENABLE_PYSIDE_EXTENSIONS "enable-pyside-extensions"
static Indentor INDENT;
//static void dumpFunction(AbstractMetaFunctionList lst);
@@ -1192,12 +1193,14 @@ QMap<QString, QString> ShibokenGenerator::options() const
{
QMap<QString, QString> opts(Generator::options());
opts.insert(PARENT_CTOR_HEURISTIC, "Enable heuristics to detect parent relationship on constructors.");
+ opts.insert(ENABLE_PYSIDE_EXTENSIONS, "Enable PySide extensions, such as support for signal/slots, use this if you are creating a binding for a Qt-based library.");
return opts;
}
bool ShibokenGenerator::doSetup(const QMap<QString, QString>& args)
{
m_useCtorHeuristic = args.contains(PARENT_CTOR_HEURISTIC);
+ m_usePySideExtensions = args.contains(ENABLE_PYSIDE_EXTENSIONS);
return true;
}
@@ -1206,3 +1209,8 @@ bool ShibokenGenerator::useCtorHeuristic() const
return m_useCtorHeuristic;
}
+bool ShibokenGenerator::usePySideExtensions() const
+{
+ return m_usePySideExtensions;
+}
+