summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/concurrent/qtconcurrentrun.h2
-rw-r--r--src/corelib/corelib.pro2
-rw-r--r--src/corelib/doc/src/objectmodel/properties.qdoc2
-rw-r--r--src/corelib/global/qcompilerdetection.h37
-rw-r--r--src/corelib/global/qglobal.cpp4
-rw-r--r--src/corelib/global/qnamespace.qdoc2
-rw-r--r--src/corelib/io/qdir.cpp4
-rw-r--r--src/corelib/io/qfile.cpp15
-rw-r--r--src/corelib/io/qfilesystemengine_p.h1
-rw-r--r--src/corelib/io/qfilesystemengine_unix.cpp27
-rw-r--r--src/corelib/io/qfilesystemengine_win.cpp75
-rw-r--r--src/corelib/kernel/qmetatype.cpp36
-rw-r--r--src/corelib/kernel/qsharedmemory_unix.cpp6
-rw-r--r--src/corelib/kernel/qsystemsemaphore_unix.cpp4
-rw-r--r--src/corelib/tools/qlocale_p.h5
-rw-r--r--src/corelib/tools/qlocale_unix.cpp27
-rw-r--r--src/gui/kernel/qopenglcontext.cpp25
-rw-r--r--src/gui/opengl/qopenglpaintengine.cpp2
-rw-r--r--src/gui/painting/qtextureglyphcache.cpp2
-rw-r--r--src/gui/text/qfontengineglyphcache_p.h3
-rw-r--r--src/network/socket/qnativesocketengine_win.cpp22
-rw-r--r--src/network/ssl/qsslcertificate.h4
-rw-r--r--src/network/ssl/qsslsocket.cpp2
-rw-r--r--src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm13
-rw-r--r--src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h15
-rw-r--r--src/plugins/accessible/widgets/itemviews.cpp2
-rw-r--r--src/plugins/platforms/cocoa/qcocoaaccessibility.mm3
-rw-r--r--src/plugins/platforms/cocoa/qcocoaaccessibilityelement.h2
-rw-r--r--src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm12
-rw-r--r--src/plugins/platforms/cocoa/qnsviewaccessibility.mm7
-rw-r--r--src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp2
-rw-r--r--src/plugins/platforms/qnx/qqnxwindow.cpp10
-rw-r--r--src/plugins/platforms/windows/qwindowsbackingstore.cpp16
-rw-r--r--src/plugins/platforms/windows/qwindowswindow.cpp17
-rw-r--r--src/plugins/platforms/windows/qwindowswindow.h1
-rw-r--r--src/plugins/platforms/xcb/qxcbbackingstore.cpp4
-rw-r--r--src/plugins/platforms/xcb/qxcbwindow.cpp5
-rw-r--r--src/sql/drivers/db2/qsql_db2.h6
-rw-r--r--src/sql/drivers/ibase/qsql_ibase.h6
-rw-r--r--src/sql/drivers/mysql/qsql_mysql.h5
-rw-r--r--src/sql/drivers/oci/qsql_oci.h5
-rw-r--r--src/sql/drivers/odbc/qsql_odbc.h5
-rw-r--r--src/sql/drivers/psql/qsql_psql.h5
-rw-r--r--src/sql/drivers/sqlite/qsql_sqlite.h6
-rw-r--r--src/sql/drivers/sqlite2/qsql_sqlite2.h5
-rw-r--r--src/sql/drivers/tds/qsql_tds.h5
-rw-r--r--src/tools/qdoc/doc/qdoc-manual.qdoc138
-rw-r--r--src/tools/qdoc/main.cpp4
-rw-r--r--src/tools/qdoc/qdocindexfiles.cpp5
-rw-r--r--src/widgets/dialogs/qdialog.cpp9
-rw-r--r--src/widgets/doc/src/widgets-and-layouts/gallery-fusion.qdoc2
-rw-r--r--src/widgets/doc/src/widgets-and-layouts/gallery-gtk.qdoc2
-rw-r--r--src/widgets/doc/src/widgets-and-layouts/gallery-macintosh.qdoc2
-rw-r--r--src/widgets/doc/src/widgets-and-layouts/gallery-windows.qdoc2
-rw-r--r--src/widgets/doc/src/widgets-and-layouts/gallery-windowsvista.qdoc2
-rw-r--r--src/widgets/doc/src/widgets-and-layouts/gallery-windowsxp.qdoc2
-rw-r--r--src/widgets/doc/src/widgets-and-layouts/stylesheet.qdoc2
-rw-r--r--src/widgets/kernel/qapplication.cpp11
-rw-r--r--src/widgets/kernel/qwidget.cpp11
-rw-r--r--src/widgets/kernel/qwidgetwindow.cpp2
-rw-r--r--src/widgets/styles/qcommonstyle.cpp2
-rw-r--r--src/widgets/styles/qgtkstyle.cpp2
-rw-r--r--src/widgets/styles/qgtkstyle_p.cpp12
-rw-r--r--src/widgets/styles/qmacstyle_mac.mm7
-rw-r--r--src/widgets/styles/qstyleanimation.cpp1
-rw-r--r--src/widgets/styles/qwindowsvistastyle.cpp24
-rw-r--r--src/widgets/widgets/qmenu.cpp2
67 files changed, 528 insertions, 182 deletions
diff --git a/src/concurrent/qtconcurrentrun.h b/src/concurrent/qtconcurrentrun.h
index 0c173d267c..3ac09fc98f 100644
--- a/src/concurrent/qtconcurrentrun.h
+++ b/src/concurrent/qtconcurrentrun.h
@@ -98,7 +98,7 @@ QFuture<T> run(T (*functionPointer)(Param1, Param2, Param3, Param4, Param5), con
return (new StoredFunctorCall5<T, T (*)(Param1, Param2, Param3, Param4, Param5), Arg1, Arg2, Arg3, Arg4, Arg5>(functionPointer, arg1, arg2, arg3, arg4, arg5))->start();
}
-#ifdef Q_COMPILER_DECLTYPE
+#if defined(Q_COMPILER_DECLTYPE) && defined(Q_COMPILER_AUTO_FUNCTION)
template <typename Functor>
auto run(Functor functor) -> typename QtPrivate::QEnableIf<!QtPrivate::HasResultType<Functor>::Value, QFuture<decltype(functor())> >::Type
diff --git a/src/corelib/corelib.pro b/src/corelib/corelib.pro
index f95ee545c0..bf2fd3c84a 100644
--- a/src/corelib/corelib.pro
+++ b/src/corelib/corelib.pro
@@ -50,7 +50,7 @@ QMAKE_DYNAMIC_LIST_FILE = $$PWD/QtCore.dynlist
contains(DEFINES,QT_EVAL):include(eval.pri)
-HOST_BINS = $$[QT_HOST_BINS]
+HOST_BINS = $$[QT_HOST_BINS/raw]
host_bins.name = host_bins
host_bins.variable = HOST_BINS
diff --git a/src/corelib/doc/src/objectmodel/properties.qdoc b/src/corelib/doc/src/objectmodel/properties.qdoc
index d818d1154c..1e88a67a90 100644
--- a/src/corelib/doc/src/objectmodel/properties.qdoc
+++ b/src/corelib/doc/src/objectmodel/properties.qdoc
@@ -83,7 +83,7 @@
existing signal in that class that is emitted whenever the value
of the property changes.
- \li A \c REVISION number is optional. If included, it defines the
+ \li A \c REVISION number is optional. If included, it defines
the property and its notifier signal to be used in a particular
revision of the API that is exposed to QML.
diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h
index 2c471bdfc3..b88309d1e7 100644
--- a/src/corelib/global/qcompilerdetection.h
+++ b/src/corelib/global/qcompilerdetection.h
@@ -94,8 +94,8 @@
# define Q_FUNC_INFO __FUNCSIG__
# define Q_ALIGNOF(type) __alignof(type)
# define Q_DECL_ALIGN(n) __declspec(align(n))
-# define Q_ASSUME(expr) __assume(expr)
-# define Q_UNREACHABLE() __assume(0)
+# define Q_ASSUME_IMPL(expr) __assume(expr)
+# define Q_UNREACHABLE_IMPL() __assume(0)
# define Q_NORETURN __declspec(noreturn)
# define Q_DECL_DEPRECATED __declspec(deprecated)
# define Q_DECL_EXPORT __declspec(dllexport)
@@ -150,18 +150,18 @@
# if defined(__INTEL_COMPILER)
/* Intel C++ also masquerades as GCC */
# define Q_CC_INTEL
-# define Q_ASSUME(expr) __assume(expr)
-# define Q_UNREACHABLE() __assume(0)
+# define Q_ASSUME_IMPL(expr) __assume(expr)
+# define Q_UNREACHABLE_IMPL() __assume(0)
# elif defined(__clang__)
/* Clang also masquerades as GCC */
# define Q_CC_CLANG
-# define Q_ASSUME(expr) if (expr){} else __builtin_unreachable()
-# define Q_UNREACHABLE() __builtin_unreachable()
+# define Q_ASSUME_IMPL(expr) if (expr){} else __builtin_unreachable()
+# define Q_UNREACHABLE_IMPL() __builtin_unreachable()
# else
/* Plain GCC */
# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405
-# define Q_ASSUME(expr) if (expr){} else __builtin_unreachable()
-# define Q_UNREACHABLE() __builtin_unreachable()
+# define Q_ASSUME_IMPL(expr) if (expr){} else __builtin_unreachable()
+# define Q_UNREACHABLE_IMPL() __builtin_unreachable()
# endif
# endif
@@ -789,11 +789,11 @@
#ifndef Q_UNLIKELY
# define Q_UNLIKELY(x) (x)
#endif
-#ifndef Q_ASSUME
-# define Q_ASSUME(expr) qt_noop()
+#ifndef Q_ASSUME_IMPL
+# define Q_ASSUME_IMPL(expr) qt_noop()
#endif
-#ifndef Q_UNREACHABLE
-# define Q_UNREACHABLE() qt_noop()
+#ifndef Q_UNREACHABLE_IMPL
+# define Q_UNREACHABLE_IMPL() qt_noop()
#endif
#ifndef Q_ALLOC_SIZE
# define Q_ALLOC_SIZE(x)
@@ -851,4 +851,17 @@
#define qMove(x) (x)
#endif
+#define Q_UNREACHABLE() \
+ do {\
+ Q_ASSERT_X(false, "Q_UNREACHABLE()", "Q_UNREACHABLE was reached");\
+ Q_UNREACHABLE_IMPL();\
+ } while (0)
+
+#define Q_ASSUME(Expr) \
+ do {\
+ const bool valueOfExpression = Expr;\
+ Q_ASSERT_X(valueOfExpression, "Q_ASSUME()", "Assumption in Q_ASSUME(\"" #Expr "\") was not correct");\
+ Q_ASSUME_IMPL(valueOfExpression);\
+ } while (0)
+
#endif // QCOMPILERDETECTION_H
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index 3881b166b1..6818b1d64d 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -1829,6 +1829,8 @@ const QSysInfo::WinVersion QSysInfo::WindowsVersion = QSysInfo::windowsVersion()
that the current code execution cannot be reached. That is, Q_ASSUME(false)
is equivalent to Q_UNREACHABLE().
+ In debug builds the condition is enforced by an assert to facilitate debugging.
+
\note Q_LIKELY() tells the compiler that the expression is likely, but not
the only possibility. Q_ASSUME tells the compiler that it is the only
possibility.
@@ -1863,6 +1865,8 @@ const QSysInfo::WinVersion QSysInfo::WindowsVersion = QSysInfo::windowsVersion()
By using this macro in impossible conditions, code coverage may be improved
as dead code paths may be eliminated.
+ In debug builds the condition is enforced by an assert to facilitate debugging.
+
\sa Q_ASSERT(), Q_ASSUME(), qFatal()
*/
diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc
index 0b0d089ba5..3937076664 100644
--- a/src/corelib/global/qnamespace.qdoc
+++ b/src/corelib/global/qnamespace.qdoc
@@ -2341,7 +2341,7 @@
\enum Qt::InputMethodQuery
\value ImEnabled The widget accepts input method input.
- \value ImMicroFocus \obsolete replaced by \c ImCursorRectangle
+ \value ImMicroFocus This query is obsolete. Use \c ImCursorRectangle instead.
\value ImCursorRectangle The rectangle covering the area of the input cursor in widget coordinates.
\value ImFont The currently used font for text input.
\value ImCursorPosition The logical position of the cursor within the text surrounding the input area
diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp
index 5463adaeb9..cb334ed741 100644
--- a/src/corelib/io/qdir.cpp
+++ b/src/corelib/io/qdir.cpp
@@ -2005,8 +2005,8 @@ bool QDir::match(const QString &filter, const QString &fileName)
#endif // QT_NO_REGEXP
/*!
- Removes all multiple directory separators "/" and resolves any
- "."s or ".."s found in the path, \a path.
+ Returns \a path with directory separators normalized (converted to "/") and
+ redundant ones removed, and "."s and ".."s resolved (as far as possible).
Symbolic links are kept. This function does not return the
canonical path, but rather the simplest version of the input.
diff --git a/src/corelib/io/qfile.cpp b/src/corelib/io/qfile.cpp
index d9f2c5c605..24f0eba1b7 100644
--- a/src/corelib/io/qfile.cpp
+++ b/src/corelib/io/qfile.cpp
@@ -48,6 +48,7 @@
#include "qfileinfo.h"
#include "private/qiodevice_p.h"
#include "private/qfile_p.h"
+#include "private/qfilesystemengine_p.h"
#include "private/qsystemerror_p.h"
#if defined(QT_BUILD_CORE_LIB)
# include "qcoreapplication.h"
@@ -548,7 +549,19 @@ QFile::rename(const QString &newName)
qWarning("QFile::rename: Empty or null file name");
return false;
}
- if (QFile(newName).exists()) {
+ if (d->fileName == newName) {
+ d->setError(QFile::RenameError, tr("Destination file is the same file."));
+ return false;
+ }
+ if (!exists()) {
+ d->setError(QFile::RenameError, tr("Source file does not exist."));
+ return false;
+ }
+ // If the file exists and it is a case-changing rename ("foo" -> "Foo"),
+ // compare Ids to make sure it really is a different file.
+ if (QFile::exists(newName)
+ && (d->fileName.compare(newName, Qt::CaseInsensitive)
+ || QFileSystemEngine::id(QFileSystemEntry(d->fileName)) != QFileSystemEngine::id(QFileSystemEntry(newName)))) {
// ### Race condition. If a file is moved in after this, it /will/ be
// overwritten. On Unix, the proper solution is to use hardlinks:
// return ::link(old, new) && ::remove(old);
diff --git a/src/corelib/io/qfilesystemengine_p.h b/src/corelib/io/qfilesystemengine_p.h
index bb91cf1142..9d03a6b459 100644
--- a/src/corelib/io/qfilesystemengine_p.h
+++ b/src/corelib/io/qfilesystemengine_p.h
@@ -75,6 +75,7 @@ public:
static QFileSystemEntry getLinkTarget(const QFileSystemEntry &link, QFileSystemMetaData &data);
static QFileSystemEntry canonicalName(const QFileSystemEntry &entry, QFileSystemMetaData &data);
static QFileSystemEntry absoluteName(const QFileSystemEntry &entry);
+ static QByteArray id(const QFileSystemEntry &entry);
static QString resolveUserName(const QFileSystemEntry &entry, QFileSystemMetaData &data);
static QString resolveGroupName(const QFileSystemEntry &entry, QFileSystemMetaData &data);
diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp
index 5870cdf7de..fa0e07b045 100644
--- a/src/corelib/io/qfilesystemengine_unix.cpp
+++ b/src/corelib/io/qfilesystemengine_unix.cpp
@@ -46,6 +46,8 @@
#include <QtCore/qvarlengtharray.h>
#include <stdlib.h> // for realpath()
+#include <sys/types.h>
+#include <sys/stat.h>
#include <unistd.h>
#include <stdio.h>
#include <errno.h>
@@ -174,9 +176,16 @@ QFileSystemEntry QFileSystemEngine::canonicalName(const QFileSystemEntry &entry,
#else
char *ret = 0;
# if defined(Q_OS_MAC) && !defined(Q_OS_IOS)
- // Mac OS X 10.5.x doesn't support the realpath(X,0) extension we use here.
+ // When using -mmacosx-version-min=10.4, we get the legacy realpath implementation,
+ // which does not work properly with the realpath(X,0) form. See QTBUG-28282.
if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_6) {
- ret = realpath(entry.nativeFilePath().constData(), (char*)0);
+ ret = (char*)malloc(PATH_MAX + 1);
+ if (ret && realpath(entry.nativeFilePath().constData(), (char*)ret) == 0) {
+ const int savedErrno = errno; // errno is checked below, and free() might change it
+ free(ret);
+ errno = savedErrno;
+ ret = 0;
+ }
} else {
// on 10.5 we can use FSRef to resolve the file path.
QString path = QDir::cleanPath(entry.filePath());
@@ -252,6 +261,20 @@ QFileSystemEntry QFileSystemEngine::absoluteName(const QFileSystemEntry &entry)
}
//static
+QByteArray QFileSystemEngine::id(const QFileSystemEntry &entry)
+{
+ struct stat statResult;
+ if (stat(entry.nativeFilePath().constData(), &statResult)) {
+ qErrnoWarning("stat() failed for '%s'", entry.nativeFilePath().constData());
+ return QByteArray();
+ }
+ QByteArray result = QByteArray::number(quint64(statResult.st_dev), 16);
+ result += ':';
+ result += QByteArray::number(quint64(statResult.st_ino), 16);
+ return result;
+}
+
+//static
QString QFileSystemEngine::resolveUserName(uint userId)
{
#if !defined(QT_NO_THREAD) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) && !defined(Q_OS_OPENBSD)
diff --git a/src/corelib/io/qfilesystemengine_win.cpp b/src/corelib/io/qfilesystemengine_win.cpp
index 5364a44f91..cc40d4af3f 100644
--- a/src/corelib/io/qfilesystemengine_win.cpp
+++ b/src/corelib/io/qfilesystemengine_win.cpp
@@ -42,6 +42,7 @@
#include "qfilesystemengine_p.h"
#include "qplatformdefs.h"
+#include "qsysinfo.h"
#include "private/qabstractfileengine_p.h"
#include "private/qfsfileengine_p.h"
#include <private/qsystemlibrary_p.h>
@@ -563,6 +564,80 @@ QFileSystemEntry QFileSystemEngine::absoluteName(const QFileSystemEntry &entry)
return QFileSystemEntry(ret, QFileSystemEntry::FromInternalPath());
}
+#ifndef Q_OS_WINCE
+
+// FILE_INFO_BY_HANDLE_CLASS has been extended by FileIdInfo = 18 as of VS2012.
+typedef enum { Q_FileIdInfo = 18 } Q_FILE_INFO_BY_HANDLE_CLASS;
+
+# if defined(Q_CC_MINGW) || (defined(Q_CC_MSVC) && _MSC_VER < 1700)
+
+typedef struct _FILE_ID_128 {
+ BYTE Identifier[16];
+} FILE_ID_128, *PFILE_ID_128;
+
+typedef struct _FILE_ID_INFO {
+ ULONGLONG VolumeSerialNumber;
+ FILE_ID_128 FileId;
+} FILE_ID_INFO, *PFILE_ID_INFO;
+# endif // if defined (Q_CC_MINGW) || (defined(Q_CC_MSVC) && _MSC_VER < 1700))
+
+// File ID for Windows up to version 7.
+static inline QByteArray fileId(HANDLE handle)
+{
+ QByteArray result;
+ BY_HANDLE_FILE_INFORMATION info;
+ if (GetFileInformationByHandle(handle, &info)) {
+ result = QByteArray::number(uint(info.nFileIndexLow), 16);
+ result += ':';
+ result += QByteArray::number(uint(info.nFileIndexHigh), 16);
+ }
+ return result;
+}
+
+// File ID for Windows starting from version 8.
+QByteArray fileIdWin8(HANDLE handle)
+{
+ typedef BOOL (WINAPI* GetFileInformationByHandleExType)(HANDLE, Q_FILE_INFO_BY_HANDLE_CLASS, void *, DWORD);
+
+ // Dynamically resolve GetFileInformationByHandleEx (Vista onwards).
+ static GetFileInformationByHandleExType getFileInformationByHandleEx = 0;
+ if (!getFileInformationByHandleEx) {
+ QSystemLibrary library(QLatin1String("kernel32"));
+ getFileInformationByHandleEx = (GetFileInformationByHandleExType)library.resolve("GetFileInformationByHandleEx");
+ }
+ QByteArray result;
+ if (getFileInformationByHandleEx) {
+ FILE_ID_INFO infoEx;
+ if (getFileInformationByHandleEx(handle, Q_FileIdInfo,
+ &infoEx, sizeof(FILE_ID_INFO))) {
+ result = QByteArray::number(infoEx.VolumeSerialNumber, 16);
+ result += ':';
+ result += QByteArray((char *)infoEx.FileId.Identifier, sizeof(infoEx.FileId.Identifier)).toHex();
+ }
+ }
+ return result;
+}
+#endif // !Q_OS_WINCE
+
+//static
+QByteArray QFileSystemEngine::id(const QFileSystemEntry &entry)
+{
+#ifndef Q_OS_WINCE
+ QByteArray result;
+ const HANDLE handle =
+ CreateFile((wchar_t*)entry.nativeFilePath().utf16(), GENERIC_READ,
+ FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
+ if (handle) {
+ result = QSysInfo::windowsVersion() >= QSysInfo::WV_WINDOWS8 ?
+ fileIdWin8(handle) : fileId(handle);
+ CloseHandle(handle);
+ }
+ return result;
+#else // !Q_OS_WINCE
+ return entry.nativeFilePath().toLower().toLatin1();
+#endif
+}
+
//static
QString QFileSystemEngine::owner(const QFileSystemEntry &entry, QAbstractFileEngine::FileOwner own)
{
diff --git a/src/corelib/kernel/qmetatype.cpp b/src/corelib/kernel/qmetatype.cpp
index 82b6ed54d1..c47270b83b 100644
--- a/src/corelib/kernel/qmetatype.cpp
+++ b/src/corelib/kernel/qmetatype.cpp
@@ -646,11 +646,26 @@ int QMetaType::registerNormalizedType(const NS(QByteArray) &normalizedTypeName,
"size %i, now registering size %i.",
normalizedTypeName.constData(), idx, previousSize, size);
}
+
+ // Ignore WasDeclaredAsMetaType inconsitency, to many users were hitting the problem
+ previousFlags |= WasDeclaredAsMetaType;
+ flags |= WasDeclaredAsMetaType;
+
if (previousFlags != flags) {
- qFatal("QMetaType::registerType: Binary compatibility break "
- "-- Type flags for type '%s' [%i] don't match. Previously "
- "registered TypeFlags(0x%x), now registering TypeFlags(0x%x).",
- normalizedTypeName.constData(), idx, previousFlags, int(flags));
+ const int maskForTypeInfo = NeedsConstruction | NeedsDestruction | MovableType;
+ const char *msg = "QMetaType::registerType: Binary compatibility break. "
+ "\nType flags for type '%s' [%i] don't match. Previously "
+ "registered TypeFlags(0x%x), now registering TypeFlags(0x%x). "
+ "This is an ODR break, which means that your application depends on a C++ undefined behavior."
+ "\nHint: %s";
+ QT_PREPEND_NAMESPACE(QByteArray) hint;
+ if ((previousFlags & maskForTypeInfo) != (flags & maskForTypeInfo)) {
+ hint += "\nIt seems that the type was registered at least twice in a different translation units, "
+ "but Q_DECLARE_TYPEINFO is not visible from all the translations unit or different flags were used."
+ "Remember that Q_DECLARE_TYPEINFO should be declared before QMetaType registration, "
+ "preferably it should be placed just after the type declaration and before Q_DECLARE_METATYPE";
+ }
+ qFatal(msg, normalizedTypeName.constData(), idx, previousFlags, int(flags), hint.constData());
}
return idx;
@@ -1722,6 +1737,9 @@ const QMetaObject *QMetaType::metaObjectForType(int type)
\snippet code/src_corelib_kernel_qmetatype.cpp 9
+ \warning This function is useful only for registering an alias (typedef)
+ for every other use case Q_DECLARE_METATYPE and qMetaTypeId() should be used instead.
+
\sa qRegisterMetaTypeStreamOperators(), QMetaType::isRegistered(),
Q_DECLARE_METATYPE()
*/
@@ -1767,7 +1785,7 @@ const QMetaObject *QMetaType::metaObjectForType(int type)
*/
/*!
- \fn int qRegisterMetaType(const char *typeName)
+ \fn int qRegisterMetaType()
\relates QMetaType
\threadsafe
\since 4.2
@@ -1779,6 +1797,14 @@ const QMetaObject *QMetaType::metaObjectForType(int type)
\snippet code/src_corelib_kernel_qmetatype.cpp 7
+ This function requires that \c{T} is a fully defined type at the point
+ where the function is called. For pointer types, it also requires that the
+ pointed to type is fully defined. Use Q_DECLARE_OPAQUE_POINTER() to be able
+ to register pointers to forward declared types.
+
+ After a type has been registered, you can create and destroy
+ objects of that type dynamically at run-time.
+
To use the type \c T in QVariant, using Q_DECLARE_METATYPE() is
sufficient. To use the type \c T in queued signal and slot connections,
\c{qRegisterMetaType<T>()} must be called before the first connection
diff --git a/src/corelib/kernel/qsharedmemory_unix.cpp b/src/corelib/kernel/qsharedmemory_unix.cpp
index fd2bc97b2d..6bcb4076b4 100644
--- a/src/corelib/kernel/qsharedmemory_unix.cpp
+++ b/src/corelib/kernel/qsharedmemory_unix.cpp
@@ -197,7 +197,7 @@ bool QSharedMemoryPrivate::create(int size)
}
// create
- if (-1 == shmget(unix_key, size, 0666 | IPC_CREAT | IPC_EXCL)) {
+ if (-1 == shmget(unix_key, size, 0600 | IPC_CREAT | IPC_EXCL)) {
QString function = QLatin1String("QSharedMemory::create");
switch (errno) {
case EINVAL:
@@ -218,7 +218,7 @@ bool QSharedMemoryPrivate::create(int size)
bool QSharedMemoryPrivate::attach(QSharedMemory::AccessMode mode)
{
// grab the shared memory segment id
- int id = shmget(unix_key, 0, (mode == QSharedMemory::ReadOnly ? 0444 : 0660));
+ int id = shmget(unix_key, 0, (mode == QSharedMemory::ReadOnly ? 0400 : 0600));
if (-1 == id) {
setErrorString(QLatin1String("QSharedMemory::attach (shmget)"));
return false;
@@ -263,7 +263,7 @@ bool QSharedMemoryPrivate::detach()
size = 0;
// Get the number of current attachments
- int id = shmget(unix_key, 0, 0444);
+ int id = shmget(unix_key, 0, 0400);
cleanHandle();
struct shmid_ds shmid_ds;
diff --git a/src/corelib/kernel/qsystemsemaphore_unix.cpp b/src/corelib/kernel/qsystemsemaphore_unix.cpp
index e67fb42285..303f0c7725 100644
--- a/src/corelib/kernel/qsystemsemaphore_unix.cpp
+++ b/src/corelib/kernel/qsystemsemaphore_unix.cpp
@@ -136,10 +136,10 @@ key_t QSystemSemaphorePrivate::handle(QSystemSemaphore::AccessMode mode)
}
// Get semaphore
- semaphore = semget(unix_key, 1, 0666 | IPC_CREAT | IPC_EXCL);
+ semaphore = semget(unix_key, 1, 0600 | IPC_CREAT | IPC_EXCL);
if (-1 == semaphore) {
if (errno == EEXIST)
- semaphore = semget(unix_key, 1, 0666 | IPC_CREAT);
+ semaphore = semget(unix_key, 1, 0600 | IPC_CREAT);
if (-1 == semaphore) {
setErrorString(QLatin1String("QSystemSemaphore::handle"));
cleanHandle();
diff --git a/src/corelib/tools/qlocale_p.h b/src/corelib/tools/qlocale_p.h
index 65201374a9..ca1b6f8b07 100644
--- a/src/corelib/tools/qlocale_p.h
+++ b/src/corelib/tools/qlocale_p.h
@@ -380,10 +380,13 @@ class QQNXLocaleData: public QObject
public:
QQNXLocaleData();
virtual ~QQNXLocaleData();
- void readPPSLocale();
public Q_SLOTS:
void updateMeasurementSystem();
+ void installSocketNotifier();
+
+private:
+ void initialize();
public:
uint ppsMeasurement;
diff --git a/src/corelib/tools/qlocale_unix.cpp b/src/corelib/tools/qlocale_unix.cpp
index 088e40b176..49bed37075 100644
--- a/src/corelib/tools/qlocale_unix.cpp
+++ b/src/corelib/tools/qlocale_unix.cpp
@@ -66,7 +66,12 @@ QQNXLocaleData::QQNXLocaleData()
:ppsNotifier(0)
,ppsFd(-1)
{
- readPPSLocale();
+ initialize();
+
+ // we cannot call this directly, because by the time this constructor is
+ // called, the event dispatcher has not yet been created, causing the
+ // subsequent call to QSocketNotifier constructor to fail.
+ QMetaObject::invokeMethod(this, "installSocketNotifier", Qt::QueuedConnection);
}
QQNXLocaleData::~QQNXLocaleData()
@@ -106,7 +111,7 @@ void QQNXLocaleData::updateMeasurementSystem()
ppsMeasurement = QLocale::MetricSystem;
}
-void QQNXLocaleData::readPPSLocale()
+void QQNXLocaleData::initialize()
{
errno = 0;
ppsFd = qt_safe_open(ppsServicePath, O_RDONLY);
@@ -116,10 +121,22 @@ void QQNXLocaleData::readPPSLocale()
}
updateMeasurementSystem();
- if (QCoreApplication::instance()) {
- ppsNotifier = new QSocketNotifier(ppsFd, QSocketNotifier::Read, this);
- QObject::connect(ppsNotifier, SIGNAL(activated(int)), this, SLOT(updateMeasurementSystem()));
+}
+
+void QQNXLocaleData::installSocketNotifier()
+{
+ if (!QCoreApplication::instance() || ppsFd == -1) {
+ qWarning("QQNXLocaleData: Failed to create socket notifier, locale updates may not work.");
+ return;
}
+
+ if (ppsNotifier) {
+ qWarning("QQNXLocaleData: socket notifier already created.");
+ return;
+ }
+
+ ppsNotifier = new QSocketNotifier(ppsFd, QSocketNotifier::Read, this);
+ QObject::connect(ppsNotifier, SIGNAL(activated(int)), this, SLOT(updateMeasurementSystem()));
}
#endif
diff --git a/src/gui/kernel/qopenglcontext.cpp b/src/gui/kernel/qopenglcontext.cpp
index f16f29718d..96b09342c7 100644
--- a/src/gui/kernel/qopenglcontext.cpp
+++ b/src/gui/kernel/qopenglcontext.cpp
@@ -759,15 +759,26 @@ void QOpenGLContextGroupPrivate::removeContext(QOpenGLContext *ctx)
{
Q_Q(QOpenGLContextGroup);
- QMutexLocker locker(&m_mutex);
- m_shares.removeOne(ctx);
+ bool deleteObject = false;
+
+ {
+ QMutexLocker locker(&m_mutex);
+ m_shares.removeOne(ctx);
- if (ctx == m_context && !m_shares.isEmpty())
- m_context = m_shares.first();
+ if (ctx == m_context && !m_shares.isEmpty())
+ m_context = m_shares.first();
+
+ if (!m_refs.deref()) {
+ cleanup();
+ deleteObject = true;
+ }
+ }
- if (!m_refs.deref()) {
- cleanup();
- q->deleteLater();
+ if (deleteObject) {
+ if (q->thread() == QThread::currentThread())
+ delete q; // Delete directly to prevent leak, refer to QTBUG-29056
+ else
+ q->deleteLater();
}
}
diff --git a/src/gui/opengl/qopenglpaintengine.cpp b/src/gui/opengl/qopenglpaintengine.cpp
index 6238564eeb..2a8902adbf 100644
--- a/src/gui/opengl/qopenglpaintengine.cpp
+++ b/src/gui/opengl/qopenglpaintengine.cpp
@@ -877,7 +877,7 @@ void QOpenGL2PaintEngineExPrivate::fill(const QVectorPath& path)
// Tag it for later so that if the same path is drawn twice, it is assumed to be static and thus cachable
path.makeCacheable();
- if (device->context()->format().stencilBufferSize() == 0) {
+ if (device->context()->format().stencilBufferSize() <= 0) {
// If there is no stencil buffer, triangulate the path instead.
QRectF bbox = path.controlPointRect();
diff --git a/src/gui/painting/qtextureglyphcache.cpp b/src/gui/painting/qtextureglyphcache.cpp
index 43243b7c34..a9d5e21b50 100644
--- a/src/gui/painting/qtextureglyphcache.cpp
+++ b/src/gui/painting/qtextureglyphcache.cpp
@@ -305,6 +305,8 @@ void QImageTextureGlyphCache::createTextureData(int width, int height)
case QFontEngineGlyphCache::Raster_RGBMask:
m_image = QImage(width, height, QImage::Format_RGB32);
break;
+ case QFontEngineGlyphCache::Raster_ARGB:
+ break;
}
}
diff --git a/src/gui/text/qfontengineglyphcache_p.h b/src/gui/text/qfontengineglyphcache_p.h
index 18440f22fa..092873a4d4 100644
--- a/src/gui/text/qfontengineglyphcache_p.h
+++ b/src/gui/text/qfontengineglyphcache_p.h
@@ -69,7 +69,8 @@ public:
enum Type {
Raster_RGBMask,
Raster_A8,
- Raster_Mono
+ Raster_Mono,
+ Raster_ARGB
};
QFontEngineGlyphCache(const QTransform &matrix, Type type) : m_transform(matrix), m_type(type) { }
diff --git a/src/network/socket/qnativesocketengine_win.cpp b/src/network/socket/qnativesocketengine_win.cpp
index be71ccb08d..beb7fe6b6a 100644
--- a/src/network/socket/qnativesocketengine_win.cpp
+++ b/src/network/socket/qnativesocketengine_win.cpp
@@ -61,6 +61,12 @@
QT_BEGIN_NAMESPACE
+//Some distributions of mingw (including 4.7.2 from mingw.org) are missing this from headers.
+//Also microsoft headers don't include it when building on XP and earlier.
+#ifndef IPV6_V6ONLY
+#define IPV6_V6ONLY 27
+#endif
+
#if defined(QNATIVESOCKETENGINE_DEBUG)
void verboseWSErrorDebug(int r)
@@ -204,7 +210,6 @@ static inline void qt_socket_getPortAndAddress(SOCKET socketDescriptor, const qt
void QNativeSocketEnginePrivate::setPortAndAddress(sockaddr_in * sockAddrIPv4, qt_sockaddr_in6 * sockAddrIPv6,
quint16 port, const QHostAddress & address, sockaddr ** sockAddrPtr, QT_SOCKLEN_T *sockAddrSize)
{
-
if (address.protocol() == QAbstractSocket::IPv6Protocol
|| address.protocol() == QAbstractSocket::AnyIPProtocol
|| socketProtocol == QAbstractSocket::IPv6Protocol
@@ -599,7 +604,6 @@ bool QNativeSocketEnginePrivate::fetchConnectionParameters()
}
}
-#if defined (IPV6_V6ONLY)
// determine if local address is dual mode
DWORD ipv6only = 0;
QT_SOCKOPTLEN_T optlen = sizeof(ipv6only);
@@ -611,7 +615,6 @@ bool QNativeSocketEnginePrivate::fetchConnectionParameters()
localAddress = QHostAddress::Any;
}
}
-#endif
memset(&sa, 0, sizeof(sa));
if (::getpeername(socketDescriptor, &sa.a, &sockAddrSize) == 0) {
@@ -652,7 +655,6 @@ bool QNativeSocketEnginePrivate::nativeConnect(const QHostAddress &address, quin
setPortAndAddress(&sockAddrIPv4, &sockAddrIPv6, port, address, &sockAddrPtr, &sockAddrSize);
-#if defined (IPV6_V6ONLY)
if (socketProtocol == QAbstractSocket::IPv6Protocol && address.toIPv4Address()) {
//IPV6_V6ONLY option must be cleared to connect to a V4 mapped address
if (QSysInfo::windowsVersion() >= QSysInfo::WV_6_0) {
@@ -660,7 +662,6 @@ bool QNativeSocketEnginePrivate::nativeConnect(const QHostAddress &address, quin
ipv6only = ::setsockopt(socketDescriptor, IPPROTO_IPV6, IPV6_V6ONLY, (char*)&ipv6only, sizeof(ipv6only) );
}
}
-#endif
forever {
int connectResult = ::WSAConnect(socketDescriptor, sockAddrPtr, sockAddrSize, 0,0,0,0);
@@ -793,15 +794,11 @@ bool QNativeSocketEnginePrivate::nativeBind(const QHostAddress &a, quint16 port)
// binding to a multicast address
address = QHostAddress(QHostAddress::AnyIPv6);
}
-#if defined (IPV6_V6ONLY)
//This is default in current windows versions, it may change in future so set it explicitly
if (QSysInfo::windowsVersion() >= QSysInfo::WV_6_0) {
ipv6only = 1;
ipv6only = ::setsockopt(socketDescriptor, IPPROTO_IPV6, IPV6_V6ONLY, (char*)&ipv6only, sizeof(ipv6only) );
}
-#else
- Q_UNUSED(ipv6only)
-#endif
break;
case QAbstractSocket::IPv4Protocol:
if ((address.toIPv4Address() & 0xffff0000) == 0xefff0000) {
@@ -810,12 +807,9 @@ bool QNativeSocketEnginePrivate::nativeBind(const QHostAddress &a, quint16 port)
}
break;
case QAbstractSocket::AnyIPProtocol:
-#if defined (IPV6_V6ONLY)
- if (QSysInfo::windowsVersion() >= QSysInfo::WV_6_0)
+ if (QSysInfo::windowsVersion() >= QSysInfo::WV_6_0) {
ipv6only = ::setsockopt(socketDescriptor, IPPROTO_IPV6, IPV6_V6ONLY, (char*)&ipv6only, sizeof(ipv6only) );
- else
-#endif
- {
+ } else {
address = QHostAddress(QHostAddress::AnyIPv4); //xp/WS2003 and earlier don't support dual stack, so bind to IPv4
socketProtocol = QAbstractSocket::IPv4Protocol;
}
diff --git a/src/network/ssl/qsslcertificate.h b/src/network/ssl/qsslcertificate.h
index 6863fb9d62..6301956e78 100644
--- a/src/network/ssl/qsslcertificate.h
+++ b/src/network/ssl/qsslcertificate.h
@@ -43,6 +43,10 @@
#ifndef QSSLCERTIFICATE_H
#define QSSLCERTIFICATE_H
+#ifdef verify
+#undef verify
+#endif
+
#include <QtCore/qnamespace.h>
#include <QtCore/qbytearray.h>
#include <QtCore/qcryptographichash.h>
diff --git a/src/network/ssl/qsslsocket.cpp b/src/network/ssl/qsslsocket.cpp
index e97cf0817a..0d3800685b 100644
--- a/src/network/ssl/qsslsocket.cpp
+++ b/src/network/ssl/qsslsocket.cpp
@@ -2389,7 +2389,7 @@ QList<QByteArray> QSslSocketPrivate::unixRootCertDirectories()
<< "/usr/local/ssl/" // Normal OpenSSL Tarball
<< "/var/ssl/certs/" // AIX
<< "/usr/local/ssl/certs/" // Solaris
- << "/var/certmgr/web/user_trusted/" // BlackBerry
+ << "/etc/openssl/certs/" // BlackBerry
<< "/opt/openssl/certs/"; // HP-UX
}
diff --git a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
index 961b28961c..8603ec337e 100644
--- a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
+++ b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
@@ -149,8 +149,6 @@ void QCoreTextFontEngine::init()
Q_ASSERT(ctfont != NULL);
Q_ASSERT(cgFont != NULL);
- glyphFormat = defaultGlyphFormat;
-
QCFString family = CTFontCopyFamilyName(ctfont);
fontDef.family = family;
@@ -159,6 +157,14 @@ void QCoreTextFontEngine::init()
synthesisFlags = 0;
CTFontSymbolicTraits traits = CTFontGetSymbolicTraits(ctfont);
+
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
+ if (supportsColorGlyphs() && (traits & kCTFontColorGlyphsTrait))
+ glyphFormat = QFontEngineGlyphCache::Raster_ARGB;
+ else
+#endif
+ glyphFormat = defaultGlyphFormat;
+
if (traits & kCTFontItalicTrait)
fontDef.style = QFont::StyleItalic;
@@ -422,6 +428,9 @@ static void convertCGPathToQPainterPath(void *info, const CGPathElement *element
void QCoreTextFontEngine::addGlyphsToPath(glyph_t *glyphs, QFixedPoint *positions, int nGlyphs,
QPainterPath *path, QTextItem::RenderFlags)
{
+ if (glyphFormat == QFontEngineGlyphCache::Raster_ARGB)
+ return; // We can't convert color-glyphs to path
+
CGAffineTransform cgMatrix = CGAffineTransformIdentity;
cgMatrix = CGAffineTransformScale(cgMatrix, 1, -1);
diff --git a/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h b/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h
index b4e94fe889..b8f1f95ac4 100644
--- a/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h
+++ b/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h
@@ -109,6 +109,21 @@ public:
virtual QFontEngine *cloneWithSize(qreal pixelSize) const;
virtual int glyphMargin(QFontEngineGlyphCache::Type type) { Q_UNUSED(type); return 0; }
+ static bool supportsColorGlyphs()
+ {
+#if defined(Q_OS_IOS)
+ return true;
+#elif MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
+ #if MAC_OS_X_VERSION_MIN_REQUIRED < 1070
+ return &CTFontDrawGlyphs;
+ #else
+ return true;
+ #endif
+#else
+ return false;
+#endif
+ }
+
static int antialiasingThreshold;
static QFontEngineGlyphCache::Type defaultGlyphFormat;
diff --git a/src/plugins/accessible/widgets/itemviews.cpp b/src/plugins/accessible/widgets/itemviews.cpp
index 92ba03753a..816970aeb0 100644
--- a/src/plugins/accessible/widgets/itemviews.cpp
+++ b/src/plugins/accessible/widgets/itemviews.cpp
@@ -575,7 +575,7 @@ int QAccessibleTree::childCount() const
QAccessibleInterface *QAccessibleTree::child(int index) const
{
- if ((index < 0) || (!view()->model()))
+ if (index < 0 || !view()->model() || !view()->model()->columnCount())
return 0;
int hHeader = horizontalHeader() ? 1 : 0;
diff --git a/src/plugins/platforms/cocoa/qcocoaaccessibility.mm b/src/plugins/platforms/cocoa/qcocoaaccessibility.mm
index e643f22793..0587da706a 100644
--- a/src/plugins/platforms/cocoa/qcocoaaccessibility.mm
+++ b/src/plugins/platforms/cocoa/qcocoaaccessibility.mm
@@ -71,7 +71,8 @@ void QCococaAccessibility::notifyAccessibilityUpdate(QAccessibleEvent *event)
case QAccessible::TextInserted :
case QAccessible::TextRemoved :
case QAccessible::TextUpdated : {
- QCocoaAccessibleElement *element = [QCocoaAccessibleElement elementWithInterface : interface parent : nil];
+ QCocoaAccessibleElement *element = [QCocoaAccessibleElement createElementWithInterface : interface parent : nil];
+ [element autorelease];
NSAccessibilityPostNotification(element, NSAccessibilityValueChangedNotification);
break; }
diff --git a/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.h b/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.h
index fce72da98f..eb810522d7 100644
--- a/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.h
+++ b/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.h
@@ -56,7 +56,7 @@
}
- (id)initWithInterface:(void *)anQAccessibleInterface parent:(id)aParent;
-+ (QCocoaAccessibleElement *)elementWithInterface:(void *)anQAccessibleInterface parent:(id)aParent;
++ (QCocoaAccessibleElement *)createElementWithInterface:(void *)anQAccessibleInterface parent:(id)aParent;
@end
diff --git a/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm b/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm
index d5841c1983..7c9ae963f6 100644
--- a/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm
+++ b/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm
@@ -68,9 +68,9 @@ static QAccessibleInterface *acast(void *ptr)
return self;
}
-+ (QCocoaAccessibleElement *)elementWithInterface:(void *)anQAccessibleInterface parent:(id)aParent
++ (QCocoaAccessibleElement *)createElementWithInterface:(void *)anQAccessibleInterface parent:(id)aParent
{
- return [[[self alloc] initWithInterface:anQAccessibleInterface parent:aParent] autorelease];
+ return [[self alloc] initWithInterface:anQAccessibleInterface parent:aParent];
}
- (void)dealloc {
@@ -136,7 +136,9 @@ static QAccessibleInterface *acast(void *ptr)
NSMutableArray *kids = [NSMutableArray arrayWithCapacity:numKids];
for (int i = 0; i < numKids; ++i) {
QAccessibleInterface *childInterface = acast(accessibleInterface)->child(i);
- [kids addObject:[QCocoaAccessibleElement elementWithInterface:(void*)childInterface parent:self]];
+ QCocoaAccessibleElement *element = [QCocoaAccessibleElement createElementWithInterface:(void*)childInterface parent:self];
+ [kids addObject: element];
+ [element release];
}
return kids;
@@ -251,7 +253,9 @@ static QAccessibleInterface *acast(void *ptr)
}
// hit a child, forward to child accessible interface.
- QCocoaAccessibleElement *accessibleElement = [QCocoaAccessibleElement elementWithInterface:childInterface parent:self];
+ QCocoaAccessibleElement *accessibleElement = [QCocoaAccessibleElement createElementWithInterface:childInterface parent:self];
+ [accessibleElement autorelease];
+
return [accessibleElement accessibilityHitTest:point];
}
diff --git a/src/plugins/platforms/cocoa/qnsviewaccessibility.mm b/src/plugins/platforms/cocoa/qnsviewaccessibility.mm
index da714d3326..9b94abf115 100644
--- a/src/plugins/platforms/cocoa/qnsviewaccessibility.mm
+++ b/src/plugins/platforms/cocoa/qnsviewaccessibility.mm
@@ -77,7 +77,9 @@
int numKids = m_accessibleRoot->childCount();
NSMutableArray *kids = [NSMutableArray arrayWithCapacity:numKids];
for (int i = 0; i < numKids; ++i) {
- [kids addObject:[QCocoaAccessibleElement elementWithInterface: m_accessibleRoot->child(i) parent:self ]];
+ QCocoaAccessibleElement *element = [QCocoaAccessibleElement createElementWithInterface: m_accessibleRoot->child(i) parent:self ];
+ [kids addObject: element];
+ [element release];
}
return kids;
@@ -98,7 +100,8 @@
// Hit a child, forward to child accessible interface.
- QCocoaAccessibleElement *accessibleElement = [QCocoaAccessibleElement elementWithInterface: childInterface parent:self ];
+ QCocoaAccessibleElement *accessibleElement = [QCocoaAccessibleElement createElementWithInterface: childInterface parent:self ];
+ [accessibleElement autorelease];
return [accessibleElement accessibilityHitTest:point];
}
diff --git a/src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp b/src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp
index 1dac60a745..4d170f15f2 100644
--- a/src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp
+++ b/src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp
@@ -264,7 +264,7 @@ static int openTtyDevice(const QString &device)
static bool switchToGraphicsMode(int ttyfd, int *oldMode)
{
- ioctl(ttyfd, KDGETMODE, &oldMode);
+ ioctl(ttyfd, KDGETMODE, oldMode);
if (*oldMode != KD_GRAPHICS) {
if (ioctl(ttyfd, KDSETMODE, KD_GRAPHICS) != 0)
return false;
diff --git a/src/plugins/platforms/qnx/qqnxwindow.cpp b/src/plugins/platforms/qnx/qqnxwindow.cpp
index af7a89a399..2cee666e23 100644
--- a/src/plugins/platforms/qnx/qqnxwindow.cpp
+++ b/src/plugins/platforms/qnx/qqnxwindow.cpp
@@ -271,8 +271,14 @@ void QQnxWindow::setVisible(bool visible)
window()->requestActivate();
- if (window()->isTopLevel() && visible)
- QWindowSystemInterface::handleExposeEvent(window(), window()->geometry());
+ if (window()->isTopLevel()) {
+ if (visible) {
+ QWindowSystemInterface::handleExposeEvent(window(), window()->geometry());
+ } else {
+ // Flush the context, otherwise it won't disappear immediately
+ screen_flush_context(m_screenContext, 0);
+ }
+ }
}
void QQnxWindow::updateVisibility(bool parentVisible)
diff --git a/src/plugins/platforms/windows/qwindowsbackingstore.cpp b/src/plugins/platforms/windows/qwindowsbackingstore.cpp
index b7937b4d84..5d3822d2cd 100644
--- a/src/plugins/platforms/windows/qwindowsbackingstore.cpp
+++ b/src/plugins/platforms/windows/qwindowsbackingstore.cpp
@@ -45,6 +45,7 @@
#include "qwindowscontext.h"
#include <QtGui/QWindow>
+#include <QtGui/QPainter>
#include <QtCore/QDebug>
@@ -147,8 +148,10 @@ void QWindowsBackingStore::resize(const QSize &size, const QRegion &region)
nsp << " from: " << m_image->image().size();
}
#endif
- m_image.reset(new QWindowsNativeImage(size.width(), size.height(),
- QWindowsNativeImage::systemFormat()));
+ QImage::Format format = QWindowsNativeImage::systemFormat();
+ if (format == QImage::Format_RGB32 && rasterWindow()->window()->format().hasAlpha())
+ format = QImage::Format_ARGB32;
+ m_image.reset(new QWindowsNativeImage(size.width(), size.height(), format));
}
}
@@ -168,9 +171,16 @@ bool QWindowsBackingStore::scroll(const QRegion &area, int dx, int dy)
void QWindowsBackingStore::beginPaint(const QRegion &region)
{
- Q_UNUSED(region);
if (QWindowsContext::verboseBackingStore > 1)
qDebug() << __FUNCTION__;
+
+ if (m_image->image().hasAlphaChannel()) {
+ QPainter p(&m_image->image());
+ p.setCompositionMode(QPainter::CompositionMode_Source);
+ const QColor blank = Qt::transparent;
+ foreach (const QRect &r, region.rects())
+ p.fillRect(r, blank);
+ }
}
QWindowsWindow *QWindowsBackingStore::rasterWindow() const
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp
index 50fd7a0792..23ebd6bd9e 100644
--- a/src/plugins/platforms/windows/qwindowswindow.cpp
+++ b/src/plugins/platforms/windows/qwindowswindow.cpp
@@ -267,7 +267,7 @@ static void setWindowOpacity(HWND hwnd, Qt::WindowFlags flags, qreal level)
struct WindowCreationData
{
typedef QWindowsWindow::WindowData WindowData;
- enum Flags { ForceChild = 0x1 };
+ enum Flags { ForceChild = 0x1, ForceTopLevel = 0x2 };
WindowCreationData() : parentHandle(0), type(Qt::Widget), style(0), exStyle(0),
topLevel(false), popup(false), dialog(false), desktop(false),
@@ -319,7 +319,13 @@ void WindowCreationData::fromWindow(const QWindow *w, const Qt::WindowFlags flag
parentHandle = (HWND)prop.value<WId>();
}
- topLevel = ((creationFlags & ForceChild) || embedded) ? false : w->isTopLevel();
+ if (creationFlags & ForceChild) {
+ topLevel = false;
+ } else if (creationFlags & ForceTopLevel) {
+ topLevel = true;
+ } else {
+ topLevel = w->isTopLevel();
+ }
if (topLevel && flags == 1) {
flags |= Qt::WindowTitleHint|Qt::WindowSystemMenuHint|Qt::WindowMinimizeButtonHint
@@ -1022,10 +1028,9 @@ void QWindowsWindow::setParent_sys(const QPlatformWindow *parent) const
// WS_CHILD/WS_POPUP must be manually set/cleared in addition
// to dialog frames, etc (see SetParent() ) if the top level state changes.
- if (wasTopLevel != isTopLevel) {
- const unsigned flags = isTopLevel ? unsigned(0) : unsigned(WindowCreationData::ForceChild);
- setWindowFlags_sys(window()->flags(), flags);
- }
+ // Force toplevel state as QWindow::isTopLevel cannot be relied upon here.
+ if (wasTopLevel != isTopLevel)
+ setWindowFlags_sys(window()->flags(), unsigned(isTopLevel ? WindowCreationData::ForceTopLevel : WindowCreationData::ForceChild));
}
}
diff --git a/src/plugins/platforms/windows/qwindowswindow.h b/src/plugins/platforms/windows/qwindowswindow.h
index 4e82938cf4..f98855d84d 100644
--- a/src/plugins/platforms/windows/qwindowswindow.h
+++ b/src/plugins/platforms/windows/qwindowswindow.h
@@ -158,6 +158,7 @@ public:
virtual void setVisible(bool visible);
bool isVisible() const;
+ virtual bool isExposed() const { return m_windowState != Qt::WindowMinimized && isVisible(); }
virtual bool isActive() const;
virtual bool isEmbedded(const QPlatformWindow *parentWindow) const;
virtual QPoint mapToGlobal(const QPoint &pos) const;
diff --git a/src/plugins/platforms/xcb/qxcbbackingstore.cpp b/src/plugins/platforms/xcb/qxcbbackingstore.cpp
index 649469ab9d..c953ab0049 100644
--- a/src/plugins/platforms/xcb/qxcbbackingstore.cpp
+++ b/src/plugins/platforms/xcb/qxcbbackingstore.cpp
@@ -107,7 +107,7 @@ QXcbShmImage::QXcbShmImage(QXcbScreen *screen, const QSize &size, uint depth, QI
if (!segmentSize)
return;
- int id = shmget(IPC_PRIVATE, segmentSize, IPC_CREAT | 0777);
+ int id = shmget(IPC_PRIVATE, segmentSize, IPC_CREAT | 0600);
if (id == -1)
qWarning("QXcbShmImage: shmget() failed (%d) for size %d (%dx%d)",
errno, segmentSize, size.width(), size.height());
@@ -272,7 +272,6 @@ void QXcbBackingStore::beginPaint(const QRegion &region)
m_image->preparePaint(region);
-#if 0
if (m_image->image()->hasAlphaChannel()) {
QPainter p(m_image->image());
p.setCompositionMode(QPainter::CompositionMode_Source);
@@ -282,7 +281,6 @@ void QXcbBackingStore::beginPaint(const QRegion &region)
p.fillRect(*it, blank);
}
}
-#endif
}
void QXcbBackingStore::endPaint(const QRegion &)
diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp
index 528c4c6580..01f4d6d231 100644
--- a/src/plugins/platforms/xcb/qxcbwindow.cpp
+++ b/src/plugins/platforms/xcb/qxcbwindow.cpp
@@ -382,6 +382,11 @@ void QXcbWindow::create()
if (window()->flags() & Qt::WindowTransparentForInput)
setTransparentForMouseEvents(true);
+#ifdef XCB_USE_XLIB
+ // force sync to read outstanding requests - see QTBUG-29106
+ XSync(DISPLAY_FROM_XCB(m_screen), false);
+#endif
+
#ifndef QT_NO_DRAGANDDROP
connection()->drag()->dndEnable(this, true);
#endif
diff --git a/src/sql/drivers/db2/qsql_db2.h b/src/sql/drivers/db2/qsql_db2.h
index 99d2e5d505..35dbd4af04 100644
--- a/src/sql/drivers/db2/qsql_db2.h
+++ b/src/sql/drivers/db2/qsql_db2.h
@@ -54,6 +54,12 @@
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
+
+#if 0
+#pragma qt_no_master_include
+#pragma qt_sync_stop_processing
+#endif
+
class QDB2Driver;
class QDB2DriverPrivate;
class QDB2ResultPrivate;
diff --git a/src/sql/drivers/ibase/qsql_ibase.h b/src/sql/drivers/ibase/qsql_ibase.h
index 86c5365823..de86744731 100644
--- a/src/sql/drivers/ibase/qsql_ibase.h
+++ b/src/sql/drivers/ibase/qsql_ibase.h
@@ -50,6 +50,12 @@
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
+
+#if 0
+#pragma qt_no_master_include
+#pragma qt_sync_stop_processing
+#endif
+
class QIBaseDriverPrivate;
class QIBaseResultPrivate;
class QIBaseDriver;
diff --git a/src/sql/drivers/mysql/qsql_mysql.h b/src/sql/drivers/mysql/qsql_mysql.h
index d48218537b..eb17c8ed28 100644
--- a/src/sql/drivers/mysql/qsql_mysql.h
+++ b/src/sql/drivers/mysql/qsql_mysql.h
@@ -61,6 +61,11 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
+#if 0
+#pragma qt_no_master_include
+#pragma qt_sync_stop_processing
+#endif
+
class QMYSQLDriverPrivate;
class QMYSQLResultPrivate;
class QMYSQLDriver;
diff --git a/src/sql/drivers/oci/qsql_oci.h b/src/sql/drivers/oci/qsql_oci.h
index 15a0357ace..188dba2c64 100644
--- a/src/sql/drivers/oci/qsql_oci.h
+++ b/src/sql/drivers/oci/qsql_oci.h
@@ -59,6 +59,11 @@ typedef struct OCISvcCtx OCISvcCtx;
QT_BEGIN_NAMESPACE
+#if 0
+#pragma qt_no_master_include
+#pragma qt_sync_stop_processing
+#endif
+
class QOCIDriver;
class QOCICols;
struct QOCIDriverPrivate;
diff --git a/src/sql/drivers/odbc/qsql_odbc.h b/src/sql/drivers/odbc/qsql_odbc.h
index 18a3c68b57..4e60e90c11 100644
--- a/src/sql/drivers/odbc/qsql_odbc.h
+++ b/src/sql/drivers/odbc/qsql_odbc.h
@@ -74,6 +74,11 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
+#if 0
+#pragma qt_no_master_include
+#pragma qt_sync_stop_processing
+#endif
+
class QODBCPrivate;
class QODBCDriverPrivate;
class QODBCDriver;
diff --git a/src/sql/drivers/psql/qsql_psql.h b/src/sql/drivers/psql/qsql_psql.h
index 4a2ec12bf1..fd02b3563f 100644
--- a/src/sql/drivers/psql/qsql_psql.h
+++ b/src/sql/drivers/psql/qsql_psql.h
@@ -58,6 +58,11 @@ typedef struct pg_result PGresult;
QT_BEGIN_NAMESPACE
+#if 0
+#pragma qt_no_master_include
+#pragma qt_sync_stop_processing
+#endif
+
class QPSQLResultPrivate;
class QPSQLDriverPrivate;
class QPSQLDriver;
diff --git a/src/sql/drivers/sqlite/qsql_sqlite.h b/src/sql/drivers/sqlite/qsql_sqlite.h
index 1b09ff505d..0dfb1f6207 100644
--- a/src/sql/drivers/sqlite/qsql_sqlite.h
+++ b/src/sql/drivers/sqlite/qsql_sqlite.h
@@ -57,6 +57,12 @@ struct sqlite3;
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
+
+#if 0
+#pragma qt_no_master_include
+#pragma qt_sync_stop_processing
+#endif
+
class QSQLiteDriverPrivate;
class QSQLiteResultPrivate;
class QSQLiteDriver;
diff --git a/src/sql/drivers/sqlite2/qsql_sqlite2.h b/src/sql/drivers/sqlite2/qsql_sqlite2.h
index 5e1501671e..9e832dc360 100644
--- a/src/sql/drivers/sqlite2/qsql_sqlite2.h
+++ b/src/sql/drivers/sqlite2/qsql_sqlite2.h
@@ -58,6 +58,11 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
+#if 0
+#pragma qt_no_master_include
+#pragma qt_sync_stop_processing
+#endif
+
class QSQLite2DriverPrivate;
class QSQLite2ResultPrivate;
class QSQLite2Driver;
diff --git a/src/sql/drivers/tds/qsql_tds.h b/src/sql/drivers/tds/qsql_tds.h
index 55df21b163..81f1c7b754 100644
--- a/src/sql/drivers/tds/qsql_tds.h
+++ b/src/sql/drivers/tds/qsql_tds.h
@@ -71,6 +71,11 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
+#if 0
+#pragma qt_no_master_include
+#pragma qt_sync_stop_processing
+#endif
+
class QTDSDriverPrivate;
class QTDSResultPrivate;
class QTDSDriver;
diff --git a/src/tools/qdoc/doc/qdoc-manual.qdoc b/src/tools/qdoc/doc/qdoc-manual.qdoc
index f584631312..d673ee30e1 100644
--- a/src/tools/qdoc/doc/qdoc-manual.qdoc
+++ b/src/tools/qdoc/doc/qdoc-manual.qdoc
@@ -128,7 +128,7 @@
\endcode
From the qdoc comment above, QDoc generates the now famous HTML
- page \l {http://doc.qt.nokia.com/qobject.html#details}
+ page \l {http://qt-project.org/doc/qt-5.0/qtcore/qobject.html#details}
{QObject Class Reference}.
This manual explains how to use the QDoc commands in qdoc comments
@@ -1744,10 +1744,10 @@
\printuntil hello
First we create a \l
- {http://qt.nokia.com/doc/4.0/qapplication} {QApplication}
+ {http://qt-project.org/doc/qt-5.0/qtwidgets/qapplication.html} {QApplication}
object using the \c argc and \c argv parameters, then we
create a \l
- {http://qt.nokia.com/doc/4.0/qpushbutton} {QPushButton}.
+ {http://qt-project.org/doc/qt-5.0/qtwidgets/qpushbutton.html} {QPushButton}.
\endquotation
(\l {Example File} {The complete example file...})
@@ -2060,16 +2060,16 @@
\code
/ *!
- Read the \l {http://qt.nokia.com/doc/4.0/}
- {Qt's Reference Documentation} carefully.
+ Read the \l {http://qt-project.org/doc/qt-5.0/}
+ {Qt 5.0 Documentation} carefully.
* /
\endcode
QDoc renders this as:
\quotation
- Read the \l {http://qt.nokia.com/doc/4.0/}
- {Qt's Reference Documentation} carefully.
+ Read the \l {http://qt-project.org/doc/qt-5.0/}
+ {Qt 5.0 Documentation} carefully.
\endquotation
If the link target is equivalent to the link text, the second
@@ -2142,7 +2142,7 @@
\li \c {\l network.html} - The file name used in a \l
{page-command} {\\page} command.
- \li \c {\l http://qt.nokia.com/} - A URL.
+ \li \c {\l http://qt-project.org/} - A URL.
\endlist
@@ -2271,7 +2271,7 @@
From other documents, the target name can be linked this way:
\list
- \li \c {\l http://doc.qt.nokia.com/4.0/qregexp.html#capturing-parentheses}
+ \li \c {\l http://qt-project.org/doc/qt-5.0/qtcore/qregexp.html#capturing-parentheses}
\endlist
See also \l {l-command} {\\l}, \l {sa-command} {\\sa} and \l
@@ -2610,7 +2610,7 @@
<tr valign="top" bgcolor="#d0d0d0">
<td>
- <a href="http://qt.nokia.com/doc/4.0/signalsandslots.html">
+ <a href="http://qt-project.org/doc/qt-5.0/qtcore/signalsandslots.html">
Signals and Slots</a>
</td>
<td>Signals and slots are used for communication
@@ -2619,7 +2619,7 @@
<tr valign="top" bgcolor="#c0c0c0">
<td>
- <a href=http://qt.nokia.com/doc/4.0/layout.html">
+ <a href="http://qt-project.org/doc/qt-5.0/qtwidgets/layout.html">
Layout Management</a></td>
<td>The Qt layout system provides a simple
and powerful way of specifying the layout
@@ -2628,7 +2628,7 @@
<tr valign="top" bgcolor="#d0d0d0">
<td>
- <a href=http://qt.nokia.com/doc/4.0/dnd.html">
+ <a href="http://qt-project.org/doc/qt-5.0/qtgui/dnd.html">
Drag and Drop</a></td>
<td>Drag and drop provides a simple visual
mechanism which users can use to transfer
@@ -2729,7 +2729,7 @@
<tr valign="top" bgcolor="#d0d0d0">
<td>
- <a href="http://qt.nokia.com/doc/4.0/signalsandslots.html">
+ <a href="http://qt-project.org/doc/qt-5.0/qtcore/signalsandslots.html">
Signals and Slots</a>
</td>
<td>Signals and slots are used for communication
@@ -2791,7 +2791,7 @@
<tr valign="top" bgcolor="#d0d0d0">
<td>
- <a href="http://qt.nokia.com/doc/4.0/signalsandslots.html">
+ <a href="http://qt-project.org/doc/qt-5.0/qtcore/signalsandslots.html">
Signals and Slots</a>
</td>
<td>Signals and slots are used for communication
@@ -2800,7 +2800,7 @@
<tr valign="top" bgcolor="#c0c0c0">
<td>
- <a href=http://qt.nokia.com/doc/4.0/layout.html">
+ <a href="http://qt-project.org/doc/qt-5.0/qtwidgets/layout.html">
Layout Management</a></td>
<td>The Qt layout system provides a simple
and powerful way of specifying the layout
@@ -2809,7 +2809,7 @@
<tr valign="top" bgcolor="#d0d0d0">
<td>
- <a href=http://qt.nokia.com/doc/4.0/dnd.html">
+ <a href="http://qt-project.org/doc/qt-5.0/qtgui/dnd.html">
Drag and Drop</a></td>
<td>Drag and drop provides a simple visual
mechanism which users can use to transfer
@@ -3213,7 +3213,7 @@
\quotation
\raw HTML
<h3>geometry :
- <a href="http://qt.nokia.com/doc/4.0/qrect.html">QRect</a>
+ <a href="http://qt-project.org/doc/qt-5.0/qtcore/qrect.html">QRect</a>
</h3>
\endraw
@@ -3704,11 +3704,11 @@
\l{GNU Lesser General Public License (LGPL)} or the
\l{Qt Commercial Edition}{Qt Commercial License Agreement}, but rather under
specific licenses from the original authors. Some pieces of code were developed
- by Nokia and others originated from third parties.
+ by Digia and others originated from third parties.
This page lists the licenses used, names the authors, and links
to the places where it is used.
- Nokia gratefully acknowledges these and other contributions
+ Digia gratefully acknowledges these and other contributions
to Qt. We recommend that programs that use Qt also acknowledge
these contributions, and quote these license statements in an
appendix to the documentation.
@@ -4642,11 +4642,11 @@
Files:
\list
- \li \l{http://qt.nokia.com/doc/4.0/widgets-imageviewer-imageviewer-cpp.html}
+ \li \l{http://qt-project.org/doc/qt-5.0/qtwidgets/widgets-imageviewer-imageviewer-cpp.html}
{widgets/imageviewer/imageviewer.cpp}
- \li \l{http://qt.nokia.com/doc/4.0/widgets-imageviewer-imageviewer-h.html}
+ \li \l{http://qt-project.org/doc/qt-5.0/qtwidgets/widgets-imageviewer-imageviewer-h.html}
{widgets/imageviewer/imageviewer.h}
- \li \l{http://qt.nokia.com/doc/4.0/widgets-imageviewer-main-cpp.html}
+ \li \l{http://qt-project.org/doc/qt-5.0/qtwidgets/widgets-imageviewer-main-cpp.html}
{widgets/imageviewer/main.cpp}
\endlist
@@ -4663,7 +4663,7 @@
\code
/ *!
- \externalpage http://doc.qt.nokia.com/index.html
+ \externalpage http://qt-project.org/doc/
\title Qt Documentation Site
* /
\endcode
@@ -4681,7 +4681,7 @@
QDoc renders this as:
\quotation
- At the \l {http://doc.qt.nokia.com/index.html}{Qt Documentation Site}
+ At the \l {http://qt-project.org/doc/}{Qt Documentation Site}
you can find the latest documentation for Qt, Qt Creator, the Qt SDK
and much more.
\endquotation
@@ -4692,7 +4692,7 @@
\code
/ *!
- At the \l {http://doc.qt.nokia.com/index.html}{Qt Documentation Site}
+ At the \l {http://qt-project.org/doc/}{Qt Documentation Site}
you can find the latest documentation for Qt, Qt Creator, the Qt SDK
and much more.
* /
@@ -4792,7 +4792,7 @@
<table width="100%">
<tr valign="top" bgcolor="#e0e0e0">
<td><b>
- <a href="http://qt.nokia.com/doc/4.0/qabstractsocket.html">QAbstractSocket</a>
+ <a href="http://qt-project.org/doc/qt-5.0/qtnetwork/qabstractsocket.html">QAbstractSocket</a>
</b></td>
<td>
The base functionality common to all socket types
@@ -4800,7 +4800,7 @@
<tr valign="top" bgcolor="#e0e0e0">
<td><b>
- <a href="http://qt.nokia.com/doc/4.0/qbuffer.html">QBuffer</a>
+ <a href="http://qt-project.org/doc/qt-5.0/qtcore/qbuffer.html">QBuffer</a>
</b></td>
<td>
QIODevice interface for a QByteArray
@@ -4808,7 +4808,7 @@
<tr valign="top" bgcolor="#e0e0e0">
<td><b>
- <a href="http://qt.nokia.com/doc/4.0/qclipboard.html">QClipboard</a>
+ <a href="http://qt-project.org/doc/qt-5.0/qtgui/qclipboard.html">QClipboard</a>
</b></td>
<td>
Access to the window system clipboard
@@ -4884,7 +4884,7 @@
<h3>Functions</h3>
<ul>
<li>RandomAccessIterator
- <a href="http://qt.nokia.com/doc/4.0/qlineedit.html#EchoMode-enum">qBinaryFind</a></b>
+ <a href="http://qt-project.org/doc/qt-5.0/qtcore/qtalgorithms.html#qBinaryFind">qBinaryFind</a></b>
(RandomAccessIterator begin, RandomAccessIterator end,
const T & value)</li>
<li>...</li></ul>
@@ -5054,7 +5054,7 @@
<table width="100%">
<tr valign="top" bgcolor="#d0d0d0">
<td><b>
- <a href="http://qt.nokia.com/doc/4.0/qabstractsocket.html">QAbstractSocket</a>
+ <a href="http://qt-project.org/doc/qt-5.0/qtnetwork/qabstractsocket.html">QAbstractSocket</a>
</b></td>
<td>
The base functionality common to all socket types
@@ -5062,7 +5062,7 @@
<tr valign="top" bgcolor="#d0d0d0">
<td><b>
- <a href="http://qt.nokia.com/doc/4.0/qftp.html">QFtp</a>
+ <a href="http://doc.qt.digia.com/4.0/qftp.html">QFtp</a>
</b></td>
<td>
Implementation of the FTP protocol
@@ -5133,7 +5133,7 @@
<pre>#include &lt;Qt&gt;</pre>
<ul>
<li>
- <a href="http://qt.nokia.com/doc/4.0/qt-qt3.html">
+ <a href="http://doc.qt.digia.com/4.0/qt-qt3.html">
Qt 3 support members</a></li>
</ul>
@@ -5141,7 +5141,7 @@
<h3>Types</h3>
<ul>
<li>flags
- <a href="http://qt.nokia.com/doc/4.0/qt.html#AlignmentFlag-enum">Alignment</a></b></li>
+ <a href="http://doc.qt.digia.com/4.0/qt.html#AlignmentFlag-enum">Alignment</a></b></li>
<li>...</li></ul>
<hr />
\endraw
@@ -5332,7 +5332,7 @@
The \\qmlattachedproperty command is for documenting a QML
property that will be attached to some QML type. See
- \l{http://doc.qt.nokia.com/4.7/qdeclarativeintroduction.html#attached-properties}
+ \l{http://qt-project.org/doc/qt-4.7/qdeclarativeintroduction.html#attached-properties}
{Attached Properties}. The argument is the rest of the line. The
argument text should be the property type, followed by the QML
element name where the property is being declared, the \c{::}
@@ -5357,14 +5357,14 @@
\endcode
QDoc includes this attached property on the QML reference page for the
- \l{http://doc.qt.nokia.com/4.7/qml-listview.html#isCurrentItem-prop}
+ \l{http://qt-project.org/doc/qt-4.7/qml-listview.html#isCurrentItem-prop}
{ListView} element.
\target qmlattachedsignal-command
\section1 \\qmlattachedsignal
The \\qmlattachedsignal command is for documenting an attachable
- \l{http://doc.qt.nokia.com/4.7/qdeclarativeintroduction.html#signal-handlers}
+ \l{http://qt-project.org/doc/qt-4.7/qdeclarativeintroduction.html#signal-handlers}
{signal handler}. The \\qmlattachedsignal command is used just like
the \l{qmlsignal-command} {\\qmlsignal} command.
@@ -5383,7 +5383,7 @@
\endcode
QDoc includes this documentation on the QML reference page for the
- \l{http://doc.qt.nokia.com/4.7/qml-gridview.html#onAdd-signal}
+ \l{http://qt-project.org/doc/qt-4.7/qml-gridview.html#onAdd-signal}
{GridView} element.
\target qmlbasictype-command
@@ -5394,10 +5394,10 @@
QML basic types group using the \l{ingroup-command}{\\ingroup}
command as shown below. This will cause QDoc to include the
documentation for the type on the
- \l{http://doc.qt.nokia.com/4.7/qdeclarativebasictypes.html}
+ \l{http://qt-project.org/doc/qt-4.7/qdeclarativebasictypes.html}
{QML Basic Types} page. The \l{brief-command} {\\brief} command
is also required, because it appears on the
- \l{http://doc.qt.nokia.com/4.7/qdeclarativebasictypes.html}
+ \l{http://qt-project.org/doc/qt-4.7/qdeclarativebasictypes.html}
{QML Basic Types} page as well.
\code
@@ -5421,7 +5421,7 @@
* /
\endcode
- QDoc outputs this as \l{http://doc.qt.nokia.com/4.7/qml-int.html}
+ QDoc outputs this as \l{http://qt-project.org/doc/qt-4.7/qml-int.html}
{qml-int.html}.
\target qmlclass-command
@@ -5464,7 +5464,7 @@
\endcode
This example generates the
- \l {http://doc.qt.nokia.com/4.7/qml-transform.html} {QML Transform}
+ \l {http://qt-project.org/doc/qt-4.7/qml-transform.html} {QML Transform}
page. The \\qmlclass comment should include the \l
{since-command} {\\since} command, because all QML types are
new. It should also include the \l{brief-command} {\\brief}
@@ -5496,7 +5496,7 @@
\endcode
QDoc includes this documentation on the element refence page for the
- \l{http://doc.qt.nokia.com/4.7/qml-textinput.html#select-method}
+ \l{http://qt-project.org/doc/qt-4.7/qml-textinput.html#select-method}
{TextInput} element.
\target qmltype-command
@@ -5538,7 +5538,7 @@
\endcode
The example generates the \l
- {http://doc.qt.nokia.com/4.7/qml-transform.html} {QML Transform}
+ {http://qt-project.org/doc/qt-4.7/qml-transform.html} {QML Transform}
page. The \e{\\qmltype} comment includes \l{instantiates-command}
{\\instantiates} to specify that a Transform is instantiated by
the C++ class QGraphicsTransform. A \\qmltype comment should
@@ -5572,7 +5572,7 @@
\endcode
QDoc includes this documentation on the element refence page for the
- \l{http://doc.qt.nokia.com/4.7/qml-textinput.html#select-method}
+ \l{http://qt-project.org/doc/qt-4.7/qml-textinput.html#select-method}
{TextInput} element.
\target qmlproperty-command
@@ -5594,7 +5594,7 @@
\endcode
QDoc includes this QML property on the QML reference page for the
- \l {http://doc.qt.nokia.com/4.7/qml-translate.html} {Translate}
+ \l {http://qt-project.org/doc/qt-4.7/qml-translate.html} {Translate}
element.
\target qmlsignal-command
@@ -5616,7 +5616,7 @@
\endcode
QDoc includes this documentation on the QML reference page for the
- \l{http://doc.qt.nokia.com/4.7/qml-mousearea.html#onEntered-signal}
+ \l{http://qt-project.org/doc/qt-4.7/qml-mousearea.html#onEntered-signal}
{MouseArea} element.
\target qmlmodule-command
@@ -5694,7 +5694,7 @@
\endcode
The example generates the \l
- {http://doc.qt.nokia.com/4.7/qml-transform.html} {QML Transform}
+ {http://qt-project.org/doc/qt-4.7/qml-transform.html} {QML Transform}
page. The \e{\\qmltype} comment includes \l{instantiates-command}
{\\instantiates} to specify that a Transform is instantiated by
the C++ class QGraphicsTransform. A \\qmltype comment should
@@ -5814,7 +5814,7 @@
\quotation
\raw HTML
<h3>
- <a href="http://qt.nokia.com/doc/4.0/qpalette.html">
+ <a href="http://qt-project.org/doc/qt-5.0/qtgui/qpalette.html">
QPalette
</a>
QStyleOption::palette
@@ -6169,7 +6169,7 @@
library.} It is provided to keep old source code
working. We strongly advise against using it in new
code. See the \l
- {http://qt.nokia.com/doc/4.0/porting4.html} {Porting
+ {http://doc.qt.digia.com/4.0/porting4.html} {Porting
Guide} for more information.
\endquotation
@@ -6218,7 +6218,7 @@
\section1 \\default
The \\default command is for marking a QML property as the
- \l {http://doc.qt.nokia.com/4.7/qdeclarativeintroduction.html#default-properties}
+ \l {http://qt-project.org/doc/qt-4.7/qdeclarativeintroduction.html#default-properties}
{default property}. The word \span {class="newStuff"} {default} is shown in red in
the documentation of the property.
@@ -6235,7 +6235,7 @@
\endcode
See how QDoc renders this property on the reference page for the
- \l {http://doc.qt.nokia.com/4.7/qml-state.html#changes-prop} {State}
+ \l {http://qt-project.org/doc/qt-4.7/qml-state.html#changes-prop} {State}
type.
\target obsolete-command
@@ -6350,7 +6350,7 @@
\quotation
\raw HTML
<h3>
- <a href="http://qt.nokia.com/doc/4.0/qchar.html#Joining-enum">Joining</a>
+ <a href="http://qt-project.org/doc/qt-5.0/qtcore/qchar.html#Joining-enum">Joining</a>
QChar::joining () const</h3>
\endraw
@@ -6369,7 +6369,7 @@
\list
\li ...
\li Joining
- \l {http://qt.nokia.com/doc/4.0/qchar.html#Joining-enum}
+ \l {http://qt-project.org/doc/qt-5.0/qtcore/qchar.html#Joining-enum}
{joining}()
const \c (preliminary)
\li ...
@@ -6658,11 +6658,11 @@
\endcode
QDoc includes this line on the reference page for the
- \l{http://doc.qt.nokia.com/4.7/qml-pauseanimation.html} {PauseAnimation}
+ \l{http://qt-project.org/doc/qt-4.7/qml-pauseanimation.html} {PauseAnimation}
element:
\quotation
- Inherits \l{http://doc.qt.nokia.com/4.7/qml-animation.html} {Animation}
+ Inherits \l{http://qt-project.org/doc/qt-4.7/qml-animation.html} {Animation}
\endquotation
\target overload-command
@@ -6707,13 +6707,13 @@
\quotation
\raw HTML
- <h3><a href="http://qt.nokia.com/doc/4.0/qaction.html">QAction</a>
+ <h3><a href="http://qt-project.org/doc/qt-5.0/qtwidgets/qaction.html">QAction</a>
* QMenu::addAction ( const QIcon & <i>icon</i>,
const QString & <i>text</i> )
</h3>
\endraw
- This function overloads \l {http://qt.nokia.com/doc/4.0/qwidget.html#addAction} {addAction()}
+ This function overloads \l {http://qt-project.org/doc/qt-5.0/qtwidgets/qwidget.html#addAction} {addAction()}
This convenience function creates a new action with an
\e icon and some \e text. The function adds the newly
@@ -6721,7 +6721,7 @@
returns it.
See also
- \l {http://qt.nokia.com/doc/4.0/qwidget.html#addAction}
+ \l {http://qt-project.org/doc/qt-5.0/qtwidgets/qwidget.html#addAction}
{QWidget::addAction}().
\endquotation
@@ -6832,7 +6832,7 @@
list created by calling the \l {generatelist-command}
{\\generatelist} command with the \c mainclasses argument:
- \l http://qt.nokia.com/doc/4.0/mainclasses.html
+ \l http://doc.qt.digia.com/4.0/mainclasses.html
\note The Qt documentation no longer includes the \e mainclasses
page.
@@ -7026,7 +7026,7 @@
is created actually contains XML text, but the \e{.ditamap} suffix is
used to identify the file as containing a DITA MAP.
- The argument is the name of the the file to be created. In the following
+ The argument is the name of the file to be created. In the following
example, the file \e{creator.ditamap} is output:
\code
\ditamap creator.ditamap
@@ -8450,7 +8450,7 @@
\endcode
The complete variable entry in \l qt.qdocconf provides the
- standard footer of the \l {http://qt.nokia.com/doc/4.0/index.html}
+ standard footer of the \l {http://doc.qt.digia.com/4.0/index.html}
{Qt Reference Documentation}.
\target HTML.postheader-variable
@@ -8479,7 +8479,7 @@
\endcode
The complete variable entry in \l qt.qdocconf provides the
- standard header of the \l {http://doc.qt.nokia.com/}
+ standard header of the \l {http://doc.qt.digia.com/}
{Qt Reference Documentation}.
\target HTML.style-variable
@@ -8506,7 +8506,7 @@
\endcode
provides the HTML style for the \l
- {http://qt.nokia.com/doc/4.0/index.html} {Qt Reference
+ {http://doc.qt.digia.com/4.0/index.html} {Qt Reference
Documentation}.
\target HTML.stylesheets-variable
@@ -8599,14 +8599,14 @@
\code
project = Qt
description = Qt Reference Documentation
- url = http://doc.qt.nokia.com/4.7
+ url = http://qt-project.org/doc/qt-4.8/
...
\endcode
This makes sure that whenever \c qt.index is used to generate
references to for example Qt classes, the base URL is \c
- http://doc.qt.nokia.com/4.7.
+ http://doc.qt.digia.com/4.7.
See also \l indexes.
@@ -8622,7 +8622,7 @@
\code
project = Qt
description = Qt Reference Documentation
- url = http://doc.qt.nokia.com/4.7
+ url = http://qt-project.org/doc/qt-4.8/
...
\endcode
@@ -8641,8 +8641,8 @@
\code
project = QtCreator
- description = Qt Creator Class Documentation
- url = http://doc.qt.nokia.com/qtcreator-2.2
+ description = Qt Creator Manual
+ url = http://qt-project.org/doc/qtcreator-2.6/
indexes = $QTDIR/doc/html/qt.index
@@ -8806,6 +8806,6 @@
*/
/*!
- \externalpage http://qt.nokia.com/about
+ \externalpage http://qt-project.org/about
\title About Qt
*/
diff --git a/src/tools/qdoc/main.cpp b/src/tools/qdoc/main.cpp
index 064617e6f4..e6fdbc8ab6 100644
--- a/src/tools/qdoc/main.cpp
+++ b/src/tools/qdoc/main.cpp
@@ -357,8 +357,8 @@ static void processQdocconfFile(const QString &fileName)
QSet<QString> outputFormats = config.getOutputFormats();
Location outputFormatsLocation = config.lastLocation();
- if (!Generator::runPrepareOnly())
- loadIndexFiles(config);
+ //if (!Generator::runPrepareOnly())
+ loadIndexFiles(config);
QSet<QString> excludedDirs;
QSet<QString> excludedFiles;
diff --git a/src/tools/qdoc/qdocindexfiles.cpp b/src/tools/qdoc/qdocindexfiles.cpp
index fec4f304e3..a15f0219b5 100644
--- a/src/tools/qdoc/qdocindexfiles.cpp
+++ b/src/tools/qdoc/qdocindexfiles.cpp
@@ -555,7 +555,10 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter& writer,
Node* node,
bool generateInternalNodes)
{
- if (node->subType() == Node::DitaMap)
+ /*
+ Don't include index nodes in a new index file. Or DITA map nodes.
+ */
+ if (node->isIndexNode() || node->subType() == Node::DitaMap)
return false;
QString nodeName;
diff --git a/src/widgets/dialogs/qdialog.cpp b/src/widgets/dialogs/qdialog.cpp
index 290f0a7f65..a765e8b7ef 100644
--- a/src/widgets/dialogs/qdialog.cpp
+++ b/src/widgets/dialogs/qdialog.cpp
@@ -827,9 +827,12 @@ void QDialog::adjustPosition(QWidget* w)
if (w) {
- // Use mapToGlobal rather than geometry() in case w might
- // be embedded in another application
- QPoint pp = w->mapToGlobal(QPoint(0,0));
+ // Use pos() if the widget is embedded into a native window
+ QPoint pp;
+ if (w->windowHandle() && w->windowHandle()->property("_q_embedded_native_parent_handle").value<WId>())
+ pp = w->pos();
+ else
+ pp = w->mapToGlobal(QPoint(0,0));
p = QPoint(pp.x() + w->width()/2,
pp.y() + w->height()/ 2);
} else {
diff --git a/src/widgets/doc/src/widgets-and-layouts/gallery-fusion.qdoc b/src/widgets/doc/src/widgets-and-layouts/gallery-fusion.qdoc
index 9b2b5913ba..f6c4ed9cd5 100644
--- a/src/widgets/doc/src/widgets-and-layouts/gallery-fusion.qdoc
+++ b/src/widgets/doc/src/widgets-and-layouts/gallery-fusion.qdoc
@@ -58,7 +58,7 @@
\table 100%
\row
\li \image fusion-groupbox.png
- The The QGroupBox widget provides a group box frame with a title.
+ The QGroupBox widget provides a group box frame with a title.
\li \image fusion-tabwidget.png
The QTabWidget class provides a stack of tabbed widgets.
\li \image fusion-frame.png
diff --git a/src/widgets/doc/src/widgets-and-layouts/gallery-gtk.qdoc b/src/widgets/doc/src/widgets-and-layouts/gallery-gtk.qdoc
index fb1a02e5dc..b584582850 100644
--- a/src/widgets/doc/src/widgets-and-layouts/gallery-gtk.qdoc
+++ b/src/widgets/doc/src/widgets-and-layouts/gallery-gtk.qdoc
@@ -62,7 +62,7 @@
\table 100%
\row
\li \image gtk-groupbox.png
- The The QGroupBox widget provides a group box frame with a title.
+ The QGroupBox widget provides a group box frame with a title.
\li \image gtk-tabwidget.png
The QTabWidget class provides a stack of tabbed widgets.
\li \image gtk-frame.png
diff --git a/src/widgets/doc/src/widgets-and-layouts/gallery-macintosh.qdoc b/src/widgets/doc/src/widgets-and-layouts/gallery-macintosh.qdoc
index 5db5f17974..9a0ff587a3 100644
--- a/src/widgets/doc/src/widgets-and-layouts/gallery-macintosh.qdoc
+++ b/src/widgets/doc/src/widgets-and-layouts/gallery-macintosh.qdoc
@@ -62,7 +62,7 @@
\table 100%
\row
\li \image macintosh-groupbox.png
- The The QGroupBox widget provides a group box frame with a title.
+ The QGroupBox widget provides a group box frame with a title.
\li \image macintosh-tabwidget.png
The QTabWidget class provides a stack of tabbed widgets.
\li \image macintosh-frame.png
diff --git a/src/widgets/doc/src/widgets-and-layouts/gallery-windows.qdoc b/src/widgets/doc/src/widgets-and-layouts/gallery-windows.qdoc
index 2505d20c3f..7fb7ea00b5 100644
--- a/src/widgets/doc/src/widgets-and-layouts/gallery-windows.qdoc
+++ b/src/widgets/doc/src/widgets-and-layouts/gallery-windows.qdoc
@@ -58,7 +58,7 @@
\table 100%
\row
\li \image windows-groupbox.png
- The The QGroupBox widget provides a group box frame with a title.
+ The QGroupBox widget provides a group box frame with a title.
\li \image windows-tabwidget.png
The QTabWidget class provides a stack of tabbed widgets.
\li \image windows-frame.png
diff --git a/src/widgets/doc/src/widgets-and-layouts/gallery-windowsvista.qdoc b/src/widgets/doc/src/widgets-and-layouts/gallery-windowsvista.qdoc
index 3e9b89832c..1055f2554b 100644
--- a/src/widgets/doc/src/widgets-and-layouts/gallery-windowsvista.qdoc
+++ b/src/widgets/doc/src/widgets-and-layouts/gallery-windowsvista.qdoc
@@ -62,7 +62,7 @@
\table 100%
\row
\li \image windowsvista-groupbox.png
- The The QGroupBox widget provides a group box frame with a title.
+ The QGroupBox widget provides a group box frame with a title.
\li \image windowsvista-tabwidget.png
The QTabWidget class provides a stack of tabbed widgets.
\li \image windowsvista-frame.png
diff --git a/src/widgets/doc/src/widgets-and-layouts/gallery-windowsxp.qdoc b/src/widgets/doc/src/widgets-and-layouts/gallery-windowsxp.qdoc
index 4fad7a55bd..629a53ebed 100644
--- a/src/widgets/doc/src/widgets-and-layouts/gallery-windowsxp.qdoc
+++ b/src/widgets/doc/src/widgets-and-layouts/gallery-windowsxp.qdoc
@@ -62,7 +62,7 @@
\table 100%
\row
\li \image windowsxp-groupbox.png
- The The QGroupBox widget provides a group box frame with a title.
+ The QGroupBox widget provides a group box frame with a title.
\li \image windowsxp-tabwidget.png
The QTabWidget class provides a stack of tabbed widgets.
\li \image windowsxp-frame.png
diff --git a/src/widgets/doc/src/widgets-and-layouts/stylesheet.qdoc b/src/widgets/doc/src/widgets-and-layouts/stylesheet.qdoc
index 2d9d5bba33..a1074a9064 100644
--- a/src/widgets/doc/src/widgets-and-layouts/stylesheet.qdoc
+++ b/src/widgets/doc/src/widgets-and-layouts/stylesheet.qdoc
@@ -813,7 +813,7 @@
In the case of a checkable QGroupBox, the title includes the
check indicator. The indicator is styled using the
- the \l{#indicator-sub}{::indicator} subcontrol. The
+ \l{#indicator-sub}{::indicator} subcontrol. The
\l{#spacing-prop}{spacing} property can be used to control
the spacing between the text and indicator.
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp
index ed6262ce93..098a439a05 100644
--- a/src/widgets/kernel/qapplication.cpp
+++ b/src/widgets/kernel/qapplication.cpp
@@ -579,6 +579,7 @@ void QApplicationPrivate::construct()
void qRegisterGuiStateMachine();
void qUnregisterGuiStateMachine();
#endif
+extern void qRegisterWidgetsVariant();
/*!
\fn void QApplicationPrivate::initialize()
@@ -590,6 +591,9 @@ void QApplicationPrivate::initialize()
QWidgetPrivate::mapper = new QWidgetMapper;
QWidgetPrivate::allWidgets = new QWidgetSet;
+ // needed for a static build.
+ qRegisterWidgetsVariant();
+
if (application_type != QApplicationPrivate::Tty)
(void) QApplication::style(); // trigger creation of application style
#ifndef QT_NO_STATEMACHINE
@@ -2217,12 +2221,17 @@ Q_WIDGETS_EXPORT bool qt_tryModalHelper(QWidget *widget, QWidget **rettop)
bool QApplicationPrivate::isBlockedByModal(QWidget *widget)
{
widget = widget->window();
- return self->isWindowBlocked(widget->windowHandle());
+ QWindow *window = widget->windowHandle();
+ return window && self->isWindowBlocked(window);
}
bool QApplicationPrivate::isWindowBlocked(QWindow *window, QWindow **blockingWindow) const
{
QWindow *unused = 0;
+ if (!window) {
+ qWarning().nospace() << "window == 0 passed.";
+ return false;
+ }
if (!blockingWindow)
blockingWindow = &unused;
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index ecf73ee777..c4ea213f29 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -2080,8 +2080,15 @@ void QWidgetPrivate::setOpaque(bool opaque)
void QWidgetPrivate::updateIsTranslucent()
{
Q_Q(QWidget);
- if (QWindow *window = q->windowHandle())
- window->setOpacity(isOpaque ? qreal(1.0) : qreal(0.0));
+ if (QWindow *window = q->windowHandle()) {
+ QSurfaceFormat format = window->format();
+ const int oldAlpha = format.alphaBufferSize();
+ const int newAlpha = q->testAttribute(Qt::WA_TranslucentBackground)? 8 : 0;
+ if (oldAlpha != newAlpha) {
+ format.setAlphaBufferSize(newAlpha);
+ window->setFormat(format);
+ }
+ }
}
static inline void fillRegion(QPainter *painter, const QRegion &rgn, const QBrush &brush)
diff --git a/src/widgets/kernel/qwidgetwindow.cpp b/src/widgets/kernel/qwidgetwindow.cpp
index 78d6a293b9..e9f41be9aa 100644
--- a/src/widgets/kernel/qwidgetwindow.cpp
+++ b/src/widgets/kernel/qwidgetwindow.cpp
@@ -597,12 +597,14 @@ void QWidgetWindow::handleWindowStateChangedEvent(QWindowStateChangeEvent *event
if (QTLWExtra *tle = m_widget->d_func()->maybeTopData())
tle->normalGeometry = m_widget->geometry();
widgetState |= Qt::WindowMaximized;
+ widgetState &= ~(Qt::WindowMinimized | Qt::WindowFullScreen);
break;
case Qt::WindowFullScreen:
if (effectiveState(widgetState) == Qt::WindowNoState)
if (QTLWExtra *tle = m_widget->d_func()->maybeTopData())
tle->normalGeometry = m_widget->geometry();
widgetState |= Qt::WindowFullScreen;
+ widgetState &= ~(Qt::WindowMinimized);
break;
case Qt::WindowActive: // Not handled by QWindow
break;
diff --git a/src/widgets/styles/qcommonstyle.cpp b/src/widgets/styles/qcommonstyle.cpp
index 7519d7f910..75407c11c5 100644
--- a/src/widgets/styles/qcommonstyle.cpp
+++ b/src/widgets/styles/qcommonstyle.cpp
@@ -1149,7 +1149,7 @@ void QCommonStylePrivate::startAnimation(QStyleAnimation *animation) const
stopAnimation(animation->target());
q->connect(animation, SIGNAL(destroyed()), SLOT(_q_removeAnimation()), Qt::UniqueConnection);
animations.insert(animation->target(), animation);
- animation->start();
+ animation->start(QAbstractAnimation::DeleteWhenStopped);
}
/*! \internal */
diff --git a/src/widgets/styles/qgtkstyle.cpp b/src/widgets/styles/qgtkstyle.cpp
index 3ee242334d..33ed9e9b69 100644
--- a/src/widgets/styles/qgtkstyle.cpp
+++ b/src/widgets/styles/qgtkstyle.cpp
@@ -317,7 +317,7 @@ static GdkColor fromQColor(const QColor &color)
It does this by making use of the GTK+ theme engine, ensuring
that Qt applications look and feel native on these platforms.
- Note: The style requires GTK+ version 2.10 or later.
+ Note: The style requires GTK+ version 2.18 or later.
The Qt3-based "Qt" GTK+ theme engine will not work with QGtkStyle.
\sa QWindowsXPStyle, QMacStyle, QWindowsStyle, QFusionStyle
diff --git a/src/widgets/styles/qgtkstyle_p.cpp b/src/widgets/styles/qgtkstyle_p.cpp
index 782ef8d483..3ba1d07361 100644
--- a/src/widgets/styles/qgtkstyle_p.cpp
+++ b/src/widgets/styles/qgtkstyle_p.cpp
@@ -579,7 +579,17 @@ void QGtkStylePrivate::initGtkWidgets() const
addWidget(QGtkStylePrivate::gtk_combo_box_entry_new());
if (gtk_combo_box_new_with_entry)
addWidget(QGtkStylePrivate::gtk_combo_box_new_with_entry());
- addWidget(QGtkStylePrivate::gtk_entry_new());
+ GtkWidget *entry = QGtkStylePrivate::gtk_entry_new();
+ // gtk-im-context-none is supported in gtk+ since 2.19.5
+ // and also exists in gtk3
+ // http://git.gnome.org/browse/gtk+/tree/gtk/gtkimmulticontext.c?id=2.19.5#n33
+ // reason that we don't use gtk-im-context-simple here is,
+ // gtk-im-context-none has less overhead, and 2.19.5 is
+ // relatively old. and even for older gtk+, it will fallback
+ // to gtk-im-context-simple if gtk-im-context-none doesn't
+ // exists.
+ g_object_set(entry, "im-module", "gtk-im-context-none", NULL);
+ addWidget(entry);
addWidget(QGtkStylePrivate::gtk_frame_new(NULL));
addWidget(QGtkStylePrivate::gtk_expander_new(""));
addWidget(QGtkStylePrivate::gtk_statusbar_new());
diff --git a/src/widgets/styles/qmacstyle_mac.mm b/src/widgets/styles/qmacstyle_mac.mm
index bde33cdb97..9834d830ca 100644
--- a/src/widgets/styles/qmacstyle_mac.mm
+++ b/src/widgets/styles/qmacstyle_mac.mm
@@ -3101,7 +3101,7 @@ void QMacStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPai
CGContextScaleCTM(cg, 1, -1);
CGContextTranslateCTM(cg, -rect.origin.x, -rect.origin.y);
- [triangleCell drawBezelWithFrame:rect inView:[triangleCell controlView]];
+ [triangleCell drawBezelWithFrame:NSRectFromCGRect(rect) inView:[triangleCell controlView]];
[NSGraphicsContext restoreGraphicsState];
CGContextRestoreGState(cg);
@@ -5028,7 +5028,7 @@ void QMacStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComplex
// Draw the track when hovering
if (opt->activeSubControls || wasActive) {
- CGRect rect = [scroller bounds];
+ NSRect rect = [scroller bounds];
if (shouldExpand) {
if (isHorizontal)
rect.origin.y += 4.5 - expandOffset;
@@ -6518,6 +6518,9 @@ void qt_mac_clip_cg(CGContextRef hd, const QRegion &rgn, CGAffineTransform *orig
// move to QRegion?
void qt_mac_scale_region(QRegion *region, qreal scaleFactor)
{
+ if (!region || !region->rectCount())
+ return;
+
QVector<QRect> scaledRects;
scaledRects.reserve(region->rects().count());
diff --git a/src/widgets/styles/qstyleanimation.cpp b/src/widgets/styles/qstyleanimation.cpp
index 64cb23ca6d..a00637deb7 100644
--- a/src/widgets/styles/qstyleanimation.cpp
+++ b/src/widgets/styles/qstyleanimation.cpp
@@ -49,7 +49,6 @@ QT_BEGIN_NAMESPACE
QStyleAnimation::QStyleAnimation(QObject *target) : QAbstractAnimation(target),
_delay(0), _duration(-1), _startTime(QTime::currentTime())
{
- connect(this, SIGNAL(finished()), SLOT(deleteLater()));
}
QStyleAnimation::~QStyleAnimation()
diff --git a/src/widgets/styles/qwindowsvistastyle.cpp b/src/widgets/styles/qwindowsvistastyle.cpp
index 34fddde604..685b328a67 100644
--- a/src/widgets/styles/qwindowsvistastyle.cpp
+++ b/src/widgets/styles/qwindowsvistastyle.cpp
@@ -181,6 +181,24 @@ QStyleOption *clonedAnimationStyleOption(const QStyleOption*option) {
return styleOption;
}
+/* \internal
+ Used by animations to delete cloned styleoption
+*/
+void deleteClonedAnimationStyleOption(const QStyleOption *option)
+{
+ if (const QStyleOptionSlider *slider = qstyleoption_cast<const QStyleOptionSlider*>(option))
+ delete slider;
+ else if (const QStyleOptionSpinBox *spinbox = qstyleoption_cast<const QStyleOptionSpinBox*>(option))
+ delete spinbox;
+ else if (const QStyleOptionGroupBox *groupBox = qstyleoption_cast<const QStyleOptionGroupBox*>(option))
+ delete groupBox;
+ else if (const QStyleOptionComboBox *combo = qstyleoption_cast<const QStyleOptionComboBox*>(option))
+ delete combo;
+ else if (const QStyleOptionButton *button = qstyleoption_cast<const QStyleOptionButton*>(option))
+ delete button;
+ else
+ delete option;
+}
/*!
\class QWindowsVistaStyle
@@ -411,7 +429,7 @@ void QWindowsVistaStyle::drawPrimitive(PrimitiveElement element, const QStyleOpt
}
t->setStartTime(QTime::currentTime());
- delete styleOption;
+ deleteClonedAnimationStyleOption(styleOption);
d->startAnimation(t);
}
styleObject->setProperty("_q_no_animation", false);
@@ -940,7 +958,7 @@ void QWindowsVistaStyle::drawControl(ControlElement element, const QStyleOption
t->setStartTime(QTime::currentTime());
styleObject->setProperty("_q_no_animation", false);
- delete styleOption;
+ deleteClonedAnimationStyleOption(styleOption);
d->startAnimation(t);
}
@@ -1627,7 +1645,7 @@ void QWindowsVistaStyle::drawComplexControl(ComplexControl control, const QStyle
else
t->setDuration(500);
- delete styleOption;
+ deleteClonedAnimationStyleOption(styleOption);
d->startAnimation(t);
}
if (QWindowsVistaAnimation *anim = qobject_cast<QWindowsVistaAnimation *>(d->animation(styleObject))) {
diff --git a/src/widgets/widgets/qmenu.cpp b/src/widgets/widgets/qmenu.cpp
index 17f9ca7911..b3fc6524c5 100644
--- a/src/widgets/widgets/qmenu.cpp
+++ b/src/widgets/widgets/qmenu.cpp
@@ -2722,7 +2722,7 @@ void QMenu::keyPressEvent(QKeyEvent *e)
key_consumed = true;
if(d->scroll)
d->scrollMenu(nextAction, QMenuPrivate::QMenuScroller::ScrollCenter, false);
- d->setCurrentAction(nextAction, 20, QMenuPrivate::SelectedFromElsewhere, true);
+ d->setCurrentAction(nextAction, 0, QMenuPrivate::SelectedFromElsewhere, true);
if (!nextAction->menu() && activateAction) {
d->setSyncAction();
d->activateAction(nextAction, QAction::Trigger);