diff --git a/agents/invitations/incidenceattribute.cpp b/agents/invitations/incidenceattribute.cpp index 20531ea192cff595559fcea15f86103d9dfe255f..116da69ddb2b6caa003e3db021f47f49ac3844ab 100644 --- a/agents/invitations/incidenceattribute.cpp +++ b/agents/invitations/incidenceattribute.cpp @@ -45,7 +45,8 @@ IncidenceAttribute::~IncidenceAttribute() QByteArray IncidenceAttribute::type() const { - return "incidence"; + static const QByteArray sType( "incidence" ); + return sType; } Attribute* IncidenceAttribute::clone() const diff --git a/migration/knotes/notealarmattribute.cpp b/migration/knotes/notealarmattribute.cpp index 3d486f5803276ff6b2d59311d3cc6bda77c60299..3a9e2c5552073caebb6c617b95645a9530c89921 100644 --- a/migration/knotes/notealarmattribute.cpp +++ b/migration/knotes/notealarmattribute.cpp @@ -53,7 +53,8 @@ QByteArray NoteAlarmAttribute::serialized() const QByteArray NoteAlarmAttribute::type() const { - return "NoteAlarmAttribute"; + static const QByteArray sType( "NoteAlarmAttribute" ); + return sType; } void NoteAlarmAttribute::setDateTime(const KDateTime &dateTime) diff --git a/migration/knotes/notedisplayattribute.cpp b/migration/knotes/notedisplayattribute.cpp index d8ebe3b29228a5330f3a7fe99dc7c3118212b0f5..ef5702952572882a59cc174234d72eb6930b5be3 100644 --- a/migration/knotes/notedisplayattribute.cpp +++ b/migration/knotes/notedisplayattribute.cpp @@ -111,7 +111,8 @@ QByteArray NoteDisplayAttribute::serialized() const QByteArray NoteDisplayAttribute::type() const { - return "NoteDisplayAttribute"; + static const QByteArray sType( "NoteDisplayAttribute" ); + return sType; } void NoteDisplayAttribute::setBackgroundColor(const QColor &color) diff --git a/migration/knotes/notelockattribute.cpp b/migration/knotes/notelockattribute.cpp index 404cbd07d28f55c1cf93dc8c8aa70abb4895d579..ada60a778fe1534ccc704fff62e7aba51b94c6b3 100644 --- a/migration/knotes/notelockattribute.cpp +++ b/migration/knotes/notelockattribute.cpp @@ -52,7 +52,8 @@ QByteArray NoteLockAttribute::serialized() const QByteArray NoteLockAttribute::type() const { //We can't change this name! - return "KJotsLockAttribute"; + static const QByteArray sType( "KJotsLockAttribute" ); + return sType; } diff --git a/resources/dav/resource/davprotocolattribute.cpp b/resources/dav/resource/davprotocolattribute.cpp index e961ee9a7f1a27e34a4b35ffe7854e316ba076c1..d6bbc04e8c6b97f2892697c1fc379d0b973016ab 100644 --- a/resources/dav/resource/davprotocolattribute.cpp +++ b/resources/dav/resource/davprotocolattribute.cpp @@ -40,7 +40,8 @@ Akonadi::Attribute* DavProtocolAttribute::clone() const QByteArray DavProtocolAttribute::type() const { - return "davprotocol"; + static const QByteArray sType( "davprotocol" ); + return sType; } QByteArray DavProtocolAttribute::serialized() const diff --git a/resources/google/calendar/defaultreminderattribute.cpp b/resources/google/calendar/defaultreminderattribute.cpp index 5fa009d23513f171229995363729b2a106373613..61f75053034b686803361a22ec601412cc0b8749 100644 --- a/resources/google/calendar/defaultreminderattribute.cpp +++ b/resources/google/calendar/defaultreminderattribute.cpp @@ -109,6 +109,7 @@ KCalCore::Alarm::List DefaultReminderAttribute::alarms( KCalCore::Incidence *inc QByteArray DefaultReminderAttribute::type() const { - return "defaultReminders"; + static const QByteArray sType( "defaultReminders" ); + return sType; } diff --git a/resources/imap/highestmodseqattribute.cpp b/resources/imap/highestmodseqattribute.cpp index af166fd9796812846edecc58aa18add0bdee792a..9a9e6b0b83daf8796d67e02ff2f51eabfcca280b 100644 --- a/resources/imap/highestmodseqattribute.cpp +++ b/resources/imap/highestmodseqattribute.cpp @@ -44,7 +44,8 @@ Akonadi::Attribute* HighestModSeqAttribute::clone() const QByteArray HighestModSeqAttribute::type() const { - return "highestmodseq"; + static const QByteArray sType( "highestmodseq" ); + return sType; } void HighestModSeqAttribute::deserialize( const QByteArray &data ) diff --git a/resources/imap/noinferiorsattribute.cpp b/resources/imap/noinferiorsattribute.cpp index c506de3eecd8e711b38a4333cc8f8316315b8511..ffca8d7bec3df24b33574fb8bc4dfc9b43ca760a 100644 --- a/resources/imap/noinferiorsattribute.cpp +++ b/resources/imap/noinferiorsattribute.cpp @@ -40,7 +40,8 @@ bool NoInferiorsAttribute::noInferiors() const QByteArray NoInferiorsAttribute::type() const { - return "noinferiors"; + static const QByteArray sType( "noinferiors" ); + return sType; } Akonadi::Attribute* NoInferiorsAttribute::clone() const diff --git a/resources/imap/noselectattribute.cpp b/resources/imap/noselectattribute.cpp index 849032b5de4bfca74931de57cbce10272aaa3a97..6cde6a974230ab100db66f4c837c3ba46b71f25d 100644 --- a/resources/imap/noselectattribute.cpp +++ b/resources/imap/noselectattribute.cpp @@ -40,7 +40,8 @@ bool NoSelectAttribute::noSelect() const QByteArray NoSelectAttribute::type() const { - return "noselect"; + static const QByteArray sType( "noselect" ); + return sType; } Akonadi::Attribute* NoSelectAttribute::clone() const diff --git a/resources/imap/timestampattribute.cpp b/resources/imap/timestampattribute.cpp index e1ab6f65b7eb56540cf6641f33b81ea502d676ba..1aac345d6bd0a8fd08189c42f4c3627fd8cc24bc 100644 --- a/resources/imap/timestampattribute.cpp +++ b/resources/imap/timestampattribute.cpp @@ -42,7 +42,8 @@ uint TimestampAttribute::timestamp() const QByteArray TimestampAttribute::type() const { - return "timestamp"; + static const QByteArray sType( "timestamp" ); + return sType; } Akonadi::Attribute *TimestampAttribute::clone() const diff --git a/resources/imap/uidnextattribute.cpp b/resources/imap/uidnextattribute.cpp index 24a3f2e487cd5d9d2e004a06216fe3aea75d9085..f72d52bb08e1a941309a7be89864526926309ea4 100644 --- a/resources/imap/uidnextattribute.cpp +++ b/resources/imap/uidnextattribute.cpp @@ -40,7 +40,8 @@ int UidNextAttribute::uidNext() const QByteArray UidNextAttribute::type() const { - return "uidnext"; + static const QByteArray sType( "uidnext" ); + return sType; } Akonadi::Attribute* UidNextAttribute::clone() const diff --git a/resources/imap/uidvalidityattribute.cpp b/resources/imap/uidvalidityattribute.cpp index 04bb217933fe8ef26a4cb33061b781982d5212ec..67d733aaabd209925aac084a703a2ff359778995 100644 --- a/resources/imap/uidvalidityattribute.cpp +++ b/resources/imap/uidvalidityattribute.cpp @@ -40,7 +40,8 @@ int UidValidityAttribute::uidValidity() const QByteArray UidValidityAttribute::type() const { - return "uidvalidity"; + static const QByteArray sType( "uidvalidity" ); + return sType; } Akonadi::Attribute* UidValidityAttribute::clone() const diff --git a/resources/mbox/deleteditemsattribute.cpp b/resources/mbox/deleteditemsattribute.cpp index f1bebd4e47d1f191278b5bc2f712c6383dbf9cc3..6e858f5ed815798ebf6d79d585a4cd9adb3ca402 100644 --- a/resources/mbox/deleteditemsattribute.cpp +++ b/resources/mbox/deleteditemsattribute.cpp @@ -92,5 +92,6 @@ int DeletedItemsAttribute::offsetCount() const QByteArray DeletedItemsAttribute::type() const { - return "DeletedMboxItems"; + static const QByteArray sType( "DeletedMboxItems" ); + return sType; } diff --git a/resources/nntp/nntpcollectionattribute.cpp b/resources/nntp/nntpcollectionattribute.cpp index 6aba4b34b08b6c8d3b59e96340e063117b0c0a1e..83b8d31fed0d50ba5214ec642b484f0294e47253 100644 --- a/resources/nntp/nntpcollectionattribute.cpp +++ b/resources/nntp/nntpcollectionattribute.cpp @@ -29,7 +29,8 @@ NntpCollectionAttribute::NntpCollectionAttribute() QByteArray NntpCollectionAttribute::type() const { - return "NNTP"; + static const QByteArray sType( "NNTP" ); + return sType; } NntpCollectionAttribute * NntpCollectionAttribute::clone() const diff --git a/resources/shared/collectionannotationsattribute.cpp b/resources/shared/collectionannotationsattribute.cpp index b4df346ff658f9d9a0f7717274abe0ea85fa398b..83a79910940fac1eb750d684a7a73c5f6383c986 100644 --- a/resources/shared/collectionannotationsattribute.cpp +++ b/resources/shared/collectionannotationsattribute.cpp @@ -46,7 +46,8 @@ QMap CollectionAnnotationsAttribute::annotations() const QByteArray CollectionAnnotationsAttribute::type() const { - return "collectionannotations"; + static const QByteArray sType( "collectionannotations" ); + return sType; } Akonadi::Attribute* CollectionAnnotationsAttribute::clone() const diff --git a/resources/shared/collectionflagsattribute.cpp b/resources/shared/collectionflagsattribute.cpp index 42c980bb0840b4139219c7215181137c59e99a59..a5a48266996894dd18c73364cba1c99392b45ec3 100644 --- a/resources/shared/collectionflagsattribute.cpp +++ b/resources/shared/collectionflagsattribute.cpp @@ -41,7 +41,8 @@ QList CollectionFlagsAttribute::flags() const QByteArray CollectionFlagsAttribute::type() const { - return "collectionflags"; + static const QByteArray sType( "collectionflags" ); + return sType; } Akonadi::Attribute* CollectionFlagsAttribute::clone() const diff --git a/resources/shared/filestore/entitycompactchangeattribute.cpp b/resources/shared/filestore/entitycompactchangeattribute.cpp index 3484b49948716fc66d20f60ea040955cd78a6e63..1320b326a008a3271b18c87aea911b9940ca5b7c 100644 --- a/resources/shared/filestore/entitycompactchangeattribute.cpp +++ b/resources/shared/filestore/entitycompactchangeattribute.cpp @@ -81,7 +81,8 @@ QString FileStore::EntityCompactChangeAttribute::remoteRevision() const QByteArray FileStore::EntityCompactChangeAttribute::type() const { - return "ENTITYCOMPACTCHANGE"; + static const QByteArray sType( "ENTITYCOMPACTCHANGE" ); + return sType; } FileStore::EntityCompactChangeAttribute* FileStore::EntityCompactChangeAttribute::clone() const diff --git a/resources/shared/imapaclattribute.cpp b/resources/shared/imapaclattribute.cpp index ad4fe2cf2f8c9c1f8446fe7cd8b727755fe3b652..8882edd988056c41a488d64365f151dbc884363f 100644 --- a/resources/shared/imapaclattribute.cpp +++ b/resources/shared/imapaclattribute.cpp @@ -51,7 +51,8 @@ QMap ImapAclAttribute::oldRights() const QByteArray ImapAclAttribute::type() const { - return "imapacl"; + static const QByteArray sType( "imapacl" ); + return sType; } Akonadi::Attribute* ImapAclAttribute::clone() const diff --git a/resources/shared/imapquotaattribute.cpp b/resources/shared/imapquotaattribute.cpp index 879e5cd4b969d8c6a6f51d6f18bf0ef227afd9bd..ecd868359778425d36dd2e48d507b88641bf6d8c 100644 --- a/resources/shared/imapquotaattribute.cpp +++ b/resources/shared/imapquotaattribute.cpp @@ -69,7 +69,8 @@ QList< QMap > Akonadi::ImapQuotaAttribute::usages() const QByteArray ImapQuotaAttribute::type() const { - return "imapquota"; + static const QByteArray sType( "imapquota" ); + return sType; } Akonadi::Attribute* ImapQuotaAttribute::clone() const