1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-24 04:36:34 +01:00

PyFalkon: Add __version__ and __version_info__

This commit is contained in:
David Rosca 2018-02-26 20:29:13 +01:00
parent abd30880a5
commit 27506e3ba1
No known key found for this signature in database
GPG Key ID: EBC3FC294452C6D8

View File

@ -201,6 +201,15 @@
</inject-code>
</add-function>
<inject-code class="target" position="end">
QList&lt;QByteArray&gt; version = QByteArray(Qz::VERSION).split('.');
PyObject *pyFalkonVersion = PyTuple_New(3);
for (int i = 0; i &lt; 3; ++i)
PyTuple_SET_ITEM(pyFalkonVersion, i, PyInt_FromLong(version[i].toInt()));
PyModule_AddObject(module, "__version_info__", pyFalkonVersion);
PyModule_AddStringConstant(module, "__version__", Qz::VERSION);
</inject-code>
<suppress-warning text="Unable to translate type &quot;std::function&lt;QPoint (QSize)&gt;&quot;:*"/>
<suppress-warning text="Unable to translate type &quot;std::function&lt;void ()&gt;&quot;:*"/>
<suppress-warning text="skipping field 'ClickController::popupClosed'*"/>