summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorAnton Kudryavtsev <anton.kudryavtsev@corp.mail.ru>2019-06-18 17:19:08 +0300
committerAnton Kudryavtsev <anton.kudryavtsev@corp.mail.ru>2019-06-27 11:47:27 +0300
commitfc940b24dbe8a118e92e335c0d9c7d4194bf3d4f (patch)
tree336362beebc1275510e8e470d5b0244883bb54d3 /src/corelib
parent72e3d3633e4aca6742a124fb29584d46b63f40ff (diff)
QString: fix comments for qsizetype
Change-Id: I445ba61513fbafd24834fa48ade849feae4f1324 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/tools/qregexp.cpp2
-rw-r--r--src/corelib/tools/qstring.cpp44
-rw-r--r--src/corelib/tools/qstring.h20
3 files changed, 33 insertions, 33 deletions
diff --git a/src/corelib/tools/qregexp.cpp b/src/corelib/tools/qregexp.cpp
index 128df84053..dd38ba0360 100644
--- a/src/corelib/tools/qregexp.cpp
+++ b/src/corelib/tools/qregexp.cpp
@@ -1420,7 +1420,7 @@ void QRegExpMatchState::match(const QChar *str0, int len0, int pos0,
#ifndef QT_NO_REGEXP_OPTIM
if (eng->trivial && !oneTest) {
- // ### Qt6: qsize
+ // ### Qt6: qsizetype
pos = int(QtPrivate::findString(QStringView(str0, len0), pos0, QStringView(eng->goodStr.unicode(), eng->goodStr.length()), eng->cs));
matchLen = eng->goodStr.length();
matched = (pos != -1);
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp
index f9a9fcfe91..319f82af53 100644
--- a/src/corelib/tools/qstring.cpp
+++ b/src/corelib/tools/qstring.cpp
@@ -3701,7 +3701,7 @@ bool QString::operator>(QLatin1String other) const noexcept
*/
int QString::indexOf(const QString &str, int from, Qt::CaseSensitivity cs) const
{
- // ### Qt6: qsize
+ // ### Qt6: qsizetype
return int(QtPrivate::findString(QStringView(unicode(), length()), from, QStringView(str.unicode(), str.length()), cs));
}
#endif // QT_STRINGVIEW_LEVEL < 2
@@ -3745,7 +3745,7 @@ int QString::indexOf(const QString &str, int from, Qt::CaseSensitivity cs) const
int QString::indexOf(QLatin1String str, int from, Qt::CaseSensitivity cs) const
{
- // ### Qt6: qsize
+ // ### Qt6: qsizetype
return int(QtPrivate::findString(QStringView(unicode(), size()), from, str, cs));
}
@@ -3758,7 +3758,7 @@ int QString::indexOf(QLatin1String str, int from, Qt::CaseSensitivity cs) const
*/
int QString::indexOf(QChar ch, int from, Qt::CaseSensitivity cs) const
{
- // ### Qt6: qsize
+ // ### Qt6: qsizetype
return int(qFindChar(QStringView(unicode(), length()), ch, from, cs));
}
@@ -3777,7 +3777,7 @@ int QString::indexOf(QChar ch, int from, Qt::CaseSensitivity cs) const
*/
int QString::indexOf(const QStringRef &str, int from, Qt::CaseSensitivity cs) const
{
- // ### Qt6: qsize
+ // ### Qt6: qsizetype
return int(QtPrivate::findString(QStringView(unicode(), length()), from, QStringView(str.unicode(), str.length()), cs));
}
@@ -3799,7 +3799,7 @@ int QString::indexOf(const QStringRef &str, int from, Qt::CaseSensitivity cs) co
*/
int QString::lastIndexOf(const QString &str, int from, Qt::CaseSensitivity cs) const
{
- // ### Qt6: qsize
+ // ### Qt6: qsizetype
return int(QtPrivate::lastIndexOf(*this, from, str, cs));
}
@@ -3826,7 +3826,7 @@ int QString::lastIndexOf(const QString &str, int from, Qt::CaseSensitivity cs) c
*/
int QString::lastIndexOf(QLatin1String str, int from, Qt::CaseSensitivity cs) const
{
- // ### Qt6: qsize
+ // ### Qt6: qsizetype
return int(QtPrivate::lastIndexOf(*this, from, str, cs));
}
@@ -3838,7 +3838,7 @@ int QString::lastIndexOf(QLatin1String str, int from, Qt::CaseSensitivity cs) co
*/
int QString::lastIndexOf(QChar ch, int from, Qt::CaseSensitivity cs) const
{
- // ### Qt6: qsize
+ // ### Qt6: qsizetype
return int(qLastIndexOf(*this, ch, from, cs));
}
@@ -3860,7 +3860,7 @@ int QString::lastIndexOf(QChar ch, int from, Qt::CaseSensitivity cs) const
*/
int QString::lastIndexOf(const QStringRef &str, int from, Qt::CaseSensitivity cs) const
{
- // ### Qt6: qsize
+ // ### Qt6: qsizetype
return int(QtPrivate::lastIndexOf(*this, from, str, cs));
}
#endif // QT_STRINGVIEW_LEVEL < 2
@@ -4192,7 +4192,7 @@ QString &QString::replace(const QRegularExpression &re, const QString &after)
int QString::count(const QString &str, Qt::CaseSensitivity cs) const
{
- // ### Qt6: qsize
+ // ### Qt6: qsizetype
return int(qt_string_count(QStringView(unicode(), size()), QStringView(str.unicode(), str.size()), cs));
}
@@ -4209,7 +4209,7 @@ int QString::count(const QString &str, Qt::CaseSensitivity cs) const
int QString::count(QChar ch, Qt::CaseSensitivity cs) const
{
- // ### Qt6: qsize
+ // ### Qt6: qsizetype
return int(qt_string_count(QStringView(unicode(), size()), ch, cs));
}
@@ -4226,7 +4226,7 @@ int QString::count(QChar ch, Qt::CaseSensitivity cs) const
*/
int QString::count(const QStringRef &str, Qt::CaseSensitivity cs) const
{
- // ### Qt6: qsize
+ // ### Qt6: qsizetype
return int(qt_string_count(QStringView(unicode(), size()), QStringView(str.unicode(), str.size()), cs));
}
@@ -11172,7 +11172,7 @@ QStringRef QString::midRef(int position, int n) const
*/
int QStringRef::indexOf(const QString &str, int from, Qt::CaseSensitivity cs) const
{
- // ### Qt6: qsize
+ // ### Qt6: qsizetype
return int(QtPrivate::findString(QStringView(unicode(), length()), from, QStringView(str.unicode(), str.length()), cs));
}
#endif // QT_STRINGVIEW_LEVEL < 2
@@ -11207,7 +11207,7 @@ int QStringRef::indexOf(const QString &str, int from, Qt::CaseSensitivity cs) co
*/
int QStringRef::indexOf(QChar ch, int from, Qt::CaseSensitivity cs) const
{
- // ### Qt6: qsize
+ // ### Qt6: qsizetype
return int(qFindChar(QStringView(unicode(), length()), ch, from, cs));
}
@@ -11228,7 +11228,7 @@ int QStringRef::indexOf(QChar ch, int from, Qt::CaseSensitivity cs) const
*/
int QStringRef::indexOf(QLatin1String str, int from, Qt::CaseSensitivity cs) const
{
- // ### Qt6: qsize
+ // ### Qt6: qsizetype
return int(QtPrivate::findString(QStringView(unicode(), size()), from, str, cs));
}
@@ -11249,7 +11249,7 @@ int QStringRef::indexOf(QLatin1String str, int from, Qt::CaseSensitivity cs) con
*/
int QStringRef::indexOf(const QStringRef &str, int from, Qt::CaseSensitivity cs) const
{
- // ### Qt6: qsize
+ // ### Qt6: qsizetype
return int(QtPrivate::findString(QStringView(unicode(), size()), from, QStringView(str.unicode(), str.size()), cs));
}
#endif // QT_STRINGVIEW_LEVEL < 2
@@ -11270,7 +11270,7 @@ int QStringRef::indexOf(const QStringRef &str, int from, Qt::CaseSensitivity cs)
*/
int QStringRef::lastIndexOf(const QString &str, int from, Qt::CaseSensitivity cs) const
{
- // ### Qt6: qsize
+ // ### Qt6: qsizetype
return int(QtPrivate::lastIndexOf(*this, from, str, cs));
}
@@ -11285,7 +11285,7 @@ int QStringRef::lastIndexOf(const QString &str, int from, Qt::CaseSensitivity cs
*/
int QStringRef::lastIndexOf(QChar ch, int from, Qt::CaseSensitivity cs) const
{
- // ### Qt6: qsize
+ // ### Qt6: qsizetype
return int(qLastIndexOf(*this, ch, from, cs));
}
@@ -11306,7 +11306,7 @@ int QStringRef::lastIndexOf(QChar ch, int from, Qt::CaseSensitivity cs) const
*/
int QStringRef::lastIndexOf(QLatin1String str, int from, Qt::CaseSensitivity cs) const
{
- // ### Qt6: qsize
+ // ### Qt6: qsizetype
return int(QtPrivate::lastIndexOf(*this, from, str, cs));
}
@@ -11327,7 +11327,7 @@ int QStringRef::lastIndexOf(QLatin1String str, int from, Qt::CaseSensitivity cs)
*/
int QStringRef::lastIndexOf(const QStringRef &str, int from, Qt::CaseSensitivity cs) const
{
- // ### Qt6: qsize
+ // ### Qt6: qsizetype
return int(QtPrivate::lastIndexOf(*this, from, str, cs));
}
@@ -11360,7 +11360,7 @@ int QStringRef::lastIndexOf(const QStringRef &str, int from, Qt::CaseSensitivity
*/
int QStringRef::count(const QString &str, Qt::CaseSensitivity cs) const
{
- // ### Qt6: qsize
+ // ### Qt6: qsizetype
return int(qt_string_count(QStringView(unicode(), size()), QStringView(str.unicode(), str.size()), cs));
}
@@ -11378,7 +11378,7 @@ int QStringRef::count(const QString &str, Qt::CaseSensitivity cs) const
*/
int QStringRef::count(QChar ch, Qt::CaseSensitivity cs) const
{
- // ### Qt6: qsize
+ // ### Qt6: qsizetype
return int(qt_string_count(QStringView(unicode(), size()), ch, cs));
}
@@ -11396,7 +11396,7 @@ int QStringRef::count(QChar ch, Qt::CaseSensitivity cs) const
*/
int QStringRef::count(const QStringRef &str, Qt::CaseSensitivity cs) const
{
- // ### Qt6: qsize
+ // ### Qt6: qsizetype
return int(qt_string_count(QStringView(unicode(), size()), QStringView(str.unicode(), str.size()), cs));
}
diff --git a/src/corelib/tools/qstring.h b/src/corelib/tools/qstring.h
index b56b37edf3..37bc8d91c9 100644
--- a/src/corelib/tools/qstring.h
+++ b/src/corelib/tools/qstring.h
@@ -135,11 +135,11 @@ public:
{ return QtPrivate::endsWith(*this, QStringView(&c, 1), cs); }
Q_REQUIRED_RESULT int indexOf(QStringView s, int from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive) const noexcept
- { return int(QtPrivate::findString(*this, from, s, cs)); } // ### Qt6: qsize
+ { return int(QtPrivate::findString(*this, from, s, cs)); } // ### Qt6: qsizetype
Q_REQUIRED_RESULT int indexOf(QLatin1String s, int from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive) const noexcept
- { return int(QtPrivate::findString(*this, from, s, cs)); } // ### Qt6: qsize
+ { return int(QtPrivate::findString(*this, from, s, cs)); } // ### Qt6: qsizetype
Q_REQUIRED_RESULT inline int indexOf(QChar c, int from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive) const noexcept
- { return int(QtPrivate::findString(*this, from, QStringView(&c, 1), cs)); } // ### Qt6: qsize
+ { return int(QtPrivate::findString(*this, from, QStringView(&c, 1), cs)); } // ### Qt6: qsizetype
Q_REQUIRED_RESULT bool contains(QStringView s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const noexcept
{ return indexOf(s, 0, cs) != -1; }
@@ -149,11 +149,11 @@ public:
{ return indexOf(QStringView(&c, 1), 0, cs) != -1; }
Q_REQUIRED_RESULT int lastIndexOf(QStringView s, int from = -1, Qt::CaseSensitivity cs = Qt::CaseSensitive) const noexcept
- { return int(QtPrivate::lastIndexOf(*this, from, s, cs)); } // ### Qt6: qsize
+ { return int(QtPrivate::lastIndexOf(*this, from, s, cs)); } // ### Qt6: qsizetype
Q_REQUIRED_RESULT int lastIndexOf(QLatin1String s, int from = -1, Qt::CaseSensitivity cs = Qt::CaseSensitive) const noexcept
- { return int(QtPrivate::lastIndexOf(*this, from, s, cs)); } // ### Qt6: qsize
+ { return int(QtPrivate::lastIndexOf(*this, from, s, cs)); } // ### Qt6: qsizetype
Q_REQUIRED_RESULT inline int lastIndexOf(QChar c, int from = -1, Qt::CaseSensitivity cs = Qt::CaseSensitive) const noexcept
- { return int(QtPrivate::lastIndexOf(*this, from, QStringView(&c, 1), cs)); } // ### Qt6: qsize
+ { return int(QtPrivate::lastIndexOf(*this, from, QStringView(&c, 1), cs)); } // ### Qt6: qsizetype
using value_type = const char;
using reference = value_type&;
@@ -367,7 +367,7 @@ public:
int indexOf(const QStringRef &s, int from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
#endif
Q_REQUIRED_RESULT int indexOf(QStringView s, int from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive) const noexcept
- { return int(QtPrivate::findString(*this, from, s, cs)); } // ### Qt6: qsize
+ { return int(QtPrivate::findString(*this, from, s, cs)); } // ### Qt6: qsizetype
int lastIndexOf(QChar c, int from = -1, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
int lastIndexOf(QLatin1String s, int from = -1, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
#if QT_STRINGVIEW_LEVEL < 2
@@ -376,7 +376,7 @@ public:
#endif
Q_REQUIRED_RESULT int lastIndexOf(QStringView s, int from = -1, Qt::CaseSensitivity cs = Qt::CaseSensitive) const noexcept
- { return int(QtPrivate::lastIndexOf(*this, from, s, cs)); } // ### Qt6: qsize
+ { return int(QtPrivate::lastIndexOf(*this, from, s, cs)); } // ### Qt6: qsizetype
inline bool contains(QChar c, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
#if QT_STRINGVIEW_LEVEL < 2
@@ -1555,7 +1555,7 @@ public:
int indexOf(const QStringRef &str, int from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
#endif
Q_REQUIRED_RESULT int indexOf(QStringView s, int from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive) const noexcept
- { return int(QtPrivate::findString(*this, from, s, cs)); } // ### Qt6: qsize
+ { return int(QtPrivate::findString(*this, from, s, cs)); } // ### Qt6: qsizetype
int indexOf(QChar ch, int from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
int indexOf(QLatin1String str, int from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
#if QT_STRINGVIEW_LEVEL < 2
@@ -1565,7 +1565,7 @@ public:
int lastIndexOf(QChar ch, int from = -1, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
int lastIndexOf(QLatin1String str, int from = -1, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
Q_REQUIRED_RESULT int lastIndexOf(QStringView s, int from = -1, Qt::CaseSensitivity cs = Qt::CaseSensitive) const noexcept
- { return int(QtPrivate::lastIndexOf(*this, from, s, cs)); } // ### Qt6: qsize
+ { return int(QtPrivate::lastIndexOf(*this, from, s, cs)); } // ### Qt6: qsizetype
#if QT_STRINGVIEW_LEVEL < 2
inline bool contains(const QString &str, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;