diff --git a/src/propertyinfo.h b/src/propertyinfo.h --- a/src/propertyinfo.h +++ b/src/propertyinfo.h @@ -41,6 +41,7 @@ class KFILEMETADATA_EXPORT PropertyInfo { public: + PropertyInfo(); PropertyInfo(Property::Property property); PropertyInfo(const PropertyInfo& pi); ~PropertyInfo(); @@ -97,5 +98,8 @@ Private* d; }; -} +} // namespace +Q_DECLARE_METATYPE(KFileMetaData::PropertyInfo) + + #endif // _KFILEMETADATA_PROPERTYINFO_H diff --git a/src/propertyinfo.cpp b/src/propertyinfo.cpp --- a/src/propertyinfo.cpp +++ b/src/propertyinfo.cpp @@ -39,6 +39,16 @@ QString (*formatAsString)(const QVariant& value) = nullptr; }; +PropertyInfo::PropertyInfo() + : d(new Private) +{ + d->prop = Property::Empty; + d->name = QStringLiteral("empty"); + d->valueType = QVariant::Invalid; + d->shouldBeIndexed = false; + d->formatAsString = &FormatStrings::toStringFunction; +} + PropertyInfo::PropertyInfo(Property::Property property) : d(new Private) {