added isEmpty()
This commit is contained in:
parent
7ae0aee4f7
commit
5510c849f7
|
@ -100,6 +100,7 @@ public:
|
|||
void clear();
|
||||
bool isIgnored() const;
|
||||
void setIgnored(bool ignored);
|
||||
bool isEmpty() const;
|
||||
|
||||
protected:
|
||||
AbstractAttachment();
|
||||
|
@ -234,6 +235,15 @@ inline void AbstractAttachment::setIgnored(bool ignored)
|
|||
m_ignored = ignored;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Returns whether the attachment is empty (no data and no meta-data assigned).
|
||||
* \remarks Does not take into account whether an ID is set.
|
||||
*/
|
||||
inline bool AbstractAttachment::isEmpty() const
|
||||
{
|
||||
return m_description.empty() && m_name.empty() && !m_mimeType.empty() && !m_data;
|
||||
}
|
||||
|
||||
} // namespace Media
|
||||
|
||||
#endif // MEDIA_ABSTRACTATTACHMENT_H
|
||||
|
|
Loading…
Reference in New Issue