summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2012-06-04 14:21:11 +0300
committerQt by Nokia <qt-info@nokia.com>2012-06-07 10:00:56 +0200
commit25949fb8527e5a7b11abe666b61f296d6b7170b6 (patch)
tree61508a12009f66786652933c7d59c19c4dba7e2c /src
parent723d4b86ce1303c513b3becea9f7c0a2d3227778 (diff)
downloadqtactiveqt-25949fb8527e5a7b11abe666b61f296d6b7170b6.tar.gz
Fix IDL generation for struct type optional parameters
A recently added optional QRect parameter for QWidget::grab() caused a build failure in most ActiveQt examples. Optional parameters apparently need to use VARIANT type in .idl file, but the parameter replacement logic didn't account for struct keyword, which is what QRect parameters get in earlier type conversion. Fixed similarly to the enum case. Note that QRect parameters don't seem to work at all even in 4.8, so this is simply a compile fix at this point. Task-number: QTBUG-25955 Change-Id: Ic1a2a2e69d5b9b34e4a2e1199275b961fe82d2c8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/activeqt/control/qaxserver.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/activeqt/control/qaxserver.cpp b/src/activeqt/control/qaxserver.cpp
index 6fe39ea..a27656d 100644
--- a/src/activeqt/control/qaxserver.cpp
+++ b/src/activeqt/control/qaxserver.cpp
@@ -741,6 +741,8 @@ static QByteArray addDefaultArguments(const QByteArray &prototype, int numDefArg
QByteArray type = ptype.mid(in, ptype.indexOf(' ', in) - in);
if (type == "enum")
type += ' ' + ptype.mid(in + 5, ptype.indexOf(' ', in + 5) - in - 5);
+ if (type == "struct")
+ type += ' ' + ptype.mid(in + 7, ptype.indexOf(' ', in + 7) - in - 7);
ptype.replace(in, type.length(), QByteArray("VARIANT /*was: ") + type + "*/");
--numDefArgs;
}