aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Filho <renato.filho@openbossa.org>2010-08-02 15:54:35 -0300
committerRenato Filho <renato.filho@openbossa.org>2010-08-02 17:49:50 -0300
commitf098bb9f3ab5034d8fd04f5ea06e7128bee50d5a (patch)
tree56b0669080ec65af533f685ff49b5f9aac1274fc
parent34a06b8de43767cc206d2a200c84e5505516e111 (diff)
Included support to double values on qAbs.
Fixes bug #269. Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Luciano Wolf <luciano.wolf@openbossa.org>
-rw-r--r--PySide/QtCore/typesystem_core.xml4
-rw-r--r--tests/QtCore/qabs_test.py3
2 files changed, 4 insertions, 3 deletions
diff --git a/PySide/QtCore/typesystem_core.xml b/PySide/QtCore/typesystem_core.xml
index 9d38208ed..94a0a8c4e 100644
--- a/PySide/QtCore/typesystem_core.xml
+++ b/PySide/QtCore/typesystem_core.xml
@@ -517,9 +517,9 @@
<include file-name="QTextDocument" location="global"/>
</extra-includes>
</namespace-type>
- <add-function signature="qAbs(long)" return-type="long">
+ <add-function signature="qAbs(double)" return-type="double">
<inject-code class="target" position="beginning">
- %PYARG_0 = %CONVERTTOPYTHON[long](qAbs(%1));
+ %PYARG_0 = %CONVERTTOPYTHON[double](qAbs(%1));
</inject-code>
</add-function>
diff --git a/tests/QtCore/qabs_test.py b/tests/QtCore/qabs_test.py
index 1727ae6d5..37ff9c7cd 100644
--- a/tests/QtCore/qabs_test.py
+++ b/tests/QtCore/qabs_test.py
@@ -14,7 +14,8 @@ class QAbsTest(unittest.TestCase):
check(0)
check(-10)
check(10)
-
+ check(10.5)
+ check(-10.5)
if __name__ == '__main__':
unittest.main()