summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLauro Neto <lauro.neto@openbossa.org>2010-09-17 20:13:58 -0300
committerrenatofilho <renato.filho@openbossa.org>2010-09-20 14:13:25 -0300
commit2b8f4f3d19256f306be1c354eb62a7b367926d43 (patch)
treee27ad0a886b96053e8a35d5a41934fe6cc4ea510 /tests
parent42a3b42f8a00e94dd10e786210739fee7878cf51 (diff)
downloadshiboken-2b8f4f3d19256f306be1c354eb62a7b367926d43.tar.gz
shiboken-2b8f4f3d19256f306be1c354eb62a7b367926d43.tar.xz
shiboken-2b8f4f3d19256f306be1c354eb62a7b367926d43.zip
Fix OverloadData::isSingleArgument
Now returning true *only* when exactly all overloads accept exactly 1 argument. Fixes compilation of QAudioInput and QAudioOutput from QtMultimedia. Both have start() and start(QIODevice*) overloads, and the previous code was generating 'arg' instead of 'pyargs'. Reviewer: Renato Ara├║jo <renato.filho@openbossa.org> Luciano Wolf <luciano.wolf@openbossa.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/libsample/overload.h3
-rw-r--r--tests/samplebinding/typesystem_sample.xml5
2 files changed, 8 insertions, 0 deletions
diff --git a/tests/libsample/overload.h b/tests/libsample/overload.h
index 739c4065..36b30f2b 100644
--- a/tests/libsample/overload.h
+++ b/tests/libsample/overload.h
@@ -57,6 +57,9 @@ public:
inline int intOverloads(const Point& p, double d) { return 1; }
inline int intOverloads(int i, int i2) { return 2; }
inline int intOverloads(int i, int removedArg, double d) { return 3; }
+
+ void singleOverload(Point* x) {}
+ Point* singleOverload() {return new Point();}
};
#endif // OVERLOAD_H
diff --git a/tests/samplebinding/typesystem_sample.xml b/tests/samplebinding/typesystem_sample.xml
index 40b70ab4..4f98dff4 100644
--- a/tests/samplebinding/typesystem_sample.xml
+++ b/tests/samplebinding/typesystem_sample.xml
@@ -978,6 +978,11 @@
%PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](%CPPSELF.%FUNCTION_NAME(%1, 2, %3));
</inject-code>
</modify-function>
+ <modify-function signature="singleOverload(Point*)">
+ <modify-argument index="1">
+ <define-ownership owner="c++"/>
+ </modify-argument>
+ </modify-function>
</value-type>
<object-type name="Collector" stream="yes"/>