1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

chore(review): address remaining review comments from #5098

use QStringBuilder
replace "Not sent" with "Pending"
This commit is contained in:
Anthony Bilinski 2018-07-22 21:22:47 -07:00
parent ee0d4bb880
commit 7c496d425b
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C
2 changed files with 3 additions and 3 deletions

View File

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

View File

@ -45,6 +45,7 @@
#include <QFileDialog>
#include <QKeyEvent>
#include <QMessageBox>
#include <QStringBuilder>
#ifdef SPELL_CHECKING
#include <KF5/SonnetUi/sonnet/spellcheckdecorator.h>
@ -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());