summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2024-02-20 08:27:28 +0100
committerIvan Solovev <ivan.solovev@qt.io>2024-02-22 15:57:17 +0000
commit448d4f847a263d88ee2149a728bcb390e15cefbc (patch)
tree09f2d182731b32a228695688ac9e487ef0927561
parent211e51b81ec9800161d0a98c6f70c747701035e8 (diff)
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. Pick-to: 6.7 Change-Id: I316cb5e49f3476adc5ff5abb023b9d74303ab640 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
-rw-r--r--src/dbus/qdbusintrospection_p.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/dbus/qdbusintrospection_p.h b/src/dbus/qdbusintrospection_p.h
index 947fc8d8a3..a9d96e62a9 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;