Changeset View
Changeset View
Standalone View
Standalone View
src/propertyinfo.cpp
Show First 20 Lines • Show All 572 Lines • ▼ Show 20 Line(s) | 61 | switch (property) { | |||
---|---|---|---|---|---|
573 | 573 | | |||
574 | case Property::OriginEmailMessageId: | 574 | case Property::OriginEmailMessageId: | ||
575 | d->name = QStringLiteral("originEmailMessageId"); | 575 | d->name = QStringLiteral("originEmailMessageId"); | ||
576 | d->displayName = i18nc("@label the message ID of an email this file was attached to", "E-Mail Attachment Message ID"); | 576 | d->displayName = i18nc("@label the message ID of an email this file was attached to", "E-Mail Attachment Message ID"); | ||
577 | d->valueType = QVariant::String; | 577 | d->valueType = QVariant::String; | ||
578 | d->shouldBeIndexed = false; | 578 | d->shouldBeIndexed = false; | ||
579 | break; | 579 | break; | ||
580 | 580 | | |||
581 | case Property::FrontCover: | ||||
582 | d->name = QStringLiteral("frontCover"); | ||||
583 | d->displayName = i18nc("@label", "Front Cover Image"); | ||||
584 | d->valueType = QVariant::ByteArray; | ||||
585 | break; | ||||
bruns: shouldBeIndexed is irrelevant for ByteArray, omit it. | |||||
586 | | ||||
581 | case Property::PropertyCount: // To silence the compiler. | 587 | case Property::PropertyCount: // To silence the compiler. | ||
582 | break; | 588 | break; | ||
583 | 589 | | |||
584 | // NOTE: new properties must also be added to ::fromName() | 590 | // NOTE: new properties must also be added to ::fromName() | ||
585 | } | 591 | } | ||
586 | 592 | | |||
587 | if (d->valueType == QVariant::Int || d->valueType == QVariant::DateTime || | 593 | if (d->valueType == QVariant::Int || d->valueType == QVariant::DateTime || | ||
588 | d->valueType == QVariant::Double) | 594 | d->valueType == QVariant::Double) | ||
▲ Show 20 Lines • Show All 142 Lines • ▼ Show 20 Line(s) | 667 | static QHash<QString, Property::Property> propertyHash = { | |||
731 | { QStringLiteral("translationunitswithtranslation"), Property::TranslationUnitsWithTranslation }, | 737 | { QStringLiteral("translationunitswithtranslation"), Property::TranslationUnitsWithTranslation }, | ||
732 | { QStringLiteral("translationunitswithdrafttranslation"), Property::TranslationUnitsWithDraftTranslation }, | 738 | { QStringLiteral("translationunitswithdrafttranslation"), Property::TranslationUnitsWithDraftTranslation }, | ||
733 | { QStringLiteral("translationlastauthor"), Property::TranslationLastAuthor }, | 739 | { QStringLiteral("translationlastauthor"), Property::TranslationLastAuthor }, | ||
734 | { QStringLiteral("translationlastupdate"), Property::TranslationLastUpDate }, | 740 | { QStringLiteral("translationlastupdate"), Property::TranslationLastUpDate }, | ||
735 | { QStringLiteral("translationtemplatedate"), Property::TranslationTemplateDate }, | 741 | { QStringLiteral("translationtemplatedate"), Property::TranslationTemplateDate }, | ||
736 | { QStringLiteral("originurl"), Property::OriginUrl }, | 742 | { QStringLiteral("originurl"), Property::OriginUrl }, | ||
737 | { QStringLiteral("originemailsubject"), Property::OriginEmailSubject }, | 743 | { QStringLiteral("originemailsubject"), Property::OriginEmailSubject }, | ||
738 | { QStringLiteral("originemailsender"), Property::OriginEmailSender }, | 744 | { QStringLiteral("originemailsender"), Property::OriginEmailSender }, | ||
739 | { QStringLiteral("originemailmessageid"), Property::OriginEmailMessageId } | 745 | { QStringLiteral("originemailmessageid"), Property::OriginEmailMessageId }, | ||
746 | { QStringLiteral("frontcover"), Property::FrontCover } | ||||
740 | }; | 747 | }; | ||
741 | 748 | | |||
742 | return PropertyInfo(propertyHash.value(name.toLower())); | 749 | return PropertyInfo(propertyHash.value(name.toLower())); | ||
743 | } | 750 | } |
shouldBeIndexed is irrelevant for ByteArray, omit it.