qdoc: Instantiator::objectAt now appear in docs
There was a bug in bool CppCodeParser::splitQmlMethodArg(), which has now been fixed. The bug occurred when there was a "::" in the return type. Change-Id: Id31ed0d4a03d84e76fb69403441a3491ec884ddc Task-number: QTBUG-47438 Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
This commit is contained in:
parent
8c5ce68fcf
commit
330da82cc2
@ -687,10 +687,10 @@ bool CppCodeParser::splitQmlPropertyArg(const QString& arg,
|
|||||||
<type> <QML-type>::<name>(<param>, <param>, ...)
|
<type> <QML-type>::<name>(<param>, <param>, ...)
|
||||||
<type> <QML-module>::<QML-type>::<name>(<param>, <param>, ...)
|
<type> <QML-module>::<QML-type>::<name>(<param>, <param>, ...)
|
||||||
|
|
||||||
This function splits the argument into one of those two
|
This function splits the \a{arg}ument into one of those
|
||||||
forms, sets \a module, \a qmlTypeName, and \a name, and returns
|
two forms, sets \a type, \a module, and \a qmlTypeName,
|
||||||
true. If the argument doesn't match either form, an error
|
and returns true. If the argument doesn't match either
|
||||||
message is emitted and false is returned.
|
form, an error message is emitted and false is returned.
|
||||||
|
|
||||||
\note The two QML types \e{Component} and \e{QtObject} never
|
\note The two QML types \e{Component} and \e{QtObject} never
|
||||||
have a module qualifier.
|
have a module qualifier.
|
||||||
@ -700,22 +700,22 @@ bool CppCodeParser::splitQmlMethodArg(const QString& arg,
|
|||||||
QString& module,
|
QString& module,
|
||||||
QString& qmlTypeName)
|
QString& qmlTypeName)
|
||||||
{
|
{
|
||||||
QStringList colonSplit(arg.split("::"));
|
QString name;
|
||||||
if (colonSplit.size() > 1) {
|
int leftParen = arg.indexOf(QChar('('));
|
||||||
QStringList blankSplit = colonSplit[0].split(QLatin1Char(' '));
|
if (leftParen > 0)
|
||||||
if (blankSplit.size() > 1) {
|
name = arg.left(leftParen);
|
||||||
type = blankSplit[0];
|
else
|
||||||
if (colonSplit.size() > 2) {
|
name = arg;
|
||||||
module = blankSplit[1];
|
int firstBlank = name.indexOf(QChar(' '));
|
||||||
qmlTypeName = colonSplit[1];
|
if (firstBlank > 0) {
|
||||||
|
type = name.left(firstBlank);
|
||||||
|
name = name.right(name.length() - firstBlank - 1);
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
module.clear();
|
|
||||||
qmlTypeName = blankSplit[1];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
type.clear();
|
type.clear();
|
||||||
|
|
||||||
|
QStringList colonSplit(name.split("::"));
|
||||||
|
if (colonSplit.size() > 1) {
|
||||||
if (colonSplit.size() > 2) {
|
if (colonSplit.size() > 2) {
|
||||||
module = colonSplit[0];
|
module = colonSplit[0];
|
||||||
qmlTypeName = colonSplit[1];
|
qmlTypeName = colonSplit[1];
|
||||||
@ -724,7 +724,6 @@ bool CppCodeParser::splitQmlMethodArg(const QString& arg,
|
|||||||
module.clear();
|
module.clear();
|
||||||
qmlTypeName = colonSplit[0];
|
qmlTypeName = colonSplit[0];
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
QString msg = "Unrecognizable QML module/component qualifier for " + arg;
|
QString msg = "Unrecognizable QML module/component qualifier for " + arg;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user