diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-02-15 18:29:46 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-02-16 10:39:59 +0100 |
commit | 80f8c4a48b8cbb359c4efdb9a13485bf86b4d1ed (patch) | |
tree | 71bf67319f53d5967daacfafd50d44aad4efbc9e | |
parent | 0ecabf708cd56e0312392cca6d85aa8c3f2e7ccc (diff) | |
download | sink-80f8c4a48b8cbb359c4efdb9a13485bf86b4d1ed.tar.gz sink-80f8c4a48b8cbb359c4efdb9a13485bf86b4d1ed.zip |
sinksh list apply resource filter and print BLOB properties
-rw-r--r-- | sinksh/syntax_modules/sink_list.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sinksh/syntax_modules/sink_list.cpp b/sinksh/syntax_modules/sink_list.cpp index d63749b..7421b89 100644 --- a/sinksh/syntax_modules/sink_list.cpp +++ b/sinksh/syntax_modules/sink_list.cpp | |||
@@ -70,6 +70,8 @@ QStringList printToList(const Sink::ApplicationDomain::ApplicationDomainType &o, | |||
70 | if (value.isValid()) { | 70 | if (value.isValid()) { |
71 | if (value.canConvert<Sink::ApplicationDomain::Reference>()) { | 71 | if (value.canConvert<Sink::ApplicationDomain::Reference>()) { |
72 | line << compressId(compact, value.toByteArray()); | 72 | line << compressId(compact, value.toByteArray()); |
73 | } else if (value.canConvert<Sink::ApplicationDomain::BLOB>()) { | ||
74 | line << value.value<Sink::ApplicationDomain::BLOB>().value; | ||
73 | } else if (value.canConvert<QString>()) { | 75 | } else if (value.canConvert<QString>()) { |
74 | line << value.toString(); | 76 | line << value.toString(); |
75 | } else if (value.canConvert<QByteArray>()) { | 77 | } else if (value.canConvert<QByteArray>()) { |
@@ -105,6 +107,11 @@ bool list(const QStringList &args_, State &state) | |||
105 | state.printError(QObject::tr("Options: $type [--resource $resource] [--compact] [--filter $property=$value] [--showall|--show $property]")); | 107 | state.printError(QObject::tr("Options: $type [--resource $resource] [--compact] [--filter $property=$value] [--showall|--show $property]")); |
106 | return false; | 108 | return false; |
107 | } | 109 | } |
110 | if (options.options.contains("resource")) { | ||
111 | for (const auto &f : options.options.value("resource")) { | ||
112 | query.resourceFilter(f.toLatin1()); | ||
113 | } | ||
114 | } | ||
108 | if (options.options.contains("filter")) { | 115 | if (options.options.contains("filter")) { |
109 | for (const auto &f : options.options.value("filter")) { | 116 | for (const auto &f : options.options.value("filter")) { |
110 | auto filter = f.split("="); | 117 | auto filter = f.split("="); |