aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2016-12-20 13:36:42 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2016-12-22 07:32:06 +0000
commit964f9143962c071932350b85b4aa7e14c1434a5b (patch)
tree774b5594fefe9cb7cf2954a7b817343bd311f8b2
parent3e5822422f6d1ca16a43024b22feb9eacad11acf (diff)
Fix test QtWidgets/bug_722.py
The test used to fail with: Traceback (most recent call last): File "bug_722.py", line 47, in testQRealSignal effect.blurRadiusChanged['qreal'].connect(foo1.setValue) # check if qreal is a valid type IndexError: Signature blurRadiusChanged(qreal) not found for signal: blurRadiusChanged The signatures changes from setBlurRadius(qreal) (Qt 4) to setBlurRadius(double) (Qt 5) due to the metaobject resolving types. Task-number: PYSIDE-431 Change-Id: I240aac7adf34220a2e1016a0ba5ed78f5f51753b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
-rw-r--r--libpyside/pysidesignal.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/libpyside/pysidesignal.cpp b/libpyside/pysidesignal.cpp
index c258d1e8..e0aba2f3 100644
--- a/libpyside/pysidesignal.cpp
+++ b/libpyside/pysidesignal.cpp
@@ -629,7 +629,10 @@ char* getTypeName(PyObject* type)
} else if (type == Py_None) { // Must be checked before as Shiboken::String::check accepts Py_None
return strdup("void");
} else if (Shiboken::String::check(type)) {
- return strdup(Shiboken::String::toCString(type));
+ const char *result = Shiboken::String::toCString(type);
+ if (!strcmp(result, "qreal"))
+ result = sizeof(qreal) == sizeof(double) ? "double" : "float";
+ return strdup(result);
}
return 0;
}