diff options
author | Paulo Alcantara <pcacjr@gmail.com> | 2011-12-08 16:11:31 +0000 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:56:18 -0300 |
commit | 508e59c0910752d6d745a659e792ce91401875b7 (patch) | |
tree | 7e6c275d2c0f5f8eac829b4c7011ae20427a25e3 | |
parent | 93bb5d777e6db0ba8d2b216832bf4211476c581e (diff) |
Fix BUG #1063
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
Reviewed-by: Willer Moreira <willer.moreira@openbossa.org>
Reviewed-by: Luciano Wolf <luciano.wolf@openbossa.org>
-rw-r--r-- | PySide/QtCore/typesystem_core.xml | 1 | ||||
-rw-r--r-- | tests/QtCore/CMakeLists.txt | 1 | ||||
-rw-r--r-- | tests/QtCore/bug_1063.py | 29 |
3 files changed, 31 insertions, 0 deletions
diff --git a/PySide/QtCore/typesystem_core.xml b/PySide/QtCore/typesystem_core.xml index 9ac07f6fe..a1a306817 100644 --- a/PySide/QtCore/typesystem_core.xml +++ b/PySide/QtCore/typesystem_core.xml @@ -2904,6 +2904,7 @@ <modify-function signature="operator<<(QBool)" remove="all"/> <modify-function signature="operator<<(unsigned int)" remove="all"/> <modify-function signature="operator<<(unsigned short)" remove="all"/> + <modify-function signature="operator<<(const char*)" remove="all"/> <modify-function signature="operator>>(char*)" remove="all"/> <modify-function signature="operator>>(char&)" remove="all"/> diff --git a/tests/QtCore/CMakeLists.txt b/tests/QtCore/CMakeLists.txt index 388d38c07..9e49b76d4 100644 --- a/tests/QtCore/CMakeLists.txt +++ b/tests/QtCore/CMakeLists.txt @@ -25,6 +25,7 @@ PYSIDE_TEST(bug_987.py) PYSIDE_TEST(bug_994.py) PYSIDE_TEST(bug_1019.py) PYSIDE_TEST(bug_1031.py) +PYSIDE_TEST(bug_1063.py) PYSIDE_TEST(bug_1069.py) PYSIDE_TEST(blocking_signals_test.py) PYSIDE_TEST(classinfo_test.py) diff --git a/tests/QtCore/bug_1063.py b/tests/QtCore/bug_1063.py new file mode 100644 index 000000000..3de10d293 --- /dev/null +++ b/tests/QtCore/bug_1063.py @@ -0,0 +1,29 @@ +''' unit test for BUG #1063 ''' + +import unittest +import tempfile +from PySide import QtCore +import os + +class QTextStreamTestCase(unittest.TestCase): + def setUp(self): + self.temp_file = tempfile.NamedTemporaryFile(delete=False) + self.temp_file.close() + self.f = QtCore.QFile(self.temp_file.name) + self.f.open(QtCore.QIODevice.WriteOnly) + self.strings = (u'foo', u'bar') + self.stream = QtCore.QTextStream(self.f) + + def testIt(self): + for s in self.strings: + self.stream << s + + self.f.close() + + # make sure we didn't get an empty file + self.assertNotEqual(QtCore.QFile(self.temp_file.name).size(), 0L) + + os.unlink(self.temp_file.name) + +if __name__ == "__main__": + unittest.main() |