summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-11-10 12:30:50 (GMT)
committerMontel Laurent <montel@kde.org>2016-11-10 12:30:50 (GMT)
commit148596cad7390a5d1f31d96e354ca44b9e1beadb (patch)
tree0085998eac05ba69118b9e70f21dfdbb419cee16
parent8b2beb57d79ec2cadeb4bee7499ef805add8ff0c (diff)
Minor optimization
-rw-r--r--resources/pop3/jobs.cpp3
-rw-r--r--resources/pop3/pop3resource.cpp2
2 files changed, 3 insertions, 2 deletions
diff --git a/resources/pop3/jobs.cpp b/resources/pop3/jobs.cpp
index 23443d8..2fae458 100644
--- a/resources/pop3/jobs.cpp
+++ b/resources/pop3/jobs.cpp
@@ -174,7 +174,8 @@ static QByteArray cleanupListRespone(const QByteArray &response)
QByteArray ret = response.simplified(); // Workaround for Maillennium POP3/UNIBOX
// Get rid of the null terminating character, if it exists
- if (ret.size() > 0 && ret.at(ret.size() - 1) == 0) {
+ int retSize = ret.size();
+ if (retSize > 0 && ret.at(retSize - 1) == 0) {
ret.chop(1);
}
return ret;
diff --git a/resources/pop3/pop3resource.cpp b/resources/pop3/pop3resource.cpp
index 8f0b569..65aa570 100644
--- a/resources/pop3/pop3resource.cpp
+++ b/resources/pop3/pop3resource.cpp
@@ -169,7 +169,7 @@ void POP3Resource::walletOpenedForLoading(bool success)
mWallet = Q_NULLPTR;
if (!passwordLoaded) {
- QString queryText = buildLabelForPasswordDialog(
+ const QString queryText = buildLabelForPasswordDialog(
i18n("You are asked here because the password could not be loaded from the wallet."));
showPasswordDialog(queryText);
} else {