diff --git a/src/CopyrighFixer/CopyrighFixer/owner.cpp b/src/CopyrighFixer/CopyrighFixer/owner.cpp index 37d549f..921b6e7 100644 --- a/src/CopyrighFixer/CopyrighFixer/owner.cpp +++ b/src/CopyrighFixer/CopyrighFixer/owner.cpp @@ -13,19 +13,19 @@ Owner::Owner() { } void Owner::setName(const QString &ownerName) { - Owner::name = ownerName; + name = ownerName; } -QString Owner::getOwnerName() { - return Owner::name; +const QString &Owner::getOwnerName() const { + return name; } void Owner::setTimeRange(const QString &interval) { timeRange = interval; } -QString Owner::getTimeRange() { - return Owner::timeRange; +const QString &Owner::getTimeRange() const { + return timeRange; } }; diff --git a/src/CopyrighFixer/CopyrighFixer/owner.h b/src/CopyrighFixer/CopyrighFixer/owner.h index 73fbf3d..81dbc74 100644 --- a/src/CopyrighFixer/CopyrighFixer/owner.h +++ b/src/CopyrighFixer/CopyrighFixer/owner.h @@ -30,7 +30,7 @@ public: * @brief getOwnerName The method allows you to get information about the owner. * @return the owner name. */ - QString getOwnerName(); + const QString& getOwnerName() const; /** * @brief setTimeRange A method that allows you to set the time interval for using a file. @@ -42,7 +42,7 @@ public: * @brief getTimeRange The method changes the timestamp of the usage. * @return the time interval when the file was modified */ - QString getTimeRange(); + const QString& getTimeRange() const; private: QString name; QString timeRange;