Do not assume QStringRef(const QString*) to be implicit

It won't be for very much longer.

Change-Id: I30e3e0cd8c8ecf0833f759557382a3ded7bdea34
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Marc Mutz 2017-03-12 22:43:04 +01:00
parent 77e71dac16
commit e83247a2b9
3 changed files with 3 additions and 3 deletions

View File

@ -1971,7 +1971,7 @@ QTime QTime::fromString(const QString& string, Qt::DateFormat format)
case Qt::ISODateWithMs: case Qt::ISODateWithMs:
case Qt::TextDate: case Qt::TextDate:
default: default:
return fromIsoTimeString(&string, format, 0); return fromIsoTimeString(QStringRef(&string), format, 0);
} }
} }

View File

@ -972,7 +972,7 @@ QLocale::NumberOptions QLocale::numberOptions() const
*/ */
QString QLocale::quoteString(const QString &str, QuotationStyle style) const QString QLocale::quoteString(const QString &str, QuotationStyle style) const
{ {
return quoteString(&str, style); return quoteString(QStringRef(&str), style);
} }
/*! /*!

View File

@ -73,7 +73,7 @@ public:
static bool isNameChar(const QChar c); static bool isNameChar(const QChar c);
static bool isLetter(const QChar c); static bool isLetter(const QChar c);
static bool isNCName(const QStringRef &ncName); static bool isNCName(const QStringRef &ncName);
static inline bool isNCName(const QString &ncName) { return isNCName(&ncName); } static inline bool isNCName(const QString &ncName) { return isNCName(QStringRef(&ncName)); }
static bool isPublicID(const QString &candidate); static bool isPublicID(const QString &candidate);
private: private: