summaryrefslogtreecommitdiffstats
path: root/common/bufferadaptor.h
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2015-12-22 10:42:37 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2015-12-22 10:42:37 +0100
commit31dbc0cba9e5acfaeca41679873b17e11ceab811 (patch)
treeceabdf4f92666d92c72e9382c8c0c80bed23b837 /common/bufferadaptor.h
parente5125013a2661b30f21323f1a3f925103e8d589f (diff)
downloadsink-31dbc0cba9e5acfaeca41679873b17e11ceab811.tar.gz
sink-31dbc0cba9e5acfaeca41679873b17e11ceab811.zip
Only load the properties we need.
...and adjust the test accordingly with what we expect.
Diffstat (limited to 'common/bufferadaptor.h')
-rw-r--r--common/bufferadaptor.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/common/bufferadaptor.h b/common/bufferadaptor.h
index 121ef9d..aaff1c2 100644
--- a/common/bufferadaptor.h
+++ b/common/bufferadaptor.h
@@ -45,11 +45,17 @@ public:
45 { 45 {
46 } 46 }
47 47
48 MemoryBufferAdaptor(const BufferAdaptor &buffer) 48 MemoryBufferAdaptor(const BufferAdaptor &buffer, const QList<QByteArray> &properties)
49 : BufferAdaptor() 49 : BufferAdaptor()
50 { 50 {
51 for(const auto &property : buffer.availableProperties()) { 51 if (properties.isEmpty()) {
52 mValues.insert(property, buffer.getProperty(property)); 52 for(const auto &property : buffer.availableProperties()) {
53 mValues.insert(property, buffer.getProperty(property));
54 }
55 } else {
56 for(const auto &property : properties) {
57 mValues.insert(property, buffer.getProperty(property));
58 }
53 } 59 }
54 } 60 }
55 61