summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/tools')
-rw-r--r--src/corelib/tools/qalgorithms.qdoc3
-rw-r--r--src/corelib/tools/qbitarray.cpp9
-rw-r--r--src/corelib/tools/qbytearray.cpp30
-rw-r--r--src/corelib/tools/qcommandlineoption.cpp6
-rw-r--r--src/corelib/tools/qrect.h2
-rw-r--r--src/corelib/tools/qstring.cpp2
-rw-r--r--src/corelib/tools/qstring.h8
-rw-r--r--src/corelib/tools/qvector.h7
8 files changed, 27 insertions, 40 deletions
diff --git a/src/corelib/tools/qalgorithms.qdoc b/src/corelib/tools/qalgorithms.qdoc
index 40eb2ed41d..8feb180248 100644
--- a/src/corelib/tools/qalgorithms.qdoc
+++ b/src/corelib/tools/qalgorithms.qdoc
@@ -662,9 +662,6 @@
This function requires the item type (in the example above,
QString) to implement \c operator<().
- See the \l{<QtAlgorithms>#binaryFind example}{detailed
- description} for an example usage.
-
\sa qLowerBound(), qUpperBound(), {random access iterators}
*/
diff --git a/src/corelib/tools/qbitarray.cpp b/src/corelib/tools/qbitarray.cpp
index 2e22cf8340..a6f22abce8 100644
--- a/src/corelib/tools/qbitarray.cpp
+++ b/src/corelib/tools/qbitarray.cpp
@@ -119,14 +119,6 @@ QT_BEGIN_NAMESPACE
\since 5.2
*/
-/*!
- \fn QBitArray &QBitArray::operator=(QBitArray &&other)
-
- Move-assigns \a other to this QBitArray instance.
-
- \since 5.2
-*/
-
/*! \fn QBitArray::QBitArray()
Constructs an empty bit array.
@@ -464,6 +456,7 @@ void QBitArray::fill(bool value, int begin, int end)
*/
/*! \fn QBitArray &QBitArray::operator=(QBitArray &&other)
+ \since 5.2
Moves \a other to this bit array and returns a reference to
this bit array.
diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp
index a9cfd604c7..ab1167d0f6 100644
--- a/src/corelib/tools/qbytearray.cpp
+++ b/src/corelib/tools/qbytearray.cpp
@@ -1303,12 +1303,10 @@ void QByteArray::chop(int n)
returns a reference to this byte array. The Unicode data is
converted into 8-bit characters using QString::toUtf8().
- If the QString contains non-ASCII Unicode characters, using this
- operator can lead to loss of information. You can disable this
- operator by defining \c QT_NO_CAST_TO_ASCII when you compile your
- applications. You then need to call QString::toUtf8() (or
- QString::toLatin1() or QString::toUtf8() or QString::toLocal8Bit())
- explicitly if you want to convert the data to \c{const char *}.
+ You can disable this function by defining \c QT_NO_CAST_TO_ASCII when you
+ compile your applications. You then need to call QString::toUtf8() (or
+ QString::toLatin1() or QString::toLocal8Bit()) explicitly if you want to
+ convert the data to \c{const char *}.
*/
/*! \fn QByteArray &QByteArray::operator+=(const char *str)
@@ -1667,12 +1665,10 @@ QByteArray &QByteArray::append(const QByteArray &ba)
Appends the string \a str to this byte array. The Unicode data is
converted into 8-bit characters using QString::toUtf8().
- If the QString contains non-ASCII Unicode characters, using this
- function can lead to loss of information. You can disable this
- function by defining \c QT_NO_CAST_TO_ASCII when you compile your
- applications. You then need to call QString::toUtf8() (or
- QString::toLatin1() or QString::toUtf8() or QString::toLocal8Bit())
- explicitly if you want to convert the data to \c{const char *}.
+ You can disable this function by defining \c QT_NO_CAST_TO_ASCII when you
+ compile your applications. You then need to call QString::toUtf8() (or
+ QString::toLatin1() or QString::toLocal8Bit()) explicitly if you want to
+ convert the data to \c{const char *}.
*/
/*!
@@ -2148,12 +2144,10 @@ QByteArray &QByteArray::replace(char before, const QByteArray &after)
string \a after. The Unicode data is converted into 8-bit
characters using QString::toUtf8().
- If the QString contains non-ASCII Unicode characters, using this
- function can lead to loss of information. You can disable this
- function by defining \c QT_NO_CAST_TO_ASCII when you compile your
- applications. You then need to call QString::toUtf8() (or
- QString::toLatin1() or QString::toUtf8() or QString::toLocal8Bit())
- explicitly if you want to convert the data to \c{const char *}.
+ You can disable this function by defining \c QT_NO_CAST_TO_ASCII when you
+ compile your applications. You then need to call QString::toUtf8() (or
+ QString::toLatin1() or QString::toLocal8Bit()) explicitly if you want to
+ convert the data to \c{const char *}.
*/
/*! \fn QByteArray &QByteArray::replace(char before, const char *after)
diff --git a/src/corelib/tools/qcommandlineoption.cpp b/src/corelib/tools/qcommandlineoption.cpp
index 86f087674b..ccf9211b52 100644
--- a/src/corelib/tools/qcommandlineoption.cpp
+++ b/src/corelib/tools/qcommandlineoption.cpp
@@ -79,7 +79,7 @@ public:
This class is used to describe an option on the command line. It allows
different ways of defining the same option with multiple aliases possible.
It is also used to describe how the option is used - it may be a flag (e.g. \c{-v})
- or take an argument (e.g. \c{-o file}).
+ or take a value (e.g. \c{-o file}).
Examples:
\snippet code/src_corelib_tools_qcommandlineoption.cpp 0
@@ -232,8 +232,8 @@ void QCommandLineOptionPrivate::setNames(const QStringList &nameList)
for the documentation of the option in the help output. An option with names \c{o} and \c{output},
and a value name of \c{file} will appear as \c{-o, --output <file>}.
- Call QCommandLineParser::argument() if you expect the option to be present
- only once, and QCommandLineParser::arguments() if you expect that option
+ Call QCommandLineParser::value() if you expect the option to be present
+ only once, and QCommandLineParser::values() if you expect that option
to be present multiple times.
\sa valueName()
diff --git a/src/corelib/tools/qrect.h b/src/corelib/tools/qrect.h
index 62ebdd10cd..22696f9edf 100644
--- a/src/corelib/tools/qrect.h
+++ b/src/corelib/tools/qrect.h
@@ -512,7 +512,7 @@ public:
Q_DECL_CONSTEXPR inline QRectF translated(qreal dx, qreal dy) const;
Q_DECL_CONSTEXPR inline QRectF translated(const QPointF &p) const;
- inline void moveTo(qreal x, qreal t);
+ inline void moveTo(qreal x, qreal y);
inline void moveTo(const QPointF &p);
inline void setRect(qreal x, qreal y, qreal w, qreal h);
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp
index 390a65aa23..f5e25f1de9 100644
--- a/src/corelib/tools/qstring.cpp
+++ b/src/corelib/tools/qstring.cpp
@@ -7845,7 +7845,7 @@ QString &QString::setRawData(const QChar *unicode, int size)
\snippet code/src_corelib_tools_qstring.cpp 6
- \sa QString, QLatin1Char, QStringLiteral
+ \sa QString, QLatin1Char, {QStringLiteral()}{QStringLiteral}
*/
/*! \fn QLatin1String::QLatin1String(const char *str)
diff --git a/src/corelib/tools/qstring.h b/src/corelib/tools/qstring.h
index 4432759b03..0b7ca1f444 100644
--- a/src/corelib/tools/qstring.h
+++ b/src/corelib/tools/qstring.h
@@ -1062,13 +1062,13 @@ inline QT_ASCII_CAST_WARN bool operator==(const char *s1, const QString &s2)
inline QT_ASCII_CAST_WARN bool operator!=(const char *s1, const QString &s2)
{ return QString::compare_helper(s2.constData(), s2.size(), s1, -1) != 0; }
inline QT_ASCII_CAST_WARN bool operator<(const char *s1, const QString &s2)
-{ return QString::compare_helper(s2.constData(), s2.size(), s1, -1) < 0; }
-inline QT_ASCII_CAST_WARN bool operator>(const char *s1, const QString &s2)
{ return QString::compare_helper(s2.constData(), s2.size(), s1, -1) > 0; }
+inline QT_ASCII_CAST_WARN bool operator>(const char *s1, const QString &s2)
+{ return QString::compare_helper(s2.constData(), s2.size(), s1, -1) < 0; }
inline QT_ASCII_CAST_WARN bool operator<=(const char *s1, const QString &s2)
-{ return QString::compare_helper(s2.constData(), s2.size(), s1, -1) <= 0; }
-inline QT_ASCII_CAST_WARN bool operator>=(const char *s1, const QString &s2)
{ return QString::compare_helper(s2.constData(), s2.size(), s1, -1) >= 0; }
+inline QT_ASCII_CAST_WARN bool operator>=(const char *s1, const QString &s2)
+{ return QString::compare_helper(s2.constData(), s2.size(), s1, -1) <= 0; }
inline QT_ASCII_CAST_WARN bool operator==(const char *s1, QLatin1String s2)
{ return QString::fromUtf8(s1) == s2; }
diff --git a/src/corelib/tools/qvector.h b/src/corelib/tools/qvector.h
index 505e1a32e4..075e8e83e8 100644
--- a/src/corelib/tools/qvector.h
+++ b/src/corelib/tools/qvector.h
@@ -254,7 +254,10 @@ private:
};
#ifdef Q_CC_MSVC
-# pragma warning ( disable : 4345 ) // behavior change: an object of POD type constructed with an initializer of the form () will be default-initialized
+// behavior change: an object of POD type constructed with an initializer of the form ()
+// will be default-initialized
+# pragma warning ( push )
+# pragma warning ( disable : 4345 )
#endif
template <typename T>
@@ -270,7 +273,7 @@ void QVector<T>::defaultConstruct(T *from, T *to)
}
#ifdef Q_CC_MSVC
-# pragma warning ( default: 4345 )
+# pragma warning ( pop )
#endif
template <typename T>