diff options
author | Kent Hansen <kent.hansen@nokia.com> | 2012-02-21 13:06:35 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-04-17 16:57:23 +0200 |
commit | 405bf8f7b8e1b1174b80d64a5aeba39ed4e797ca (patch) | |
tree | 928a33d31d301d823b21e67e45d400b866c11600 /src/script/api | |
parent | 80451ee3dcb4b50f591759018edad27098eeb371 (diff) | |
download | qtscript-405bf8f7b8e1b1174b80d64a5aeba39ed4e797ca.tar.gz |
Adapt qtscript to QMetaMethod::signature() renaming
QMetaMethod::methodSignature() should be used instead, and it returns
a QByteArray.
Change-Id: I81150e238dab7eda26d0466ac407a4f3ba79a7c7
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Diffstat (limited to 'src/script/api')
-rw-r--r-- | src/script/api/qscriptengine.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp index 73e1549..5773983 100644 --- a/src/script/api/qscriptengine.cpp +++ b/src/script/api/qscriptengine.cpp @@ -621,7 +621,7 @@ JSC::JSValue JSC_HOST_CALL functionDisconnect(JSC::ExecState *exec, JSC::JSObjec if (sig.methodType() != QMetaMethod::Signal) { QString message = QString::fromLatin1("Function.prototype.disconnect: %0::%1 is not a signal") .arg(QLatin1String(qtSignal->metaObject()->className())) - .arg(QLatin1String(sig.signature())); + .arg(QLatin1String(sig.methodSignature().constData())); return JSC::throwError(exec, JSC::TypeError, message); } @@ -652,7 +652,7 @@ JSC::JSValue JSC_HOST_CALL functionDisconnect(JSC::ExecState *exec, JSC::JSObjec if (!ok) { QString message = QString::fromLatin1("Function.prototype.disconnect: failed to disconnect from %0::%1") .arg(QLatin1String(qtSignal->metaObject()->className())) - .arg(QLatin1String(sig.signature())); + .arg(QLatin1String(sig.methodSignature().constData())); return JSC::throwError(exec, JSC::GeneralError, message); } return JSC::jsUndefined(); @@ -685,7 +685,7 @@ JSC::JSValue JSC_HOST_CALL functionConnect(JSC::ExecState *exec, JSC::JSObject * if (sig.methodType() != QMetaMethod::Signal) { QString message = QString::fromLatin1("Function.prototype.connect: %0::%1 is not a signal") .arg(QLatin1String(qtSignal->metaObject()->className())) - .arg(QLatin1String(sig.signature())); + .arg(QLatin1String(sig.methodSignature().constData())); return JSC::throwError(exec, JSC::TypeError, message); } @@ -693,13 +693,13 @@ JSC::JSValue JSC_HOST_CALL functionConnect(JSC::ExecState *exec, JSC::JSObject * QList<int> overloads = qtSignal->overloadedIndexes(); if (!overloads.isEmpty()) { overloads.append(qtSignal->initialIndex()); - QByteArray signature = sig.signature(); + QByteArray signature = sig.methodSignature(); QString message = QString::fromLatin1("Function.prototype.connect: ambiguous connect to %0::%1(); candidates are\n") .arg(QLatin1String(qtSignal->metaObject()->className())) .arg(QLatin1String(signature.left(signature.indexOf('(')))); for (int i = 0; i < overloads.size(); ++i) { QMetaMethod mtd = meta->method(overloads.at(i)); - message.append(QString::fromLatin1(" %0\n").arg(QString::fromLatin1(mtd.signature()))); + message.append(QString::fromLatin1(" %0\n").arg(QString::fromLatin1(mtd.methodSignature().constData()))); } message.append(QString::fromLatin1("Use e.g. object['%0'].connect() to connect to a particular overload") .arg(QLatin1String(signature))); @@ -734,7 +734,7 @@ JSC::JSValue JSC_HOST_CALL functionConnect(JSC::ExecState *exec, JSC::JSObject * if (!ok) { QString message = QString::fromLatin1("Function.prototype.connect: failed to connect to %0::%1") .arg(QLatin1String(qtSignal->metaObject()->className())) - .arg(QLatin1String(sig.signature())); + .arg(QLatin1String(sig.methodSignature().constData())); return JSC::throwError(exec, JSC::GeneralError, message); } return JSC::jsUndefined(); |