forked from qt-creator/qt-creator
Preferably use QStringRef::toInt().
Avoid allocations for converting to int. Change-Id: Id8c79334f4809ec075ffe7e6b7635be4873eafd8 Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
@@ -109,7 +109,7 @@ void GerritPushDialog::initRemoteBranches()
|
||||
continue;
|
||||
const QString ref = entries.at(0).mid(remotesPrefix.size());
|
||||
int refBranchIndex = ref.indexOf(QLatin1Char('/'));
|
||||
int timeT = entries.at(1).left(entries.at(1).indexOf(QLatin1Char(' '))).toInt();
|
||||
int timeT = entries.at(1).leftRef(entries.at(1).indexOf(QLatin1Char(' '))).toInt();
|
||||
BranchDate bd(ref.mid(refBranchIndex + 1), QDateTime::fromTime_t(timeT).date());
|
||||
m_remoteBranches.insertMulti(ref.left(refBranchIndex), bd);
|
||||
}
|
||||
|
Reference in New Issue
Block a user