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());