diff options
Diffstat (limited to 'sinksh/syntax_modules/sink_list.cpp')
-rw-r--r-- | sinksh/syntax_modules/sink_list.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/sinksh/syntax_modules/sink_list.cpp b/sinksh/syntax_modules/sink_list.cpp index bb2f1fe..8507d48 100644 --- a/sinksh/syntax_modules/sink_list.cpp +++ b/sinksh/syntax_modules/sink_list.cpp | |||
@@ -82,7 +82,20 @@ bool list(const QStringList &args, State &state) | |||
82 | line << o.resourceInstanceIdentifier(); | 82 | line << o.resourceInstanceIdentifier(); |
83 | line << o.identifier(); | 83 | line << o.identifier(); |
84 | for (const auto &prop: query.requestedProperties) { | 84 | for (const auto &prop: query.requestedProperties) { |
85 | line << o.getProperty(prop).toString(); | 85 | const auto value = o.getProperty(prop); |
86 | if (value.isValid()) { | ||
87 | if (value.canConvert<QString>()) { | ||
88 | line << value.toString(); | ||
89 | } else if (value.canConvert<QByteArray>()) { | ||
90 | line << value.toByteArray(); | ||
91 | } else if (value.canConvert<QByteArrayList>()) { | ||
92 | line << value.value<QByteArrayList>().join(", "); | ||
93 | } else { | ||
94 | line << QString("Unprintable type: %1").arg(value.typeName()); | ||
95 | } | ||
96 | } else { | ||
97 | line << QString{}; | ||
98 | } | ||
86 | } | 99 | } |
87 | state.stageTableLine(line); | 100 | state.stageTableLine(line); |
88 | } | 101 | } |