Let Account::Source fall back to Easy::Entity.

This commit is contained in:
tastytea 2019-04-05 14:39:35 +02:00
parent 8d4dcb9984
commit 88d69be298
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
2 changed files with 14 additions and 25 deletions

View File

@ -218,14 +218,6 @@ bool Account::sensitive() const
return get_bool("source.sensitive");
}
Account::Source::Source(const string &json)
: Entity(json)
{}
Account::Source::Source()
: Entity()
{}
bool Account::Source::valid() const
{
return true;
@ -342,7 +334,7 @@ Account::Source Account::Source::sensitive(const bool &sensitive)
const Account::Source Account::source() const
{
return Account::Source(get("source").toStyledString());
return Account::Source(get("source"));
}
Account Account::source(const Account::Source &source)

View File

@ -238,24 +238,10 @@ namespace Easy
*
* @since 0.18.5
*/
class Source : public Easy::Entity
class Source : public Entity
{
public:
/*!
* @brief Constructs an Account::Source object from a JSON string.
*
* @param json JSON string
*
* @since 0.18.5
*/
explicit Source(const string &json);
/*!
* @brief Constructs an empty Account::Source object.
*
* @since 0.18.5
*/
Source();
using Entity::Entity;
virtual bool valid() const override;
@ -316,7 +302,18 @@ namespace Easy
Source sensitive(const bool &sensitive);
};
/*!
* @brief Get source.
*
* @since before 0.100.0
*/
const Source source() const;
/*!
* @brief Set source.
*
* @since before 0.100.0
*/
Account source(const Source &source);
/*!