Commit 686c452fe3989358ca90f5653fc47f86a5b4f3fd

Authored by Scott Klum
Committed by GitHub
2 parents a450d8a6 689c5cfb

Merge pull request #507 from biometrics/split_metadata

Only use old metadata for an empty file
Showing 1 changed file with 6 additions and 2 deletions
openbr/openbr_plugin.cpp
... ... @@ -111,7 +111,11 @@ QList<File> File::split(const QString &separator) const
111 111 QList<File> files;
112 112 foreach (const QString &word, name.split(separator, QString::SkipEmptyParts)) {
113 113 File file(word);
114   - file.append(m_metadata);
  114 + // If file metadata is empty after this constructor, it means that this is the
  115 + // file corresponding to *this.m_metadata, so we append its metadata to get
  116 + // the correct functionality
  117 + if (file.m_metadata.isEmpty())
  118 + file.append(m_metadata);
115 119 files.append(file);
116 120 }
117 121 return files;
... ... @@ -764,7 +768,7 @@ QStringList Object::prunedArguments(bool expanded) const
764 768 const char *name = metaObject()->property(i).name();
765 769  
766 770 QVariant defaultVal = shellObject->property(name);
767   -
  771 +
768 772 if (defaultVal != property(name))
769 773 arguments.append(name + QString("=") + argument(i, expanded));
770 774 }
... ...