summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2014-12-30 09:35:39 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-12-30 09:35:39 +0100
commit4295203dd67a4c4d0aa0fe1a8b116069542e4474 (patch)
treea3b2b1e074b7b0838b89b224506fab6818c61acc /src
parent8f0e84bec513ad28c3ec479053fbc59add3959e1 (diff)
parentaaff94c2df665035addb90714bab4722003894da (diff)
Merge "Merge remote-tracking branch 'origin/5.4' into dev" into refs/staging/dev
Diffstat (limited to 'src')
-rw-r--r--src/corelib/Qt5CoreMacros.cmake2
-rw-r--r--src/corelib/global/qendian.h26
-rw-r--r--src/corelib/global/qlogging.cpp21
-rw-r--r--src/corelib/io/qiodevice.cpp2
-rw-r--r--src/corelib/io/qstorageinfo_unix.cpp7
-rw-r--r--src/corelib/kernel/qmetatype.h2
-rw-r--r--src/corelib/thread/qthread_unix.cpp3
-rw-r--r--src/corelib/tools/qbytearray.cpp11
-rw-r--r--src/corelib/tools/qbytearray.h3
-rw-r--r--src/corelib/tools/qelapsedtimer_unix.cpp17
-rw-r--r--src/dbus/doc/src/qtdbus-module.qdoc4
-rw-r--r--src/dbus/qdbus_symbols.cpp25
-rw-r--r--src/dbus/qdbusserver.cpp12
-rw-r--r--src/gui/image/qimage.cpp2
-rw-r--r--src/gui/kernel/qevent.cpp2
-rw-r--r--src/gui/kernel/qguiapplication.cpp3
-rw-r--r--src/gui/kernel/qopenglcontext.cpp12
-rw-r--r--src/gui/kernel/qplatformsystemtrayicon.cpp4
-rw-r--r--src/gui/kernel/qplatformsystemtrayicon.h2
-rw-r--r--src/gui/kernel/qstylehints.cpp2
-rw-r--r--src/gui/kernel/qwindow.cpp3
-rw-r--r--src/gui/painting/qpdf.cpp4
-rw-r--r--src/gui/text/qfontengine_ft.cpp30
-rw-r--r--src/gui/text/qfontengine_ft_p.h3
-rw-r--r--src/gui/text/qrawfont_p.h15
-rw-r--r--src/network/access/qnetworkreplyhttpimpl.cpp3
-rw-r--r--src/network/kernel/qhostaddress.cpp5
-rw-r--r--src/network/socket/qhttpsocketengine.cpp2
-rw-r--r--src/network/socket/qnativesocketengine.cpp4
-rw-r--r--src/network/ssl/qsslcertificate_qt.cpp4
-rw-r--r--src/opengl/doc/src/qtopengl-index.qdoc5
-rw-r--r--src/opengl/doc/src/qtopengl-module.qdoc5
-rw-r--r--src/plugins/platforms/cocoa/qcocoamenu.mm9
-rw-r--r--src/plugins/platforms/cocoa/qcocoamenuitem.mm11
-rw-r--r--src/plugins/platforms/qnx/qqnxscreen.cpp3
-rw-r--r--src/plugins/platforms/xcb/qxcbkeyboard.cpp3
-rw-r--r--src/plugins/platforms/xcb/xcb-plugin.pro1
-rw-r--r--src/plugins/printsupport/windows/qwindowsprintdevice.cpp4
-rw-r--r--src/sql/doc/src/sql-driver.qdoc5
-rw-r--r--src/testlib/qtestcase.cpp7
-rw-r--r--src/tools/qdoc/cppcodemarker.cpp2
-rw-r--r--src/tools/qdoc/htmlgenerator.cpp18
-rw-r--r--src/widgets/dialogs/qcolordialog.cpp15
-rw-r--r--src/widgets/styles/qstyle.cpp2
-rw-r--r--src/widgets/widgets/qprogressbar.cpp2
-rw-r--r--src/widgets/widgets/qscrollbar.cpp7
-rw-r--r--src/widgets/widgets/qwidgetlinecontrol.cpp23
-rw-r--r--src/widgets/widgets/qwidgetlinecontrol_p.h2
48 files changed, 196 insertions, 163 deletions
diff --git a/src/corelib/Qt5CoreMacros.cmake b/src/corelib/Qt5CoreMacros.cmake
index 88710bc55e..9c81754302 100644
--- a/src/corelib/Qt5CoreMacros.cmake
+++ b/src/corelib/Qt5CoreMacros.cmake
@@ -221,7 +221,7 @@ function(QT5_ADD_RESOURCES outfiles )
# let's make a configured file and add it as a dependency so cmake is run
# again when dependencies need to be recomputed.
qt5_make_output_file("${infile}" "" "qrc.depends" out_depends)
- configure_file("${infile}" "${out_depends}" COPY_ONLY)
+ configure_file("${infile}" "${out_depends}" COPYONLY)
else()
# The .qrc file does not exist (yet). Let's add a dependency and hope
# that it will be generated later
diff --git a/src/corelib/global/qendian.h b/src/corelib/global/qendian.h
index 136581167c..7c643f7592 100644
--- a/src/corelib/global/qendian.h
+++ b/src/corelib/global/qendian.h
@@ -40,10 +40,6 @@
#include <stdlib.h>
#include <string.h>
-#ifdef __GLIBC__
-#include <byteswap.h>
-#endif
-
QT_BEGIN_NAMESPACE
@@ -276,18 +272,16 @@ template <> inline qint8 qFromBigEndian<qint8>(const uchar *src)
*/
template <typename T> T qbswap(T source);
-#ifdef __GLIBC__
+// GCC 4.3 implemented all the intrinsics, but the 16-bit one only got implemented in 4.8;
+// Clang 2.6 implemented the 32- and 64-bit but waited until 3.2 to implement the 16-bit one
+#if (defined(Q_CC_GNU) && Q_CC_GNU >= 403) || (defined(Q_CC_CLANG) && Q_CC_CLANG >= 206)
template <> inline quint64 qbswap<quint64>(quint64 source)
{
- return bswap_64(source);
+ return __builtin_bswap64(source);
}
template <> inline quint32 qbswap<quint32>(quint32 source)
{
- return bswap_32(source);
-}
-template <> inline quint16 qbswap<quint16>(quint16 source)
-{
- return bswap_16(source);
+ return __builtin_bswap32(source);
}
#else
template <> inline quint64 qbswap<quint64>(quint64 source)
@@ -311,14 +305,20 @@ template <> inline quint32 qbswap<quint32>(quint32 source)
| ((source & 0x00ff0000) >> 8)
| ((source & 0xff000000) >> 24);
}
-
+#endif // GCC & Clang intrinsics
+#if (defined(Q_CC_GNU) && Q_CC_GNU >= 408) || (defined(Q_CC_CLANG) && Q_CC_CLANG >= 302)
+template <> inline quint16 qbswap<quint16>(quint16 source)
+{
+ return __builtin_bswap16(source);
+}
+#else
template <> inline quint16 qbswap<quint16>(quint16 source)
{
return quint16( 0
| ((source & 0x00ff) << 8)
| ((source & 0xff00) >> 8) );
}
-#endif // __GLIBC__
+#endif // GCC & Clang intrinsics
// signed specializations
template <> inline qint64 qbswap<qint64>(qint64 source)
diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp
index 7763a15b3a..c4dacd3411 100644
--- a/src/corelib/global/qlogging.cpp
+++ b/src/corelib/global/qlogging.cpp
@@ -72,20 +72,17 @@
# include "private/qcore_unix_p.h"
#endif
-#if !defined QT_NO_REGULAREXPRESSION && !defined(QT_BOOTSTRAPPED)
-#ifdef __has_include
-#if __has_include(<cxxabi.h>) && __has_include(<execinfo.h>)
-#define QLOGGING_HAVE_BACKTRACE
-#endif
-#elif defined(__GLIBCXX__) && defined(__GLIBC__) // (because older version of gcc don't have __has_include)
-#define QLOGGING_HAVE_BACKTRACE
+#ifndef __has_include
+# define __has_include(x) 0
#endif
-#ifdef QLOGGING_HAVE_BACKTRACE
-#include <qregularexpression.h>
-#include <cxxabi.h>
-#include <execinfo.h>
-#endif
+#if !defined QT_NO_REGULAREXPRESSION && !defined(QT_BOOTSTRAPPED)
+# if (defined(__GLIBC__) && defined(__GLIBCXX__)) || (__has_include(<cxxabi.h>) && __has_include(<execinfo.h>))
+# define QLOGGING_HAVE_BACKTRACE
+# include <qregularexpression.h>
+# include <cxxabi.h>
+# include <execinfo.h>
+# endif
#endif
#include <stdio.h>
diff --git a/src/corelib/io/qiodevice.cpp b/src/corelib/io/qiodevice.cpp
index 36f88f2774..d7ce8731c5 100644
--- a/src/corelib/io/qiodevice.cpp
+++ b/src/corelib/io/qiodevice.cpp
@@ -1004,7 +1004,7 @@ QByteArray QIODevice::readAll()
} else {
// Read it all in one go.
// If resize fails, don't read anything.
- if (readBytes + theSize - d->pos > INT_MAX)
+ if (quint64(readBytes + theSize - d->pos) > QByteArray::MaxSize)
return QByteArray();
result.resize(int(readBytes + theSize - d->pos));
readBytes += read(result.data() + readBytes, result.size() - readBytes);
diff --git a/src/corelib/io/qstorageinfo_unix.cpp b/src/corelib/io/qstorageinfo_unix.cpp
index bec7420dc7..1af2145296 100644
--- a/src/corelib/io/qstorageinfo_unix.cpp
+++ b/src/corelib/io/qstorageinfo_unix.cpp
@@ -52,17 +52,18 @@
#if defined(Q_OS_BSD4)
# include <sys/mount.h>
+# include <sys/statvfs.h>
#elif defined(Q_OS_ANDROID)
# include <sys/mount.h>
# include <sys/vfs.h>
# include <mntent.h>
-#elif defined(Q_OS_QNX)
-# include <sys/statvfs.h>
#elif defined(Q_OS_LINUX)
# include <mntent.h>
# include <sys/statvfs.h>
#elif defined(Q_OS_SOLARIS)
# include <sys/mnttab.h>
+#else
+# include <sys/statvfs.h>
#endif
#if defined(Q_OS_BSD4)
@@ -118,7 +119,7 @@ public:
inline QByteArray device() const;
private:
#if defined(Q_OS_BSD4)
- statfs *stat_buf;
+ struct statfs *stat_buf;
int entryCount;
int currentIndex;
#elif defined(Q_OS_SOLARIS)
diff --git a/src/corelib/kernel/qmetatype.h b/src/corelib/kernel/qmetatype.h
index 040b860a31..0e817da8ce 100644
--- a/src/corelib/kernel/qmetatype.h
+++ b/src/corelib/kernel/qmetatype.h
@@ -653,7 +653,7 @@ private:
static bool registerDebugStreamOperatorFunction(const QtPrivate::AbstractDebugStreamFunction *f, int type);
#endif
-#ifndef Q_NO_TEMPLATE_FRIENDS
+#if !defined(Q_NO_TEMPLATE_FRIENDS) && !defined(Q_CC_MSVC)
#ifndef Q_QDOC
template<typename T>
friend bool qRegisterSequentialConverter();
diff --git a/src/corelib/thread/qthread_unix.cpp b/src/corelib/thread/qthread_unix.cpp
index 5df50311ef..9a14503584 100644
--- a/src/corelib/thread/qthread_unix.cpp
+++ b/src/corelib/thread/qthread_unix.cpp
@@ -450,7 +450,8 @@ int QThread::idealThreadCount() Q_DECL_NOTHROW
// the rest: Linux, Solaris, AIX, Tru64
cores = (int)sysconf(_SC_NPROCESSORS_ONLN);
#endif
-
+ if (cores == -1)
+ return 1;
return cores;
}
diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp
index 92c2188caa..a267dc6f7b 100644
--- a/src/corelib/tools/qbytearray.cpp
+++ b/src/corelib/tools/qbytearray.cpp
@@ -123,7 +123,7 @@ int qFindByteArray(
int qAllocMore(int alloc, int extra) Q_DECL_NOTHROW
{
Q_ASSERT(alloc >= 0 && extra >= 0);
- Q_ASSERT_X(alloc <= MaxAllocSize - extra, "qAllocMore", "Requested size is too large!");
+ Q_ASSERT_X(uint(alloc) < QByteArray::MaxSize, "qAllocMore", "Requested size is too large!");
unsigned nalloc = qNextPowerOfTwo(alloc + extra);
@@ -837,6 +837,15 @@ static inline char qToLower(char c)
*/
/*!
+ \variable QByteArray::MaxSize
+ \internal
+ \since 5.4
+
+ The maximum size of a QByteArray, in bytes. Also applies to a the maximum
+ storage size of QString and QVector, though not the number of elements.
+*/
+
+/*!
\enum QByteArray::Base64Option
\since 5.2
diff --git a/src/corelib/tools/qbytearray.h b/src/corelib/tools/qbytearray.h
index 6976124bca..6286624961 100644
--- a/src/corelib/tools/qbytearray.h
+++ b/src/corelib/tools/qbytearray.h
@@ -173,6 +173,9 @@ private:
typedef QTypedArrayData<char> Data;
public:
+ // undocumented:
+ static const quint64 MaxSize = (1 << 30) - sizeof(Data);
+
enum Base64Option {
Base64Encoding = 0,
Base64UrlEncoding = 1,
diff --git a/src/corelib/tools/qelapsedtimer_unix.cpp b/src/corelib/tools/qelapsedtimer_unix.cpp
index 61bd7f1f21..922aa487d7 100644
--- a/src/corelib/tools/qelapsedtimer_unix.cpp
+++ b/src/corelib/tools/qelapsedtimer_unix.cpp
@@ -37,10 +37,6 @@
#include "qelapsedtimer.h"
#if defined(Q_OS_VXWORKS)
#include "qfunctions_vxworks.h"
-#elif defined(Q_OS_QNX)
-#include <sys/neutrino.h>
-#include <sys/syspage.h>
-#include <inttypes.h>
#else
#include <sys/time.h>
#include <time.h>
@@ -88,18 +84,7 @@ QT_BEGIN_NAMESPACE
* see http://pubs.opengroup.org/onlinepubs/9699919799/functions/clock_getres.html
*/
-#if defined(Q_OS_QNX)
-static inline void qt_clock_gettime(clockid_t clock, struct timespec *ts)
-{
- // The standard POSIX clock calls only have 1ms accuracy on QNX. To get
- // higher accuracy, this platform-specific function must be used instead
- quint64 cycles_per_sec = SYSPAGE_ENTRY(qtime)->cycles_per_sec;
- quint64 cycles = ClockCycles();
- ts->tv_sec = cycles / cycles_per_sec;
- quint64 mod = cycles % cycles_per_sec;
- ts->tv_nsec = mod * Q_INT64_C(1000000000) / cycles_per_sec;
-}
-#elif !defined(CLOCK_REALTIME)
+#if !defined(CLOCK_REALTIME)
# define CLOCK_REALTIME 0
static inline void qt_clock_gettime(int, struct timespec *ts)
{
diff --git a/src/dbus/doc/src/qtdbus-module.qdoc b/src/dbus/doc/src/qtdbus-module.qdoc
index ac9cac428b..cd9365aac8 100644
--- a/src/dbus/doc/src/qtdbus-module.qdoc
+++ b/src/dbus/doc/src/qtdbus-module.qdoc
@@ -29,7 +29,7 @@
\module QtDBus
\title Qt D-Bus C++ Classes
\brief The Qt D-Bus module is a Unix-only library that you can use
- to perform Inter-Process Communication using the \l{D-Bus} protocol.
+ to perform Inter-Process Communication using the \l{Qt D-Bus}{D-Bus} protocol.
\ingroup modules
\qtvariable dbus
@@ -61,6 +61,6 @@
directory. When installing Qt from source, this module is built when Qt's
tools are built.
- See the \l {D-Bus} page for detailed information on
+ See the \l {Qt D-Bus}{D-Bus} page for detailed information on
how to use this module.
*/
diff --git a/src/dbus/qdbus_symbols.cpp b/src/dbus/qdbus_symbols.cpp
index 8c642c8887..e475a23f48 100644
--- a/src/dbus/qdbus_symbols.cpp
+++ b/src/dbus/qdbus_symbols.cpp
@@ -84,14 +84,29 @@ bool qdbus_loadLibDBus()
triedToLoadLibrary = true;
static int majorversions[] = { 3, 2, -1 };
+ const QString baseNames[] = {
+#ifdef Q_OS_WIN
+ QStringLiteral("dbus-1"),
+#endif
+ QStringLiteral("libdbus-1")
+ };
+
lib->unload();
- lib->setFileName(QLatin1String("dbus-1"));
for (uint i = 0; i < sizeof(majorversions) / sizeof(majorversions[0]); ++i) {
- lib->setFileNameAndVersion(lib->fileName(), majorversions[i]);
- if (lib->load() && lib->resolve("dbus_connection_open_private"))
- return true;
+ for (uint j = 0; j < sizeof(baseNames) / sizeof(baseNames[0]); ++j) {
+#ifdef Q_OS_WIN
+ QString suffix;
+ if (majorversions[i] != -1)
+ suffix = QString::number(- majorversions[i]); // negative so it prepends the dash
+ lib->setFileName(baseNames[j] + suffix);
+#else
+ lib->setFileNameAndVersion(baseNames[j], majorversions[i]);
+#endif
+ if (lib->load() && lib->resolve("dbus_connection_open_private"))
+ return true;
- lib->unload();
+ lib->unload();
+ }
}
delete lib;
diff --git a/src/dbus/qdbusserver.cpp b/src/dbus/qdbusserver.cpp
index f2f4872aa0..54b38ee848 100644
--- a/src/dbus/qdbusserver.cpp
+++ b/src/dbus/qdbusserver.cpp
@@ -72,12 +72,18 @@ QDBusServer::QDBusServer(const QString &address, QObject *parent)
/*!
Constructs a QDBusServer with the given \a parent. The server will listen
- for connections in \c {/tmp}.
+ for connections in \c {/tmp} (on Unix systems) or on a TCP port bound to
+ localhost (elsewhere).
*/
QDBusServer::QDBusServer(QObject *parent)
: QObject(parent)
{
- const QString address = QLatin1String("unix:tmpdir=/tmp");
+#ifdef Q_OS_UNIX
+ // Use Unix sockets on Unix systems only
+ static const char address[] = "unix:tmpdir=/tmp";
+#else
+ static const char address[] = "tcp:";
+#endif
if (!qdbus_loadLibDBus()) {
d = 0;
@@ -89,7 +95,7 @@ QDBusServer::QDBusServer(QObject *parent)
this, SIGNAL(newConnection(QDBusConnection)));
QDBusErrorInternal error;
- d->setServer(q_dbus_server_listen(address.toUtf8().constData(), error), error);
+ d->setServer(q_dbus_server_listen(address, error), error);
}
/*!
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp
index 1cd5b869a6..38fa2df906 100644
--- a/src/gui/image/qimage.cpp
+++ b/src/gui/image/qimage.cpp
@@ -314,7 +314,7 @@ bool QImageData::checkForAlphaPixels() const
sharing}. QImage objects can also be streamed and compared.
\note If you would like to load QImage objects in a static build of Qt,
- refer to the \l{How To Create Qt Plugins#Static Plugins}{Plugin HowTo}.
+ refer to the \l{How To Create Qt Plugins}{Plugin HowTo}.
\warning Painting on a QImage with the format
QImage::Format_Indexed8 is not supported.
diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp
index 9eefa968ad..f845bf89c9 100644
--- a/src/gui/kernel/qevent.cpp
+++ b/src/gui/kernel/qevent.cpp
@@ -283,7 +283,6 @@ QMouseEvent::~QMouseEvent()
\sa Qt::MouseEventSource
\sa QGraphicsSceneMouseEvent::source()
- \sa QGraphicsSceneMouseEvent::setSource()
*/
Qt::MouseEventSource QMouseEvent::source() const
{
@@ -299,7 +298,6 @@ Qt::MouseEventSource QMouseEvent::source() const
\sa Qt::MouseEventFlag
\sa QGraphicsSceneMouseEvent::flags()
- \sa QGraphicsSceneMouseEvent::setFlags()
*/
Qt::MouseEventFlags QMouseEvent::flags() const
{
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index 8c77ff95f2..9ddb9e15ee 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -2159,6 +2159,9 @@ void QGuiApplicationPrivate::processTabletLeaveProximityEvent(QWindowSystemInter
#ifndef QT_NO_GESTURES
void QGuiApplicationPrivate::processGestureEvent(QWindowSystemInterfacePrivate::GestureEvent *e)
{
+ if (e->window.isNull())
+ return;
+
QNativeGestureEvent ev(e->type, e->pos, e->pos, e->globalPos, e->realValue, e->sequenceId, e->intValue);
ev.setTimestamp(e->timestamp);
QGuiApplication::sendSpontaneousEvent(e->window, &ev);
diff --git a/src/gui/kernel/qopenglcontext.cpp b/src/gui/kernel/qopenglcontext.cpp
index 895ea1b07b..1cd67b19d2 100644
--- a/src/gui/kernel/qopenglcontext.cpp
+++ b/src/gui/kernel/qopenglcontext.cpp
@@ -519,7 +519,7 @@ void QOpenGLContext::setScreen(QScreen *screen)
value type. These classes can be found in the QtPlatformHeaders module.
When create() is called with native handles set, the handles' ownership are
- not taken, meaning that destroy() will not destroy the native context.
+ not taken, meaning that \c destroy() will not destroy the native context.
\note Some frameworks track the current context and surfaces internally.
Making the adopted QOpenGLContext current via Qt will have no effect on such
@@ -583,9 +583,9 @@ QVariant QOpenGLContext::nativeHandle() const
be used with makeCurrent(), swapBuffers(), etc.
\note If the context is already created, this function will first call
- destroy(), and then create a new OpenGL context.
+ \c destroy(), and then create a new OpenGL context.
- \sa makeCurrent(), destroy(), format()
+ \sa makeCurrent(), format()
*/
bool QOpenGLContext::create()
{
@@ -614,7 +614,7 @@ bool QOpenGLContext::create()
destroying the underlying platform context frees any state associated with
the context.
- After destroy() has been called, you must call create() if you wish to
+ After \c destroy() has been called, you must call create() if you wish to
use the context again.
\note This implicitly calls doneCurrent() if the context is current.
@@ -659,10 +659,8 @@ void QOpenGLContext::destroy()
/*!
Destroys the QOpenGLContext object.
- This implicitly calls destroy(), so if this is the current context for the
+ This implicitly calls \c destroy(), so if this is the current context for the
thread, doneCurrent() is also called.
-
- \sa destroy()
*/
QOpenGLContext::~QOpenGLContext()
{
diff --git a/src/gui/kernel/qplatformsystemtrayicon.cpp b/src/gui/kernel/qplatformsystemtrayicon.cpp
index ae87805856..a8fe4e04fb 100644
--- a/src/gui/kernel/qplatformsystemtrayicon.cpp
+++ b/src/gui/kernel/qplatformsystemtrayicon.cpp
@@ -119,9 +119,9 @@ QPlatformSystemTrayIcon::~QPlatformSystemTrayIcon()
/*!
\fn void QPlatformSystemTrayIcon::showMessage(const QString &title, const QString &msg,
- const QIcon &icon, MessageIcon iconType, int secs)
+ const QIcon &icon, MessageIcon iconType, int msecs)
Shows a balloon message for the entry with the given \a title, message \a msg and \a icon for
- the time specified in \a secs. \a iconType is used as a hint for the implementing platform.
+ the time specified in \a msecs. \a iconType is used as a hint for the implementing platform.
\sa QSystemTrayIcon::showMessage()
*/
diff --git a/src/gui/kernel/qplatformsystemtrayicon.h b/src/gui/kernel/qplatformsystemtrayicon.h
index 9bbaf5e9ca..d77bfa9f8f 100644
--- a/src/gui/kernel/qplatformsystemtrayicon.h
+++ b/src/gui/kernel/qplatformsystemtrayicon.h
@@ -70,7 +70,7 @@ public:
virtual void updateMenu(QPlatformMenu *menu) = 0;
virtual QRect geometry() const = 0;
virtual void showMessage(const QString &title, const QString &msg,
- const QIcon &icon, MessageIcon iconType, int secs) = 0;
+ const QIcon &icon, MessageIcon iconType, int msecs) = 0;
virtual bool isSystemTrayAvailable() const = 0;
virtual bool supportsMessages() const = 0;
diff --git a/src/gui/kernel/qstylehints.cpp b/src/gui/kernel/qstylehints.cpp
index 65a710c3f7..125e59aa5f 100644
--- a/src/gui/kernel/qstylehints.cpp
+++ b/src/gui/kernel/qstylehints.cpp
@@ -88,7 +88,7 @@ public:
Access to these parameters are useful when implementing custom user interface components, in that
they allow the components to exhibit the same behaviour and feel as other components.
- \sa QGuiApplication::styleHints(), QPlatformTheme
+ \sa QGuiApplication::styleHints()
*/
QStyleHints::QStyleHints()
: QObject(*new QStyleHintsPrivate(), 0)
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp
index dd4bb57690..ced39bbe10 100644
--- a/src/gui/kernel/qwindow.cpp
+++ b/src/gui/kernel/qwindow.cpp
@@ -2444,7 +2444,8 @@ void QWindowPrivate::setCursor(const QCursor *newCursor)
hasCursor = false;
}
// Only attempt to set cursor and emit signal if there is an actual platform cursor
- if (q->screen()->handle()->cursor()) {
+ QScreen* screen = q->screen();
+ if (screen && screen->handle()->cursor()) {
applyCursor();
QEvent event(QEvent::CursorChange);
QGuiApplication::sendEvent(q, &event);
diff --git a/src/gui/painting/qpdf.cpp b/src/gui/painting/qpdf.cpp
index 8cf45863b8..2efaec41ef 100644
--- a/src/gui/painting/qpdf.cpp
+++ b/src/gui/painting/qpdf.cpp
@@ -2083,10 +2083,8 @@ int QPdfEnginePrivate::writeImage(const QByteArray &data, int width, int height,
}
if (maskObject > 0)
xprintf("/Mask %d 0 R\n", maskObject);
- if (softMaskObject > 0) {
+ if (softMaskObject > 0)
xprintf("/SMask %d 0 R\n", softMaskObject);
- xprintf("/Decode [1 0 1 0 1 0]\n");
- }
int lenobj = requestObject();
xprintf("/Length %d 0 R\n", lenobj);
diff --git a/src/gui/text/qfontengine_ft.cpp b/src/gui/text/qfontengine_ft.cpp
index 3549f57d3d..e0c1b46a90 100644
--- a/src/gui/text/qfontengine_ft.cpp
+++ b/src/gui/text/qfontengine_ft.cpp
@@ -1377,36 +1377,6 @@ QFontEngineFT::QGlyphSet *QFontEngineFT::loadTransformedGlyphSet(const QTransfor
return gs;
}
-bool QFontEngineFT::loadGlyphs(QGlyphSet *gs, const glyph_t *glyphs, int num_glyphs,
- const QFixedPoint *positions,
- GlyphFormat format)
-{
- FT_Face face = 0;
-
- for (int i = 0; i < num_glyphs; ++i) {
- QFixed spp = subPixelPositionForX(positions[i].x);
- Glyph *glyph = gs ? gs->getGlyph(glyphs[i], spp) : 0;
- if (glyph == 0 || glyph->format != format) {
- if (!face) {
- face = lockFace();
- FT_Matrix m = matrix;
- FT_Matrix_Multiply(&gs->transformationMatrix, &m);
- FT_Set_Transform(face, &m, 0);
- freetype->matrix = m;
- }
- if (!loadGlyph(gs, glyphs[i], spp, format)) {
- unlockFace();
- return false;
- }
- }
- }
-
- if (face)
- unlockFace();
-
- return true;
-}
-
void QFontEngineFT::getUnscaledGlyph(glyph_t glyph, QPainterPath *path, glyph_metrics_t *metrics)
{
FT_Face face = lockFace(Unscaled);
diff --git a/src/gui/text/qfontengine_ft_p.h b/src/gui/text/qfontengine_ft_p.h
index 02c692cccc..e33f0fc0f5 100644
--- a/src/gui/text/qfontengine_ft_p.h
+++ b/src/gui/text/qfontengine_ft_p.h
@@ -269,9 +269,6 @@ private:
Glyph *loadGlyphFor(glyph_t g, QFixed subPixelPosition, GlyphFormat format, const QTransform &t);
QGlyphSet *loadTransformedGlyphSet(const QTransform &matrix);
- bool loadGlyphs(QGlyphSet *gs, const glyph_t *glyphs, int num_glyphs,
- const QFixedPoint *positions,
- GlyphFormat format = Format_Render);
QFontEngineFT(const QFontDef &fd);
virtual ~QFontEngineFT();
diff --git a/src/gui/text/qrawfont_p.h b/src/gui/text/qrawfont_p.h
index 9b0846de9a..96ba3fd026 100644
--- a/src/gui/text/qrawfont_p.h
+++ b/src/gui/text/qrawfont_p.h
@@ -70,14 +70,18 @@ public:
, hintingPreference(other.hintingPreference)
, thread(other.thread)
{
+#ifndef QT_NO_DEBUG
Q_ASSERT(fontEngine == 0 || thread == QThread::currentThread());
+#endif
if (fontEngine != 0)
fontEngine->ref.ref();
}
~QRawFontPrivate()
{
+#ifndef QT_NO_DEBUG
Q_ASSERT(ref.load() == 0);
+#endif
cleanUp();
}
@@ -89,27 +93,36 @@ public:
inline bool isValid() const
{
+#ifndef QT_NO_DEBUG
Q_ASSERT(fontEngine == 0 || thread == QThread::currentThread());
+#endif
return fontEngine != 0;
}
inline void setFontEngine(QFontEngine *engine)
{
+#ifndef QT_NO_DEBUG
Q_ASSERT(fontEngine == 0 || thread == QThread::currentThread());
+#endif
if (fontEngine == engine)
return;
if (fontEngine != 0) {
if (!fontEngine->ref.deref())
delete fontEngine;
+#ifndef QT_NO_DEBUG
thread = 0;
+#endif
}
fontEngine = engine;
if (fontEngine != 0) {
fontEngine->ref.ref();
- Q_ASSERT(thread = QThread::currentThread()); // set only if assertions enabled
+#ifndef QT_NO_DEBUG
+ thread = QThread::currentThread();
+ Q_ASSERT(thread);
+#endif
}
}
diff --git a/src/network/access/qnetworkreplyhttpimpl.cpp b/src/network/access/qnetworkreplyhttpimpl.cpp
index 968342c7bd..48270b1f91 100644
--- a/src/network/access/qnetworkreplyhttpimpl.cpp
+++ b/src/network/access/qnetworkreplyhttpimpl.cpp
@@ -1402,6 +1402,9 @@ QNetworkCacheMetaData QNetworkReplyHttpImplPrivate::fetchCacheMetaData(const QNe
if (hop_by_hop)
continue;
+ if (header == "set-cookie")
+ continue;
+
// for 4.6.0, we were planning to not store the date header in the
// cached resource; through that we planned to reduce the number
// of writes to disk when using a QNetworkDiskCache (i.e. don't
diff --git a/src/network/kernel/qhostaddress.cpp b/src/network/kernel/qhostaddress.cpp
index cf24438f0c..10fdf2f97d 100644
--- a/src/network/kernel/qhostaddress.cpp
+++ b/src/network/kernel/qhostaddress.cpp
@@ -1024,7 +1024,10 @@ bool QHostAddress::isLoopback() const
#ifndef QT_NO_DEBUG_STREAM
QDebug operator<<(QDebug d, const QHostAddress &address)
{
- d.maybeSpace() << "QHostAddress(" << address.toString() << ')';
+ if (address == QHostAddress::Any)
+ d.maybeSpace() << "QHostAddress(QHostAddress::Any)";
+ else
+ d.maybeSpace() << "QHostAddress(" << address.toString() << ')';
return d.space();
}
#endif
diff --git a/src/network/socket/qhttpsocketengine.cpp b/src/network/socket/qhttpsocketengine.cpp
index b754e98b19..b929ee088e 100644
--- a/src/network/socket/qhttpsocketengine.cpp
+++ b/src/network/socket/qhttpsocketengine.cpp
@@ -116,7 +116,7 @@ void QHttpSocketEngine::setProxy(const QNetworkProxy &proxy)
qintptr QHttpSocketEngine::socketDescriptor() const
{
Q_D(const QHttpSocketEngine);
- return d->socket ? d->socket->socketDescriptor() : 0;
+ return d->socket ? d->socket->socketDescriptor() : -1;
}
bool QHttpSocketEngine::isValid() const
diff --git a/src/network/socket/qnativesocketengine.cpp b/src/network/socket/qnativesocketengine.cpp
index c19815034d..e7113c8c5e 100644
--- a/src/network/socket/qnativesocketengine.cpp
+++ b/src/network/socket/qnativesocketengine.cpp
@@ -641,8 +641,8 @@ bool QNativeSocketEngine::joinMulticastGroup(const QHostAddress &groupAddress,
if (groupAddress.protocol() == QAbstractSocket::IPv4Protocol &&
(d->socketProtocol == QAbstractSocket::IPv6Protocol ||
d->socketProtocol == QAbstractSocket::AnyIPProtocol)) {
- qWarning("QAbstractSocket: cannot bind to QHostAddress::Any (or an IPv6 address) and join an IPv4 multicast group");
- qWarning("QAbstractSocket: bind to QHostAddress::AnyIPv4 instead if you want to do this");
+ qWarning("QAbstractSocket: cannot bind to QHostAddress::Any (or an IPv6 address) and join an IPv4 multicast group;"
+ " bind to QHostAddress::AnyIPv4 instead if you want to do this");
return false;
}
diff --git a/src/network/ssl/qsslcertificate_qt.cpp b/src/network/ssl/qsslcertificate_qt.cpp
index cf99e77314..c560c5af87 100644
--- a/src/network/ssl/qsslcertificate_qt.cpp
+++ b/src/network/ssl/qsslcertificate_qt.cpp
@@ -39,10 +39,10 @@
**
****************************************************************************/
-
-#include "qssl_p.h"
#include "qsslcertificate.h"
#include "qsslcertificate_p.h"
+
+#include "qssl_p.h"
#include "qsslkey.h"
#include "qsslkey_p.h"
#include "qsslcertificateextension.h"
diff --git a/src/opengl/doc/src/qtopengl-index.qdoc b/src/opengl/doc/src/qtopengl-index.qdoc
index ff946c6e4e..3ba5b396ab 100644
--- a/src/opengl/doc/src/qtopengl-index.qdoc
+++ b/src/opengl/doc/src/qtopengl-index.qdoc
@@ -31,9 +31,8 @@
\brief The Qt OpenGL module offers classes that make it easy to
use OpenGL in Qt applications.
- \warning Apart from the \l{QGLWidget} class, this module should not be used
- anymore for new code. Please use the corresponding OpenGL classes in
- \l{Qt Gui}.
+ \warning This module should not be used anymore for new code. Please
+ use the corresponding OpenGL classes in \l{Qt Gui}.
OpenGL is a standard API for rendering 3D graphics. OpenGL only
deals with 3D rendering and provides little or no support for GUI
diff --git a/src/opengl/doc/src/qtopengl-module.qdoc b/src/opengl/doc/src/qtopengl-module.qdoc
index 8619f04a97..aec68e44c0 100644
--- a/src/opengl/doc/src/qtopengl-module.qdoc
+++ b/src/opengl/doc/src/qtopengl-module.qdoc
@@ -34,9 +34,8 @@
\brief The Qt OpenGL module offers classes that make it easy to
use OpenGL in Qt applications.
- \warning Apart from the \l{QGLWidget} class, this module should not be used
- anymore for new code. Please use the corresponding OpenGL classes in
- \l{Qt Gui}.
+ \warning This module should not be used anymore for new code. Please
+ use the corresponding OpenGL classes in \l{Qt Gui}.
OpenGL is a standard API for rendering 3D graphics. OpenGL only
deals with 3D rendering and provides little or no support for GUI
diff --git a/src/plugins/platforms/cocoa/qcocoamenu.mm b/src/plugins/platforms/cocoa/qcocoamenu.mm
index d849389907..736e02a3ca 100644
--- a/src/plugins/platforms/cocoa/qcocoamenu.mm
+++ b/src/plugins/platforms/cocoa/qcocoamenu.mm
@@ -366,14 +366,9 @@ void QCocoaMenu::syncMenuItem(QPlatformMenuItem *menuItem)
}
bool wasMerged = cocoaItem->isMerged();
- NSMenu *oldMenu = m_nativeMenu;
- if (wasMerged) {
- QPlatformMenuItem::MenuRole role = cocoaItem->effectiveRole();
- if (role >= QPlatformMenuItem::ApplicationSpecificRole && role < QPlatformMenuItem::CutRole)
- oldMenu = [getMenuLoader() applicationMenu];
- }
-
+ NSMenu *oldMenu = wasMerged ? [getMenuLoader() applicationMenu] : m_nativeMenu;
NSMenuItem *oldItem = [oldMenu itemWithTag:(NSInteger) cocoaItem];
+
if (cocoaItem->sync() != oldItem) {
// native item was changed for some reason
if (oldItem) {
diff --git a/src/plugins/platforms/cocoa/qcocoamenuitem.mm b/src/plugins/platforms/cocoa/qcocoamenuitem.mm
index 251fe9485c..470788b6bf 100644
--- a/src/plugins/platforms/cocoa/qcocoamenuitem.mm
+++ b/src/plugins/platforms/cocoa/qcocoamenuitem.mm
@@ -256,8 +256,8 @@ NSMenuItem *QCocoaMenuItem::sync()
if (depth == 3 || !menubar)
break; // Menu item too deep in the hierarchy, or not connected to any menubar
- MenuRole newDetectedRole = detectMenuRole(m_text);
- switch (newDetectedRole) {
+ m_detectedRole = detectMenuRole(m_text);
+ switch (m_detectedRole) {
case QPlatformMenuItem::AboutRole:
if (m_text.indexOf(QRegExp(QString::fromLatin1("qt$"), Qt::CaseInsensitive)) == -1)
mergeItem = [loader aboutMenuItem];
@@ -271,15 +271,12 @@ NSMenuItem *QCocoaMenuItem::sync()
mergeItem = [loader quitMenuItem];
break;
default:
- if (newDetectedRole >= CutRole && newDetectedRole < RoleCount && menubar)
- mergeItem = menubar->itemForRole(newDetectedRole);
+ if (m_detectedRole >= CutRole && m_detectedRole < RoleCount && menubar)
+ mergeItem = menubar->itemForRole(m_detectedRole);
if (!m_text.isEmpty())
m_textSynced = true;
break;
}
-
- m_detectedRole = newDetectedRole;
-
break;
}
diff --git a/src/plugins/platforms/qnx/qqnxscreen.cpp b/src/plugins/platforms/qnx/qqnxscreen.cpp
index 04a6611cc4..d4407842f5 100644
--- a/src/plugins/platforms/qnx/qqnxscreen.cpp
+++ b/src/plugins/platforms/qnx/qqnxscreen.cpp
@@ -329,7 +329,8 @@ qreal QQnxScreen::refreshRate() const
{
screen_display_mode_t displayMode;
int result = screen_get_display_property_pv(m_display, SCREEN_PROPERTY_MODE, reinterpret_cast<void **>(&displayMode));
- if (result != 0) {
+ // Screen shouldn't really return 0 but it does so default to 60 or things break.
+ if (result != 0 || displayMode.refresh == 0) {
qWarning("QQnxScreen: Failed to query screen mode. Using default value of 60Hz");
return 60.0;
}
diff --git a/src/plugins/platforms/xcb/qxcbkeyboard.cpp b/src/plugins/platforms/xcb/qxcbkeyboard.cpp
index 260fb46309..5fb745717b 100644
--- a/src/plugins/platforms/xcb/qxcbkeyboard.cpp
+++ b/src/plugins/platforms/xcb/qxcbkeyboard.cpp
@@ -957,7 +957,8 @@ QList<int> QXcbKeyboard::possibleKeys(const QKeyEvent *event) const
QList<int> result;
int baseQtKey = keysymToQtKey(sym, modifiers, lookupString(kb_state, keycode));
- result += (baseQtKey + modifiers); // The base key is _always_ valid, of course
+ if (baseQtKey)
+ result += (baseQtKey + modifiers);
xkb_mod_index_t shiftMod = xkb_keymap_mod_get_index(xkb_keymap, "Shift");
xkb_mod_index_t altMod = xkb_keymap_mod_get_index(xkb_keymap, "Alt");
diff --git a/src/plugins/platforms/xcb/xcb-plugin.pro b/src/plugins/platforms/xcb/xcb-plugin.pro
index 8dfe08d413..09ab1ad77a 100644
--- a/src/plugins/platforms/xcb/xcb-plugin.pro
+++ b/src/plugins/platforms/xcb/xcb-plugin.pro
@@ -9,6 +9,5 @@ QT += core-private gui-private platformsupport-private xcb_qpa_lib-private
SOURCES = \
qxcbmain.cpp
-
OTHER_FILES += xcb.json README
diff --git a/src/plugins/printsupport/windows/qwindowsprintdevice.cpp b/src/plugins/printsupport/windows/qwindowsprintdevice.cpp
index a0a549da6f..c349655b1e 100644
--- a/src/plugins/printsupport/windows/qwindowsprintdevice.cpp
+++ b/src/plugins/printsupport/windows/qwindowsprintdevice.cpp
@@ -39,6 +39,10 @@
# define DC_COLLATE 22
#endif
+#if defined (Q_CC_MINGW)
+# pragma GCC diagnostic ignored "-Wsign-compare"
+#endif
+
QT_BEGIN_NAMESPACE
#ifndef QT_NO_PRINTER
diff --git a/src/sql/doc/src/sql-driver.qdoc b/src/sql/doc/src/sql-driver.qdoc
index 71d2fb4f85..e2ffdaea2c 100644
--- a/src/sql/doc/src/sql-driver.qdoc
+++ b/src/sql/doc/src/sql-driver.qdoc
@@ -713,9 +713,8 @@
\snippet code/doc_src_sql-driver.cpp 31
- the problem is usually that the plugin had the wrong \l{Deploying
- Plugins#The Build Key}{build key}. This might require removing an
- entry from the \l{Deploying Plugins#The Plugin Cache} {plugin cache}.
+ the problem is usually that the plugin had the wrong build key.
+ This might require removing an entry from the plugin cache.
\target development
\section1 How to Write Your Own Database Driver
diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp
index 61b0a13259..71c3ccff38 100644
--- a/src/testlib/qtestcase.cpp
+++ b/src/testlib/qtestcase.cpp
@@ -2719,6 +2719,13 @@ QString QTest::qFindTestData(const QString& base, const char *file, int line, co
found = candidate;
}
+ // 5. Try current directory
+ if (found.isEmpty()) {
+ QString candidate = QString::fromLatin1("%1/%2").arg(QDir::currentPath()).arg(base);
+ if (QFileInfo(candidate).exists())
+ found = candidate;
+ }
+
if (found.isEmpty()) {
QTest::qWarn(qPrintable(
QString::fromLatin1("testdata %1 could not be located!").arg(base)),
diff --git a/src/tools/qdoc/cppcodemarker.cpp b/src/tools/qdoc/cppcodemarker.cpp
index 92b6ccca6a..3851ede16c 100644
--- a/src/tools/qdoc/cppcodemarker.cpp
+++ b/src/tools/qdoc/cppcodemarker.cpp
@@ -136,7 +136,7 @@ QString CppCodeMarker::markedUpSynopsis(const Node *node,
if ((style == Detailed) && !node->parent()->name().isEmpty() &&
(node->type() != Node::Property) && !node->isQmlNode())
- name.prepend(taggedNode(node->parent()) + "::&#8203;");
+ name.prepend(taggedNode(node->parent()) + "::");
switch (node->type()) {
case Node::Namespace:
diff --git a/src/tools/qdoc/htmlgenerator.cpp b/src/tools/qdoc/htmlgenerator.cpp
index bc79d5ce7f..bb1f9cd651 100644
--- a/src/tools/qdoc/htmlgenerator.cpp
+++ b/src/tools/qdoc/htmlgenerator.cpp
@@ -1420,11 +1420,10 @@ void HtmlGenerator::generateClassLikeNode(InnerNode* inner, CodeMarker* marker)
}
if (!s->reimpMembers.isEmpty()) {
QString name = QString("Reimplemented ") + (*s).name;
+ QString ref = registerRef(name.toLower());
// out() << "<hr />\n";
- out() << "<a name=\""
- << registerRef(name.toLower())
- << "\"></a>" << divNavTop << "\n";
- out() << "<h2>" << protectEnc(name) << "</h2>\n";
+ out() << "<a name=\"" << ref << "\"></a>" << divNavTop << "\n";
+ out() << "<h2 id=\"" << ref << "\">" << protectEnc(name) << "</h2>\n";
generateSection(s->reimpMembers, inner, marker, CodeMarker::Summary);
}
@@ -2419,7 +2418,7 @@ void HtmlGenerator::generateTableOfContents(const Node *node,
else if (sections && (node->isClass() || node->isNamespace() || node->isQmlType())) {
QList<Section>::ConstIterator s = sections->constBegin();
while (s != sections->constEnd()) {
- if (!s->members.isEmpty() || !s->reimpMembers.isEmpty()) {
+ if (!s->members.isEmpty()) {
out() << "<li class=\"level"
<< sectionNumber.size()
<< "\"><a href=\"#"
@@ -2427,6 +2426,15 @@ void HtmlGenerator::generateTableOfContents(const Node *node,
<< "\">" << (*s).name
<< "</a></li>\n";
}
+ if (!s->reimpMembers.isEmpty()) {
+ QString ref = QString("Reimplemented ") + (*s).pluralMember;
+ out() << "<li class=\"level"
+ << sectionNumber.size()
+ << "\"><a href=\"#"
+ << registerRef(ref.toLower())
+ << "\">" << QString("Reimplemented ") + (*s).name
+ << "</a></li>\n";
+ }
++s;
}
out() << "<li class=\"level"
diff --git a/src/widgets/dialogs/qcolordialog.cpp b/src/widgets/dialogs/qcolordialog.cpp
index 14853f3895..40ef6505cf 100644
--- a/src/widgets/dialogs/qcolordialog.cpp
+++ b/src/widgets/dialogs/qcolordialog.cpp
@@ -972,6 +972,7 @@ private:
QColorShowLabel *lab;
bool rgbOriginal;
QColorDialog *colorDialog;
+ QGridLayout *gl;
friend class QColorDialog;
friend class QColorDialogPrivate;
@@ -1099,7 +1100,7 @@ QColorShower::QColorShower(QColorDialog *parent)
curCol = qRgb(255, 255, 255);
curQColor = Qt::white;
- QGridLayout *gl = new QGridLayout(this);
+ gl = new QGridLayout(this);
gl->setMargin(gl->spacing());
lab = new QColorShowLabel(this);
@@ -1277,10 +1278,16 @@ QColorShower::QColorShower(QColorDialog *parent)
#else
htEd->setReadOnly(true);
#endif
+ htEd->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Fixed);
lblHtml->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
+#if defined(QT_SMALL_COLORDIALOG)
+ gl->addWidget(lblHtml, 5, 0);
+ gl->addWidget(htEd, 5, 1, 1, /*colspan=*/ 2);
+#else
gl->addWidget(lblHtml, 5, 1);
- gl->addWidget(htEd, 5, 2);
+ gl->addWidget(htEd, 5, 2, 1, /*colspan=*/ 3);
+#endif
connect(hEd, SIGNAL(valueChanged(int)), this, SLOT(hsvEd()));
connect(sEd, SIGNAL(valueChanged(int)), this, SLOT(hsvEd()));
@@ -1742,7 +1749,9 @@ void QColorDialogPrivate::initWidgets()
lp->hide();
#else
lp->setFixedWidth(20);
+ pickLay->addSpacing(10);
pickLay->addWidget(lp);
+ pickLay->addStretch();
#endif
QObject::connect(cp, SIGNAL(newCol(int,int)), lp, SLOT(setCol(int,int)));
@@ -1751,6 +1760,7 @@ void QColorDialogPrivate::initWidgets()
rightLay->addStretch();
cs = new QColorShower(q);
+ pickLay->setMargin(cs->gl->margin());
QObject::connect(cs, SIGNAL(newCol(QRgb)), q, SLOT(_q_newColorTypedIn(QRgb)));
QObject::connect(cs, SIGNAL(currentColorChanged(QColor)),
q, SIGNAL(currentColorChanged(QColor)));
@@ -1760,6 +1770,7 @@ void QColorDialogPrivate::initWidgets()
topLay->addWidget(cs);
#else
rightLay->addWidget(cs);
+ leftLay->addSpacing(cs->gl->margin());
#endif
buttons = new QDialogButtonBox(q);
diff --git a/src/widgets/styles/qstyle.cpp b/src/widgets/styles/qstyle.cpp
index 5999ba5431..8df68d25a5 100644
--- a/src/widgets/styles/qstyle.cpp
+++ b/src/widgets/styles/qstyle.cpp
@@ -627,7 +627,7 @@ void QStyle::drawItemPixmap(QPainter *painter, const QRect &rect, int alignment,
indicator or button bevel.
\omitvalue PE_IndicatorViewItemCheck
- \value PE_FrameStatusBar Frame
+ \value PE_FrameStatusBar Obsolete. Use PE_FrameStatusBarItem instead.
\value PE_PanelButtonCommand Button used to initiate an action, for
example, a QPushButton.
diff --git a/src/widgets/widgets/qprogressbar.cpp b/src/widgets/widgets/qprogressbar.cpp
index 751fcda871..1c76bd0ac1 100644
--- a/src/widgets/widgets/qprogressbar.cpp
+++ b/src/widgets/widgets/qprogressbar.cpp
@@ -525,7 +525,7 @@ Qt::Orientation QProgressBar::orientation() const
\property QProgressBar::invertedAppearance
\brief whether or not a progress bar shows its progress inverted
- If this property is \c false, the progress bar grows in the other
+ If this property is \c true, the progress bar grows in the other
direction (e.g. from right to left). By default, the progress bar
is not inverted.
diff --git a/src/widgets/widgets/qscrollbar.cpp b/src/widgets/widgets/qscrollbar.cpp
index 5851020379..c2d2117e20 100644
--- a/src/widgets/widgets/qscrollbar.cpp
+++ b/src/widgets/widgets/qscrollbar.cpp
@@ -593,13 +593,14 @@ void QScrollBar::mousePressEvent(QMouseEvent *e)
d->clickOffset = sliderLength / 2;
}
const int initialDelay = 500; // default threshold
- d->activateControl(d->pressedControl, initialDelay);
QElapsedTimer time;
time.start();
+ d->activateControl(d->pressedControl, initialDelay);
repaint(style()->subControlRect(QStyle::CC_ScrollBar, &opt, d->pressedControl, this));
if (time.elapsed() >= initialDelay && d->repeatActionTimer.isActive()) {
- // It took more than 500ms (the initial timer delay) to process the repaint(), we
- // therefore need to restart the timer in case we have a pending mouse release event;
+ // It took more than 500ms (the initial timer delay) to process
+ // the control activation and repaint(), we therefore need
+ // to restart the timer in case we have a pending mouse release event;
// otherwise we'll get a timer event right before the release event,
// causing the repeat action to be invoked twice on a single mouse click.
// 50ms is the default repeat time (see activateControl/setRepeatAction).
diff --git a/src/widgets/widgets/qwidgetlinecontrol.cpp b/src/widgets/widgets/qwidgetlinecontrol.cpp
index e6385ba390..7033eeea22 100644
--- a/src/widgets/widgets/qwidgetlinecontrol.cpp
+++ b/src/widgets/widgets/qwidgetlinecontrol.cpp
@@ -279,6 +279,23 @@ void QWidgetLineControl::clear()
separate();
finishChange(priorState, /*update*/false, /*edited*/false);
}
+/*!
+ \internal
+
+ Undoes the previous operation.
+*/
+
+void QWidgetLineControl::undo()
+{
+ // Undo works only for clearing the line when in any of password the modes
+ if (m_echoMode == QLineEdit::Normal) {
+ internalUndo();
+ finishChange(-1, true);
+ } else {
+ cancelPasswordEchoTimer();
+ clear();
+ }
+}
/*!
\internal
@@ -1278,12 +1295,6 @@ void QWidgetLineControl::internalUndo(int until)
cancelPasswordEchoTimer();
internalDeselect();
- // Undo works only for clearing the line when in any of password the modes
- if (m_echoMode != QLineEdit::Normal) {
- clear();
- return;
- }
-
while (m_undoState && m_undoState > until) {
Command& cmd = m_history[--m_undoState];
switch (cmd.type) {
diff --git a/src/widgets/widgets/qwidgetlinecontrol_p.h b/src/widgets/widgets/qwidgetlinecontrol_p.h
index 78edefe0f3..1baceb9cc2 100644
--- a/src/widgets/widgets/qwidgetlinecontrol_p.h
+++ b/src/widgets/widgets/qwidgetlinecontrol_p.h
@@ -245,7 +245,7 @@ public:
void insert(const QString &);
void clear();
- void undo() { internalUndo(); finishChange(-1, true); }
+ void undo();
void redo() { internalRedo(); finishChange(); }
void selectWordAtPos(int);