Fix bug273 - QT_VERSION and QT_VERSION_STR constants.
Reviewer: Renato Araújo <renato.filho@openbossa.org>
Marcelo Lira <marcelo.lira@openbossa.org>
This commit is contained in:
parent
630a4062ff
commit
34a06b8de4
3 changed files with 25 additions and 0 deletions
|
|
@ -522,6 +522,12 @@
|
||||||
%PYARG_0 = %CONVERTTOPYTHON[long](qAbs(%1));
|
%PYARG_0 = %CONVERTTOPYTHON[long](qAbs(%1));
|
||||||
</inject-code>
|
</inject-code>
|
||||||
</add-function>
|
</add-function>
|
||||||
|
|
||||||
|
<inject-code class="target" position="end">
|
||||||
|
PyModule_AddIntConstant(module, "QT_VERSION", QT_VERSION);
|
||||||
|
PyModule_AddStringConstant(module, "QT_VERSION_STR", QT_VERSION_STR);
|
||||||
|
</inject-code>
|
||||||
|
|
||||||
<enum-type name="QtMsgType"/>
|
<enum-type name="QtMsgType"/>
|
||||||
<enum-type name="QSystemSemaphore::AccessMode"/>
|
<enum-type name="QSystemSemaphore::AccessMode"/>
|
||||||
<enum-type name="QSystemSemaphore::SystemSemaphoreError"/>
|
<enum-type name="QSystemSemaphore::SystemSemaphoreError"/>
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,7 @@ PYSIDE_TEST(qobject_timer_event_test.py)
|
||||||
PYSIDE_TEST(qobject_tr_as_instance_test.py)
|
PYSIDE_TEST(qobject_tr_as_instance_test.py)
|
||||||
PYSIDE_TEST(qpoint_test.py)
|
PYSIDE_TEST(qpoint_test.py)
|
||||||
PYSIDE_TEST(qprocess_test.py)
|
PYSIDE_TEST(qprocess_test.py)
|
||||||
|
PYSIDE_TEST(qqtversion_test.py)
|
||||||
PYSIDE_TEST(qrect_test.py)
|
PYSIDE_TEST(qrect_test.py)
|
||||||
PYSIDE_TEST(qresource_test.py)
|
PYSIDE_TEST(qresource_test.py)
|
||||||
PYSIDE_TEST(qsize_test.py)
|
PYSIDE_TEST(qsize_test.py)
|
||||||
|
|
|
||||||
18
tests/QtCore/qqtversion_test.py
Normal file
18
tests/QtCore/qqtversion_test.py
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
from PySide import QtCore
|
||||||
|
|
||||||
|
|
||||||
|
class QQtVersionTest(unittest.TestCase):
|
||||||
|
'''Tests for QtCore.QT_VERSION and QT_VERSION_STR'''
|
||||||
|
|
||||||
|
def testVersion(self):
|
||||||
|
self.assert_(hex(QtCore.QT_VERSION) > 0x40500)
|
||||||
|
|
||||||
|
def testVersionStr(self):
|
||||||
|
self.assert_(QtCore.QT_VERSION_STR)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
unittest.main()
|
||||||
Loading…
Add table
Add a link
Reference in a new issue