summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--examples/widgets/doc/src/padnavigator.qdoc21
-rw-r--r--examples/widgets/graphicsview/padnavigator/padnavigator.cpp8
-rw-r--r--qmake/doc/qmake.qdocconf2
-rw-r--r--qmake/doc/src/qmake-manual.qdoc4
-rw-r--r--src/corelib/doc/qtcore.qdocconf2
-rw-r--r--src/corelib/doc/src/qtcore-index.qdoc2
-rw-r--r--src/corelib/global/qendian.cpp1
-rw-r--r--src/corelib/text/qlocale_win.cpp97
-rw-r--r--src/corelib/text/qregularexpression.cpp8
-rw-r--r--src/corelib/time/qcalendar.cpp2
-rw-r--r--src/corelib/time/qtimezone.cpp2
-rw-r--r--src/dbus/qdbusabstractinterface.cpp6
-rw-r--r--src/dbus/qdbuspendingcall.cpp5
-rw-r--r--src/dbus/qdbuspendingreply.cpp3
-rw-r--r--src/gui/doc/qtgui.qdocconf1
-rw-r--r--src/gui/kernel/qwindow.cpp1
-rw-r--r--src/gui/painting/qbackingstore.cpp2
-rw-r--r--src/gui/painting/qcolor.h8
-rw-r--r--src/gui/painting/qpainter.cpp3
-rw-r--r--src/gui/rhi/qrhimetal.mm2
-rw-r--r--src/gui/text/qfontmetrics.cpp70
-rw-r--r--src/platformheaders/windowsfunctions/qwindowswindowfunctions.qdoc1
-rw-r--r--src/widgets/dialogs/qmessagebox.cpp6
-rw-r--r--src/widgets/itemviews/qtablewidget.cpp4
-rw-r--r--src/widgets/widgets/qdialogbuttonbox.cpp3
25 files changed, 147 insertions, 117 deletions
diff --git a/examples/widgets/doc/src/padnavigator.qdoc b/examples/widgets/doc/src/padnavigator.qdoc
index e59fa3cdbe..d8e83978cf 100644
--- a/examples/widgets/doc/src/padnavigator.qdoc
+++ b/examples/widgets/doc/src/padnavigator.qdoc
@@ -387,17 +387,12 @@
\snippet graphicsview/padnavigator/padnavigator.cpp 7
We now create the animations that control the flip-effect when you press
- the enter key. The main goal is to rotate the pad by 180 degrees or back,
- but we also need to make sure the selection item's tilt rotations are reset
- back to 0 when the pad is flipped, and restored back to their original
- values when flipped back:
+ the enter key. The main goal is to rotate the pad by 180 degrees or back.
\list
\li \c smoothFlipRotation: Animates the main 180 degree rotation of the pad.
\li \c smoothFlipScale: Scales the pad out and then in again while the pad is rotating.
- \li \c smoothFlipXRotation: Animates the selection item's X-tilt to 0 and back.
- \li \c smoothFlipYRotation: Animates the selection item's Y-tilt to 0 and back.
- \li \c flipAnimation: A parallel animation group that ensures all the above animations are run in parallel.
+ \li \c flipAnimation: A parallel animation group that ensures the above animations are run in parallel.
\endlist
All animations are given a 500 millisecond duration and an
@@ -447,11 +442,17 @@
Each state assigns specific properties to objects on entry. Most
interesting perhaps is the assignment of the value 0.0 to the pad's \c
flipRotation angle property when in \c frontState, and 180.0 when in \c
- backState. At the end of this section we register default animations with
- the state engine; these animations will apply to their respective objects
- and properties for any state transition. Otherwise it's common to assign
+ backState.
+
+ At the end of this section we register default animations with the state
+ engine; these animations will apply to their respective objects and
+ properties for any state transition. Otherwise it's common to assign
animations to specific transitions.
+ Specifically, we use default animations to control the selection item's
+ movement and tilt rotations. The tilt rotations are set to 0 when the pad
+ is flipped, and restored back to their original values when flipped back.
+
The \c splashState state is set as the initial state. This is required
before we start the state engine. We proceed with creating some
transitions.
diff --git a/examples/widgets/graphicsview/padnavigator/padnavigator.cpp b/examples/widgets/graphicsview/padnavigator/padnavigator.cpp
index b9ce2a47ca..dbf89dd318 100644
--- a/examples/widgets/graphicsview/padnavigator/padnavigator.cpp
+++ b/examples/widgets/graphicsview/padnavigator/padnavigator.cpp
@@ -142,24 +142,16 @@ PadNavigator::PadNavigator(const QSize &size, QWidget *parent)
// Flip animation setup
QPropertyAnimation *smoothFlipRotation = new QPropertyAnimation(flipRotation, "angle");
QPropertyAnimation *smoothFlipScale = new QPropertyAnimation(pad, "scale");
- QPropertyAnimation *smoothFlipXRotation = new QPropertyAnimation(xRotation, "angle");
- QPropertyAnimation *smoothFlipYRotation = new QPropertyAnimation(yRotation, "angle");
QParallelAnimationGroup *flipAnimation = new QParallelAnimationGroup(this);
smoothFlipScale->setDuration(500);
smoothFlipRotation->setDuration(500);
- smoothFlipXRotation->setDuration(500);
- smoothFlipYRotation->setDuration(500);
smoothFlipScale->setEasingCurve(QEasingCurve::InOutQuad);
smoothFlipRotation->setEasingCurve(QEasingCurve::InOutQuad);
- smoothFlipXRotation->setEasingCurve(QEasingCurve::InOutQuad);
- smoothFlipYRotation->setEasingCurve(QEasingCurve::InOutQuad);
smoothFlipScale->setKeyValueAt(0, qvariant_cast<qreal>(1.0));
smoothFlipScale->setKeyValueAt(0.5, qvariant_cast<qreal>(0.7));
smoothFlipScale->setKeyValueAt(1, qvariant_cast<qreal>(1.0));
flipAnimation->addAnimation(smoothFlipRotation);
flipAnimation->addAnimation(smoothFlipScale);
- flipAnimation->addAnimation(smoothFlipXRotation);
- flipAnimation->addAnimation(smoothFlipYRotation);
//! [7]
//! [8]
diff --git a/qmake/doc/qmake.qdocconf b/qmake/doc/qmake.qdocconf
index cf8f911372..9e1ad2f807 100644
--- a/qmake/doc/qmake.qdocconf
+++ b/qmake/doc/qmake.qdocconf
@@ -47,7 +47,7 @@ depends += \
qtnetwork \
qtopengl \
qtprintsupport \
- qtqml \
+ qtqml qtqmltest \
qtquick \
qtquickcontrols \
qtquickdialogs \
diff --git a/qmake/doc/src/qmake-manual.qdoc b/qmake/doc/src/qmake-manual.qdoc
index bb7ad31f8d..cd8129a539 100644
--- a/qmake/doc/src/qmake-manual.qdoc
+++ b/qmake/doc/src/qmake-manual.qdoc
@@ -5443,8 +5443,8 @@
\li The exit code of the test will be ignored during \c{make check}.
\endtable
- Test cases will often be written with \l{QTest} or \l[QML]{TestCase}, but
- that is not a requirement to make use of \c{CONFIG+=testcase} and \c{make check}.
+ Test cases will often be written with \l{QTest} or \c{TestCase}, but
+ it is not a requirement to make use of \c{CONFIG+=testcase} and \c{make check}.
The only primary requirement is that the test program exit with a zero exit code
on success, and a non-zero exit code on failure.
diff --git a/src/corelib/doc/qtcore.qdocconf b/src/corelib/doc/qtcore.qdocconf
index 15b1925e51..2b9adabc3a 100644
--- a/src/corelib/doc/qtcore.qdocconf
+++ b/src/corelib/doc/qtcore.qdocconf
@@ -26,7 +26,7 @@ qhp.QtCore.subprojects.classes.sortPages = true
tagfile = ../../../doc/qtcore/qtcore.tags
-depends += activeqt qtdbus qtgui qtwidgets qtnetwork qtdoc qtmacextras qtquick qtlinguist qtdesigner qtconcurrent qtxml qmake qtwinextras qtqml
+depends += activeqt qtdbus qtgui qtwidgets qtnetwork qtdoc qtmacextras qtquick qtlinguist qtdesigner qtconcurrent qtxml qmake qtwinextras qtqml qtcmake
headerdirs += ..
diff --git a/src/corelib/doc/src/qtcore-index.qdoc b/src/corelib/doc/src/qtcore-index.qdoc
index 29fc25f69d..5838d13914 100644
--- a/src/corelib/doc/src/qtcore-index.qdoc
+++ b/src/corelib/doc/src/qtcore-index.qdoc
@@ -56,7 +56,7 @@
\include module-use.qdocinc using qt module
\quotefile overview/using-qt-core.cmake
- See also the \l[QtDoc]{Build with CMake} overview.
+ See also the \l{Build with CMake} overview.
\section2 Building with qmake
diff --git a/src/corelib/global/qendian.cpp b/src/corelib/global/qendian.cpp
index 98dc6a9a4b..eb08b2f848 100644
--- a/src/corelib/global/qendian.cpp
+++ b/src/corelib/global/qendian.cpp
@@ -192,7 +192,6 @@ QT_BEGIN_NAMESPACE
an in-place swap (if necessary). If they are not the same, the memory
regions must not overlap.
- \sa qFromLittleEndian()
\sa qToBigEndian()
\sa qToLittleEndian()
*/
diff --git a/src/corelib/text/qlocale_win.cpp b/src/corelib/text/qlocale_win.cpp
index 79ea67f966..4b4152c519 100644
--- a/src/corelib/text/qlocale_win.cpp
+++ b/src/corelib/text/qlocale_win.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2020 The Qt Company Ltd.
** Copyright (C) 2016 Intel Corporation.
** Contact: https://www.qt.io/licensing/
**
@@ -106,11 +106,11 @@ struct QSystemLocalePrivate
{
QSystemLocalePrivate();
- QChar zeroDigit();
- QChar decimalPoint();
- QChar groupSeparator();
- QChar negativeSign();
- QChar positiveSign();
+ QString zeroDigit();
+ QString decimalPoint();
+ QString groupSeparator();
+ QString negativeSign();
+ QString positiveSign();
QVariant dateFormat(QLocale::FormatType);
QVariant timeFormat(QLocale::FormatType);
QVariant dateTimeFormat(QLocale::FormatType);
@@ -147,12 +147,11 @@ private:
WCHAR lcName[LOCALE_NAME_MAX_LENGTH];
#endif
SubstitutionType substitutionType;
- QChar zero;
+ QString zero; // cached value for zeroDigit()
int getLocaleInfo(LCTYPE type, LPWSTR data, int size);
QString getLocaleInfo(LCTYPE type, int maxlen = 0);
int getLocaleInfo_int(LCTYPE type, int maxlen = 0);
- QChar getLocaleInfo_qchar(LCTYPE type);
int getCurrencyFormat(DWORD flags, LPCWSTR value, const CURRENCYFMTW *format, LPWSTR data, int size);
int getDateFormat(DWORD flags, const SYSTEMTIME * date, LPCWSTR format, LPWSTR data, int size);
@@ -236,12 +235,6 @@ int QSystemLocalePrivate::getLocaleInfo_int(LCTYPE type, int maxlen)
return ok ? v : 0;
}
-QChar QSystemLocalePrivate::getLocaleInfo_qchar(LCTYPE type)
-{
- QString str = getLocaleInfo(type);
- return str.isEmpty() ? QChar() : str.at(0);
-}
-
QSystemLocalePrivate::SubstitutionType QSystemLocalePrivate::substitution()
{
if (substitutionType == SUnknown) {
@@ -257,13 +250,12 @@ QSystemLocalePrivate::SubstitutionType QSystemLocalePrivate::substitution()
else if (buf[0] == '2')
substitutionType = QSystemLocalePrivate::SAlways;
else {
- wchar_t digits[11];
+ wchar_t digits[11]; // See zeroDigit() for why 11.
if (!getLocaleInfo(LOCALE_SNATIVEDIGITS, digits, 11)) {
substitutionType = QSystemLocalePrivate::SNever;
return substitutionType;
}
- const wchar_t zero = digits[0];
- if (buf[0] == zero + 2)
+ if (buf[0] == digits[0] + 2)
substitutionType = QSystemLocalePrivate::SAlways;
else
substitutionType = QSystemLocalePrivate::SNever;
@@ -274,40 +266,75 @@ QSystemLocalePrivate::SubstitutionType QSystemLocalePrivate::substitution()
QString &QSystemLocalePrivate::substituteDigits(QString &string)
{
- ushort zero = zeroDigit().unicode();
- ushort *qch = reinterpret_cast<ushort *>(string.data());
- for (ushort *end = qch + string.size(); qch != end; ++qch) {
- if (*qch >= '0' && *qch <= '9')
- *qch = zero + (*qch - '0');
+ zeroDigit(); // Ensure zero is set.
+ switch (zero.size()) {
+ case 1: {
+ const ushort offset = zero.at(0).unicode() - '0';
+ if (!offset) // Nothing to do
+ break;
+ Q_ASSERT(offset > 9);
+ ushort *const qch = reinterpret_cast<ushort *>(string.data());
+ for (int i = 0, stop = string.size(); i < stop; ++i) {
+ ushort &ch = qch[i];
+ if (ch >= '0' && ch <= '9')
+ ch += offset;
+ }
+ break;
+ }
+ case 2: {
+ // Surrogate pair (high, low):
+ uint digit = QChar::surrogateToUcs4(zero.at(0), zero.at(1));
+ for (int i = 0; i < 10; i++) {
+ const QChar s[2] = { QChar::highSurrogate(digit + i), QChar::lowSurrogate(digit + i) };
+ string.replace(QString(QLatin1Char('0' + i)), QString(s, 2));
+ }
+ break;
+ }
+ default:
+ Q_ASSERT(!"Expected zero digit to be a single UCS2 code-point or a surrogate pair");
+ case 0: // Apparently this locale info was not available.
+ break;
}
return string;
}
-QChar QSystemLocalePrivate::zeroDigit()
+QString QSystemLocalePrivate::zeroDigit()
{
- if (zero.isNull())
- zero = getLocaleInfo_qchar(LOCALE_SNATIVEDIGITS);
+ if (zero.isEmpty()) {
+ /* Ten digits plus a terminator.
+
+ https://docs.microsoft.com/en-us/windows/win32/intl/locale-snative-constants
+ "Native equivalents of ASCII 0 through 9. The maximum number of
+ characters allowed for this string is eleven, including a terminating
+ null character."
+ */
+ wchar_t digits[11];
+ if (getLocaleInfo(LOCALE_SNATIVEDIGITS, digits, 11)) {
+ // assert all(digits[i] == i + digits[0] for i in range(1, 10)), assumed above
+ zero = QString::fromWCharArray(digits, 1);
+ }
+ }
return zero;
}
-QChar QSystemLocalePrivate::decimalPoint()
+QString QSystemLocalePrivate::decimalPoint()
{
- return getLocaleInfo_qchar(LOCALE_SDECIMAL);
+ return getLocaleInfo(LOCALE_SDECIMAL);
}
-QChar QSystemLocalePrivate::groupSeparator()
+QString QSystemLocalePrivate::groupSeparator()
{
- return getLocaleInfo_qchar(LOCALE_STHOUSAND);
+ return getLocaleInfo(LOCALE_STHOUSAND);
}
-QChar QSystemLocalePrivate::negativeSign()
+QString QSystemLocalePrivate::negativeSign()
{
- return getLocaleInfo_qchar(LOCALE_SNEGATIVESIGN);
+ return getLocaleInfo(LOCALE_SNEGATIVESIGN);
}
-QChar QSystemLocalePrivate::positiveSign()
+QString QSystemLocalePrivate::positiveSign()
{
- return getLocaleInfo_qchar(LOCALE_SPOSITIVESIGN);
+ return getLocaleInfo(LOCALE_SPOSITIVESIGN);
}
QVariant QSystemLocalePrivate::dateFormat(QLocale::FormatType type)
@@ -677,7 +704,7 @@ void QSystemLocalePrivate::update()
GetUserDefaultLocaleName(lcName, LOCALE_NAME_MAX_LENGTH);
#endif
substitutionType = SUnknown;
- zero = QChar();
+ zero.resize(0);
}
QString QSystemLocalePrivate::winToQtFormat(QStringView sys_fmt)
@@ -749,7 +776,7 @@ QLocale QSystemLocale::fallbackUiLocale() const
return QLocale(QString::fromLatin1(getWinLocaleName()));
}
-QVariant QSystemLocale::query(QueryType type, QVariant in = QVariant()) const
+QVariant QSystemLocale::query(QueryType type, QVariant in) const
{
QSystemLocalePrivate *d = systemLocalePrivate();
switch(type) {
diff --git a/src/corelib/text/qregularexpression.cpp b/src/corelib/text/qregularexpression.cpp
index a3a4921690..d74b759aa9 100644
--- a/src/corelib/text/qregularexpression.cpp
+++ b/src/corelib/text/qregularexpression.cpp
@@ -1915,6 +1915,10 @@ QString QRegularExpression::wildcardToRegularExpression(const QString &pattern)
\snippet code/src_corelib_tools_qregularexpression.cpp 31
+ The returned regular expression is already fully anchored. In other
+ words, there is no need of calling anchoredPattern() again on the
+ result.
+
\warning Unlike QRegExp, this implementation follows closely the definition
of wildcard for glob patterns:
\table
@@ -1941,12 +1945,12 @@ QString QRegularExpression::wildcardToRegularExpression(const QString &pattern)
\note The backslash (\\) character is \e not an escape char in this context.
In order to match one of the special characters, place it in square brackets
- (for example, "[?]").
+ (for example, \c{[?]}).
More information about the implementation can be found in:
\list
\li \l {https://en.wikipedia.org/wiki/Glob_(programming)} {The Wikipedia Glob article}
- \li \c man 7 glob
+ \li \c {man 7 glob}
\endlist
\sa escape()
diff --git a/src/corelib/time/qcalendar.cpp b/src/corelib/time/qcalendar.cpp
index 6a4623ce92..9d485f181e 100644
--- a/src/corelib/time/qcalendar.cpp
+++ b/src/corelib/time/qcalendar.cpp
@@ -723,7 +723,7 @@ QCalendar::QCalendar(QLatin1String name)
QCalendar::QCalendar(QStringView name)
: d(QCalendarBackend::fromName(name)) {}
-/*
+/*!
\fn bool QCalendar::isValid() const
Returns true if this is a valid calendar object.
diff --git a/src/corelib/time/qtimezone.cpp b/src/corelib/time/qtimezone.cpp
index 3d2078087b..87d8ea75f1 100644
--- a/src/corelib/time/qtimezone.cpp
+++ b/src/corelib/time/qtimezone.cpp
@@ -217,7 +217,7 @@ Q_GLOBAL_STATIC(QTimeZoneSingleton, global_tz);
This class includes data obtained from the CLDR data files under the terms
of the Unicode Data Files and Software License. See
- \l{Unicode Common Locale Data Repository (CLDR)} for details.
+ \l{unicode-cldr}{Unicode Common Locale Data Repository (CLDR)} for details.
\sa QDateTime
*/
diff --git a/src/dbus/qdbusabstractinterface.cpp b/src/dbus/qdbusabstractinterface.cpp
index b628c2b560..8a11767140 100644
--- a/src/dbus/qdbusabstractinterface.cpp
+++ b/src/dbus/qdbusabstractinterface.cpp
@@ -696,7 +696,7 @@ void QDBusAbstractInterface::internalPropSet(const char *propname, const QVarian
*/
/*!
- \fn QDBusAbstractInterface::call(const QString &message, Args&&...args)
+ \fn template <typename...Args> QDBusMessage QDBusAbstractInterface::call(const QString &method, Args&&...args)
Calls the method \a method on this interface and passes \a args to the method.
All \a args must be convertible to QVariant.
@@ -745,7 +745,7 @@ QDBusMessage QDBusAbstractInterface::call(const QString &method, const QVariant
*/
/*!
- \fn QDBusAbstractInterface::call(QDBus::CallMode mode, const QString &message, Args&&...args)
+ \fn template <typename...Args> QDBusMessage QDBusAbstractInterface::call(QDBus::CallMode mode, const QString &method, Args&&...args)
\overload
@@ -827,7 +827,7 @@ QDBusMessage QDBusAbstractInterface::call(QDBus::CallMode mode, const QString &m
*/
/*!
- \fn QDBusAbstractInterface::asyncCall(const QString &message, Args&&...args)
+ \fn template <typename...Args> QDBusPendingCall QDBusAbstractInterface::asyncCall(const QString &method, Args&&...args)
Calls the method \a method on this interface and passes \a args to the method.
All \a args must be convertible to QVariant.
diff --git a/src/dbus/qdbuspendingcall.cpp b/src/dbus/qdbuspendingcall.cpp
index e55321f79c..04d8e3f6c7 100644
--- a/src/dbus/qdbuspendingcall.cpp
+++ b/src/dbus/qdbuspendingcall.cpp
@@ -82,8 +82,7 @@ QT_BEGIN_NAMESPACE
provide a method of detaching the copies (since they refer
to the same pending call)
- \sa QDBusPendingReply, QDBusPendingCallWatcher,
- QDBusAbstractInterface::asyncCall()
+ \sa QDBusPendingReply, QDBusPendingCallWatcher
*/
/*!
@@ -115,7 +114,7 @@ QT_BEGIN_NAMESPACE
(one string and one QByteArray), QDBusPendingReply::isError() will
return true.
- \sa QDBusPendingReply, QDBusAbstractInterface::asyncCall()
+ \sa QDBusPendingReply
*/
/*!
diff --git a/src/dbus/qdbuspendingreply.cpp b/src/dbus/qdbuspendingreply.cpp
index cf13a134c5..df37d92211 100644
--- a/src/dbus/qdbuspendingreply.cpp
+++ b/src/dbus/qdbuspendingreply.cpp
@@ -91,8 +91,7 @@
QDBusPendingCallWatcher objects, which emit signals when the reply
arrives.
- \sa QDBusPendingCallWatcher, QDBusReply,
- QDBusAbstractInterface::asyncCall()
+ \sa QDBusPendingCallWatcher, QDBusReply
*/
/*!
diff --git a/src/gui/doc/qtgui.qdocconf b/src/gui/doc/qtgui.qdocconf
index 76dd6d7ea1..d149caf069 100644
--- a/src/gui/doc/qtgui.qdocconf
+++ b/src/gui/doc/qtgui.qdocconf
@@ -41,6 +41,7 @@ depends += \
qtwidgets \
qtdoc \
qmake \
+ qtcmake \
qttestlib
headerdirs += ..
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp
index c4c7de1b2e..dad1b6ba2d 100644
--- a/src/gui/kernel/qwindow.cpp
+++ b/src/gui/kernel/qwindow.cpp
@@ -2690,7 +2690,6 @@ QOpenGLContext *QWindowPrivate::shareContext() const
platform dependent and untested.
\sa setParent()
- \sa setTransientParent()
*/
QWindow *QWindow::fromWinId(WId id)
{
diff --git a/src/gui/painting/qbackingstore.cpp b/src/gui/painting/qbackingstore.cpp
index b0393aff95..0a49269c36 100644
--- a/src/gui/painting/qbackingstore.cpp
+++ b/src/gui/painting/qbackingstore.cpp
@@ -220,8 +220,6 @@ static bool isRasterSurface(QWindow *window)
to the backingstore's top level window.
You should call this function after ending painting with endPaint().
-
- \sa QWindow::transientParent()
*/
void QBackingStore::flush(const QRegion &region, QWindow *window, const QPoint &offset)
{
diff --git a/src/gui/painting/qcolor.h b/src/gui/painting/qcolor.h
index f0d7dd23ad..0189f4e5f1 100644
--- a/src/gui/painting/qcolor.h
+++ b/src/gui/painting/qcolor.h
@@ -72,10 +72,10 @@ public:
QColor(Qt::GlobalColor color) noexcept;
Q_DECL_CONSTEXPR QColor(int r, int g, int b, int a = 255) noexcept
: cspec(isRgbaValid(r, g, b, a) ? Rgb : Invalid),
- ct(cspec == Rgb ? a * 0x0101 : 0,
- cspec == Rgb ? r * 0x0101 : 0,
- cspec == Rgb ? g * 0x0101 : 0,
- cspec == Rgb ? b * 0x0101 : 0,
+ ct(ushort(cspec == Rgb ? a * 0x0101 : 0),
+ ushort(cspec == Rgb ? r * 0x0101 : 0),
+ ushort(cspec == Rgb ? g * 0x0101 : 0),
+ ushort(cspec == Rgb ? b * 0x0101 : 0),
0) {}
QColor(QRgb rgb) noexcept;
QColor(QRgba64 rgba64) noexcept;
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp
index f70bbbd7d2..b0553a1ff9 100644
--- a/src/gui/painting/qpainter.cpp
+++ b/src/gui/painting/qpainter.cpp
@@ -1404,8 +1404,7 @@ void QPainterPrivate::updateState(QPainterState *newState)
cases where expensive operations are ok to use, for instance when
the result is cached in a QPixmap.
- \sa QPaintDevice, QPaintEngine, {Qt SVG}, {Basic Drawing Example},
- {Drawing Utility Functions}
+ \sa QPaintDevice, QPaintEngine, {Qt SVG}, {Basic Drawing Example}, {<qdrawutil.h>}{Drawing Utility Functions}
*/
/*!
diff --git a/src/gui/rhi/qrhimetal.mm b/src/gui/rhi/qrhimetal.mm
index 883d6923b9..98cbd416b5 100644
--- a/src/gui/rhi/qrhimetal.mm
+++ b/src/gui/rhi/qrhimetal.mm
@@ -122,7 +122,7 @@ QT_BEGIN_NAMESPACE
recording a frame, that is, between a \l{QRhi::beginFrame()}{beginFrame()}
- \l{QRhi::endFrame()}{endFrame()} or
\l{QRhi::beginOffscreenFrame()}{beginOffscreenFrame()} -
- \l{QRhi::endOffsrceenFrame()}{endOffscreenFrame()} pair.
+ \l{QRhi::endOffscreenFrame()}{endOffsrceenFrame()} pair.
\note The command encoder is only valid while recording a pass, that is,
between \l{QRhiCommandBuffer::beginPass()} -
diff --git a/src/gui/text/qfontmetrics.cpp b/src/gui/text/qfontmetrics.cpp
index a79957797d..de9cae0c91 100644
--- a/src/gui/text/qfontmetrics.cpp
+++ b/src/gui/text/qfontmetrics.cpp
@@ -106,12 +106,12 @@ extern void qt_format_text(const QFont& font, const QRectF &_r,
These are by necessity slow, and we recommend avoiding them if
possible.
- For each character, you can get its width(), leftBearing() and
- rightBearing() and find out whether it is in the font using
+ For each character, you can get its horizontalAdvance(), leftBearing(),
+ and rightBearing(), and find out whether it is in the font using
inFont(). You can also treat the character as a string, and use
the string functions on it.
- The string functions include width(), to return the width of a
+ The string functions include horizontalAdvance(), to return the width of a
string in pixels (or points, for a printer), boundingRect(), to
return a rectangle large enough to contain the rendered string,
and size(), to return the size of that rectangle.
@@ -464,9 +464,9 @@ bool QFontMetrics::inFontUcs4(uint ucs4) const
value is negative if the pixels of the character extend to the
left of the logical origin.
- See width() for a graphical description of this metric.
+ See horizontalAdvance() for a graphical description of this metric.
- \sa rightBearing(), minLeftBearing(), width()
+ \sa rightBearing(), minLeftBearing(), horizontalAdvance()
*/
int QFontMetrics::leftBearing(QChar ch) const
{
@@ -495,11 +495,11 @@ int QFontMetrics::leftBearing(QChar ch) const
The right bearing is the left-ward distance of the right-most
pixel of the character from the logical origin of a subsequent
character. This value is negative if the pixels of the character
- extend to the right of the width() of the character.
+ extend to the right of the horizontalAdvance() of the character.
- See width() for a graphical description of this metric.
+ See horizontalAdvance() for a graphical description of this metric.
- \sa leftBearing(), minRightBearing(), width()
+ \sa leftBearing(), minRightBearing(), horizontalAdvance()
*/
int QFontMetrics::rightBearing(QChar ch) const
{
@@ -535,7 +535,7 @@ int QFontMetrics::rightBearing(QChar ch) const
\deprecated in Qt 5.11. Use horizontalAdvance() instead.
- \sa boundingRect()
+ \sa boundingRect(), horizontalAdvance()
*/
int QFontMetrics::width(const QString &text, int len) const
{
@@ -601,7 +601,7 @@ int QFontMetrics::width(const QString &text, int len, int flags) const
processing strings cannot be taken into account. When implementing
an interactive text control, use QTextLayout instead.
- \sa boundingRect()
+ \sa boundingRect(), horizontalAdvance()
*/
int QFontMetrics::width(QChar ch) const
{
@@ -751,7 +751,8 @@ int QFontMetrics::charWidth(const QString &text, int pos) const
Note that the bounding rectangle may extend to the left of (0, 0),
e.g. for italicized fonts, and that the width of the returned
- rectangle might be different than what the width() method returns.
+ rectangle might be different than what the horizontalAdvance() method
+ returns.
If you want to know the advance width of the string (to lay out
a set of strings next to each other), use horizontalAdvance() instead.
@@ -762,7 +763,8 @@ int QFontMetrics::charWidth(const QString &text, int pos) const
The height of the bounding rectangle is at least as large as the
value returned by height().
- \sa width(), height(), QPainter::boundingRect(), tightBoundingRect()
+ \sa horizontalAdvance(), height(), QPainter::boundingRect(),
+ tightBoundingRect()
*/
QRect QFontMetrics::boundingRect(const QString &text) const
{
@@ -790,7 +792,7 @@ QRect QFontMetrics::boundingRect(const QString &text) const
\warning The width of the returned rectangle is not the advance width
of the character. Use boundingRect(const QString &) or horizontalAdvance() instead.
- \sa width()
+ \sa horizontalAdvance()
*/
QRect QFontMetrics::boundingRect(QChar ch) const
{
@@ -864,7 +866,7 @@ QRect QFontMetrics::boundingRect(QChar ch) const
fontHeight() and lineSpacing() are used to calculate the height,
rather than individual character heights.
- \sa width(), QPainter::boundingRect(), Qt::Alignment
+ \sa horizontalAdvance(), QPainter::boundingRect(), Qt::Alignment
*/
QRect QFontMetrics::boundingRect(const QRect &rect, int flags, const QString &text, int tabStops,
int *tabArray) const
@@ -920,7 +922,8 @@ QSize QFontMetrics::size(int flags, const QString &text, int tabStops, int *tabA
Note that the bounding rectangle may extend to the left of (0, 0),
e.g. for italicized fonts, and that the width of the returned
- rectangle might be different than what the width() method returns.
+ rectangle might be different than what the horizontalAdvance() method
+ returns.
If you want to know the advance width of the string (to lay out
a set of strings next to each other), use horizontalAdvance() instead.
@@ -930,7 +933,7 @@ QSize QFontMetrics::size(int flags, const QString &text, int tabStops, int *tabA
\warning Calling this method is very slow on Windows.
- \sa width(), height(), boundingRect()
+ \sa horizontalAdvance(), height(), boundingRect()
*/
QRect QFontMetrics::tightBoundingRect(const QString &text) const
{
@@ -1079,12 +1082,12 @@ qreal QFontMetrics::fontDpi() const
These are by necessity slow, and we recommend avoiding them if
possible.
- For each character, you can get its width(), leftBearing() and
- rightBearing() and find out whether it is in the font using
+ For each character, you can get its horizontalAdvance(), leftBearing(), and
+ rightBearing(), and find out whether it is in the font using
inFont(). You can also treat the character as a string, and use
the string functions on it.
- The string functions include width(), to return the width of a
+ The string functions include horizontalAdvance(), to return the width of a
string in pixels (or points, for a printer), boundingRect(), to
return a rectangle large enough to contain the rendered string,
and size(), to return the size of that rectangle.
@@ -1434,9 +1437,9 @@ bool QFontMetricsF::inFontUcs4(uint ucs4) const
value is negative if the pixels of the character extend to the
left of the logical origin.
- See width() for a graphical description of this metric.
+ See horizontalAdvance() for a graphical description of this metric.
- \sa rightBearing(), minLeftBearing(), width()
+ \sa rightBearing(), minLeftBearing(), horizontalAdvance()
*/
qreal QFontMetricsF::leftBearing(QChar ch) const
{
@@ -1465,11 +1468,11 @@ qreal QFontMetricsF::leftBearing(QChar ch) const
The right bearing is the left-ward distance of the right-most
pixel of the character from the logical origin of a subsequent
character. This value is negative if the pixels of the character
- extend to the right of the width() of the character.
+ extend to the right of the horizontalAdvance() of the character.
- See width() for a graphical description of this metric.
+ See horizontalAdvance() for a graphical description of this metric.
- \sa leftBearing(), minRightBearing(), width()
+ \sa leftBearing(), minRightBearing(), horizontalAdvance()
*/
qreal QFontMetricsF::rightBearing(QChar ch) const
{
@@ -1504,7 +1507,7 @@ qreal QFontMetricsF::rightBearing(QChar ch) const
\deprecated in Qt 5.11. Use horizontalAdvance() instead.
- \sa boundingRect()
+ \sa boundingRect(), horizontalAdvance()
*/
qreal QFontMetricsF::width(const QString &text) const
{
@@ -1535,7 +1538,7 @@ qreal QFontMetricsF::width(const QString &text) const
processing strings cannot be taken into account. When implementing
an interactive text control, use QTextLayout instead.
- \sa boundingRect()
+ \sa boundingRect(), horizontalAdvance()
*/
qreal QFontMetricsF::width(QChar ch) const
{
@@ -1581,7 +1584,7 @@ qreal QFontMetricsF::horizontalAdvance(const QString &text, int length) const
ch.
Some of the metrics are described in the image to the right. The
- central dark rectangles cover the logical width() of each
+ central dark rectangles cover the logical horizontalAdvance() of each
character. The outer pale rectangles cover the leftBearing() and
rightBearing() of each character. Notice that the bearings of "f"
in this particular font are both negative, while the bearings of
@@ -1632,7 +1635,7 @@ qreal QFontMetricsF::horizontalAdvance(QChar ch) const
Note that the bounding rectangle may extend to the left of (0, 0),
e.g. for italicized fonts, and that the width of the returned
- rectangle might be different than what the width() method returns.
+ rectangle might be different than what the horizontalAdvance() method returns.
If you want to know the advance width of the string (to lay out
a set of strings next to each other), use horizontalAdvance() instead.
@@ -1643,7 +1646,7 @@ qreal QFontMetricsF::horizontalAdvance(QChar ch) const
The height of the bounding rectangle is at least as large as the
value returned height().
- \sa width(), height(), QPainter::boundingRect()
+ \sa horizontalAdvance(), height(), QPainter::boundingRect()
*/
QRectF QFontMetricsF::boundingRect(const QString &text) const
{
@@ -1669,7 +1672,7 @@ QRectF QFontMetricsF::boundingRect(const QString &text) const
Note that the rectangle usually extends both above and below the
base line.
- \sa width()
+ \sa horizontalAdvance()
*/
QRectF QFontMetricsF::boundingRect(QChar ch) const
{
@@ -1746,7 +1749,7 @@ QRectF QFontMetricsF::boundingRect(QChar ch) const
fontHeight() and lineSpacing() are used to calculate the height,
rather than individual character heights.
- \sa width(), QPainter::boundingRect(), Qt::Alignment
+ \sa horizontalAdvance(), QPainter::boundingRect(), Qt::Alignment
*/
QRectF QFontMetricsF::boundingRect(const QRectF &rect, int flags, const QString& text,
int tabStops, int *tabArray) const
@@ -1805,7 +1808,8 @@ QSizeF QFontMetricsF::size(int flags, const QString &text, int tabStops, int *ta
Note that the bounding rectangle may extend to the left of (0, 0),
e.g. for italicized fonts, and that the width of the returned
- rectangle might be different than what the width() method returns.
+ rectangle might be different than what the horizontalAdvance() method
+ returns.
If you want to know the advance width of the string (to lay out
a set of strings next to each other), use horizontalAdvance() instead.
@@ -1815,7 +1819,7 @@ QSizeF QFontMetricsF::size(int flags, const QString &text, int tabStops, int *ta
\warning Calling this method is very slow on Windows.
- \sa width(), height(), boundingRect()
+ \sa horizontalAdvance(), height(), boundingRect()
*/
QRectF QFontMetricsF::tightBoundingRect(const QString &text) const
{
diff --git a/src/platformheaders/windowsfunctions/qwindowswindowfunctions.qdoc b/src/platformheaders/windowsfunctions/qwindowswindowfunctions.qdoc
index 0c52cde753..31a8d40abe 100644
--- a/src/platformheaders/windowsfunctions/qwindowswindowfunctions.qdoc
+++ b/src/platformheaders/windowsfunctions/qwindowswindowfunctions.qdoc
@@ -28,6 +28,7 @@
/*!
\class QWindowsWindowFunctions
\inmodule QtPlatformHeaders
+ \inheaderfile QtPlatformHeaders/QWindowsWindowFunctions
\since 5.5
\brief The QWindowsWindowFunctions class is an inline class containing
miscellaneous functionality for Windows window specific functionality.
diff --git a/src/widgets/dialogs/qmessagebox.cpp b/src/widgets/dialogs/qmessagebox.cpp
index 7a6223f45c..854fee6e33 100644
--- a/src/widgets/dialogs/qmessagebox.cpp
+++ b/src/widgets/dialogs/qmessagebox.cpp
@@ -756,6 +756,12 @@ void QMessageBoxPrivate::_q_clicked(QPlatformDialogHelper::StandardButton button
*/
/*!
+ \enum QMessageBox::ButtonRole
+
+ \include qdialogbuttonbox.cpp buttonrole-enum
+*/
+
+/*!
\enum QMessageBox::StandardButton
\since 4.2
diff --git a/src/widgets/itemviews/qtablewidget.cpp b/src/widgets/itemviews/qtablewidget.cpp
index 8f37ef4c3d..60abd02564 100644
--- a/src/widgets/itemviews/qtablewidget.cpp
+++ b/src/widgets/itemviews/qtablewidget.cpp
@@ -923,8 +923,8 @@ QTableWidgetSelectionRange::QTableWidgetSelectionRange(int top, int left, int bo
Constructs a the table selection range by copying the given \a
other table selection range.
*/
-QTableWidgetSelectionRange::QTableWidgetSelectionRange(const QTableWidgetSelectionRange &other) = default;
-QTableWidgetSelectionRange &QTableWidgetSelectionRange::operator=(const QTableWidgetSelectionRange &other) = default;
+QTableWidgetSelectionRange::QTableWidgetSelectionRange(const QTableWidgetSelectionRange &) = default;
+QTableWidgetSelectionRange &QTableWidgetSelectionRange::operator=(const QTableWidgetSelectionRange &) = default;
/*!
Destroys the table selection range.
diff --git a/src/widgets/widgets/qdialogbuttonbox.cpp b/src/widgets/widgets/qdialogbuttonbox.cpp
index 9867cb5540..2e12320bc3 100644
--- a/src/widgets/widgets/qdialogbuttonbox.cpp
+++ b/src/widgets/widgets/qdialogbuttonbox.cpp
@@ -522,8 +522,8 @@ QDialogButtonBox::~QDialogButtonBox()
/*!
\enum QDialogButtonBox::ButtonRole
- \enum QMessageBox::ButtonRole
+//! [buttonrole-enum]
This enum describes the roles that can be used to describe buttons in
the button box. Combinations of these roles are as flags used to
describe different aspects of their behavior.
@@ -546,6 +546,7 @@ QDialogButtonBox::~QDialogButtonBox()
\omitvalue NRoles
\sa StandardButton
+//! [buttonrole-enum]
*/
/*!