Fix code-style issues

Fixed issues pointed out during review
This commit is contained in:
Christian Kieschnick authored and Janek Bevendorff committed 2018-01-23 00:57:04 +01:00
1 parent 943dc6cdd6
commit 258438f01f
6 files changed
+24 -24

No files matched your search

+3 -1
View File
@@ -586,6 +586,7 @@ void Entry::truncateHistory()
QMutableListIterator<Entry*> i(m_history);
i.toBack();
const QRegularExpression delimiter(",|:|;");
while (i.hasPrevious()) {
Entry* historyItem = i.previous();
@@ -594,7 +595,8 @@ void Entry::truncateHistory()
size += historyItem->attributes()->attributesSize();
size += historyItem->autoTypeAssociations()->associationsSize();
size += historyItem->attachments()->attachmentsSize(foundAttachments);
foreach( const QString &tag, historyItem->tags().split(QRegExp(",|;|:"), QString::SkipEmptyParts)){
const QStringList tags = historyItem->tags().split(delimiter, QString::SkipEmptyParts);
for (const QString& tag : tags) {
size += tag.toUtf8().size();
}
foundAttachments += historyItem->attachments()->values();