From 7c496d425ba2acf37095664b1318b25658d07516 Mon Sep 17 00:00:00 2001 From: Anthony Bilinski Date: Sun, 22 Jul 2018 21:22:47 -0700 Subject: [PATCH] chore(review): address remaining review comments from #5098 use QStringBuilder replace "Not sent" with "Pending" --- src/widget/form/chatform.cpp | 3 +-- src/widget/form/genericchatform.cpp | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/widget/form/chatform.cpp b/src/widget/form/chatform.cpp index 0eb2faa6b..78b3dd201 100644 --- a/src/widget/form/chatform.cpp +++ b/src/widget/form/chatform.cpp @@ -1092,8 +1092,7 @@ void ChatForm::onExportChat() ToxPk authorPk(ToxId(it.sender).getPublicKey()); QString author = getMsgAuthorDispName(authorPk, it.dispName); - QString line = QString("%1\t%2\t%3\t%4\n").arg(datestamp, timestamp, author, it.message); - buffer = buffer % line; + buffer = buffer % QString{datestamp % '\t' % timestamp % '\t' % author % '\t' % it.message % '\n'}; } file.write(buffer.toUtf8()); file.close(); diff --git a/src/widget/form/genericchatform.cpp b/src/widget/form/genericchatform.cpp index b21ade2c4..0401e02b8 100644 --- a/src/widget/form/genericchatform.cpp +++ b/src/widget/form/genericchatform.cpp @@ -45,6 +45,7 @@ #include #include #include +#include #ifdef SPELL_CHECKING #include @@ -503,7 +504,7 @@ void GenericChatForm::onSaveLogClicked() QString timestamp = (rightCol == nullptr) ? tr("Not sent") : rightCol->getText(); - plainText += QString("%1\t%3\t%2\n").arg(nick, timestamp, msg); + plainText += QString{nick % "\t" % timestamp % "\t" % msg % "\n"}; } file.write(plainText.toUtf8());