summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--examples/widgets/doc/dropsite.qdoc2
-rw-r--r--examples/widgets/tools/codecs/doc/images/codecs-example.png (renamed from doc/src/images/codecs-example.png)bin20593 -> 20593 bytes
-rw-r--r--src/corelib/global/qglobal.cpp16
-rw-r--r--src/corelib/tools/qeasingcurve.cpp16
-rw-r--r--src/corelib/tools/qstring.cpp134
-rw-r--r--src/corelib/tools/qvarlengtharray.qdoc8
-rw-r--r--src/corelib/tools/qvector.cpp5
-rw-r--r--src/dbus/qdbusvirtualobject.cpp3
-rw-r--r--src/gui/kernel/qguiapplication.cpp12
-rw-r--r--src/gui/kernel/qopenglcontext.cpp15
-rw-r--r--src/gui/opengl/qopengltexture.cpp72
-rw-r--r--src/widgets/doc/snippets/code/doc_src_examples_dropsite.qdoc2
-rw-r--r--src/widgets/widgets/qmaccocoaviewcontainer_mac.mm2
13 files changed, 172 insertions, 115 deletions
diff --git a/examples/widgets/doc/dropsite.qdoc b/examples/widgets/doc/dropsite.qdoc
index aaa5f7b3eb..785d044a15 100644
--- a/examples/widgets/doc/dropsite.qdoc
+++ b/examples/widgets/doc/dropsite.qdoc
@@ -205,7 +205,7 @@
supported formats using the \l{The foreach Keyword}{foreach keyword}.
This keyword has the following format:
- \snippet code/doc_src_examples_dropsite.qdoc 0
+ \include code/doc_src_examples_dropsite.qdoc 0
In our example, \c format is the \a variable and the \a container is a
QStringList, obtained from \c mimeData->formats().
diff --git a/doc/src/images/codecs-example.png b/examples/widgets/tools/codecs/doc/images/codecs-example.png
index 8e7ae95317..8e7ae95317 100644
--- a/doc/src/images/codecs-example.png
+++ b/examples/widgets/tools/codecs/doc/images/codecs-example.png
Binary files differ
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index 710f7e8ba1..c15305322b 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -394,7 +394,7 @@ Q_STATIC_ASSERT_X(UCHAR_MAX == 255, "Qt assumes that char is 8 bits");
\fn bool QFlags::testFlag(Enum flag) const
\since 4.2
- Returns \c true if the \a flag is set, otherwise false.
+ Returns \c true if the \a flag is set, otherwise \c false.
*/
/*!
@@ -1937,7 +1937,7 @@ const QSysInfo::WinVersion QSysInfo::WindowsVersion = QSysInfo::windowsVersion()
\relates <QtGlobal>
Prints a warning message containing the source code file name and
- line number if \a test is false.
+ line number if \a test is \c false.
Q_ASSERT() is useful for testing pre- and post-conditions
during development. It does nothing if \c QT_NO_DEBUG was defined
@@ -1960,7 +1960,7 @@ const QSysInfo::WinVersion QSysInfo::WindowsVersion = QSysInfo::windowsVersion()
\relates <QtGlobal>
Prints the message \a what together with the location \a where,
- the source file name and line number if \a test is false.
+ the source file name and line number if \a test is \c false.
Q_ASSERT_X is useful for testing pre- and post-conditions during
development. It does nothing if \c QT_NO_DEBUG was defined during
@@ -1983,18 +1983,18 @@ const QSysInfo::WinVersion QSysInfo::WindowsVersion = QSysInfo::windowsVersion()
\relates <QtGlobal>
\since 5.0
- Causes the compiler to assume that \a expr is true. This macro is useful
+ Causes the compiler to assume that \a expr is \c true. This macro is useful
for improving code generation, by providing the compiler with hints about
conditions that it would not otherwise know about. However, there is no
guarantee that the compiler will actually use those hints.
This macro could be considered a "lighter" version of \l{Q_ASSERT()}. While
- Q_ASSERT will abort the program's execution if the condition is false,
+ Q_ASSERT will abort the program's execution if the condition is \c false,
Q_ASSUME will tell the compiler not to generate code for those conditions.
Therefore, it is important that the assumptions always hold, otherwise
undefined behaviour may occur.
- If \a expr is a constantly false condition, Q_ASSUME will tell the compiler
+ If \a expr is a constantly \c false condition, Q_ASSUME will tell the compiler
that the current code execution cannot be reached. That is, Q_ASSUME(false)
is equivalent to Q_UNREACHABLE().
@@ -3346,6 +3346,8 @@ bool QInternal::activateCallbacks(Callback cb, void **parameters)
It expands to "std::move" if your compiler supports that C++11 function, or to nothing
otherwise.
+
+ qMove takes an rvalue reference to its parameter \a x, and converts it to an xvalue.
*/
/*!
@@ -3426,7 +3428,7 @@ bool QInternal::activateCallbacks(Callback cb, void **parameters)
\relates <QtGlobal>
\since 5.0
- This macro marks a function as non-throwing if \a x is true. If
+ This macro marks a function as non-throwing if \a x is \c true. If
the function does nevertheless throw, the behaviour is defined:
std::terminate() is called.
diff --git a/src/corelib/tools/qeasingcurve.cpp b/src/corelib/tools/qeasingcurve.cpp
index 2708901866..409ebd1de5 100644
--- a/src/corelib/tools/qeasingcurve.cpp
+++ b/src/corelib/tools/qeasingcurve.cpp
@@ -1232,6 +1232,8 @@ void QEasingCurve::setOvershoot(qreal overshoot)
It is only applicable if type() is QEasingCurve::BezierSpline.
Note that the spline implicitly starts at (0.0, 0.0) and has to end at (1.0, 1.0) to
be a valid easing curve.
+ \a c1 and \a c2 are the control points used for drawing the curve.
+ \a endPoint is the endpoint of the curve.
*/
void QEasingCurve::addCubicBezierSegment(const QPointF & c1, const QPointF & c2, const QPointF & endPoint)
{
@@ -1290,8 +1292,12 @@ QVector<QPointF> static inline tcbToBezier(const TCBPoints &tcbPoints)
It is only applicable if type() is QEasingCurve::TCBSpline.
The spline has to start explitly at (0.0, 0.0) and has to end at (1.0, 1.0) to
be a valid easing curve.
- The three parameters are called tension, continuity and bias. All three parameters are
- valid between -1 and 1 and define the tangent of the control point.
+ The tension \a t changes the length of the tangent vector.
+ The continuity \a c changes the sharpness in change between the tangents.
+ The bias \a b changes the direction of the tangent vector.
+ \a nextPoint is the sample position.
+ All three parameters are valid between -1 and 1 and define the
+ tangent of the control point.
If all three parameters are 0 the resulting spline is a Catmull-Rom spline.
The begin and endpoint always have a bias of -1 and 1, since the outer tangent is not defined.
*/
@@ -1390,7 +1396,7 @@ void QEasingCurve::setType(Type type)
/*!
Sets a custom easing curve that is defined by the user in the function \a func.
The signature of the function is qreal myEasingFunction(qreal progress),
- where \e progress and the return value is considered to be normalized between 0 and 1.
+ where \e progress and the return value are considered to be normalized between 0 and 1.
(In some cases the return value can be outside that range)
After calling this function type() will return QEasingCurve::Custom.
\a func cannot be zero.
@@ -1420,8 +1426,8 @@ QEasingCurve::EasingFunction QEasingCurve::customType() const
/*!
Return the effective progress for the easing curve at \a progress.
- While \a progress must be between 0 and 1, the returned effective progress
- can be outside those bounds. For instance, QEasingCurve::InBack will
+ Whereas \a progress must be between 0 and 1, the returned effective progress
+ can be outside those bounds. For example, QEasingCurve::InBack will
return negative values in the beginning of the function.
*/
qreal QEasingCurve::valueForProgress(qreal progress) const
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp
index 116da9e383..7547ba8c19 100644
--- a/src/corelib/tools/qstring.cpp
+++ b/src/corelib/tools/qstring.cpp
@@ -1617,7 +1617,7 @@ void QString::resize(int size)
This function is useful for code that needs to build up a long
string and wants to avoid repeated reallocation. In this example,
- we want to add to the string until some condition is true, and
+ we want to add to the string until some condition is \c true, and
we're fairly sure that size is large enough to make a call to
reserve() worthwhile:
@@ -2534,6 +2534,9 @@ bool QString::operator==(QLatin1String other) const
QT_NO_CAST_FROM_ASCII when you compile your applications. This
can be useful if you want to ensure that all user-visible strings
go through QObject::tr(), for example.
+
+ Returns \c true if this string is lexically equal to the parameter
+ string \a other. Otherwise returns \c false.
*/
/*! \fn bool QString::operator==(const char *other) const
@@ -2563,9 +2566,11 @@ bool operator<(const QString &s1, const QString &s2)
{
return ucstrcmp(s1.constData(), s1.length(), s2.constData(), s2.length()) < 0;
}
-
/*!
- \overload operator<()
+ \overload operator<()
+ \relates QString
+ Returns \c true if this string is lexically less than the parameter
+ string called \a other; otherwise returns \c false.
*/
bool QString::operator<(QLatin1String other) const
{
@@ -2592,6 +2597,9 @@ bool QString::operator<(QLatin1String other) const
/*! \fn bool QString::operator<(const char *other) const
+ Returns \c true if this string is lexically less than string \a other.
+ Otherwise returns \c false.
+
\overload operator<()
The \a other const char pointer is converted to a QString using
@@ -2616,6 +2624,9 @@ bool QString::operator<(QLatin1String other) const
/*! \fn bool QString::operator<=(QLatin1String other) const
+ Returns \c true if this string is lexically less than or equal to
+ parameter string \a other. Otherwise returns \c false.
+
\overload operator<=()
*/
@@ -2658,7 +2669,10 @@ bool QString::operator<(QLatin1String other) const
*/
/*!
- \overload operator>()
+ \overload operator>()
+ \relates QString
+ Returns \c true if this string is lexically greater than the parameter
+ string \a other; otherwise returns \c false.
*/
bool QString::operator>(QLatin1String other) const
{
@@ -2710,6 +2724,9 @@ bool QString::operator>(QLatin1String other) const
/*! \fn bool QString::operator>=(QLatin1String other) const
+ Returns \c true if this string is lexically greater than or equal to parameter
+ string \a other. Otherwise returns \c false.
+
\overload operator>=()
*/
@@ -2754,6 +2771,9 @@ bool QString::operator>(QLatin1String other) const
/*! \fn bool QString::operator!=(QLatin1String other) const
+ Returns \c true if this string is not equal to parameter string \a other.
+ Otherwise returns \c false.
+
\overload operator!=()
*/
@@ -4082,7 +4102,7 @@ QString QString::mid(int position, int n) const
/*!
Returns \c true if the string starts with \a s; otherwise returns
- false.
+ \c false.
If \a cs is Qt::CaseSensitive (default), the search is
case sensitive; otherwise the search is case insensitive.
@@ -4109,7 +4129,7 @@ bool QString::startsWith(QLatin1String s, Qt::CaseSensitivity cs) const
\overload startsWith()
Returns \c true if the string starts with \a c; otherwise returns
- false.
+ \c false.
*/
bool QString::startsWith(QChar c, Qt::CaseSensitivity cs) const
{
@@ -4138,7 +4158,7 @@ bool QString::startsWith(const QStringRef &s, Qt::CaseSensitivity cs) const
/*!
Returns \c true if the string ends with \a s; otherwise returns
- false.
+ \c false.
If \a cs is Qt::CaseSensitive (default), the search is case
sensitive; otherwise the search is case insensitive.
@@ -4181,7 +4201,7 @@ bool QString::endsWith(QLatin1String s, Qt::CaseSensitivity cs) const
/*!
Returns \c true if the string ends with \a c; otherwise returns
- false.
+ \c false.
\overload endsWith()
*/
@@ -4581,7 +4601,7 @@ QString& QString::setUnicode(const QChar *unicode, int size)
replaced with a single space.
Whitespace means any character for which QChar::isSpace() returns
- true. This includes the ASCII characters '\\t', '\\n', '\\v',
+ \c true. This includes the ASCII characters '\\t', '\\n', '\\v',
'\\f', '\\r', and ' '.
Example:
@@ -4671,7 +4691,7 @@ QString QString::simplified() const
the end.
Whitespace means any character for which QChar::isSpace() returns
- true. This includes the ASCII characters '\\t', '\\n', '\\v',
+ \c true. This includes the ASCII characters '\\t', '\\n', '\\v',
'\\f', '\\r', and ' '.
Example:
@@ -4866,7 +4886,7 @@ QString& QString::fill(QChar ch, int size)
/*! \fn bool QString::isEmpty() const
Returns \c true if the string has no characters; otherwise returns
- false.
+ \c false.
Example:
@@ -4981,7 +5001,7 @@ QString& QString::fill(QChar ch, int size)
\relates QString
Returns \c true if \a s1 is not equal to \a s2; otherwise returns
- false.
+ \c false.
For \a s1 != 0, this is equivalent to \c {compare(} \a s1, \a s2
\c {) != 0}. Note that no string is equal to \a s1 being 0.
@@ -5389,12 +5409,12 @@ const ushort *QString::utf16() const
Returns a string of size \a width that contains this string
padded by the \a fill character.
- If \a truncate is false and the size() of the string is more than
+ If \a truncate is \c false and the size() of the string is more than
\a width, then the returned string is a copy of the string.
\snippet qstring/main.cpp 32
- If \a truncate is true and the size() of the string is more than
+ If \a truncate is \c true and the size() of the string is more than
\a width, then any characters in a copy of the string after
position \a width are removed, and the copy is returned.
@@ -5430,7 +5450,7 @@ QString QString::leftJustified(int width, QChar fill, bool truncate) const
\snippet qstring/main.cpp 49
- If \a truncate is false and the size() of the string is more than
+ If \a truncate is \c false and the size() of the string is more than
\a width, then the returned string is a copy of the string.
If \a truncate is true and the size() of the string is more than
@@ -6053,8 +6073,8 @@ QString &QString::vsprintf(const char* cformat, va_list ap)
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to false; otherwise
- *\a{ok} is set to true.
+ If a conversion error occurs, *\a{ok} is set to \c false; otherwise
+ *\a{ok} is set to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -6093,8 +6113,8 @@ qlonglong QString::toIntegral_helper(const QChar *data, int len, bool *ok, int b
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to false; otherwise
- *\a{ok} is set to true.
+ If a conversion error occurs, *\a{ok} is set to \c false; otherwise
+ *\a{ok} is set to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -6134,8 +6154,8 @@ qulonglong QString::toIntegral_helper(const QChar *data, uint len, bool *ok, int
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to false; otherwise
- *\a{ok} is set to true.
+ If a conversion error occurs, *\a{ok} is set to \c false; otherwise
+ *\a{ok} is set to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -6163,8 +6183,8 @@ long QString::toLong(bool *ok, int base) const
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to false; otherwise
- *\a{ok} is set to true.
+ If a conversion error occurs, *\a{ok} is set to \c false; otherwise
+ *\a{ok} is set to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -6191,8 +6211,8 @@ ulong QString::toULong(bool *ok, int base) const
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to false; otherwise
- *\a{ok} is set to true.
+ If a conversion error occurs, *\a{ok} is set to \c false; otherwise
+ *\a{ok} is set to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -6218,8 +6238,8 @@ int QString::toInt(bool *ok, int base) const
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to false; otherwise
- *\a{ok} is set to true.
+ If a conversion error occurs, *\a{ok} is set to \c false; otherwise
+ *\a{ok} is set to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -6245,8 +6265,8 @@ uint QString::toUInt(bool *ok, int base) const
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to false; otherwise
- *\a{ok} is set to true.
+ If a conversion error occurs, *\a{ok} is set to \c false; otherwise
+ *\a{ok} is set to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -6272,8 +6292,8 @@ short QString::toShort(bool *ok, int base) const
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to false; otherwise
- *\a{ok} is set to true.
+ If a conversion error occurs, *\a{ok} is set to \c false; otherwise
+ *\a{ok} is set to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -6300,8 +6320,8 @@ ushort QString::toUShort(bool *ok, int base) const
Returns 0.0 if the conversion fails.
- If a conversion error occurs, \c{*}\a{ok} is set to false;
- otherwise \c{*}\a{ok} is set to true.
+ If a conversion error occurs, \c{*}\a{ok} is set to \c false;
+ otherwise \c{*}\a{ok} is set to \c true.
\snippet qstring/main.cpp 66
@@ -6332,8 +6352,8 @@ double QString::toDouble(bool *ok) const
/*!
Returns the string converted to a \c float value.
- If a conversion error occurs, *\a{ok} is set to false; otherwise
- *\a{ok} is set to true. Returns 0.0 if the conversion fails.
+ If a conversion error occurs, *\a{ok} is set to \c false; otherwise
+ *\a{ok} is set to \c true. Returns 0.0 if the conversion fails.
The string conversion will always happen in the 'C' locale. For locale
dependent conversion use QLocale::toFloat()
@@ -8276,7 +8296,7 @@ ownership of it, no memory is freed when instances are destroyed.
\fn bool QStringRef::isEmpty() const
Returns \c true if the string reference has no characters; otherwise returns
- false.
+ \c false.
A string reference is empty if its size is zero.
@@ -9523,7 +9543,7 @@ QVector<uint> QStringRef::toUcs4() const
the end.
Whitespace means any character for which QChar::isSpace() returns
- true. This includes the ASCII characters '\\t', '\\n', '\\v',
+ \c true. This includes the ASCII characters '\\t', '\\n', '\\v',
'\\f', '\\r', and ' '.
Unlike QString::simplified(), trimmed() leaves internal whitespace alone.
@@ -9555,8 +9575,8 @@ QStringRef QStringRef::trimmed() const
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to false; otherwise
- *\a{ok} is set to true.
+ If a conversion error occurs, *\a{ok} is set to \c false; otherwise
+ *\a{ok} is set to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -9580,8 +9600,8 @@ qint64 QStringRef::toLongLong(bool *ok, int base) const
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to false; otherwise
- *\a{ok} is set to true.
+ If a conversion error occurs, *\a{ok} is set to \c false; otherwise
+ *\a{ok} is set to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -9607,8 +9627,8 @@ quint64 QStringRef::toULongLong(bool *ok, int base) const
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to false; otherwise
- *\a{ok} is set to true.
+ If a conversion error occurs, *\a{ok} is set to \c false; otherwise
+ *\a{ok} is set to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -9634,8 +9654,8 @@ long QStringRef::toLong(bool *ok, int base) const
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to false; otherwise
- *\a{ok} is set to true.
+ If a conversion error occurs, *\a{ok} is set to \c false; otherwise
+ *\a{ok} is set to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -9660,8 +9680,8 @@ ulong QStringRef::toULong(bool *ok, int base) const
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to false; otherwise
- *\a{ok} is set to true.
+ If a conversion error occurs, *\a{ok} is set to \c false; otherwise
+ *\a{ok} is set to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -9685,8 +9705,8 @@ int QStringRef::toInt(bool *ok, int base) const
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to false; otherwise
- *\a{ok} is set to true.
+ If a conversion error occurs, *\a{ok} is set to \c false; otherwise
+ *\a{ok} is set to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -9710,8 +9730,8 @@ uint QStringRef::toUInt(bool *ok, int base) const
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to false; otherwise
- *\a{ok} is set to true.
+ If a conversion error occurs, *\a{ok} is set to \c false; otherwise
+ *\a{ok} is set to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -9735,8 +9755,8 @@ short QStringRef::toShort(bool *ok, int base) const
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to false; otherwise
- *\a{ok} is set to true.
+ If a conversion error occurs, *\a{ok} is set to \c false; otherwise
+ *\a{ok} is set to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -9761,8 +9781,8 @@ ushort QStringRef::toUShort(bool *ok, int base) const
Returns 0.0 if the conversion fails.
- If a conversion error occurs, \c{*}\a{ok} is set to false;
- otherwise \c{*}\a{ok} is set to true.
+ If a conversion error occurs, \c{*}\a{ok} is set to \c false;
+ otherwise \c{*}\a{ok} is set to \c true.
The string conversion will always happen in the 'C' locale. For locale
dependent conversion use QLocale::toDouble()
@@ -9784,8 +9804,8 @@ double QStringRef::toDouble(bool *ok) const
/*!
Returns the string converted to a \c float value.
- If a conversion error occurs, *\a{ok} is set to false; otherwise
- *\a{ok} is set to true. Returns 0.0 if the conversion fails.
+ If a conversion error occurs, *\a{ok} is set to \c false; otherwise
+ *\a{ok} is set to \c true. Returns 0.0 if the conversion fails.
The string conversion will always happen in the 'C' locale. For locale
dependent conversion use QLocale::toFloat()
diff --git a/src/corelib/tools/qvarlengtharray.qdoc b/src/corelib/tools/qvarlengtharray.qdoc
index 05d9258c86..73036ceaed 100644
--- a/src/corelib/tools/qvarlengtharray.qdoc
+++ b/src/corelib/tools/qvarlengtharray.qdoc
@@ -189,6 +189,8 @@
/*! \fn bool QVarLengthArray::empty() const
\since 5.0
+ Returns \c true if the array has size 0; otherwise returns \c false.
+
Same as isEmpty(). Provided for STL-compatibility.
*/
@@ -285,7 +287,8 @@
\fn void QVarLengthArray::push_back(const T &t)
\since 5.0
- Same as append(). Provided for STL-compatibility.
+ Appends item \a t to the array, extending the array if necessary.
+ Provided for STL-compatibility.
*/
/*!
@@ -665,8 +668,7 @@
/*! \fn QVarLengthArray &QVarLengthArray::operator+=(const T &value)
\since 4.8
- Appends \a value to the array and returns a reference to this
- vector.
+ Appends \a value to the array and returns a reference to this vector.
\sa append(), operator<<()
*/
diff --git a/src/corelib/tools/qvector.cpp b/src/corelib/tools/qvector.cpp
index 4beb0f939c..89396540e0 100644
--- a/src/corelib/tools/qvector.cpp
+++ b/src/corelib/tools/qvector.cpp
@@ -565,6 +565,7 @@
/*! \fn void QVector::removeAt(int i)
\since 5.2
+ Removes the element at index position \a i.
Equivalent to
\code
remove(i);
@@ -588,6 +589,8 @@
/*! \fn T QVector::takeAt(int i)
\since 5.2
+ Removes the element at index position \a i and returns it.
+
Equivalent to
\code
T t = at(i);
@@ -907,7 +910,7 @@
/*! \fn bool QVector::empty() const
This function is provided for STL compatibility. It is equivalent
- to isEmpty(), returning true if the vector is empty; otherwise
+ to isEmpty(), returning \c true if the vector is empty; otherwise
returns \c false.
*/
diff --git a/src/dbus/qdbusvirtualobject.cpp b/src/dbus/qdbusvirtualobject.cpp
index 15e01c2f20..fb9599f193 100644
--- a/src/dbus/qdbusvirtualobject.cpp
+++ b/src/dbus/qdbusvirtualobject.cpp
@@ -71,7 +71,8 @@ QT_END_NAMESPACE
This function needs to handle all messages to the path of the
virtual object, when the SubPath option is specified.
The service, path, interface and methos are all part of the \a message.
- Must return true when the message is handled, otherwise false (will generate dbus error message).
+ Parameter \a connection is the connection handle.
+ Must return \c true when the message is handled, otherwise \c false (will generate dbus error message).
*/
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index b2d774b40d..c6376b2647 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -910,7 +910,7 @@ qreal QGuiApplication::devicePixelRatio() const
}
/*!
- Returns the top level window at the given position, if any.
+ Returns the top level window at the given position \a pos, if any.
*/
QWindow *QGuiApplication::topLevelAt(const QPoint &pos)
{
@@ -2711,7 +2711,7 @@ void QGuiApplicationPrivate::notifyWindowIconChanged()
\brief whether the application implicitly quits when the last window is
closed.
- The default is true.
+ The default is \c true.
If this property is \c true, the applications quits when the last visible
primary window (i.e. window with no parent) is closed.
@@ -2739,7 +2739,7 @@ bool QGuiApplication::quitOnLastWindowClosed()
primary window (i.e. window with no parent) is closed.
By default, QGuiApplication quits after this signal is emitted. This feature
- can be turned off by setting \l quitOnLastWindowClosed to false.
+ can be turned off by setting \l quitOnLastWindowClosed to \c false.
\sa QWindow::close(), QWindow::isTopLevel()
*/
@@ -2915,7 +2915,7 @@ void QGuiApplicationPrivate::setApplicationState(Qt::ApplicationState state)
Returns \c true if the application is currently saving the
\l{Session Management}{session}; otherwise returns \c false.
- This is true when commitDataRequest() and saveStateRequest() are emitted,
+ This is \c true when commitDataRequest() and saveStateRequest() are emitted,
but also when the windows are closed afterwards by session management.
\sa sessionId(), commitDataRequest(), saveStateRequest()
@@ -3186,7 +3186,7 @@ QStyleHints *QGuiApplication::styleHints()
/*!
Sets whether Qt should use the system's standard colors, fonts, etc., to
- \a on. By default, this is true.
+ \a on. By default, this is \c true.
This function must be called before creating the QGuiApplication object, like
this:
@@ -3202,7 +3202,7 @@ void QGuiApplication::setDesktopSettingsAware(bool on)
/*!
Returns \c true if Qt is set to use the system's standard colors, fonts, etc.;
- otherwise returns \c false. The default is true.
+ otherwise returns \c false. The default is \c true.
\sa setDesktopSettingsAware()
*/
diff --git a/src/gui/kernel/qopenglcontext.cpp b/src/gui/kernel/qopenglcontext.cpp
index d64f996b56..fb7d15c160 100644
--- a/src/gui/kernel/qopenglcontext.cpp
+++ b/src/gui/kernel/qopenglcontext.cpp
@@ -163,7 +163,7 @@ void QOpenGLVersionProfile::setVersion(int majorVersion, int minorVersion)
}
/*!
- Returns the OpenGL profile. Only make sense if profiles are supported by this version.
+ Returns the OpenGL profile. Only makes sense if profiles are supported by this version.
\sa setProfile(), supportsProfiles()
*/
@@ -173,7 +173,8 @@ QSurfaceFormat::OpenGLContextProfile QOpenGLVersionProfile::profile() const
}
/*!
- Sets the profile. Only make sense if profiles are supported by this version.
+ Sets the OpenGL profile \a profile. Only makes sense if profiles are supported by
+ this version.
\sa profile(), supportsProfiles()
*/
@@ -205,7 +206,7 @@ bool QOpenGLVersionProfile::isLegacyVersion() const
/*!
Returns \c true if the version number is valid. Note that for a default constructed
- QOpenGLVersionProfile object this function will return false.
+ QOpenGLVersionProfile object this function will return \c false.
\sa setVersion(), version()
*/
@@ -634,9 +635,9 @@ QOpenGLFunctions *QOpenGLContext::functions() const
*/
/*!
- Returns a pointer to an object that provides access to all functions for
- the version of the current context. Before using any of the functions
- they must be initialized by calling QAbstractOpenGLFunctions::initializeOpenGLFunctions().
+ Returns a pointer to an object that provides access to all functions for the
+ \a versionProfile of the current context. Before using any of the functions they must
+ be initialized by calling QAbstractOpenGLFunctions::initializeOpenGLFunctions().
Usually one would use the template version of this function to automatically
have the result cast to the correct type.
@@ -704,7 +705,7 @@ QSet<QByteArray> QOpenGLContext::extensions() const
/*!
Returns \c true if this OpenGL context supports the specified OpenGL
- \a extension, false otherwise.
+ \a extension, \c false otherwise.
The context or a sharing context must be current.
diff --git a/src/gui/opengl/qopengltexture.cpp b/src/gui/opengl/qopengltexture.cpp
index 0266656c1b..983496230d 100644
--- a/src/gui/opengl/qopengltexture.cpp
+++ b/src/gui/opengl/qopengltexture.cpp
@@ -1461,7 +1461,7 @@ QOpenGLTexture::QOpenGLTexture(Target target)
/*!
Creates a QOpenGLTexture object that can later be bound to the 2D texture
target and contains the pixel data contained in \a image. If you wish
- to have a chain of mipmaps generated then set \a useMipMaps to true (this
+ to have a chain of mipmaps generated then set \a genMipMaps to \c true (this
is the default).
This does create the underlying OpenGL texture object. Therefore,
@@ -1491,6 +1491,8 @@ QOpenGLTexture::~QOpenGLTexture()
functions that set properties of the texture object implicitly call create()
on your behalf.
+ Returns \c true if the creation succeeded, otherwise returns \c false.
+
\sa destroy(), isCreated(), textureId()
*/
bool QOpenGLTexture::create()
@@ -1557,9 +1559,8 @@ void QOpenGLTexture::bind()
EXT_direct_state_access extension where available and simulates it
where it is not.
- If \a restoreTextureUnit is true then this function
- will restore the active unit to the texture unit that was active
- upon entry.
+ If parameter \a reset is \c true then this function will restore
+ the active unit to the texture unit that was active upon entry.
\sa release()
*/
@@ -1584,7 +1585,7 @@ void QOpenGLTexture::release()
/*!
Unbinds this texture from texture unit \a unit.
- If \a restoreTextureUnit is true then this function
+ If parameter \a reset is \c true then this function
will restore the active unit to the texture unit that was active
upon entry.
*/
@@ -1838,11 +1839,11 @@ QOpenGLTexture::TextureFormat QOpenGLTexture::format() const
}
/*!
- Sets the dimensions of this texture object. The default
- for each dimension is 1. The maximum allowable texture size
- is dependent upon your OpenGL implementation. Allocating
- storage for a texture less than the maximum size can still
- fail if your system is low on resources.
+ Sets the dimensions of this texture object to \a width,
+ \a height, and \a depth. The default for each dimension is 1.
+ The maximum allowable texture size is dependent upon your OpenGL
+ implementation. Allocating storage for a texture less than the
+ maximum size can still fail if your system is low on resources.
\sa width(), height(), depth()
*/
@@ -1925,8 +1926,8 @@ int QOpenGLTexture::depth() const
}
/*!
- For texture targets that support mipmaps this function
- sets the requested number of mipmap levels to allocate storage
+ For texture targets that support mipmaps, this function
+ sets the requested number of mipmap \a levels to allocate storage
for. This function should be called before storage is allocated
for the texture.
@@ -1991,11 +1992,10 @@ int QOpenGLTexture::maximumMipLevels() const
}
/*!
- For those texture targets that support array layers this function
- sets the number of array layers to allocate storage for. This
- function should be called before storage is allocated for the tecture.
+ Sets the number of array \a layers to allocate storage for. This
+ function should be called before storage is allocated for the texture.
- For tarets that do not support array layers this function has
+ For targets that do not support array layers this function has
no effect.
\sa layers(), isStorageAllocated()
@@ -2116,13 +2116,13 @@ bool QOpenGLTexture::isStorageAllocated() const
Simpliar constraints apply for the \a viewFormat. See the above link
and the specification for more details.
- The \a minimumMipmapLevel, \a maximumMipmapLevel, \a mimimumLayer,
+ The \a minimumMipmapLevel, \a maximumMipmapLevel, \a minimumLayer,
and \a maximumLayer arguments serve to restrict the parts of the
texture accessible by the texture view.
If creation of the texture view fails this function will return
0. If the function succeeds it will return a pointer to a new
- QOpenGLTexture object that will return true from its isTextureView()
+ QOpenGLTexture object that will return \c true from its isTextureView()
function.
\sa isTextureView()
@@ -2158,7 +2158,7 @@ bool QOpenGLTexture::isTextureView() const
}
/*!
- Uploads pixel \a data for this texture object \a mipLevel, array \a layer and \acubeFace.
+ Uploads pixel \a data for this texture object \a mipLevel, array \a layer, and \a cubeFace.
Storage must have been allocated before uploading pixel data. Some overloads of setData()
will set appropriate dimensions, mipmap levels, and array layers and then allocate storage
for you if they have enough information to do so. This will be noted in the function
@@ -2285,6 +2285,8 @@ void QOpenGLTexture::setData(PixelFormat sourceFormat, PixelType sourceType,
/*!
This overload of setData() will allocate storage for you.
+ The pixel data is contained in \a image. Mipmaps are generated by default.
+ Set \a genMipMaps to \l DontGenerateMipMaps to turn off mipmap generation.
\overload
*/
@@ -2303,7 +2305,7 @@ void QOpenGLTexture::setData(const QImage& image, MipMapGeneration genMipMaps)
}
/*!
- Uploads compressed pixel \a data to \a mipLevel, array \a layer and \a cubeFace.
+ Uploads compressed pixel \a data to \a mipLevel, array \a layer, and \a cubeFace.
The pixel transfer can optionally be controlled with \a options. The \a dataSize
argument should specify the size of the data pointed to by \a data.
@@ -2625,7 +2627,7 @@ QPair<int, int> QOpenGLTexture::mipLevelRange() const
}
/*!
- If \a enabled is true, enables automatic mipmap generation for this texture object
+ If \a enabled is \c true, enables automatic mipmap generation for this texture object
to occur whenever the level 0 mipmap data is set via setData().
The automatic mipmap generation is enabled by default.
@@ -2673,7 +2675,7 @@ void QOpenGLTexture::generateMipMaps()
The generation of mipmaps to above \baseLevel is achieved by setting the mipmap
base level to \a baseLevel and then generating the mipmap chain. If \a resetBaseLevel
- is true, then the baseLevel of the texture will be reset to its previous value.
+ is \c true, then the baseLevel of the texture will be reset to its previous value.
\sa setAutoMipMapGenerationEnabled(), setMipLevels(), mipLevels()
*/
@@ -2727,6 +2729,8 @@ void QOpenGLTexture::setSwizzleMask(SwizzleComponent component, SwizzleValue val
}
/*!
+ Parameters \a {r}, \a {g}, \a {b}, and \a {a} are values used for setting
+ the colors red, green, blue, and the alpha value.
\overload
*/
void QOpenGLTexture::setSwizzleMask(SwizzleValue r, SwizzleValue g,
@@ -2941,6 +2945,7 @@ void QOpenGLTexture::setWrapMode(QOpenGLTexture::WrapMode mode)
}
/*!
+ Holds the texture dimension \a direction.
\overload
*/
void QOpenGLTexture::setWrapMode(QOpenGLTexture::CoordinateDirection direction, QOpenGLTexture::WrapMode mode)
@@ -2995,6 +3000,8 @@ void QOpenGLTexture::setBorderColor(QColor color)
}
/*!
+ Sets the color red to \a {r}, green to \a {g}, blue to \{b}, and \a {a} to the
+ alpha value.
\overload
*/
void QOpenGLTexture::setBorderColor(float r, float g, float b, float a)
@@ -3026,6 +3033,8 @@ void QOpenGLTexture::setBorderColor(float r, float g, float b, float a)
}
/*!
+ Sets the color red to \a {r}, green to \a {g}, blue to \a {b}, and \a the alpha
+ value to {a}.
\overload
*/
void QOpenGLTexture::setBorderColor(int r, int g, int b, int a)
@@ -3059,6 +3068,8 @@ void QOpenGLTexture::setBorderColor(int r, int g, int b, int a)
}
/*!
+ Sets the color red to \a {r}, green to \a {g}, blue to \a {b}, and \a the alpha
+ value to {a}.
\overload
*/
void QOpenGLTexture::setBorderColor(uint r, uint g, uint b, uint a)
@@ -3110,7 +3121,7 @@ QColor QOpenGLTexture::borderColor() const
}
/*!
- Writes the texture border color into the first 4 elements
+ Writes the texture border color into the first four elements
of the array pointed to by \a border.
\sa setBorderColor()
@@ -3129,6 +3140,9 @@ void QOpenGLTexture::borderColor(float *border) const
}
/*!
+ Writes the texture border color into the first four elements
+ of the array pointed to by \a border.
+
\overload
*/
void QOpenGLTexture::borderColor(int *border) const
@@ -3145,6 +3159,9 @@ void QOpenGLTexture::borderColor(int *border) const
}
/*!
+ Writes the texture border color into the first four elements
+ of the array pointed to by \a border.
+
\overload
*/
void QOpenGLTexture::borderColor(unsigned int *border) const
@@ -3235,8 +3252,8 @@ float QOpenGLTexture::maximumLevelOfDetail() const
}
/*!
- Sets the minimum and maximum level of detail parameters.
-
+ Sets the minimum level of detail parameters to \a min and the maximum level
+ to \a max.
\note This function has no effect on Qt built for OpenGL ES 2.
\sa levelOfDetailRange(), setMinimumLevelOfDetail(), setMaximumLevelOfDetail()
*/
@@ -3274,7 +3291,10 @@ QPair<float, float> QOpenGLTexture::levelOfDetailRange() const
}
/*!
- Sets the level of detail bias parameter.
+ Sets the level of detail bias to \a bias.
+ Level of detail bias affects the point at which mipmapping levels change.
+ Increasing values for level of detail bias makes the overall images blurrier
+ or smoother. Decreasing values make the overall images sharper.
\note This function has no effect on Qt built for OpenGL ES 2.
\sa levelofDetailBias()
diff --git a/src/widgets/doc/snippets/code/doc_src_examples_dropsite.qdoc b/src/widgets/doc/snippets/code/doc_src_examples_dropsite.qdoc
index 923362e909..e9d2a94a59 100644
--- a/src/widgets/doc/snippets/code/doc_src_examples_dropsite.qdoc
+++ b/src/widgets/doc/snippets/code/doc_src_examples_dropsite.qdoc
@@ -39,5 +39,7 @@
****************************************************************************/
//! [0]
+\code
foreach(variable, container)
+\endcode
//! [0]
diff --git a/src/widgets/widgets/qmaccocoaviewcontainer_mac.mm b/src/widgets/widgets/qmaccocoaviewcontainer_mac.mm
index a94273c574..965e9301e9 100644
--- a/src/widgets/widgets/qmaccocoaviewcontainer_mac.mm
+++ b/src/widgets/widgets/qmaccocoaviewcontainer_mac.mm
@@ -164,7 +164,7 @@ NSView *QMacCocoaViewContainer::cocoaView() const
}
/*!
- Sets the NSView to contain to be \a cocoaViewToWrap and retains it. If this
+ Sets \a view as the NSView to contain and retains it. If this
container already had a view set, it will release the previously set view.
*/
void QMacCocoaViewContainer::setCocoaView(NSView *view)