From c375503fa030de51e821db00e7ca6c1378eb34ba Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sat, 20 Jan 2018 10:56:58 -0800 Subject: Add a few methods to check if a string is US-ASCII or Latin1 isLatin1(QLatin1String) is provided for completeness sake, in case some generic code operates on both QLatin1String and QString/QStringView. Change-Id: I5e421e32396d44e4b39efffd150b99a18eedf648 Reviewed-by: Allan Sandfeld Jensen Reviewed-by: Lars Knoll --- src/corelib/tools/qstring.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/corelib/tools/qstring.h') diff --git a/src/corelib/tools/qstring.h b/src/corelib/tools/qstring.h index 808f388c89..b40a622c7c 100644 --- a/src/corelib/tools/qstring.h +++ b/src/corelib/tools/qstring.h @@ -201,6 +201,12 @@ Q_DECLARE_TYPEINFO(QLatin1String, Q_MOVABLE_TYPE); // Qt 4.x compatibility typedef QLatin1String QLatin1Literal; +// +// QLatin1String inline implementations +// +inline bool QtPrivate::isLatin1(QLatin1String) Q_DECL_NOTHROW +{ return true; } + // // QStringView members that require QLatin1String: // -- cgit v1.2.3