summaryrefslogtreecommitdiffstats
path: root/src/corelib/text/qstringview.h
diff options
context:
space:
mode:
authorKarsten Heimrich <karsten.heimrich@qt.io>2020-08-12 13:16:27 +0200
committerKarsten Heimrich <karsten.heimrich@qt.io>2020-08-20 00:58:13 +0200
commit2766322de37adba37e0d0d4b0054e55edff01c6c (patch)
treed487d502ee944963e103e11c9726c3efcd8fe041 /src/corelib/text/qstringview.h
parenteb7d1cf098df56f8ebf62f02af611a627435a4a1 (diff)
Move QStringRef and remains to Qt5Compat
Export some private functions from QUtf8 to resolve undefined symbols in Qt5Compat after moving QStringRef. Task-number: QTBUG-84437 Change-Id: I9046dcb14ed520d8868a511d79da6e721e26f72b Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/corelib/text/qstringview.h')
-rw-r--r--src/corelib/text/qstringview.h11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/corelib/text/qstringview.h b/src/corelib/text/qstringview.h
index f2e9f876f9..a59a24f8a5 100644
--- a/src/corelib/text/qstringview.h
+++ b/src/corelib/text/qstringview.h
@@ -46,9 +46,7 @@
1. offer QStringView, overload some functions taking QString with
QStringView
- 2. like 1, but remove all overloads of functions taking QStringRef,
- leaving only the function taking QStringView. Do this only where
- QStringRef overloads tradionally existed.
+ 2. Obsolete: QStringRef and its overloads have been removed.
3. like 2, but replace functions taking QString, too.
*/
@@ -71,7 +69,6 @@ Q_FORWARD_DECLARE_OBJC_CLASS(NSString);
QT_BEGIN_NAMESPACE
class QString;
-class QStringRef;
class QStringView;
class QRegularExpression;
@@ -113,7 +110,6 @@ struct IsContainerCompatibleWithQStringView<T, std::enable_if_t<std::conjunction
// These need to be treated specially due to the empty vs null distinction
std::negation<std::is_same<std::decay_t<T>, QString>>,
- std::negation<std::is_same<std::decay_t<T>, QStringRef>>,
// Don't make an accidental copy constructor
std::negation<std::is_same<std::decay_t<T>, QStringView>>
@@ -146,7 +142,7 @@ private:
using if_compatible_pointer = typename std::enable_if<QtPrivate::IsCompatiblePointer<Pointer>::value, bool>::type;
template <typename T>
- using if_compatible_qstring_like = typename std::enable_if<std::is_same<T, QString>::value || std::is_same<T, QStringRef>::value, bool>::type;
+ using if_compatible_qstring_like = typename std::enable_if<std::is_same<T, QString>::value, bool>::type;
template <typename T>
using if_compatible_container = typename std::enable_if<QtPrivate::IsContainerCompatibleWithQStringView<T>::value, bool>::type;
@@ -217,7 +213,6 @@ public:
#ifdef Q_CLANG_QDOC
QStringView(const QString &str) noexcept;
- QStringView(const QStringRef &str) noexcept;
#else
template <typename String, if_compatible_qstring_like<String> = true>
QStringView(const String &str) noexcept
@@ -415,7 +410,7 @@ private:
Q_DECLARE_TYPEINFO(QStringView, Q_PRIMITIVE_TYPE);
template <typename QStringLike, typename std::enable_if<
- std::is_same<QStringLike, QString>::value || std::is_same<QStringLike, QStringRef>::value,
+ std::is_same<QStringLike, QString>::value,
bool>::type = true>
inline QStringView qToStringViewIgnoringNull(const QStringLike &s) noexcept
{ return QStringView(s.data(), s.size()); }