From 368f788ba1e4a9359077a4c142ecf8a1568b50ad Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Tue, 20 Feb 2024 08:27:28 +0100 Subject: [PATCH] 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 (cherry picked from commit 448d4f847a263d88ee2149a728bcb390e15cefbc) Reviewed-by: Qt Cherry-pick Bot --- src/dbus/qdbusintrospection_p.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/dbus/qdbusintrospection_p.h b/src/dbus/qdbusintrospection_p.h index 947fc8d8a3b..a9d96e62a90 100644 --- a/src/dbus/qdbusintrospection_p.h +++ b/src/dbus/qdbusintrospection_p.h @@ -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;