summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-11-10 06:32:02 (GMT)
committerMontel Laurent <montel@kde.org>2016-11-10 06:32:02 (GMT)
commit4e5c0984944a3d184b7b8315aaded5a1e08d312e (patch)
tree9688fbd3222bca7c1ad4ef815930c67815b4f1ed
parent1d99fef42ff4b0c6e4e17fee3af9db456dd30b8a (diff)
Minor optimization
-rw-r--r--src/sentbehaviourattribute.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/sentbehaviourattribute.cpp b/src/sentbehaviourattribute.cpp
index 0c2bd4b..934fe7d 100644
--- a/src/sentbehaviourattribute.cpp
+++ b/src/sentbehaviourattribute.cpp
@@ -86,14 +86,15 @@ void SentBehaviourAttribute::deserialize(const QByteArray &data)
const QByteArrayList in = data.split(',');
Q_ASSERT(in.size() > 0);
+ const QByteArray attr0 = in[0];
d->mMoveToCollection = Akonadi::Collection(-1);
- if (in[0] == "delete") {
+ if (attr0 == "delete") {
d->mBehaviour = Delete;
- } else if (in[0] == "moveToDefault") {
+ } else if (attr0 == "moveToDefault") {
d->mBehaviour = MoveToDefaultSentCollection;
- } else if (in[0].startsWith(QByteArray("moveTo"))) {
+ } else if (attr0.startsWith(QByteArray("moveTo"))) {
d->mBehaviour = MoveToCollection;
- d->mMoveToCollection = Akonadi::Collection(in[0].mid(6).toLongLong());
+ d->mMoveToCollection = Akonadi::Collection(attr0.mid(6).toLongLong());
// NOTE: 6 is the strlen of "moveTo".
} else {
Q_ASSERT(false);