aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--PySide/QtCore/typesystem_core_common.xml21
-rw-r--r--tests/QtNetwork/CMakeLists.txt1
-rw-r--r--tests/QtNetwork/bug_1084.py16
3 files changed, 25 insertions, 13 deletions
diff --git a/PySide/QtCore/typesystem_core_common.xml b/PySide/QtCore/typesystem_core_common.xml
index aa39e9536..a2e1deb6b 100644
--- a/PySide/QtCore/typesystem_core_common.xml
+++ b/PySide/QtCore/typesystem_core_common.xml
@@ -2666,20 +2666,15 @@
<modify-function signature="waitForReadyRead(int)" allow-thread="yes"/>
<modify-function signature="waitForBytesWritten(int)" allow-thread="yes"/>
<!-- ### peek(qint64) do the job -->
- <modify-function signature="peek(char *,qint64)" remove="all"/>
+ <modify-function signature="peek(char*, qint64)" remove="all"/>
<!-- ### read(qint64) do the job -->
- <modify-function signature="read(char *,qint64)" remove="all"/>
+ <modify-function signature="read(char*, qint64)" remove="all"/>
<!-- ### readLine(qint64) do the job -->
- <modify-function signature="readLine(char *,qint64)" remove="all"/>
+ <modify-function signature="readLine(char*, qint64)" remove="all"/>
<!-- ### write(str) do the job -->
- <modify-function signature="write(const char *,qint64)" remove="all"/>
- <modify-function signature="write(const char *)">
- <inject-code>
- %RETURN_TYPE %0 = %CPPSELF.%FUNCTION_NAME(%1, Shiboken::String::len(%PYARG_1));
- %PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](%0);
- </inject-code>
- </modify-function>
- <modify-function signature="getChar(char *)">
+ <modify-function signature="write(const char*, qint64)" remove="all"/>
+ <modify-function signature="write(const char*)" remove="all"/>
+ <modify-function signature="getChar(char*)">
<modify-argument index="1">
<remove-argument />
<remove-default-expression />
@@ -2688,7 +2683,7 @@
<insert-template name="fix_char*" />
</inject-code>
</modify-function>
- <modify-function signature="readData(char *,qint64)">
+ <modify-function signature="readData(char*, qint64)">
<inject-code class="target">
QByteArray ba;
ba.resize(%2);
@@ -2712,7 +2707,7 @@
</conversion-rule>
</modify-argument>
</modify-function>
- <modify-function signature="readLineData(char *,qint64)">
+ <modify-function signature="readLineData(char*, qint64)">
<inject-code class="target">
QByteArray ba;
ba.resize(%2);
diff --git a/tests/QtNetwork/CMakeLists.txt b/tests/QtNetwork/CMakeLists.txt
index 307715547..7476f9193 100644
--- a/tests/QtNetwork/CMakeLists.txt
+++ b/tests/QtNetwork/CMakeLists.txt
@@ -1,4 +1,5 @@
PYSIDE_TEST(bug_446.py)
+PYSIDE_TEST(bug_1084.py)
PYSIDE_TEST(basic_auth_test.py)
PYSIDE_TEST(accessManager_test.py)
PYSIDE_TEST(http_test.py)
diff --git a/tests/QtNetwork/bug_1084.py b/tests/QtNetwork/bug_1084.py
new file mode 100644
index 000000000..9d8471c04
--- /dev/null
+++ b/tests/QtNetwork/bug_1084.py
@@ -0,0 +1,16 @@
+''' unit test for BUG #1084 '''
+
+import unittest
+from PySide import QtNetwork
+import py3kcompat as py3k
+
+class QTcpSocketTestCase(unittest.TestCase):
+ def setUp(self):
+ self.sock = QtNetwork.QTcpSocket()
+ self.sock.connectToHost('127.0.0.1', 25)
+
+ def testIt(self):
+ self.sock.write(py3k.unicode_('quit'))
+
+if __name__ == "__main__":
+ unittest.main()