diff options
-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() |