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:
@@ -898,7 +898,7 @@ void DebuggerToolTipHolder::positionShow(const TextEditorWidget *editorWidget)
|
||||
static QDate dateFromString(const QString &date)
|
||||
{
|
||||
return date.size() == 8 ?
|
||||
QDate(date.left(4).toInt(), date.mid(4, 2).toInt(), date.mid(6, 2).toInt()) :
|
||||
QDate(date.leftRef(4).toInt(), date.midRef(4, 2).toInt(), date.midRef(6, 2).toInt()) :
|
||||
QDate();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user