Make Field default-constructable

This commit is contained in:
Martchus 2018-06-13 00:40:16 +02:00
parent 69161989ae
commit 405afe4e31
2 changed files with 8 additions and 0 deletions

View File

@ -136,6 +136,7 @@ void Entry::setParent(NodeEntry *parent, int index)
/*!
* \brief Returns an indication whether the instance is an indirect child of the specified \a entry.
* \todo Make \a entry const in v4.
*/
bool Entry::isIndirectChildOf(NodeEntry *entry) const
{

View File

@ -14,6 +14,7 @@ class AccountEntry;
class PASSWORD_FILE_EXPORT Field {
public:
Field();
Field(AccountEntry *tiedAccount, const std::string &name = std::string(), const std::string &value = std::string());
Field(AccountEntry *tiedAccount, std::istream &stream);
@ -38,6 +39,12 @@ protected:
std::string m_extendedData;
};
inline Field::Field()
: m_type(FieldType::Normal)
, m_tiedAccount(nullptr)
{
}
/*!
* \brief Returns an indication whether the entry is empty.
*/