Commit 89089d76e502451f39c515ff32b82106feb4d655

Authored by Josh Klontz
1 parent 35ab70c9

now using QMap

sdk/openbr_plugin.cpp
... ... @@ -58,7 +58,7 @@ QString File::hash() const
58 58 return QtUtils::shortTextHash(flat());
59 59 }
60 60  
61   -void File::append(const QHash<QString, QVariant> &metadata)
  61 +void File::append(const QMap<QString,QVariant> &metadata)
62 62 {
63 63 foreach (const QString &key, metadata.keys())
64 64 set(key, metadata[key]);
... ...
sdk/openbr_plugin.h
... ... @@ -164,8 +164,8 @@ struct BR_EXPORT File
164 164 inline void clear() { name.clear(); m_metadata.clear(); } /*!< \brief Clears the file's name and metadata. */
165 165  
166 166 inline QList<QString> localKeys() const { return m_metadata.keys(); } /*!< \brief Returns the private metadata keys. */
167   - inline QHash<QString,QVariant> localMetadata() const { return m_metadata; } /*!< \brief Returns the private metadata. */
168   - void append(const QHash<QString,QVariant> &localMetadata); /*!< \brief Add new metadata fields. */
  167 + inline QMap<QString,QVariant> localMetadata() const { return m_metadata; } /*!< \brief Returns the private metadata. */
  168 + void append(const QMap<QString,QVariant> &localMetadata); /*!< \brief Add new metadata fields. */
169 169 void append(const File &other); /*!< \brief Append another file using \c separator. */
170 170 QList<File> split() const; /*!< \brief Split the file using \c separator. */
171 171 QList<File> split(const QString &separator) const; /*!< \brief Split the file. */
... ... @@ -181,7 +181,7 @@ struct BR_EXPORT File
181 181 inline bool operator<=(const File &other) const { return name <= other.name; } /*!< \brief Compare name. */
182 182 inline bool operator>(const File &other) const { return name > other.name; } /*!< \brief Compare name. */
183 183 inline bool operator>=(const File &other) const { return name >= other.name; } /*!< \brief Compare name. */
184   - inline File &operator+=(const QHash<QString,QVariant> &other) { append(other); return *this; } /*!< \brief Add new metadata fields. */
  184 + inline File &operator+=(const QMap<QString,QVariant> &other) { append(other); return *this; } /*!< \brief Add new metadata fields. */
185 185 inline File &operator+=(const File &other) { append(other); return *this; } /*!< \brief Append another file using \c separator. */
186 186  
187 187 inline bool isNull() const { return name.isEmpty() && m_metadata.isEmpty(); } /*!< \brief Returns \c true if name and metadata are empty, \c false otherwise. */
... ... @@ -238,7 +238,7 @@ struct BR_EXPORT File
238 238 void setROIs(const QList<QRectF> &ROIs); /*!< \brief Assigns the file's landmark list. */
239 239  
240 240 private:
241   - QHash<QString,QVariant> m_metadata;
  241 + QMap<QString,QVariant> m_metadata;
242 242 BR_EXPORT friend QDataStream &operator<<(QDataStream &stream, const File &file); /*!< */
243 243 BR_EXPORT friend QDataStream &operator>>(QDataStream &stream, File &file); /*!< */
244 244  
... ...
sdk/plugins/output.cpp
... ... @@ -106,7 +106,7 @@ class meltOutput : public MatrixOutput
106 106 const bool genuineOnly = file.contains("Genuine") && !file.contains("Impostor");
107 107 const bool impostorOnly = file.contains("Impostor") && !file.contains("Genuine");
108 108  
109   - QHash<QString,QVariant> args = file.localMetadata();
  109 + QMap<QString,QVariant> args = file.localMetadata();
110 110 args.remove("Genuine");
111 111 args.remove("Impostor");
112 112  
... ...