summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/corelib/global/qlogging.cpp1
-rw-r--r--src/corelib/io/qdiriterator.cpp1
-rw-r--r--src/corelib/kernel/qdeadlinetimer.cpp88
-rw-r--r--src/corelib/mimetypes/qmimeprovider.cpp10
-rw-r--r--src/dbus/qdbusxmlparser.cpp11
-rw-r--r--src/dbus/qdbusxmlparser_p.h3
-rw-r--r--src/gui/kernel/qclipboard.cpp4
-rw-r--r--src/gui/kernel/qguiapplication.cpp6
-rw-r--r--src/gui/kernel/qwindow.cpp2
-rw-r--r--src/gui/opengl/qopenglshaderprogram.cpp14
-rw-r--r--src/gui/painting/qbackingstore.cpp1
-rw-r--r--src/gui/painting/qdrawhelper.cpp7
-rw-r--r--src/gui/painting/qplatformbackingstore.cpp19
-rw-r--r--src/gui/painting/qplatformbackingstore.h4
-rw-r--r--src/gui/text/qrawfont.cpp16
-rw-r--r--src/network/doc/src/ssl.qdoc6
-rw-r--r--src/network/kernel/qnetworkinterface_unix.cpp3
-rw-r--r--src/network/ssl/qsslsocket_mac.cpp2
-rw-r--r--src/platformsupport/eglconvenience/qeglstreamconvenience_p.h4
-rw-r--r--src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp8
-rw-r--r--src/platformsupport/graphics/qrasterbackingstore.cpp5
-rw-r--r--src/plugins/platforms/android/qandroidplatformtheme.cpp3
-rw-r--r--src/plugins/platforms/cocoa/qcocoaintegration.mm2
-rw-r--r--src/plugins/platforms/cocoa/qnsview.mm18
-rw-r--r--src/plugins/platforms/ios/qiosbackingstore.mm27
-rw-r--r--src/plugins/platforms/windows/qwindowsfontdatabase.cpp19
-rw-r--r--src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp18
-rw-r--r--src/plugins/platforms/windows/qwindowsfontenginedirectwrite.h3
-rw-r--r--src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglintegration.cpp14
-rw-r--r--src/sql/configure.json1
-rw-r--r--src/tools/moc/moc.cpp38
-rw-r--r--src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp4
-rw-r--r--src/widgets/dialogs/qcolordialog.cpp6
-rw-r--r--src/widgets/dialogs/qfiledialog.cpp6
-rw-r--r--src/widgets/dialogs/qfontdialog.cpp4
-rw-r--r--src/widgets/graphicsview/qgraphicsanchorlayout_p.cpp4
-rw-r--r--src/widgets/graphicsview/qgraphicsanchorlayout_p.h2
-rw-r--r--src/widgets/graphicsview/qgraphicsscene.cpp11
-rw-r--r--src/widgets/kernel/qapplication.cpp16
-rw-r--r--src/widgets/kernel/qlayout.cpp7
-rw-r--r--src/widgets/kernel/qstackedlayout.cpp12
-rw-r--r--src/widgets/kernel/qstandardgestures.cpp24
-rw-r--r--src/widgets/kernel/qtooltip.cpp1
-rw-r--r--src/widgets/kernel/qwidget.cpp4
-rw-r--r--src/widgets/kernel/qwidget_p.h1
-rw-r--r--src/widgets/widgets/qdatetimeedit.cpp4
46 files changed, 315 insertions, 149 deletions
diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp
index 6c7cd9c5c6..0ca6829564 100644
--- a/src/corelib/global/qlogging.cpp
+++ b/src/corelib/global/qlogging.cpp
@@ -1138,6 +1138,7 @@ void QMessagePattern::setPattern(const QString &pattern)
backtraceArgs.append(backtraceParams);
#else
error += QLatin1String("QT_MESSAGE_PATTERN: %{backtrace} is not supported by this Qt build\n");
+ tokens[i] = "";
#endif
}
diff --git a/src/corelib/io/qdiriterator.cpp b/src/corelib/io/qdiriterator.cpp
index a6394c16cc..5fd9edc552 100644
--- a/src/corelib/io/qdiriterator.cpp
+++ b/src/corelib/io/qdiriterator.cpp
@@ -254,6 +254,7 @@ void QDirIteratorPrivate::advance()
if (entryMatches(nextEntry.fileName(), info))
return;
+ nextMetaData = QFileSystemMetaData();
}
nativeIterators.pop();
diff --git a/src/corelib/kernel/qdeadlinetimer.cpp b/src/corelib/kernel/qdeadlinetimer.cpp
index 957d985c31..17a74b22d7 100644
--- a/src/corelib/kernel/qdeadlinetimer.cpp
+++ b/src/corelib/kernel/qdeadlinetimer.cpp
@@ -87,8 +87,8 @@ Q_DECL_CONST_FUNCTION static inline QPair<qint64, qint64> toSecsAndNSecs(qint64
other Qt functions named \c{waitFor} or similar:
\list
- \o 0: no time left, expired
- \o -1: infinite time left, timer never expires
+ \li 0: no time left, expired
+ \li -1: infinite time left, timer never expires
\endlist
\section1 Reference Clocks
@@ -169,20 +169,20 @@ Q_DECL_CONST_FUNCTION static inline QPair<qint64, qint64> toSecsAndNSecs(qint64
cannot be used in calculation of how long it is overdue. If that
functionality is required, use QDeadlineTimer::current().
- \sa hasExpired(), remainingTime(), timerType(), current()
+ \sa hasExpired(), remainingTime(), Qt::TimerType, current()
*/
/*!
\fn QDeadlineTimer::QDeadlineTimer(ForeverConstant, Qt::TimerType timerType)
- Constructs a QDeadlineTimer object that never expires. For this object,
- remainingTime() will return -1, deadline() will return the maximum value,
- and isForever() will return true.
+ QDeadlineTimer objects created with parameter \a ForeverConstant never expire.
+ For such objects, remainingTime() will return -1, deadline() will return the
+ maximum value, and isForever() will return true.
The timer type \a timerType may be ignored, since the timer is already
expired.
- \sa hasExpired(), isForever(), remainingTime(), timerType()
+ \sa ForeverConstant, hasExpired(), isForever(), remainingTime(), timerType()
*/
/*!
@@ -194,8 +194,7 @@ Q_DECL_CONST_FUNCTION static inline QPair<qint64, qint64> toSecsAndNSecs(qint64
never expire, causing remainingTime() to return -1 and deadline() to return
the maximum value.
- The QDeadlineTimer object will be constructed with a timer type of \a
- timerType.
+ The QDeadlineTimer object will be constructed with the specified timer \a type.
For optimization purposes, if \a msecs is zero, this function may skip
obtaining the current time and may instead use a value known to be in the
@@ -223,10 +222,9 @@ QDeadlineTimer::QDeadlineTimer(qint64 msecs, Qt::TimerType type) Q_DECL_NOTHROW
expired, whereas if \a deadline is equal to \c{Duration::max()}, then this
object is set to never expire.
- The QDeadlineTimer object will be constructed with a timer type of \a
- timerType.
+ The QDeadlineTimer object will be constructed with the specified timer \a type.
- \sa hasExpired(), isForever(), remainingTime<Duration>(), setDeadline()
+ \sa hasExpired(), isForever(), remainingTime(), setDeadline()
*/
/*!
@@ -237,8 +235,7 @@ QDeadlineTimer::QDeadlineTimer(qint64 msecs, Qt::TimerType type) Q_DECL_NOTHROW
mark as expired, whereas if \a remaining is equal to \c{duration::max()},
the object will be set to never expire.
- The QDeadlineTimer object will be constructed with a timer type of \a
- timerType.
+ The QDeadlineTimer object will be constructed with the specified timer \a type.
This constructor can be used with C++14's user-defined literals for time, such as in:
@@ -254,7 +251,7 @@ QDeadlineTimer::QDeadlineTimer(qint64 msecs, Qt::TimerType type) Q_DECL_NOTHROW
it is overdue. If that functionality is required, use
QDeadlineTimer::current() and add time to it.
- \sa hasExpired(), isForever(), remainingTime<Duration>(), setRemainingTime()
+ \sa hasExpired(), isForever(), remainingTime(), setRemainingTime()
*/
/*!
@@ -268,9 +265,9 @@ QDeadlineTimer::QDeadlineTimer(qint64 msecs, Qt::TimerType type) Q_DECL_NOTHROW
expired, whereas if \a deadline is equal to \c{Duration::max()}, then this
object is set to never expire.
- The timer type for this QDeadlineTimer object will be set to \a timerType type.
+ The timer type for this QDeadlineTimer object will be set to the specified \a type.
- \sa hasExpired(), isForever(), remainingTime<Duration>(),
+ \sa hasExpired(), isForever(), remainingTime(),
*/
/*!
@@ -279,7 +276,7 @@ QDeadlineTimer::QDeadlineTimer(qint64 msecs, Qt::TimerType type) Q_DECL_NOTHROW
zero, this QDeadlineTimer object will be marked as expired, whereas a value
of -1 will set it to never expire.
- The timer type for this QDeadlineTimer object will be set to \a timerType type.
+ The timer type for this QDeadlineTimer object will be set to the specified \a timerType.
\sa setPreciseRemainingTime(), hasExpired(), isForever(), remainingTime()
*/
@@ -297,7 +294,8 @@ void QDeadlineTimer::setRemainingTime(qint64 msecs, Qt::TimerType timerType) Q_D
secs is -1, this QDeadlineTimer will be set it to never expire. If both
parameters are zero, this QDeadlineTimer will be marked as expired.
- The timer type for this QDeadlineTimer object will be set to \a timerType type.
+ The timer type for this QDeadlineTimer object will be set to the specified
+ \a type.
\sa setRemainingTime(), hasExpired(), isForever(), remainingTime()
*/
@@ -330,7 +328,7 @@ void QDeadlineTimer::setPreciseRemainingTime(qint64 secs, qint64 nsecs, Qt::Time
as expired, whereas if \a remaining is equal to \c{duration::max()}, the
object will be set to never expire.
- The timer type for this QDeadlineTimer object will be set to \a timerType type.
+ The timer type for this QDeadlineTimer object will be set to the specified \a type.
This function can be used with C++14's user-defined literals for time, such as in:
@@ -339,7 +337,7 @@ void QDeadlineTimer::setPreciseRemainingTime(qint64 secs, qint64 nsecs, Qt::Time
deadline.setRemainingTime(250ms);
\endcode
- \sa setDeadline(), remainingTime<Duration>(), hasExpired(), isForever()
+ \sa setDeadline(), remainingTime(), hasExpired(), isForever()
*/
/*!
@@ -353,7 +351,7 @@ void QDeadlineTimer::setPreciseRemainingTime(qint64 secs, qint64 nsecs, Qt::Time
If value of \a nsecs is more than 1 billion nanoseconds (1 second), this
function will adjust \a secs accordingly.
- The timer type for this QDeadlineTimer object will be set to \a timerType type.
+ The timer type for this QDeadlineTimer object will be set to the specified \a type.
\sa setRemainingTime(), hasExpired(), isForever(), remainingTime()
*/
@@ -422,7 +420,7 @@ void QDeadlineTimer::setPreciseRemainingTime(qint64 secs, qint64 nsecs, Qt::Time
remains time left. For objects that have expired, remainingTime() will
return zero and deadline() will return a time point in the past.
- QDeadlineTimer objects created with the \ref{ForeverConstant} never expire
+ QDeadlineTimer objects created with the \l {ForeverConstant} never expire
and this function always returns false for them.
\sa isForever(), remainingTime()
@@ -435,7 +433,7 @@ bool QDeadlineTimer::hasExpired() const Q_DECL_NOTHROW
}
/*!
- \fn Qt::TimerType QDeadlineTimer::timerType() const Q_DECL_NOTHROW
+ \fn Qt::TimerType QDeadlineTimer::timerType() const
Returns the timer type is active for this object.
@@ -451,7 +449,7 @@ bool QDeadlineTimer::hasExpired() const Q_DECL_NOTHROW
will try to use a more coarse timer for Qt::CoarseTimer and
Qt::VeryCoarseTimer.
- \sa timerType()
+ \sa Qt::TimerType
*/
void QDeadlineTimer::setTimerType(Qt::TimerType timerType)
{
@@ -466,13 +464,13 @@ void QDeadlineTimer::setTimerType(Qt::TimerType timerType)
returns -1.
This function is suitable for use in Qt APIs that take a millisecond
- timeout, such as the many \ref QIODevice \c waitFor functions or the timed
- lock functions in \ref QMutex, \ref QWaitCondition, \ref QSemaphore, or
- \ref QReadWriteLock. For example:
+ timeout, such as the many \l QIODevice \c waitFor functions or the timed
+ lock functions in \l QMutex, \l QWaitCondition, \l QSemaphore, or
+ \l QReadWriteLock. For example:
\code
mutex.tryLock(deadline.remainingTime());
- \code
+ \endcode
\sa remainingTimeNSecs(), isForever(), hasExpired()
*/
@@ -658,24 +656,12 @@ QDeadlineTimer QDeadlineTimer::addNSecs(QDeadlineTimer dt, qint64 nsecs) Q_DECL_
current time. Objects created by this function can participate in the
calculation of how long a timer is overdue, using the deadline() function.
- The QDeadlineTimer object will be constructed with a timer type of \a
- timerType.
-*/
-
-/*!
- \fn qint64 QDeadlineTimer::resolution(Qt::TimerType timerType)
-
- Returns the resolution in nanoseconds of the system clock that backs timers
- of type \a timerType, or 0 if the resolution could not be determined.
-
- The resolution is not a guarantee that applications will get time values
- with an accuracy down to that level. It is only the minimum change value
- that can be expected.
+ The QDeadlineTimer object will be constructed with the specified \a timerType.
*/
/*!
\fn bool operator==(QDeadlineTimer d1, QDeadlineTimer d2)
- \related QDeadlineTimer
+ \relates QDeadlineTimer
Returns true if the deadline on \a d1 and the deadline in \a d2 are the
same, false otherwise. The timer type used to create the two deadlines is
@@ -691,7 +677,7 @@ QDeadlineTimer QDeadlineTimer::addNSecs(QDeadlineTimer dt, qint64 nsecs) Q_DECL_
/*!
\fn bool operator!=(QDeadlineTimer d1, QDeadlineTimer d2)
- \related QDeadlineTimer
+ \relates QDeadlineTimer
Returns true if the deadline on \a d1 and the deadline in \a d2 are
diferent, false otherwise. The timer type used to create the two deadlines
@@ -707,7 +693,7 @@ QDeadlineTimer QDeadlineTimer::addNSecs(QDeadlineTimer dt, qint64 nsecs) Q_DECL_
/*!
\fn bool operator<(QDeadlineTimer d1, QDeadlineTimer d2)
- \related QDeadlineTimer
+ \relates QDeadlineTimer
Returns true if the deadline on \a d1 is earlier than the deadline in \a
d2, false otherwise. The timer type used to create the two deadlines is
@@ -723,7 +709,7 @@ QDeadlineTimer QDeadlineTimer::addNSecs(QDeadlineTimer dt, qint64 nsecs) Q_DECL_
/*!
\fn bool operator<=(QDeadlineTimer d1, QDeadlineTimer d2)
- \related QDeadlineTimer
+ \relates QDeadlineTimer
Returns true if the deadline on \a d1 is earlier than or the same as the
deadline in \a d2, false otherwise. The timer type used to create the two
@@ -739,7 +725,7 @@ QDeadlineTimer QDeadlineTimer::addNSecs(QDeadlineTimer dt, qint64 nsecs) Q_DECL_
/*!
\fn bool operator>(QDeadlineTimer d1, QDeadlineTimer d2)
- \related QDeadlineTimer
+ \relates QDeadlineTimer
Returns true if the deadline on \a d1 is later than the deadline in \a
d2, false otherwise. The timer type used to create the two deadlines is
@@ -755,7 +741,7 @@ QDeadlineTimer QDeadlineTimer::addNSecs(QDeadlineTimer dt, qint64 nsecs) Q_DECL_
/*!
\fn bool operator>=(QDeadlineTimer d1, QDeadlineTimer d2)
- \related QDeadlineTimer
+ \relates QDeadlineTimer
Returns true if the deadline on \a d1 is later than or the same as the
deadline in \a d2, false otherwise. The timer type used to create the two
@@ -771,7 +757,7 @@ QDeadlineTimer QDeadlineTimer::addNSecs(QDeadlineTimer dt, qint64 nsecs) Q_DECL_
/*!
\fn QDeadlineTimer operator+(QDeadlineTimer dt, qint64 msecs)
- \related QDeadlineTimer
+ \relates QDeadlineTimer
Returns a QDeadlineTimer object whose deadline is \a msecs later than the
deadline stored in \a dt. If \a dt is set to never expire, this function
@@ -782,7 +768,7 @@ QDeadlineTimer QDeadlineTimer::addNSecs(QDeadlineTimer dt, qint64 nsecs) Q_DECL_
/*!
\fn QDeadlineTimer operator+(qint64 msecs, QDeadlineTimer dt)
- \related QDeadlineTimer
+ \relates QDeadlineTimer
Returns a QDeadlineTimer object whose deadline is \a msecs later than the
deadline stored in \a dt. If \a dt is set to never expire, this function
@@ -793,7 +779,7 @@ QDeadlineTimer QDeadlineTimer::addNSecs(QDeadlineTimer dt, qint64 nsecs) Q_DECL_
/*!
\fn QDeadlineTimer operator-(QDeadlineTimer dt, qint64 msecs)
- \related QDeadlineTimer
+ \relates QDeadlineTimer
Returns a QDeadlineTimer object whose deadline is \a msecs before the
deadline stored in \a dt. If \a dt is set to never expire, this function
diff --git a/src/corelib/mimetypes/qmimeprovider.cpp b/src/corelib/mimetypes/qmimeprovider.cpp
index a798d9eff6..e9996c204d 100644
--- a/src/corelib/mimetypes/qmimeprovider.cpp
+++ b/src/corelib/mimetypes/qmimeprovider.cpp
@@ -536,11 +536,11 @@ void QMimeBinaryProvider::loadMimeTypeList()
for (const QString &typeFilename : typesFilenames) {
QFile file(typeFilename);
if (file.open(QIODevice::ReadOnly)) {
- while (!file.atEnd()) {
- QByteArray line = file.readLine();
- line.chop(1);
- m_mimetypeNames.insert(QString::fromLatin1(line.constData(), line.size()));
- }
+ QTextStream stream(&file);
+ stream.setCodec("ISO 8859-1");
+ QString line;
+ while (stream.readLineInto(&line))
+ m_mimetypeNames.insert(line);
}
}
}
diff --git a/src/dbus/qdbusxmlparser.cpp b/src/dbus/qdbusxmlparser.cpp
index fa362bc579..3618c76a1d 100644
--- a/src/dbus/qdbusxmlparser.cpp
+++ b/src/dbus/qdbusxmlparser.cpp
@@ -48,15 +48,12 @@
#ifndef QT_NO_DBUS
-//#define QDBUS_PARSER_DEBUG
-#ifdef QDBUS_PARSER_DEBUG
-# define qDBusParserError qDebug
-#else
-# define qDBusParserError if (true) {} else qDebug
-#endif
-
QT_BEGIN_NAMESPACE
+Q_LOGGING_CATEGORY(dbusParser, "dbus.parser", QtWarningMsg)
+
+#define qDBusParserError(...) qCDebug(dbusParser, ##__VA_ARGS__)
+
static bool parseArg(const QXmlStreamAttributes &attributes, QDBusIntrospection::Argument &argData,
QDBusIntrospection::Interface *ifaceData)
{
diff --git a/src/dbus/qdbusxmlparser_p.h b/src/dbus/qdbusxmlparser_p.h
index 7db2d12df4..d089bae163 100644
--- a/src/dbus/qdbusxmlparser_p.h
+++ b/src/dbus/qdbusxmlparser_p.h
@@ -52,6 +52,7 @@
//
#include <QtDBus/private/qtdbusglobal_p.h>
+#include <QtCore/qloggingcategory.h>
#include <QtCore/qmap.h>
#include "qdbusintrospection_p.h"
@@ -59,6 +60,8 @@
QT_BEGIN_NAMESPACE
+Q_DECLARE_LOGGING_CATEGORY(dbusParser)
+
/*!
\internal
*/
diff --git a/src/gui/kernel/qclipboard.cpp b/src/gui/kernel/qclipboard.cpp
index ec6c0bcc36..21127eebbd 100644
--- a/src/gui/kernel/qclipboard.cpp
+++ b/src/gui/kernel/qclipboard.cpp
@@ -438,6 +438,10 @@ void QClipboard::setPixmap(const QPixmap &pixmap, Mode mode)
The text(), image(), and pixmap() functions are simpler
wrappers for retrieving text, image, and pixmap data.
+ \note The pointer returned might become invalidated when the contents
+ of the clipboard changes; either by calling one of the setter functions
+ or externally by the system clipboard changing.
+
\sa setMimeData()
*/
const QMimeData* QClipboard::mimeData(Mode mode) const
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index 16add8f627..d8457bc041 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -1203,12 +1203,6 @@ static void init_plugins(const QList<QByteArray> &pluginList)
void QGuiApplicationPrivate::createPlatformIntegration()
{
- // Use the Qt menus by default. Platform plugins that
- // want to enable a native menu implementation can clear
- // this flag.
- QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuBar, true);
-
-
QHighDpiScaling::initHighDpiScaling();
// Load the platform integration
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp
index 23e783fcb4..edb65a2d4c 100644
--- a/src/gui/kernel/qwindow.cpp
+++ b/src/gui/kernel/qwindow.cpp
@@ -2395,7 +2395,7 @@ void QWindowPrivate::maybeQuitOnLastWindowClosed()
bool lastWindowClosed = true;
for (int i = 0; i < list.size(); ++i) {
QWindow *w = list.at(i);
- if (!w->isVisible() || w->transientParent())
+ if (!w->isVisible() || w->transientParent() || w->type() == Qt::ToolTip)
continue;
lastWindowClosed = false;
break;
diff --git a/src/gui/opengl/qopenglshaderprogram.cpp b/src/gui/opengl/qopenglshaderprogram.cpp
index c0c0bb0a03..6f5aff14aa 100644
--- a/src/gui/opengl/qopenglshaderprogram.cpp
+++ b/src/gui/opengl/qopenglshaderprogram.cpp
@@ -584,16 +584,26 @@ bool QOpenGLShader::compileSourceCode(const char *source)
QVarLengthArray<const char *, 5> sourceChunks;
QVarLengthArray<GLint, 5> sourceChunkLengths;
+ QOpenGLContext *ctx = QOpenGLContext::currentContext();
if (versionDirectivePosition.hasPosition()) {
- // Append source up to #version directive
+ // Append source up to and including the #version directive
sourceChunks.append(source);
sourceChunkLengths.append(GLint(versionDirectivePosition.position));
+ } else {
+ // QTBUG-55733: Intel on Windows with Compatibility profile requires a #version always
+ if (ctx->format().profile() == QSurfaceFormat::CompatibilityProfile) {
+ const char *vendor = reinterpret_cast<const char *>(ctx->functions()->glGetString(GL_VENDOR));
+ if (vendor && !strcmp(vendor, "Intel")) {
+ static const char version110[] = "#version 110\n";
+ sourceChunks.append(version110);
+ sourceChunkLengths.append(GLint(sizeof(version110)) - 1);
+ }
+ }
}
// The precision qualifiers are useful on OpenGL/ES systems,
// but usually not present on desktop systems.
- QOpenGLContext *ctx = QOpenGLContext::currentContext();
const QSurfaceFormat currentSurfaceFormat = ctx->format();
QOpenGLContextPrivate *ctx_d = QOpenGLContextPrivate::get(QOpenGLContext::currentContext());
if (currentSurfaceFormat.renderableType() == QSurfaceFormat::OpenGL
diff --git a/src/gui/painting/qbackingstore.cpp b/src/gui/painting/qbackingstore.cpp
index e3d18512dd..ceaad61e13 100644
--- a/src/gui/painting/qbackingstore.cpp
+++ b/src/gui/painting/qbackingstore.cpp
@@ -138,6 +138,7 @@ QBackingStore::QBackingStore(QWindow *window)
: d_ptr(new QBackingStorePrivate(window))
{
d_ptr->platformBackingStore = QGuiApplicationPrivate::platformIntegration()->createPlatformBackingStore(window);
+ d_ptr->platformBackingStore->setBackingStore(this);
}
/*!
diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp
index 7685f7f4ca..3e01d34cb2 100644
--- a/src/gui/painting/qdrawhelper.cpp
+++ b/src/gui/painting/qdrawhelper.cpp
@@ -5331,15 +5331,16 @@ static void qt_gradient_quint16(int count, const QSpan *spans, void *userData)
int yinc = int((linear.dy * data->m22 * gss) * FIXPT_SIZE);
int off = int((((linear.dy * (data->m22 * qreal(0.5) + data->dy) + linear.off) * gss) * FIXPT_SIZE));
- QRgba64 oldColor = data->solid.color;
+ // Save the fillData since we overwrite it when setting solid.color.
+ QGradientData gradient = data->gradient;
while (count--) {
int y = spans->y;
- data->solid.color = QRgba64::fromArgb32(qt_gradient_pixel_fixed(&data->gradient, yinc * y + off));
+ data->solid.color = QRgba64::fromArgb32(qt_gradient_pixel_fixed(&gradient, yinc * y + off));
blend_color_rgb16(1, spans, userData);
++spans;
}
- data->solid.color = oldColor;
+ data->gradient = gradient;
} else {
blend_src_generic(count, spans, userData);
diff --git a/src/gui/painting/qplatformbackingstore.cpp b/src/gui/painting/qplatformbackingstore.cpp
index 0c5de36981..b8bbdefa37 100644
--- a/src/gui/painting/qplatformbackingstore.cpp
+++ b/src/gui/painting/qplatformbackingstore.cpp
@@ -77,6 +77,7 @@ class QPlatformBackingStorePrivate
public:
QPlatformBackingStorePrivate(QWindow *w)
: window(w)
+ , backingStore(0)
#ifndef QT_NO_OPENGL
, textureId(0)
, blitter(0)
@@ -100,6 +101,7 @@ public:
#endif
}
QWindow *window;
+ QBackingStore *backingStore;
#ifndef QT_NO_OPENGL
mutable GLuint textureId;
mutable QSize textureSize;
@@ -623,6 +625,23 @@ QWindow* QPlatformBackingStore::window() const
}
/*!
+ Sets the backing store associated with this surface.
+*/
+void QPlatformBackingStore::setBackingStore(QBackingStore *backingStore)
+{
+ d_ptr->backingStore = backingStore;
+}
+
+/*!
+ Returns a pointer to the backing store associated with this
+ surface.
+*/
+QBackingStore *QPlatformBackingStore::backingStore() const
+{
+ return d_ptr->backingStore;
+}
+
+/*!
This function is called before painting onto the surface begins,
with the \a region in which the painting will occur.
diff --git a/src/gui/painting/qplatformbackingstore.h b/src/gui/painting/qplatformbackingstore.h
index 8d0e29ad8d..ec56aaa002 100644
--- a/src/gui/painting/qplatformbackingstore.h
+++ b/src/gui/painting/qplatformbackingstore.h
@@ -112,6 +112,7 @@ public:
virtual ~QPlatformBackingStore();
QWindow *window() const;
+ QBackingStore *backingStore() const;
virtual QPaintDevice *paintDevice() = 0;
@@ -145,6 +146,9 @@ public:
private:
QPlatformBackingStorePrivate *d_ptr;
+
+ void setBackingStore(QBackingStore *);
+ friend class QBackingStore;
};
#ifndef QT_NO_OPENGL
diff --git a/src/gui/text/qrawfont.cpp b/src/gui/text/qrawfont.cpp
index 4d567b26c2..886cf5ef39 100644
--- a/src/gui/text/qrawfont.cpp
+++ b/src/gui/text/qrawfont.cpp
@@ -324,6 +324,13 @@ bool QRawFont::operator==(const QRawFont &other) const
/*!
Returns the ascent of this QRawFont in pixel units.
+ The ascent of a font is the distance from the baseline to the
+ highest position characters extend to. In practice, some font
+ designers break this rule, e.g. when they put more than one accent
+ on top of a character, or to accommodate an unusual character in
+ an exotic language, so it is possible (though rare) that this
+ value will be too small.
+
\sa QFontMetricsF::ascent()
*/
qreal QRawFont::ascent() const
@@ -351,6 +358,11 @@ qreal QRawFont::capHeight() const
/*!
Returns the descent of this QRawFont in pixel units.
+ The descent is the distance from the base line to the lowest point
+ characters extend to. In practice, some font designers break this rule,
+ e.g. to accommodate an unusual character in an exotic language, so
+ it is possible (though rare) that this value will be too small.
+
\sa QFontMetricsF::descent()
*/
qreal QRawFont::descent() const
@@ -361,6 +373,8 @@ qreal QRawFont::descent() const
/*!
Returns the xHeight of this QRawFont in pixel units.
+ This is often but not always the same as the height of the character 'x'.
+
\sa QFontMetricsF::xHeight()
*/
qreal QRawFont::xHeight() const
@@ -371,6 +385,8 @@ qreal QRawFont::xHeight() const
/*!
Returns the leading of this QRawFont in pixel units.
+ This is the natural inter-line spacing.
+
\sa QFontMetricsF::leading()
*/
qreal QRawFont::leading() const
diff --git a/src/network/doc/src/ssl.qdoc b/src/network/doc/src/ssl.qdoc
index 0129673ea2..5ad2cfafc6 100644
--- a/src/network/doc/src/ssl.qdoc
+++ b/src/network/doc/src/ssl.qdoc
@@ -36,10 +36,12 @@
the Secure Sockets Layer (SSL) protocol, using the OpenSSL Toolkit (\l{http://www.openssl.org/})
to perform encryption and protocol handling.
+ From Qt version 5.2 onwards, the officially supported version for OpenSSL
+ is 1.0.0 or later. Versions >= 0.9.7 and < 1.0.0 might work, but are not
+ guaranteed to work.
+
\annotatedlist ssl
- See the \l {openssl-v1later}{OpenSSL Compatibility} page for information about the
- versions of OpenSSL that are known to work with Qt.
\section1 Enabling and Disabling SSL Support
diff --git a/src/network/kernel/qnetworkinterface_unix.cpp b/src/network/kernel/qnetworkinterface_unix.cpp
index 2fa98c0e07..4f4615d4d0 100644
--- a/src/network/kernel/qnetworkinterface_unix.cpp
+++ b/src/network/kernel/qnetworkinterface_unix.cpp
@@ -404,6 +404,9 @@ static QList<QNetworkInterfacePrivate *> createInterfaces(ifaddrs *rawList)
if (seenIndexes.contains(ifindex))
continue;
+ seenInterfaces.insert(name);
+ seenIndexes.append(ifindex);
+
QNetworkInterfacePrivate *iface = new QNetworkInterfacePrivate;
interfaces << iface;
iface->name = name;
diff --git a/src/network/ssl/qsslsocket_mac.cpp b/src/network/ssl/qsslsocket_mac.cpp
index 4c06404415..0548aa3909 100644
--- a/src/network/ssl/qsslsocket_mac.cpp
+++ b/src/network/ssl/qsslsocket_mac.cpp
@@ -505,7 +505,7 @@ void QSslSocketBackendPrivate::transmit()
if (connectionEncrypted) {
QVarLengthArray<char, 4096> data;
- while (context) {
+ while (context && (!readBufferMaxSize || buffer.size() < readBufferMaxSize)) {
size_t readBytes = 0;
data.resize(4096);
const OSStatus err = SSLRead(context, data.data(), data.size(), &readBytes);
diff --git a/src/platformsupport/eglconvenience/qeglstreamconvenience_p.h b/src/platformsupport/eglconvenience/qeglstreamconvenience_p.h
index f535afbc55..a4c8245280 100644
--- a/src/platformsupport/eglconvenience/qeglstreamconvenience_p.h
+++ b/src/platformsupport/eglconvenience/qeglstreamconvenience_p.h
@@ -140,6 +140,10 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMEROUTPUTEXTPROC) (EGLDisplay
#define EGL_DRM_PLANE_EXT 0x3235
#endif
+#ifndef EGL_PLATFORM_X11_KHR
+#define EGL_PLATFORM_X11_KHR 0x31D5
+#endif
+
QT_BEGIN_NAMESPACE
class QEGLStreamConvenience
diff --git a/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp b/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp
index 5847c601a8..d92b87c6da 100644
--- a/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp
+++ b/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp
@@ -362,6 +362,12 @@ static const char *getFcFamilyForStyleHint(const QFont::StyleHint style)
return stylehint;
}
+static inline bool requiresOpenType(int writingSystem)
+{
+ return ((writingSystem >= QFontDatabase::Syriac && writingSystem <= QFontDatabase::Sinhala)
+ || writingSystem == QFontDatabase::Khmer || writingSystem == QFontDatabase::Nko);
+}
+
static void populateFromPattern(FcPattern *pattern)
{
QString familyName;
@@ -430,7 +436,7 @@ static void populateFromPattern(FcPattern *pattern)
FcLangResult langRes = FcLangSetHasLang(langset, lang);
if (langRes != FcLangDifferentLang) {
#if FC_VERSION >= 20297
- if (capabilityForWritingSystem[j] != Q_NULLPTR) {
+ if (capabilityForWritingSystem[j] != Q_NULLPTR && requiresOpenType(j)) {
if (cap == Q_NULLPTR)
capRes = FcPatternGetString(pattern, FC_CAPABILITY, 0, &cap);
if (capRes == FcResultMatch && strstr(reinterpret_cast<const char *>(cap), capabilityForWritingSystem[j]) == 0)
diff --git a/src/platformsupport/graphics/qrasterbackingstore.cpp b/src/platformsupport/graphics/qrasterbackingstore.cpp
index 325c98b93d..ef26edc494 100644
--- a/src/platformsupport/graphics/qrasterbackingstore.cpp
+++ b/src/platformsupport/graphics/qrasterbackingstore.cpp
@@ -39,6 +39,7 @@
#include "qrasterbackingstore_p.h"
+#include <QtGui/qbackingstore.h>
#include <QtGui/qpainter.h>
QT_BEGIN_NAMESPACE
@@ -104,6 +105,10 @@ bool QRasterBackingStore::scroll(const QRegion &region, int dx, int dy)
void QRasterBackingStore::beginPaint(const QRegion &region)
{
+ // Keep backing store device pixel ratio in sync with window
+ if (m_image.devicePixelRatio() != window()->devicePixelRatio())
+ resize(backingStore()->size(), backingStore()->staticContents());
+
if (!m_image.hasAlphaChannel())
return;
diff --git a/src/plugins/platforms/android/qandroidplatformtheme.cpp b/src/plugins/platforms/android/qandroidplatformtheme.cpp
index b9009fe704..c4387c5d88 100644
--- a/src/plugins/platforms/android/qandroidplatformtheme.cpp
+++ b/src/plugins/platforms/android/qandroidplatformtheme.cpp
@@ -368,9 +368,6 @@ QAndroidPlatformTheme::QAndroidPlatformTheme(QAndroidPlatformNativeInterface *an
// default in case the style has not set a font
m_systemFont = QFont(QLatin1String("Roboto"), 14.0 * 100 / 72); // keep default size the same after changing from 100 dpi to 72 dpi
-
- // by default use native menu bar
- QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuBar, false);
}
QPlatformMenuBar *QAndroidPlatformTheme::createPlatformMenuBar() const
diff --git a/src/plugins/platforms/cocoa/qcocoaintegration.mm b/src/plugins/platforms/cocoa/qcocoaintegration.mm
index f3f720654e..92fffb4d15 100644
--- a/src/plugins/platforms/cocoa/qcocoaintegration.mm
+++ b/src/plugins/platforms/cocoa/qcocoaintegration.mm
@@ -301,8 +301,6 @@ QCocoaIntegration::QCocoaIntegration(const QStringList &paramList)
initResources();
QMacAutoReleasePool pool;
- qApp->setAttribute(Qt::AA_DontUseNativeMenuBar, false);
-
NSApplication *cocoaApplication = [QNSApplication sharedApplication];
qt_redirectNSApplicationSendEvent();
diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm
index 6f4375b251..ee0bf75606 100644
--- a/src/plugins/platforms/cocoa/qnsview.mm
+++ b/src/plugins/platforms/cocoa/qnsview.mm
@@ -1114,7 +1114,7 @@ static bool _q_dontOverrideCtrlLMB = false;
QPointF windowPoint;
QPointF screenPoint;
- [self convertFromScreen:[NSEvent mouseLocation] toWindowPoint:&windowPoint andScreenPoint:&screenPoint];
+ [self convertFromScreen:[self screenMousePoint:theEvent] toWindowPoint:&windowPoint andScreenPoint:&screenPoint];
m_platformWindow->m_enterLeaveTargetWindow = m_platformWindow->childWindowAt(windowPoint.toPoint());
QWindowSystemInterface::handleEnterEvent(m_platformWindow->m_enterLeaveTargetWindow, windowPoint, screenPoint);
}
@@ -1156,7 +1156,7 @@ Q_GLOBAL_STATIC(QCocoaTabletDeviceDataHash, tabletDeviceDataHash)
QPointF windowPoint;
QPointF screenPoint;
- [self convertFromScreen:[NSEvent mouseLocation] toWindowPoint: &windowPoint andScreenPoint: &screenPoint];
+ [self convertFromScreen:[self screenMousePoint:theEvent] toWindowPoint: &windowPoint andScreenPoint: &screenPoint];
uint deviceId = [theEvent deviceID];
if (!tabletDeviceDataHash->contains(deviceId)) {
@@ -1371,7 +1371,7 @@ static QTabletEvent::TabletDevice wacomTabletDevice(NSEvent *theEvent)
const NSTimeInterval timestamp = [event timestamp];
QPointF windowPoint;
QPointF screenPoint;
- [self convertFromScreen:[NSEvent mouseLocation] toWindowPoint:&windowPoint andScreenPoint:&screenPoint];
+ [self convertFromScreen:[self screenMousePoint:event] toWindowPoint:&windowPoint andScreenPoint:&screenPoint];
QWindowSystemInterface::handleGestureEventWithRealValue(m_window, timestamp, Qt::ZoomNativeGesture,
[event magnification], windowPoint, screenPoint);
}
@@ -1383,7 +1383,7 @@ static QTabletEvent::TabletDevice wacomTabletDevice(NSEvent *theEvent)
const NSTimeInterval timestamp = [event timestamp];
QPointF windowPoint;
QPointF screenPoint;
- [self convertFromScreen:[NSEvent mouseLocation] toWindowPoint:&windowPoint andScreenPoint:&screenPoint];
+ [self convertFromScreen:[self screenMousePoint:event] toWindowPoint:&windowPoint andScreenPoint:&screenPoint];
QWindowSystemInterface::handleGestureEventWithRealValue(m_window, timestamp, Qt::SmartZoomNativeGesture,
zoomIn ? 1.0f : 0.0f, windowPoint, screenPoint);
zoomIn = !zoomIn;
@@ -1397,7 +1397,7 @@ static QTabletEvent::TabletDevice wacomTabletDevice(NSEvent *theEvent)
const NSTimeInterval timestamp = [event timestamp];
QPointF windowPoint;
QPointF screenPoint;
- [self convertFromScreen:[NSEvent mouseLocation] toWindowPoint:&windowPoint andScreenPoint:&screenPoint];
+ [self convertFromScreen:[self screenMousePoint:event] toWindowPoint:&windowPoint andScreenPoint:&screenPoint];
QWindowSystemInterface::handleGestureEventWithRealValue(m_window, timestamp, Qt::RotateNativeGesture,
-[event rotation], windowPoint, screenPoint);
}
@@ -1408,7 +1408,7 @@ static QTabletEvent::TabletDevice wacomTabletDevice(NSEvent *theEvent)
const NSTimeInterval timestamp = [event timestamp];
QPointF windowPoint;
QPointF screenPoint;
- [self convertFromScreen:[NSEvent mouseLocation] toWindowPoint:&windowPoint andScreenPoint:&screenPoint];
+ [self convertFromScreen:[self screenMousePoint:event] toWindowPoint:&windowPoint andScreenPoint:&screenPoint];
qreal angle = 0.0f;
if ([event deltaX] == 1)
@@ -1429,7 +1429,7 @@ static QTabletEvent::TabletDevice wacomTabletDevice(NSEvent *theEvent)
const NSTimeInterval timestamp = [event timestamp];
QPointF windowPoint;
QPointF screenPoint;
- [self convertFromScreen:[NSEvent mouseLocation] toWindowPoint:&windowPoint andScreenPoint:&screenPoint];
+ [self convertFromScreen:[self screenMousePoint:event] toWindowPoint:&windowPoint andScreenPoint:&screenPoint];
qCDebug(lcQpaGestures) << "beginGestureWithEvent @" << windowPoint;
QWindowSystemInterface::handleGestureEvent(m_window, timestamp, Qt::BeginNativeGesture,
windowPoint, screenPoint);
@@ -1441,7 +1441,7 @@ static QTabletEvent::TabletDevice wacomTabletDevice(NSEvent *theEvent)
const NSTimeInterval timestamp = [event timestamp];
QPointF windowPoint;
QPointF screenPoint;
- [self convertFromScreen:[NSEvent mouseLocation] toWindowPoint:&windowPoint andScreenPoint:&screenPoint];
+ [self convertFromScreen:[self screenMousePoint:event] toWindowPoint:&windowPoint andScreenPoint:&screenPoint];
QWindowSystemInterface::handleGestureEvent(m_window, timestamp, Qt::EndNativeGesture,
windowPoint, screenPoint);
}
@@ -1485,7 +1485,7 @@ static QTabletEvent::TabletDevice wacomTabletDevice(NSEvent *theEvent)
QPointF qt_windowPoint;
QPointF qt_screenPoint;
- [self convertFromScreen:[NSEvent mouseLocation] toWindowPoint:&qt_windowPoint andScreenPoint:&qt_screenPoint];
+ [self convertFromScreen:[self screenMousePoint:theEvent] toWindowPoint:&qt_windowPoint andScreenPoint:&qt_screenPoint];
NSTimeInterval timestamp = [theEvent timestamp];
ulong qt_timestamp = timestamp * 1000;
diff --git a/src/plugins/platforms/ios/qiosbackingstore.mm b/src/plugins/platforms/ios/qiosbackingstore.mm
index 357a3db3c9..076e34c1a5 100644
--- a/src/plugins/platforms/ios/qiosbackingstore.mm
+++ b/src/plugins/platforms/ios/qiosbackingstore.mm
@@ -66,6 +66,33 @@ void QIOSPaintDevice::ensureActiveTarget()
m_backingStore->makeCurrent();
}
+/*!
+ \class QIOSBackingStore
+
+ \brief The QPlatformBackingStore on iOS.
+
+ QBackingStore enables the use of QPainter to paint on a QWindow, as opposed
+ to rendering to a QWindow through the use of OpenGL with QOpenGLContext.
+
+ Historically, the iOS port initially implemented the backing store by using
+ an QOpenGLPaintDevice as its paint device, triggering the use of the OpenGL
+ paint engine for QPainter based drawing. This was due to raster drawing
+ operations being too slow when not being NEON-optimized, and got the port
+ up and running quickly.
+
+ As of 3e892e4a97, released in Qt 5.7, the backing store now uses a QImage,
+ for its paint device, giving normal raster-based QPainter operations, and
+ enabling features such as antialiased drawing.
+
+ To account for regressions in performance, the old code path is still
+ available by setting the surface type of the QWindow to OpenGLSurface.
+ This surface type is normally used when rendering though QOpenGLContext,
+ but will in the case of QIOSBackingStore trigger the old OpenGL based
+ painter.
+
+ This fallback path is not too intrusive, as the QImage based path still
+ uses OpenGL to composite the image at flush() time using composeAndFlush.
+*/
QIOSBackingStore::QIOSBackingStore(QWindow *window)
: QRasterBackingStore(window)
, m_context(new QOpenGLContext)
diff --git a/src/plugins/platforms/windows/qwindowsfontdatabase.cpp b/src/plugins/platforms/windows/qwindowsfontdatabase.cpp
index d667036e8a..4f022141cf 100644
--- a/src/plugins/platforms/windows/qwindowsfontdatabase.cpp
+++ b/src/plugins/platforms/windows/qwindowsfontdatabase.cpp
@@ -1274,8 +1274,23 @@ QT_WARNING_POP
Q_ASSERT(fontEngine->ref.load() == 0);
// Override the generated font name
- static_cast<QWindowsFontEngine *>(fontEngine)->setUniqueFamilyName(uniqueFamilyName);
- fontEngine->fontDef.family = actualFontName;
+ switch (fontEngine->type()) {
+ case QFontEngine::Win:
+ static_cast<QWindowsFontEngine *>(fontEngine)->setUniqueFamilyName(uniqueFamilyName);
+ fontEngine->fontDef.family = actualFontName;
+ break;
+
+#if !defined(QT_NO_DIRECTWRITE)
+ case QFontEngine::DirectWrite:
+ static_cast<QWindowsFontEngineDirectWrite *>(fontEngine)->setUniqueFamilyName(uniqueFamilyName);
+ fontEngine->fontDef.family = actualFontName;
+ break;
+#endif // !QT_NO_DIRECTWRITE
+
+ default:
+ Q_ASSERT_X(false, Q_FUNC_INFO, "Unhandled font engine.");
+ }
+
UniqueFontData uniqueData;
uniqueData.handle = fontHandle;
uniqueData.refCount.ref();
diff --git a/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp b/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp
index ec73a4c065..66cc08f9fa 100644
--- a/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp
+++ b/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp
@@ -49,6 +49,8 @@
#include <QtCore/QFile>
#include <private/qstringiterator_p.h>
#include <QtCore/private/qsystemlibrary_p.h>
+#include <QtGui/private/qguiapplication_p.h>
+#include <qpa/qplatformintegration.h>
#if defined(QT_USE_DIRECTWRITE2)
# include <dwrite_2.h>
@@ -235,6 +237,11 @@ QWindowsFontEngineDirectWrite::~QWindowsFontEngineDirectWrite()
if (m_directWriteBitmapRenderTarget != 0)
m_directWriteBitmapRenderTarget->Release();
+
+ if (!m_uniqueFamilyName.isEmpty()) {
+ QPlatformFontDatabase *pfdb = QGuiApplicationPrivate::platformIntegration()->fontDatabase();
+ static_cast<QWindowsFontDatabase *>(pfdb)->derefUniqueFont(m_uniqueFamilyName);
+ }
}
#ifndef Q_CC_MINGW
@@ -866,12 +873,17 @@ QImage QWindowsFontEngineDirectWrite::alphaRGBMapForGlyph(glyph_t t,
QFontEngine *QWindowsFontEngineDirectWrite::cloneWithSize(qreal pixelSize) const
{
- QFontEngine *fontEngine = new QWindowsFontEngineDirectWrite(m_directWriteFontFace,
- pixelSize,
- m_fontEngineData);
+ QWindowsFontEngineDirectWrite *fontEngine = new QWindowsFontEngineDirectWrite(m_directWriteFontFace,
+ pixelSize,
+ m_fontEngineData);
fontEngine->fontDef = fontDef;
fontEngine->fontDef.pixelSize = pixelSize;
+ if (!m_uniqueFamilyName.isEmpty()) {
+ fontEngine->setUniqueFamilyName(m_uniqueFamilyName);
+ QPlatformFontDatabase *pfdb = QGuiApplicationPrivate::platformIntegration()->fontDatabase();
+ static_cast<QWindowsFontDatabase *>(pfdb)->refUniqueFont(m_uniqueFamilyName);
+ }
return fontEngine;
}
diff --git a/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.h b/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.h
index 1978304b13..e4a82c6a6e 100644
--- a/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.h
+++ b/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.h
@@ -111,6 +111,8 @@ public:
IDWriteFontFace *directWriteFontFace() const { return m_directWriteFontFace; }
+ void setUniqueFamilyName(const QString &newName) { m_uniqueFamilyName = newName; }
+
private:
QImage imageForGlyph(glyph_t t, QFixed subPixelPosition, int margin, const QTransform &xform);
void collectMetrics();
@@ -131,6 +133,7 @@ private:
QFixed m_xHeight;
QFixed m_lineGap;
FaceId m_faceId;
+ QString m_uniqueFamilyName;
};
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglintegration.cpp b/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglintegration.cpp
index 079f0466dc..00f64e3c40 100644
--- a/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglintegration.cpp
+++ b/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglintegration.cpp
@@ -42,6 +42,7 @@
#include "qxcbeglcontext.h"
#include <QtGui/QOffscreenSurface>
+#include <QtPlatformSupport/private/qeglstreamconvenience_p.h>
#include "qxcbeglnativeinterfacehandler.h"
@@ -63,7 +64,18 @@ QXcbEglIntegration::~QXcbEglIntegration()
bool QXcbEglIntegration::initialize(QXcbConnection *connection)
{
m_connection = connection;
- m_egl_display = eglGetDisplay(reinterpret_cast<EGLNativeDisplayType>(xlib_display()));
+
+ const char *extensions = eglQueryString(EGL_NO_DISPLAY, EGL_EXTENSIONS);
+
+ if (extensions && strstr(extensions, "EGL_EXT_platform_x11")) {
+ QEGLStreamConvenience streamFuncs;
+ m_egl_display = streamFuncs.get_platform_display(EGL_PLATFORM_X11_KHR,
+ xlib_display(),
+ nullptr);
+ }
+
+ if (!m_egl_display)
+ m_egl_display = eglGetDisplay(reinterpret_cast<EGLNativeDisplayType>(xlib_display()));
EGLint major, minor;
bool success = eglInitialize(m_egl_display, &major, &minor);
diff --git a/src/sql/configure.json b/src/sql/configure.json
index 5476d419ed..96c82e84f9 100644
--- a/src/sql/configure.json
+++ b/src/sql/configure.json
@@ -69,6 +69,7 @@
"label": "PostgreSQL",
"test": "unix/psql",
"sources": [
+ { "type": "pkgConfig", "args": "libpq" },
{ "type": "psqlConfig" },
{ "type": "psqlEnv", "libs": "-llibpq -lws2_32 -ladvapi32", "condition": "config.win32" },
{ "type": "psqlEnv", "libs": "-lpq", "condition": "!config.win32" }
diff --git a/src/tools/moc/moc.cpp b/src/tools/moc/moc.cpp
index e4b9b19758..3bd87e1f01 100644
--- a/src/tools/moc/moc.cpp
+++ b/src/tools/moc/moc.cpp
@@ -538,7 +538,6 @@ bool Moc::parseMaybeFunction(const ClassDef *cdef, FunctionDef *def)
return true;
}
-
void Moc::parse()
{
QVector<NamespaceDef> namespaceList;
@@ -560,9 +559,27 @@ void Moc::parse()
until(RBRACE);
def.end = index;
index = def.begin + 1;
+
const bool parseNamespace = currentFilenames.size() <= 1;
+ if (parseNamespace) {
+ for (int i = namespaceList.size() - 1; i >= 0; --i) {
+ if (inNamespace(&namespaceList.at(i))) {
+ def.qualified.prepend(namespaceList.at(i).classname + "::");
+ }
+ }
+ }
while (parseNamespace && inNamespace(&def) && hasNext()) {
switch (next()) {
+ case NAMESPACE:
+ if (test(IDENTIFIER)) {
+ if (test(EQ)) {
+ // namespace Foo = Bar::Baz;
+ until(SEMIC);
+ } else if (!test(SEMIC)) {
+ until(RBRACE);
+ }
+ }
+ break;
case Q_NAMESPACE_TOKEN:
def.hasQNamespace = true;
break;
@@ -857,13 +874,22 @@ void Moc::parse()
continue;
ClassDef def;
static_cast<BaseDef &>(def) = static_cast<BaseDef>(n);
- if (!def.qualified.isEmpty())
- def.qualified += "::";
def.qualified += def.classname;
def.hasQGadget = true;
- classList += def;
- knownGadgets.insert(def.classname, def.qualified);
- knownGadgets.insert(def.qualified, def.qualified);
+ auto it = std::find_if(classList.begin(), classList.end(), [&def](const ClassDef &val) {
+ return def.classname == val.classname && def.qualified == val.qualified;
+ });
+
+ if (it != classList.end()) {
+ it->classInfoList += def.classInfoList;
+ it->enumDeclarations.unite(def.enumDeclarations);
+ it->enumList += def.enumList;
+ it->flagAliases.unite(def.flagAliases);
+ } else {
+ knownGadgets.insert(def.classname, def.qualified);
+ knownGadgets.insert(def.qualified, def.qualified);
+ classList += def;
+ }
}
}
diff --git a/src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp b/src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp
index e58f194b72..8dbb1bf350 100644
--- a/src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp
+++ b/src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp
@@ -32,6 +32,7 @@
#include <qdebug.h>
#include <qfile.h>
#include <qfileinfo.h>
+#include <qloggingcategory.h>
#include <qstring.h>
#include <qstringlist.h>
#include <qtextstream.h>
@@ -1092,6 +1093,9 @@ int main(int argc, char **argv)
}
}
+ if (verbose)
+ QLoggingCategory::setFilterRules(QStringLiteral("dbus.parser.debug=true"));
+
QDBusIntrospection::Interfaces interfaces = readInput();
cleanInterfaces(interfaces);
diff --git a/src/widgets/dialogs/qcolordialog.cpp b/src/widgets/dialogs/qcolordialog.cpp
index 1116685fc7..39eacae596 100644
--- a/src/widgets/dialogs/qcolordialog.cpp
+++ b/src/widgets/dialogs/qcolordialog.cpp
@@ -1862,12 +1862,14 @@ void QColorDialogPrivate::retranslateStrings()
bool QColorDialogPrivate::canBeNativeDialog() const
{
- Q_Q(const QColorDialog);
+ // Don't use Q_Q here! This function is called from ~QDialog,
+ // so Q_Q calling q_func() invokes undefined behavior (invalid cast in q_func()).
+ const QDialog * const q = static_cast<const QDialog*>(q_ptr);
if (nativeDialogInUse)
return true;
if (QCoreApplication::testAttribute(Qt::AA_DontUseNativeDialogs)
|| q->testAttribute(Qt::WA_DontShowOnScreen)
- || (q->options() & QColorDialog::DontUseNativeDialog)) {
+ || (options->options() & QColorDialog::DontUseNativeDialog)) {
return false;
}
diff --git a/src/widgets/dialogs/qfiledialog.cpp b/src/widgets/dialogs/qfiledialog.cpp
index 7b60e9cb56..879f085f11 100644
--- a/src/widgets/dialogs/qfiledialog.cpp
+++ b/src/widgets/dialogs/qfiledialog.cpp
@@ -692,12 +692,14 @@ void QFileDialogPrivate::emitFilesSelected(const QStringList &files)
bool QFileDialogPrivate::canBeNativeDialog() const
{
- Q_Q(const QFileDialog);
+ // Don't use Q_Q here! This function is called from ~QDialog,
+ // so Q_Q calling q_func() invokes undefined behavior (invalid cast in q_func()).
+ const QDialog * const q = static_cast<const QDialog*>(q_ptr);
if (nativeDialogInUse)
return true;
if (QCoreApplication::testAttribute(Qt::AA_DontUseNativeDialogs)
|| q->testAttribute(Qt::WA_DontShowOnScreen)
- || (q->options() & QFileDialog::DontUseNativeDialog)) {
+ || (options->options() & QFileDialog::DontUseNativeDialog)) {
return false;
}
diff --git a/src/widgets/dialogs/qfontdialog.cpp b/src/widgets/dialogs/qfontdialog.cpp
index 5118383fe5..3a833e85c0 100644
--- a/src/widgets/dialogs/qfontdialog.cpp
+++ b/src/widgets/dialogs/qfontdialog.cpp
@@ -1030,7 +1030,9 @@ void QFontDialog::done(int result)
bool QFontDialogPrivate::canBeNativeDialog() const
{
- Q_Q(const QFontDialog);
+ // Don't use Q_Q here! This function is called from ~QDialog,
+ // so Q_Q calling q_func() invokes undefined behavior (invalid cast in q_func()).
+ const QDialog * const q = static_cast<const QDialog*>(q_ptr);
if (nativeDialogInUse)
return true;
if (QCoreApplication::testAttribute(Qt::AA_DontUseNativeDialogs)
diff --git a/src/widgets/graphicsview/qgraphicsanchorlayout_p.cpp b/src/widgets/graphicsview/qgraphicsanchorlayout_p.cpp
index 02956b76f9..6a9036997c 100644
--- a/src/widgets/graphicsview/qgraphicsanchorlayout_p.cpp
+++ b/src/widgets/graphicsview/qgraphicsanchorlayout_p.cpp
@@ -2096,7 +2096,7 @@ QList<AnchorData *> getVariables(const QList<QSimplexConstraint *> &constraints)
void QGraphicsAnchorLayoutPrivate::calculateGraphs(
QGraphicsAnchorLayoutPrivate::Orientation orientation)
{
-#if defined(QT_DEBUG) || defined(Q_AUTOTEST_EXPORT)
+#if defined(QT_DEBUG) || defined(QT_BUILD_INTERNAL)
lastCalculationUsedSimplex[orientation] = false;
#endif
@@ -2249,7 +2249,7 @@ bool QGraphicsAnchorLayoutPrivate::calculateTrunk(Orientation orientation, const
sizeHints[orientation][Qt::MaximumSize] = ad->sizeAtMaximum;
}
-#if defined(QT_DEBUG) || defined(Q_AUTOTEST_EXPORT)
+#if defined(QT_DEBUG) || defined(QT_BUILD_INTERNAL)
lastCalculationUsedSimplex[orientation] = needsSimplex;
#endif
diff --git a/src/widgets/graphicsview/qgraphicsanchorlayout_p.h b/src/widgets/graphicsview/qgraphicsanchorlayout_p.h
index ee11cb8561..b6d8a12658 100644
--- a/src/widgets/graphicsview/qgraphicsanchorlayout_p.h
+++ b/src/widgets/graphicsview/qgraphicsanchorlayout_p.h
@@ -579,7 +579,7 @@ public:
bool graphHasConflicts[2];
QSet<QGraphicsLayoutItem *> m_floatItems[2];
-#if defined(QT_DEBUG) || defined(Q_AUTOTEST_EXPORT)
+#if defined(QT_DEBUG) || defined(QT_BUILD_INTERNAL)
bool lastCalculationUsedSimplex[2];
#endif
diff --git a/src/widgets/graphicsview/qgraphicsscene.cpp b/src/widgets/graphicsview/qgraphicsscene.cpp
index aa781e8f8b..5b46eb35be 100644
--- a/src/widgets/graphicsview/qgraphicsscene.cpp
+++ b/src/widgets/graphicsview/qgraphicsscene.cpp
@@ -717,10 +717,11 @@ void QGraphicsScenePrivate::removeItemHelper(QGraphicsItem *item)
++it;
}
- QGraphicsObject *dummy = static_cast<QGraphicsObject *>(item);
- cachedTargetItems.removeOne(dummy);
- cachedItemGestures.remove(dummy);
- cachedAlreadyDeliveredGestures.remove(dummy);
+ if (QGraphicsObject *dummy = item->toGraphicsObject()) {
+ cachedTargetItems.removeOne(dummy);
+ cachedItemGestures.remove(dummy);
+ cachedAlreadyDeliveredGestures.remove(dummy);
+ }
foreach (Qt::GestureType gesture, item->d_ptr->gestureContext.keys())
ungrabGesture(item, gesture);
@@ -996,7 +997,7 @@ void QGraphicsScenePrivate::ungrabMouse(QGraphicsItem *item, bool itemIsDying)
// If the item is a popup, go via removePopup to ensure state
// consistency and that it gets hidden correctly - beware that
// removePopup() reenters this function to continue removing the grab.
- removePopup((QGraphicsWidget *)item, itemIsDying);
+ removePopup(popupWidgets.constLast(), itemIsDying);
return;
}
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp
index 9b8677e6a8..815ae7fe33 100644
--- a/src/widgets/kernel/qapplication.cpp
+++ b/src/widgets/kernel/qapplication.cpp
@@ -1068,15 +1068,17 @@ QStyle *QApplication::style()
if (!QApplicationPrivate::app_style) {
// Compile-time search for default style
//
- QString style;
+ QStyle *&app_style = QApplicationPrivate::app_style;
+
if (!QApplicationPrivate::styleOverride.isEmpty()) {
- style = QApplicationPrivate::styleOverride.toLower();
- } else {
- style = QApplicationPrivate::desktopStyleKey();
+ const QString style = QApplicationPrivate::styleOverride.toLower();
+ app_style = QStyleFactory::create(style);
+ if (!app_style)
+ qWarning("QApplication: invalid style override passed, ignoring it.");
}
+ if (!app_style)
+ app_style = QStyleFactory::create(QApplicationPrivate::desktopStyleKey());
- QStyle *&app_style = QApplicationPrivate::app_style;
- app_style = QStyleFactory::create(style);
if (!app_style) {
const QStringList styles = QStyleFactory::keys();
for (const auto &style : styles) {
@@ -3116,11 +3118,11 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
key->accept();
else
key->ignore();
- res = d->notify_helper(receiver, e);
QWidget *w = isWidget ? static_cast<QWidget *>(receiver) : 0;
#ifndef QT_NO_GRAPHICSVIEW
QGraphicsWidget *gw = isGraphicsWidget ? static_cast<QGraphicsWidget *>(receiver) : 0;
#endif
+ res = d->notify_helper(receiver, e);
if ((res && key->isAccepted())
/*
diff --git a/src/widgets/kernel/qlayout.cpp b/src/widgets/kernel/qlayout.cpp
index 0a21ece1dd..1a341d155b 100644
--- a/src/widgets/kernel/qlayout.cpp
+++ b/src/widgets/kernel/qlayout.cpp
@@ -546,7 +546,7 @@ void QLayout::invalidate()
update();
}
-static bool removeWidgetRecursively(QLayoutItem *li, QWidget *w)
+static bool removeWidgetRecursively(QLayoutItem *li, QObject *w)
{
QLayout *lay = li->layout();
if (!lay)
@@ -609,12 +609,11 @@ void QLayout::widgetEvent(QEvent *e)
{
QChildEvent *c = (QChildEvent *)e;
if (c->child()->isWidgetType()) {
- QWidget *w = (QWidget *)c->child();
#ifndef QT_NO_MENUBAR
- if (w == d->menubar)
+ if (c->child() == d->menubar)
d->menubar = 0;
#endif
- removeWidgetRecursively(this, w);
+ removeWidgetRecursively(this, c->child());
}
}
break;
diff --git a/src/widgets/kernel/qstackedlayout.cpp b/src/widgets/kernel/qstackedlayout.cpp
index 006b3e8588..d9c1c524d7 100644
--- a/src/widgets/kernel/qstackedlayout.cpp
+++ b/src/widgets/kernel/qstackedlayout.cpp
@@ -41,7 +41,7 @@
#include "qlayout_p.h"
#include <qlist.h>
-#include <qwidget.h>
+#include "private/qwidget_p.h"
#include "private/qlayoutengine_p.h"
QT_BEGIN_NAMESPACE
@@ -251,14 +251,10 @@ QLayoutItem *QStackedLayout::itemAt(int index) const
// Code that enables proper handling of the case that takeAt() is
// called somewhere inside QObject destructor (can't call hide()
// on the object then)
-
-class QtFriendlyLayoutWidget : public QWidget
+static bool qt_wasDeleted(const QWidget *w)
{
-public:
- inline bool wasDeleted() const { return d_ptr->wasDeleted; }
-};
-
-static bool qt_wasDeleted(const QWidget *w) { return static_cast<const QtFriendlyLayoutWidget*>(w)->wasDeleted(); }
+ return QWidgetPrivate::get(w)->wasDeleted;
+}
/*!
diff --git a/src/widgets/kernel/qstandardgestures.cpp b/src/widgets/kernel/qstandardgestures.cpp
index 68ac874b59..759c9864a6 100644
--- a/src/widgets/kernel/qstandardgestures.cpp
+++ b/src/widgets/kernel/qstandardgestures.cpp
@@ -508,45 +508,46 @@ QTapAndHoldGestureRecognizer::recognize(QGesture *state, QObject *object,
return QGestureRecognizer::FinishGesture | QGestureRecognizer::ConsumeEventHint;
}
- const QTouchEvent *ev = static_cast<const QTouchEvent *>(event);
- const QMouseEvent *me = static_cast<const QMouseEvent *>(event);
-#ifndef QT_NO_GRAPHICSVIEW
- const QGraphicsSceneMouseEvent *gsme = static_cast<const QGraphicsSceneMouseEvent *>(event);
-#endif
-
enum { TapRadius = 40 };
switch (event->type()) {
#ifndef QT_NO_GRAPHICSVIEW
- case QEvent::GraphicsSceneMousePress:
+ case QEvent::GraphicsSceneMousePress: {
+ const QGraphicsSceneMouseEvent *gsme = static_cast<const QGraphicsSceneMouseEvent *>(event);
d->position = gsme->screenPos();
q->setHotSpot(d->position);
if (d->timerId)
q->killTimer(d->timerId);
d->timerId = q->startTimer(QTapAndHoldGesturePrivate::Timeout);
return QGestureRecognizer::MayBeGesture; // we don't show a sign of life until the timeout
+ }
#endif
- case QEvent::MouseButtonPress:
+ case QEvent::MouseButtonPress: {
+ const QMouseEvent *me = static_cast<const QMouseEvent *>(event);
d->position = me->globalPos();
q->setHotSpot(d->position);
if (d->timerId)
q->killTimer(d->timerId);
d->timerId = q->startTimer(QTapAndHoldGesturePrivate::Timeout);
return QGestureRecognizer::MayBeGesture; // we don't show a sign of life until the timeout
- case QEvent::TouchBegin:
+ }
+ case QEvent::TouchBegin: {
+ const QTouchEvent *ev = static_cast<const QTouchEvent *>(event);
d->position = ev->touchPoints().at(0).startScreenPos();
q->setHotSpot(d->position);
if (d->timerId)
q->killTimer(d->timerId);
d->timerId = q->startTimer(QTapAndHoldGesturePrivate::Timeout);
return QGestureRecognizer::MayBeGesture; // we don't show a sign of life until the timeout
+ }
#ifndef QT_NO_GRAPHICSVIEW
case QEvent::GraphicsSceneMouseRelease:
#endif
case QEvent::MouseButtonRelease:
case QEvent::TouchEnd:
return QGestureRecognizer::CancelGesture; // get out of the MayBeGesture state
- case QEvent::TouchUpdate:
+ case QEvent::TouchUpdate: {
+ const QTouchEvent *ev = static_cast<const QTouchEvent *>(event);
if (d->timerId && ev->touchPoints().size() == 1) {
QTouchEvent::TouchPoint p = ev->touchPoints().at(0);
QPoint delta = p.pos().toPoint() - p.startPos().toPoint();
@@ -554,7 +555,9 @@ QTapAndHoldGestureRecognizer::recognize(QGesture *state, QObject *object,
return QGestureRecognizer::MayBeGesture;
}
return QGestureRecognizer::CancelGesture;
+ }
case QEvent::MouseMove: {
+ const QMouseEvent *me = static_cast<const QMouseEvent *>(event);
QPoint delta = me->globalPos() - d->position.toPoint();
if (d->timerId && delta.manhattanLength() <= TapRadius)
return QGestureRecognizer::MayBeGesture;
@@ -562,6 +565,7 @@ QTapAndHoldGestureRecognizer::recognize(QGesture *state, QObject *object,
}
#ifndef QT_NO_GRAPHICSVIEW
case QEvent::GraphicsSceneMouseMove: {
+ const QGraphicsSceneMouseEvent *gsme = static_cast<const QGraphicsSceneMouseEvent *>(event);
QPoint delta = gsme->screenPos() - d->position.toPoint();
if (d->timerId && delta.manhattanLength() <= TapRadius)
return QGestureRecognizer::MayBeGesture;
diff --git a/src/widgets/kernel/qtooltip.cpp b/src/widgets/kernel/qtooltip.cpp
index c606ef6375..78929d8cd5 100644
--- a/src/widgets/kernel/qtooltip.cpp
+++ b/src/widgets/kernel/qtooltip.cpp
@@ -342,6 +342,7 @@ bool QTipLabel::eventFilter(QObject *o, QEvent *e)
case QEvent::FocusIn:
case QEvent::FocusOut:
#endif
+ case QEvent::Close: // For QTBUG-55523 (QQC) specifically: Hide tooltip when windows are closed
case QEvent::MouseButtonPress:
case QEvent::MouseButtonRelease:
case QEvent::MouseButtonDblClick:
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index 28f4cd34ce..51e1ef9aaf 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -5226,8 +5226,10 @@ static void sendResizeEvents(QWidget *target)
const QObjectList children = target->children();
for (int i = 0; i < children.size(); ++i) {
+ if (!children.at(i)->isWidgetType())
+ continue;
QWidget *child = static_cast<QWidget*>(children.at(i));
- if (child->isWidgetType() && !child->isWindow() && child->testAttribute(Qt::WA_PendingResizeEvent))
+ if (!child->isWindow() && child->testAttribute(Qt::WA_PendingResizeEvent))
sendResizeEvents(child);
}
}
diff --git a/src/widgets/kernel/qwidget_p.h b/src/widgets/kernel/qwidget_p.h
index a2579df48f..3e57f9de41 100644
--- a/src/widgets/kernel/qwidget_p.h
+++ b/src/widgets/kernel/qwidget_p.h
@@ -330,6 +330,7 @@ public:
~QWidgetPrivate();
static QWidgetPrivate *get(QWidget *w) { return w->d_func(); }
+ static const QWidgetPrivate *get(const QWidget *w) { return w->d_func(); }
QWExtra *extraData() const;
QTLWExtra *topData() const;
diff --git a/src/widgets/widgets/qdatetimeedit.cpp b/src/widgets/widgets/qdatetimeedit.cpp
index b168c98410..54094de765 100644
--- a/src/widgets/widgets/qdatetimeedit.cpp
+++ b/src/widgets/widgets/qdatetimeedit.cpp
@@ -2394,18 +2394,21 @@ void QDateTimeEditPrivate::init(const QVariant &var)
switch (var.type()) {
case QVariant::Date:
value = QDateTime(var.toDate(), QDATETIMEEDIT_TIME_MIN);
+ updateTimeSpec();
q->setDisplayFormat(defaultDateFormat);
if (sectionNodes.isEmpty()) // ### safeguard for broken locale
q->setDisplayFormat(QLatin1String("dd/MM/yyyy"));
break;
case QVariant::DateTime:
value = var;
+ updateTimeSpec();
q->setDisplayFormat(defaultDateTimeFormat);
if (sectionNodes.isEmpty()) // ### safeguard for broken locale
q->setDisplayFormat(QLatin1String("dd/MM/yyyy hh:mm:ss"));
break;
case QVariant::Time:
value = QDateTime(QDATETIMEEDIT_DATE_INITIAL, var.toTime());
+ updateTimeSpec();
q->setDisplayFormat(defaultTimeFormat);
if (sectionNodes.isEmpty()) // ### safeguard for broken locale
q->setDisplayFormat(QLatin1String("hh:mm:ss"));
@@ -2418,7 +2421,6 @@ void QDateTimeEditPrivate::init(const QVariant &var)
if (QApplication::keypadNavigationEnabled())
q->setCalendarPopup(true);
#endif
- updateTimeSpec();
q->setInputMethodHints(Qt::ImhPreferNumbers);
setLayoutItemMargins(QStyle::SE_DateTimeEditLayoutItem);
}