From 689c5cfbcc41cb633d531a31f37efad30461c4e4 Mon Sep 17 00:00:00 2001 From: Scott Klum Date: Wed, 19 Oct 2016 12:04:53 -0600 Subject: [PATCH] Only use old metadata for an empty file --- openbr/openbr_plugin.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/openbr/openbr_plugin.cpp b/openbr/openbr_plugin.cpp index 1ae0209..7c29cda 100644 --- a/openbr/openbr_plugin.cpp +++ b/openbr/openbr_plugin.cpp @@ -111,7 +111,11 @@ QList File::split(const QString &separator) const QList files; foreach (const QString &word, name.split(separator, QString::SkipEmptyParts)) { File file(word); - file.append(m_metadata); + // If file metadata is empty after this constructor, it means that this is the + // file corresponding to *this.m_metadata, so we append its metadata to get + // the correct functionality + if (file.m_metadata.isEmpty()) + file.append(m_metadata); files.append(file); } return files; @@ -764,7 +768,7 @@ QStringList Object::prunedArguments(bool expanded) const const char *name = metaObject()->property(i).name(); QVariant defaultVal = shellObject->property(name); - + if (defaultVal != property(name)) arguments.append(name + QString("=") + argument(i, expanded)); } -- libgit2 0.21.4