QDBusIntrospection: fix position of Annotation definition

When 2e8a48c1cdc8547ec47f097a41dd53c641715b77 made
Annotations::mapped_type a struct Annotation instead of just QString,
it inserted the Annotation definition after the first inline user of
Annotations (struct Method).

I don't know why this compiled in the first place, but it did,
probably because of the re-parse-everything-at-closing-of-class rule,
but there's no reason to not move it to before the first users, so do
that.

Found while trying to make QDBusIntrospection a namespace instead of a
struct.

Amends 2e8a48c1cdc8547ec47f097a41dd53c641715b77.

Change-Id: I316cb5e49f3476adc5ff5abb023b9d74303ab640
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 448d4f847a263d88ee2149a728bcb390e15cefbc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Marc Mutz 2024-02-20 08:27:28 +01:00 committed by Qt Cherry-pick Bot
parent 175f2c4f33
commit 368f788ba1

View File

@ -67,6 +67,18 @@ public:
Q_ATTRIBUTE_FORMAT_PRINTF(3, 4) = 0;
};
struct Annotation
{
SourceLocation location;
QString name;
QString value;
inline bool operator==(const Annotation &other) const
{
return name == other.name && value == other.value;
}
};
struct Argument
{
SourceLocation location;
@ -116,18 +128,6 @@ public:
annotations == other.annotations && type == other.type; }
};
struct Annotation
{
SourceLocation location;
QString name;
QString value;
inline bool operator==(const Annotation &other) const
{
return name == other.name && value == other.value;
}
};
struct Interface: public QSharedData
{
SourceLocation location;