summaryrefslogtreecommitdiff
path: root/src/containers/kolabcontainers.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/containers/kolabcontainers.cpp')
-rw-r--r--src/containers/kolabcontainers.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/containers/kolabcontainers.cpp b/src/containers/kolabcontainers.cpp
index 47c76e3..fc241a1 100644
--- a/src/containers/kolabcontainers.cpp
+++ b/src/containers/kolabcontainers.cpp
@@ -536,11 +536,13 @@ struct Attachment::Private
std::string data;
std::string mimetype;
std::string label;
+ bool isValid;
};
Attachment::Attachment()
: d(new Attachment::Private)
{
+ d->isValid = false;
}
Attachment::Attachment(const Kolab::Attachment &other)
@@ -568,6 +570,7 @@ bool Attachment::operator==(const Kolab::Attachment &other) const
void Attachment::setUri(const std::string &uri, const std::string& mimetype)
{
+ d->isValid = true;
d->uri = uri;
d->mimetype = mimetype;
}
@@ -594,6 +597,7 @@ std::string Attachment::label() const
void Attachment::setData(const std::string &data, const std::string& mimetype)
{
+ d->isValid = true;
d->data = data;
d->mimetype = mimetype;
}
@@ -605,7 +609,7 @@ std::string Attachment::data() const
bool Attachment::isValid() const
{
- return !d->mimetype.empty(); //TODO use isValid variable
+ return d->isValid;
}