From fc92ae96319099e903a3e2927c26547d4bd5cde3 Mon Sep 17 00:00:00 2001 From: Josh Klontz Date: Fri, 12 Apr 2013 08:53:03 -0400 Subject: [PATCH] RelabelTransform now SubjectTransform --- openbr/plugins/misc.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/openbr/plugins/misc.cpp b/openbr/plugins/misc.cpp index b1c0b10..765568d 100644 --- a/openbr/plugins/misc.cpp +++ b/openbr/plugins/misc.cpp @@ -400,13 +400,14 @@ BR_REGISTER(Transform, AsTransform) /*! * \ingroup transforms - * \brief Change the template label using a regular expresion matched to the file's base name. + * \brief Change the template subject using a regular expresion matched to the file's base name. + * \author Josh Klontz \cite jklontz */ -class RelabelTransform : public UntrainableMetaTransform +class SubjectTransform : public UntrainableMetaTransform { Q_OBJECT Q_PROPERTY(QString regexp READ get_regexp WRITE set_regexp RESET reset_regexp STORED false) - BR_PROPERTY(QString, regexp, "") + BR_PROPERTY(QString, regexp, "(.*)") void project(const Template &src, Template &dst) const { @@ -415,11 +416,11 @@ class RelabelTransform : public UntrainableMetaTransform QRegularExpressionMatch match = re.match(dst.file.baseName()); if (!match.hasMatch()) qFatal("Unable to match regular expression \"%s\" to base name \"%s\"!", qPrintable(regexp), qPrintable(dst.file.baseName())); - dst.file.set("Label", match.captured(match.lastCapturedIndex())); + dst.file.set("Subject", match.captured(match.lastCapturedIndex())); } }; -BR_REGISTER(Transform, RelabelTransform) +BR_REGISTER(Transform, SubjectTransform) /*! * \ingroup transforms -- libgit2 0.21.4