diff --git a/autotests/rocketchataccountsettingstest.cpp b/autotests/rocketchataccountsettingstest.cpp --- a/autotests/rocketchataccountsettingstest.cpp +++ b/autotests/rocketchataccountsettingstest.cpp @@ -78,9 +78,10 @@ { RocketChatAccountSettings *sampleChat = new RocketChatAccountSettings; - sampleChat->setAccountName(QStringLiteral("myAccount#$^56")); + QString val = QStringLiteral("myAccount#$^56"); + sampleChat->setAccountName(val); - QCOMPARE(QStringLiteral("myAccount#$^56"), sampleChat->accountName()); + QCOMPARE(val, sampleChat->accountName()); delete sampleChat; } @@ -89,9 +90,10 @@ { RocketChatAccountSettings *sampleChat = new RocketChatAccountSettings; - sampleChat->setAuthToken(QStringLiteral("myAuthToken#$^56")); + QString val = QStringLiteral("myAuthToken#$^56"); + sampleChat->setAuthToken(val); - QCOMPARE(QStringLiteral("myAuthToken#$^56"), sampleChat->authToken()); + QCOMPARE(val, sampleChat->authToken()); delete sampleChat; } @@ -100,9 +102,10 @@ { RocketChatAccountSettings *sampleChat = new RocketChatAccountSettings; - sampleChat->setPassword(QStringLiteral("myPass#$^56")); + QString val =QStringLiteral("myPass#$^56"); + sampleChat->setPassword(val); - QCOMPARE(QStringLiteral("myPass#$^56"), sampleChat->password()); + QCOMPARE(val, sampleChat->password()); delete sampleChat; } @@ -111,9 +114,10 @@ { RocketChatAccountSettings *sampleChat = new RocketChatAccountSettings; - sampleChat->setServerUrl(QStringLiteral("my.fancy.url")); + QString val = QStringLiteral("my.fancy.url"); + sampleChat->setServerUrl(val); - QCOMPARE(QStringLiteral("my.fancy.url"), sampleChat->serverUrl()); + QCOMPARE(val, sampleChat->serverUrl()); delete sampleChat; } @@ -122,9 +126,10 @@ { RocketChatAccountSettings *sampleChat = new RocketChatAccountSettings; - sampleChat->setUserId(QStringLiteral("ECE305")); + QString val = QStringLiteral("ECE305"); + sampleChat->setUserId(val); - QCOMPARE(QStringLiteral("ECE305"), sampleChat->userId()); + QCOMPARE(val, sampleChat->userId()); delete sampleChat; } @@ -133,9 +138,10 @@ { RocketChatAccountSettings *sampleChat = new RocketChatAccountSettings; - sampleChat->setUserName(QStringLiteral("Eric Roberts")); + QString val = QStringLiteral("Eric Roberts"); + sampleChat->setUserName(val); - QCOMPARE(QStringLiteral("Eric Roberts"), sampleChat->userName()); + QCOMPARE(val, sampleChat->userName()); delete sampleChat; }