summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--PySide/QtCore/typesystem_core_common.xml2
-rw-r--r--tests/QtCore/CMakeLists.txt1
-rw-r--r--tests/QtCore/bug_1104.py18
3 files changed, 20 insertions, 1 deletions
diff --git a/PySide/QtCore/typesystem_core_common.xml b/PySide/QtCore/typesystem_core_common.xml
index b0ea23d..017547f 100644
--- a/PySide/QtCore/typesystem_core_common.xml
+++ b/PySide/QtCore/typesystem_core_common.xml
@@ -311,7 +311,7 @@
%out = %OUTTYPE(in);
</add-conversion>
<add-conversion type="PyInt">
- int in = %CONVERTTOCPP[int](%in);
+ qlonglong in = %CONVERTTOCPP[qlonglong](%in);
%out = %OUTTYPE(in);
</add-conversion>
<add-conversion type="PyLong" check="PyLong_CheckExact(%in)">
diff --git a/tests/QtCore/CMakeLists.txt b/tests/QtCore/CMakeLists.txt
index 9e49b76..b383be4 100644
--- a/tests/QtCore/CMakeLists.txt
+++ b/tests/QtCore/CMakeLists.txt
@@ -27,6 +27,7 @@ PYSIDE_TEST(bug_1019.py)
PYSIDE_TEST(bug_1031.py)
PYSIDE_TEST(bug_1063.py)
PYSIDE_TEST(bug_1069.py)
+PYSIDE_TEST(bug_1104.py)
PYSIDE_TEST(blocking_signals_test.py)
PYSIDE_TEST(classinfo_test.py)
PYSIDE_TEST(child_event_test.py)
diff --git a/tests/QtCore/bug_1104.py b/tests/QtCore/bug_1104.py
new file mode 100644
index 0000000..b985f4f
--- /dev/null
+++ b/tests/QtCore/bug_1104.py
@@ -0,0 +1,18 @@
+''' unit test for BUG #1104 '''
+
+from PySide import QtCore
+import py3kcompat as py3k
+from helper import UsesQApplication
+import unittest
+
+class QSettingsTestCase(UsesQApplication):
+ def testSetValueWithLongInts(self):
+ s = QtCore.QSettings()
+ s.setValue("test", [(py3k.unicode_('36/37'), 65824, 69888),
+ (py3k.unicode_('38/39'), 4294902272, 4294906368),
+ (py3k.unicode_('40/41'), 4294902528, 4294906624),
+ (py3k.unicode_('new'), 65824, 69888)])
+ val = s.value("test")
+
+if __name__ == "__main__":
+ unittest.main()