Port QtSql from QStringRef to QStringView
Task-number: QTBUG-84319 Change-Id: Icc9b955dae1aa13b16c01e26192cb82f828903b1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
d984adac68
commit
4895ae10c6
@ -720,7 +720,7 @@ bool QSQLiteDriver::open(const QString & db, const QString &, const QString &, c
|
||||
int regexpCacheSize = 25;
|
||||
#endif
|
||||
|
||||
const auto opts = conOpts.splitRef(QLatin1Char(';'));
|
||||
const auto opts = QStringView{conOpts}.split(QLatin1Char(';'));
|
||||
for (auto option : opts) {
|
||||
option = option.trimmed();
|
||||
if (option.startsWith(QLatin1String("QSQLITE_BUSY_TIMEOUT"))) {
|
||||
|
@ -232,12 +232,12 @@ QString QSqlRecord::fieldName(int index) const
|
||||
|
||||
int QSqlRecord::indexOf(const QString& name) const
|
||||
{
|
||||
QStringRef tableName;
|
||||
QStringRef fieldName(&name);
|
||||
QStringView tableName;
|
||||
QStringView fieldName(name);
|
||||
const int idx = name.indexOf(QLatin1Char('.'));
|
||||
if (idx != -1) {
|
||||
tableName = name.leftRef(idx);
|
||||
fieldName = name.midRef(idx + 1);
|
||||
tableName = fieldName.left(idx);
|
||||
fieldName = fieldName.mid(idx + 1);
|
||||
}
|
||||
const int cnt = count();
|
||||
for (int i = 0; i < cnt; ++i) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user