moc: Fix Generator::registerableMetaType
when the type is a pointer to a registerable 1 argument template type. Task-number: QTBUG-31002 Change-Id: Iac0d6b71b2b805a1876110a0781d02188083c4e5 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
This commit is contained in:
parent
403c46b9b7
commit
e63b831bbd
@ -172,12 +172,12 @@ bool Generator::registerableMetaType(const QByteArray &propertyType)
|
|||||||
#undef STREAM_1ARG_TEMPLATE
|
#undef STREAM_1ARG_TEMPLATE
|
||||||
;
|
;
|
||||||
foreach (const QByteArray &oneArgTemplateType, oneArgTemplates)
|
foreach (const QByteArray &oneArgTemplateType, oneArgTemplates)
|
||||||
if (propertyType.startsWith(oneArgTemplateType + "<") && !propertyType.endsWith("&")) {
|
if (propertyType.startsWith(oneArgTemplateType + "<") && propertyType.endsWith(">")) {
|
||||||
const int argumentSize = propertyType.size() - oneArgTemplateType.size() - 1
|
const int argumentSize = propertyType.size() - oneArgTemplateType.size() - 1
|
||||||
// The closing '>'
|
// The closing '>'
|
||||||
- 1
|
- 1
|
||||||
// templates inside templates have an extra whitespace char to strip.
|
// templates inside templates have an extra whitespace char to strip.
|
||||||
- (propertyType.at(propertyType.size() - 2) == '>' ? 1 : 0 );
|
- (propertyType.at(propertyType.size() - 2) == ' ' ? 1 : 0 );
|
||||||
const QByteArray templateArg = propertyType.mid(oneArgTemplateType.size() + 1, argumentSize);
|
const QByteArray templateArg = propertyType.mid(oneArgTemplateType.size() + 1, argumentSize);
|
||||||
return isBuiltinType(templateArg) || registerableMetaType(templateArg);
|
return isBuiltinType(templateArg) || registerableMetaType(templateArg);
|
||||||
}
|
}
|
||||||
|
@ -325,6 +325,8 @@ public slots:
|
|||||||
signals:
|
signals:
|
||||||
void signalWithArray(const double[3]);
|
void signalWithArray(const double[3]);
|
||||||
void signalWithNamedArray(const double namedArray[3]);
|
void signalWithNamedArray(const double namedArray[3]);
|
||||||
|
void signalWithIterator(QList<QUrl>::iterator);
|
||||||
|
void signalWithListPointer(QList<QUrl>*); //QTBUG-31002
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
// for tst_Moc::preprocessorConditionals
|
// for tst_Moc::preprocessorConditionals
|
||||||
|
Loading…
x
Reference in New Issue
Block a user