To provide a little more type-safety and documentation than setPropert(QByteArray, QVariant) we should define properties in the applicationdomaintype instance with macros like this:
PROPERTY(QString, "subject")
EXTRACTED_PROPERTY(QString, "subject")
BLOB_PROPERTY("mimeMessage")
All properties generate:
'''
static QByteArray $NameProperty();
'''
A regular property will generate:
$type get$Name() const;
void set$Name(const $type &);
An extracted property will generate (to make clear that these properties should not be set by clients)
'''
$type get$Name() const;
void setExtracted$Name(const $type &);
'''
A blob property will generate:
'''
QByteArray get$Name() const;
QString get$NamePath() const;
void set$NamePath(const QString &path);
void set$Name(const QByteArray &path);
'''