aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2017-04-13 06:41:33 +0200
committerMontel Laurent <[email protected]>2017-04-13 06:41:33 +0200
commit1b663b1f4957c12852c0b8e906bb96f811f3ed8d (patch)
tree340b14ce4f6210c28c76472ebc99fcd9086020b5
parent15b15d4cc93ed2445f8ec9a1c6d2be8e19e2d1bb (diff)
Minor optimization
-rw-r--r--src/address.cpp4
-rw-r--r--src/addressee.cpp4
2 files changed, 2 insertions, 6 deletions
diff --git a/src/address.cpp b/src/address.cpp
index 5bd8b11..061593d 100644
--- a/src/address.cpp
+++ b/src/address.cpp
@@ -560,9 +560,7 @@ Geo Address::geo() const
QString Address::toString() const
{
- QString str;
-
- str += QLatin1String("Address {\n");
+ QString str = QLatin1String("Address {\n");
str += QStringLiteral(" IsEmpty: %1\n").
arg(d->mEmpty ? QStringLiteral("true") : QStringLiteral("false"));
str += QStringLiteral(" Id: %1\n").arg(d->mId);
diff --git a/src/addressee.cpp b/src/addressee.cpp
index 5307c30..b38ae25 100644
--- a/src/addressee.cpp
+++ b/src/addressee.cpp
@@ -1919,9 +1919,7 @@ Key Addressee::findKey(const QString &id) const
QString Addressee::toString() const
{
- QString str;
-
- str += QLatin1String("Addressee {\n");
+ QString str = QLatin1String("Addressee {\n");
str += QStringLiteral(" Uid: %1\n").arg(uid());
str += QStringLiteral(" Name: %1\n").arg(name());