summaryrefslogtreecommitdiffstats
path: root/src/activeqt/control
diff options
context:
space:
mode:
Diffstat (limited to 'src/activeqt/control')
-rw-r--r--src/activeqt/control/qaxserver.cpp7
-rw-r--r--src/activeqt/control/qaxserverbase.cpp10
2 files changed, 7 insertions, 10 deletions
diff --git a/src/activeqt/control/qaxserver.cpp b/src/activeqt/control/qaxserver.cpp
index aec88e6..7ba1515 100644
--- a/src/activeqt/control/qaxserver.cpp
+++ b/src/activeqt/control/qaxserver.cpp
@@ -948,7 +948,7 @@ static HRESULT classIDL(QObject *o, const QMetaObject *mo, const QString &classN
if (i <= qtSlots && ignoreSlots(name))
continue;
- signature = signature.mid(name.length() + 1);
+ signature.remove(0, name.length() + 1);
signature.truncate(signature.length() - 1);
name = renameOverloads(replaceKeyword(name));
if (ignoreSlots(name))
@@ -968,7 +968,8 @@ static HRESULT classIDL(QObject *o, const QMetaObject *mo, const QString &classN
if (!ok)
outBuffer += "\t/****** Slot parameter uses unsupported datatype\n";
- outBuffer += "\t\t[id(" + QString::number(id).toLatin1() + ")] " + type + ' ' + name + '(' + ptype + ");\n";
+ outBuffer += "\t\t[id(" + QByteArray::number(id) + ")] " + type + ' '
+ + name + '(' + ptype + ");\n";
if (!ok)
outBuffer += "\t******/\n";
@@ -1014,7 +1015,7 @@ static HRESULT classIDL(QObject *o, const QMetaObject *mo, const QString &classN
QByteArray signature(signal.methodSignature());
QByteArray name(signature.left(signature.indexOf('(')));
- signature = signature.mid(name.length() + 1);
+ signature.remove(0, name.length() + 1);
signature.truncate(signature.length() - 1);
QList<QByteArray> parameterTypes(signal.parameterTypes());
diff --git a/src/activeqt/control/qaxserverbase.cpp b/src/activeqt/control/qaxserverbase.cpp
index 583cb76..d6af214 100644
--- a/src/activeqt/control/qaxserverbase.cpp
+++ b/src/activeqt/control/qaxserverbase.cpp
@@ -1969,7 +1969,7 @@ int QAxServerBase::qt_metacall(QMetaObject::Call call, int index, void **argv)
}
}
- signature = signature.mid(name.length() + 1);
+ signature.remove(0, name.length() + 1);
signature.truncate(signature.length() - 1);
if (!signature.isEmpty())
@@ -2615,13 +2615,9 @@ HRESULT WINAPI QAxServerBase::Invoke(DISPID dispidMember, REFIID riid,
if (!exception->context.isNull()) {
QString context = exception->context;
int contextID = 0;
- int br = context.indexOf(QLatin1Char('['));
+ const int br = context.indexOf(QLatin1Char('[')); // "error[42]"
if (br != -1) {
- context = context.mid(br+1);
- context.chop(1);
- contextID = context.toInt();
-
- context = exception->context;
+ contextID = context.midRef(br + 1, context.size() - br - 2).toInt();
context.truncate(br-1);
}
pexcepinfo->bstrHelpFile = QStringToBSTR(context);