aboutsummaryrefslogtreecommitdiffstats
path: root/PySide/QtCore/glue/qt_version.cpp
diff options
context:
space:
mode:
authorrenatofilho <renato.filho@openbossa.org>2010-11-12 08:52:09 -0300
committerrenatofilho <renato.filho@openbossa.org>2010-11-12 14:25:27 -0300
commit178f81aa70711876fe492431ae32afa3538cf460 (patch)
tree08da3637fb25f36969e8e61daaf1700dc611dea6 /PySide/QtCore/glue/qt_version.cpp
parent655219636b1500e82d543914045f4cc7ba7db95f (diff)
Added PySide attributes to specify current version, and Qt version.
Fixes bug: #454 Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Luciano Wolf <luciano.wolf@openbossa.org>
Diffstat (limited to 'PySide/QtCore/glue/qt_version.cpp')
-rw-r--r--PySide/QtCore/glue/qt_version.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/PySide/QtCore/glue/qt_version.cpp b/PySide/QtCore/glue/qt_version.cpp
new file mode 100644
index 000000000..66f8c0049
--- /dev/null
+++ b/PySide/QtCore/glue/qt_version.cpp
@@ -0,0 +1,5 @@
+QList<QByteArray> version = QByteArray(qVersion()).split('.');
+PyObject *pyQtVersion = Shiboken::makeTuple(version[0].toInt(), version[1].toInt(), version[2].toInt());
+
+PyModule_AddStringConstant(module, "__version__", qVersion());
+PyModule_AddObject(module, "__version_info__", pyQtVersion);