Fixed code for setting QtCore.__version_info__ to not use Shiboken::makeTuple.
This commit is contained in:
parent
770c8bda73
commit
30118e265d
2 changed files with 9 additions and 6 deletions
|
|
@ -1,5 +0,0 @@
|
||||||
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);
|
|
||||||
|
|
@ -891,7 +891,15 @@
|
||||||
qAddPostRoutine(PySide::globalPostRoutineCallback);
|
qAddPostRoutine(PySide::globalPostRoutineCallback);
|
||||||
</inject-code>
|
</inject-code>
|
||||||
|
|
||||||
<inject-code class="target" position="end" file="glue/qt_version.cpp" />
|
<inject-code class="target" position="end">
|
||||||
|
QList<QByteArray> version = QByteArray(qVersion()).split('.');
|
||||||
|
PyObject* pyQtVersion = PyTuple_New(3);
|
||||||
|
for (int i = 0; i < 3; ++i)
|
||||||
|
PyTuple_SET_ITEM(pyQtVersion, i, PyInt_FromLong(version[i].toInt()));
|
||||||
|
PyModule_AddObject(module, "__version_info__", pyQtVersion);
|
||||||
|
PyModule_AddStringConstant(module, "__version__", qVersion());
|
||||||
|
</inject-code>
|
||||||
|
|
||||||
<inject-code class="target" position="end">
|
<inject-code class="target" position="end">
|
||||||
{ // Avoid name clash
|
{ // Avoid name clash
|
||||||
Shiboken::AutoDecRef atexit(Shiboken::Module::import("atexit"));
|
Shiboken::AutoDecRef atexit(Shiboken::Module::import("atexit"));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue