forked from qt-creator/qt-creator
SVN: Avoid uncessesary QString creations.
Commmitsa5b7ba58f0anda5720ca8afremove some QLatinString uses. As the subversion status strings only contains Latin1 characters, the comparisons can be speed up by restricting to Latin1, instead using fromUtf8() as would be done otherwise. Change-Id: I734691bda6f5a1214ec6b15fe6d7ed4b028fbc1e Reviewed-by: Hugues Delorme <delorme.hugues@fougue.pro> Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
committed by
André Hartmann
parent
44b0ca4754
commit
2b2b06a6d3
@@ -145,11 +145,12 @@ StatusList parseStatusOutput(const QString &output)
|
||||
foreach (const QString &l, list) {
|
||||
const QString line =l.trimmed();
|
||||
if (line.size() > 8) {
|
||||
const QString state = line.left(1);
|
||||
const QByteArray state = line.left(1).toLatin1();
|
||||
if (state == FileAddedC || state == FileConflictedC
|
||||
|| state == FileDeletedC || state == FileModifiedC) {
|
||||
const QString fileName = line.mid(7); // Column 8 starting from svn 1.6
|
||||
changeSet.push_back(SubversionSubmitEditor::StatusFilePair(QString(state), fileName.trimmed()));
|
||||
changeSet.push_back(SubversionSubmitEditor::StatusFilePair(QLatin1String(state),
|
||||
fileName.trimmed()));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user