# # # patch "src/model/Changeset.cpp" # from [3965e92b77fe505cd39b8020371b5b4301abe1a5] # to [9c83e44c573e8d63b936e3460650025bf10840c4] # # patch "src/model/Changeset.h" # from [e71537ad07538589038c6e0542fc5cb542ed09ea] # to [b527eae7879981258856407d36e8feaa2679e125] # ============================================================ --- src/model/Changeset.cpp 3965e92b77fe505cd39b8020371b5b4301abe1a5 +++ src/model/Changeset.cpp 9c83e44c573e8d63b936e3460650025bf10840c4 @@ -1,6 +1,6 @@ /*************************************************************************** - * Copyright (C) 2006 by Jean-Louis Fuchs * - * address@hidden * + * Copyright (C) 2006 by Jean-Louis Fuchs * + * address@hidden * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -20,36 +20,18 @@ #include "Changeset.h" -Changeset::Changeset(QString revsion, QDateTime date, QString author, QString changelog) -{ - this->revision = revision; - this->date = date; - this->author = author; - this->changelog = changelog; -} +Changeset::Changeset(const QString & r, const QDateTime & d, const QString & a, const QString & c) + : revision(r), date(d), author(a), changelog(c) +{} -QString Changeset::getRevision() -{ - return revision; -} +Changeset::~Changeset() {} -QDateTime Changeset::getDate() +QString Changeset::getChangelogFlat() const { - return date; + QString cl(changelog); + cl.replace("\n", ""); + cl.replace("\r", ""); + cl.replace("\t", ""); + return cl; } -QString Changeset::getAuthor() -{ - return author; -} - -QString Changeset::getChangelogFlat() -{ - QString cl = changelog; - cl.replace("\n", ""); - cl.replace("\r", ""); - cl.replace("\t", ""); - return cl; -} - -Changeset::~Changeset() {} ============================================================ --- src/model/Changeset.h e71537ad07538589038c6e0542fc5cb542ed09ea +++ src/model/Changeset.h b527eae7879981258856407d36e8feaa2679e125 @@ -1,6 +1,6 @@ /*************************************************************************** - * Copyright (C) 2006 by Jean-Louis Fuchs * - * address@hidden * + * Copyright (C) 2006 by Jean-Louis Fuchs * + * address@hidden * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -21,24 +21,25 @@ #ifndef CHANGESET_H #define CHANGESET_H -#include +#include +#include class Changeset { public: - Changeset(QString revsion, QDateTime date, QString author, QString changelog); - ~Changeset(); + Changeset(const QString &, const QDateTime &, const QString &, const QString &); + ~Changeset(); - QString getRevision(); - QDateTime getDate(); - QString getAuthor(); - QString getChangelogFlat(); + inline QString getRevision() const { return revision; } + inline QDateTime getDate() const { return date; } + inline QString getAuthor() const { return author; } + QString getChangelogFlat() const; private: - QString revision; - QDateTime date; - QString changelog; - QString author; + QString revision; + QDateTime date; + QString author; + QString changelog; }; #endif //CHANGESET_H