aboutsummaryrefslogtreecommitdiffstats
path: root/shibokengenerator.cpp
diff options
context:
space:
mode:
authorHugo Lima <hugo.lima@openbossa.org>2010-02-18 13:59:22 -0200
committerHugo Lima <hugo.lima@openbossa.org>2010-02-18 14:02:47 -0200
commit01d4e01928987984c2d6b04f13794ce6776f7f67 (patch)
treee802513cfdd876356e17756dbae25bec2ddc2c10 /shibokengenerator.cpp
parent9dac886d87f546bd9d2ed3162192c0af5f733b74 (diff)
Write a verbose error messages when the function arguments don't match.
This will increase the binding size, so there's an option to disable verbose error messages. "--disable-verbose-error-messages" Reviewed by Renato Araújo <renato.filho@openbossa.org> and Marcelo Lira <marcelo.lira@openbossa.org>
Diffstat (limited to 'shibokengenerator.cpp')
-rw-r--r--shibokengenerator.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/shibokengenerator.cpp b/shibokengenerator.cpp
index dfb2a7c92..aeacb25b5 100644
--- a/shibokengenerator.cpp
+++ b/shibokengenerator.cpp
@@ -33,6 +33,7 @@
#define PARENT_CTOR_HEURISTIC "enable-parent-ctor-heuristic"
#define RETURN_VALUE_HEURISTIC "enable-return-value-heuristic"
#define ENABLE_PYSIDE_EXTENSIONS "enable-pyside-extensions"
+#define DISABLE_VERBOSE_ERROR_MESSAGES "disable-verbose-error-messages"
//static void dumpFunction(AbstractMetaFunctionList lst);
@@ -1287,6 +1288,7 @@ QMap<QString, QString> ShibokenGenerator::options() const
opts.insert(PARENT_CTOR_HEURISTIC, "Enable heuristics to detect parent relationship on constructors.");
opts.insert(RETURN_VALUE_HEURISTIC, "Enable heuristics to detect parent relationship on return values (USE WITH CAUTION!)");
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.");
+ opts.insert(DISABLE_VERBOSE_ERROR_MESSAGES, "Disable verbose error messages. Turn the python code hard to debug but safe few kB on the generated bindings.");
return opts;
}
@@ -1295,6 +1297,7 @@ bool ShibokenGenerator::doSetup(const QMap<QString, QString>& args)
m_useCtorHeuristic = args.contains(PARENT_CTOR_HEURISTIC);
m_usePySideExtensions = args.contains(ENABLE_PYSIDE_EXTENSIONS);
m_userReturnValueHeuristic = args.contains(RETURN_VALUE_HEURISTIC);
+ m_verboseErrorMessagesDisabled = args.contains(DISABLE_VERBOSE_ERROR_MESSAGES);
return true;
}
@@ -1332,3 +1335,9 @@ QString ShibokenGenerator::getTypeIndexVariableName(const TypeEntry* metaType)
res += "_IDX";
return res.toUpper();
}
+
+bool ShibokenGenerator::verboseErrorMessagesDisabled() const
+{
+ return m_verboseErrorMessagesDisabled;
+}
+