From ba1580c3671a096c40c4ab5bc1e43b101ddf3c73 Mon Sep 17 00:00:00 2001 From: Charles Otto Date: Sat, 20 Jul 2013 19:20:27 -0400 Subject: [PATCH] Use Label as the default class identifier more consistently --- openbr/openbr_plugin.cpp | 4 ++-- openbr/openbr_plugin.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/openbr/openbr_plugin.cpp b/openbr/openbr_plugin.cpp index 976f971..1a6494f 100644 --- a/openbr/openbr_plugin.cpp +++ b/openbr/openbr_plugin.cpp @@ -412,8 +412,8 @@ TemplateList TemplateList::fromGallery(const br::File &gallery) // of target images to every partition newTemplates[i].file.set("Partition", -1); } else { - // Direct use of "Subject" is not general -cao - const QByteArray md5 = QCryptographicHash::hash(newTemplates[i].file.get("Subject").toLatin1(), QCryptographicHash::Md5); + // Direct use of "Label" is not general -cao + const QByteArray md5 = QCryptographicHash::hash(newTemplates[i].file.get("Label").toLatin1(), QCryptographicHash::Md5); // Select the right 8 hex characters so that it can be represented as a 64 bit integer without overflow newTemplates[i].file.set("Partition", md5.toHex().right(8).toULongLong(0, 16) % crossValidate); } diff --git a/openbr/openbr_plugin.h b/openbr/openbr_plugin.h index 0ecf867..7b27901 100644 --- a/openbr/openbr_plugin.h +++ b/openbr/openbr_plugin.h @@ -172,7 +172,7 @@ struct BR_EXPORT File File() {} File(const QString &file) { init(file); } /*!< \brief Construct a file from a string. */ - File(const QString &file, const QVariant &subject) { init(file); set("Subject", subject); } /*!< \brief Construct a file from a string and assign a label. */ + File(const QString &file, const QVariant &label) { init(file); set("Label", label); } /*!< \brief Construct a file from a string and assign a label. */ File(const char *file) { init(file); } /*!< \brief Construct a file from a c-style string. */ inline operator QString() const { return name; } /*!< \brief Returns #name. */ QString flat() const; /*!< \brief A stringified version of the file with metadata. */ -- libgit2 0.21.4