summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2014-09-22 14:17:52 +0200
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2014-09-23 11:23:36 +0200
commitc5a3e5edd9e63b18abf1838c86a27a662224b02c (patch)
tree9a367c113d9b586da73439cb100744d616ce6399 /src/corelib
parent3312ac91692c3a4a033d123eecbf982d3ff10471 (diff)
parenta5df2e7120412dfdedb9f4951cdb061c0f218bf7 (diff)
Merge remote-tracking branch 'origin/5.3' into 5.4
The isAlwaysAskOption was removed in 38621713150b663355ebeb799a5a50d8e39a3c38 so manually removed code in src/plugins/bearer/connman/qconnmanengine.cpp Conflicts: src/corelib/global/qglobal.h src/corelib/tools/qcollator_macx.cpp src/corelib/tools/qstring.cpp src/gui/kernel/qwindow.cpp src/gui/kernel/qwindow_p.h src/gui/text/qtextengine.cpp src/platformsupport/fontdatabases/fontconfig/qfontenginemultifontconfig_p.h src/plugins/platforms/android/qandroidinputcontext.cpp src/plugins/platforms/xcb/qglxintegration.cpp src/plugins/platforms/xcb/qglxintegration.h src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/testlib/qtestcase.cpp src/testlib/qtestlog.cpp src/widgets/dialogs/qfiledialog.cpp src/widgets/kernel/qwindowcontainer.cpp tests/auto/corelib/tools/qcollator/tst_qcollator.cpp tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp Change-Id: Ic5d4187f682257a17509f6cd28d2836c6cfe2fc8
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/arch/qatomic_mips.h2
-rw-r--r--src/corelib/global/qlogging.cpp9
-rw-r--r--src/corelib/global/qnamespace.qdoc2
-rw-r--r--src/corelib/global/qprocessordetection.h1
-rw-r--r--src/corelib/io/qdir_p.h11
-rw-r--r--src/corelib/io/qfile.cpp6
-rw-r--r--src/corelib/io/qfiledevice.cpp2
-rw-r--r--src/corelib/io/qfilesystemwatcher_fsevents.mm1
-rw-r--r--src/corelib/io/qfsfileengine.cpp3
-rw-r--r--src/corelib/io/qiodevice.cpp18
-rw-r--r--src/corelib/io/qprocess.cpp10
-rw-r--r--src/corelib/io/qtemporaryfile.cpp10
-rw-r--r--src/corelib/io/qtemporaryfile_p.h11
-rw-r--r--src/corelib/io/qtextstream.cpp2
-rw-r--r--src/corelib/io/qurl.cpp29
-rw-r--r--src/corelib/json/qjsonvalue.cpp12
-rw-r--r--src/corelib/kernel/kernel.pri2
-rw-r--r--src/corelib/kernel/qcoreapplication.cpp8
-rw-r--r--src/corelib/kernel/qeventloop_p.h11
-rw-r--r--src/corelib/kernel/qjni.cpp9
-rw-r--r--src/corelib/kernel/qmetaobject_moc_p.h11
-rw-r--r--src/corelib/kernel/qobject.cpp3
-rw-r--r--src/corelib/mimetypes/qmimedatabase_p.h11
-rw-r--r--src/corelib/mimetypes/qmimeglobpattern_p.h11
-rw-r--r--src/corelib/mimetypes/qmimemagicrule_p.h11
-rw-r--r--src/corelib/mimetypes/qmimemagicrulematcher_p.h11
-rw-r--r--src/corelib/mimetypes/qmimeprovider_p.h11
-rw-r--r--src/corelib/mimetypes/qmimetype_p.h11
-rw-r--r--src/corelib/mimetypes/qmimetypeparser_p.h11
-rw-r--r--src/corelib/plugin/qsystemlibrary_p.h11
-rw-r--r--src/corelib/thread/qbasicatomic.h2
-rw-r--r--src/corelib/tools/qcollator_macx.cpp2
-rw-r--r--src/corelib/tools/qcollator_p.h11
-rw-r--r--src/corelib/tools/qregularexpression.cpp4
-rw-r--r--src/corelib/tools/qsimd_p.h11
-rw-r--r--src/corelib/tools/qstring.cpp10
-rw-r--r--src/corelib/tools/qstringiterator_p.h11
-rw-r--r--src/corelib/tools/qunicodetools.cpp6
38 files changed, 248 insertions, 70 deletions
diff --git a/src/corelib/arch/qatomic_mips.h b/src/corelib/arch/qatomic_mips.h
index 7bfe16a450..33e7053234 100644
--- a/src/corelib/arch/qatomic_mips.h
+++ b/src/corelib/arch/qatomic_mips.h
@@ -121,7 +121,7 @@ void QBasicAtomicOps<size>::releaseMemoryFence(const T &) Q_DECL_NOTHROW
{
asm volatile (".set push\n"
".set mips32\n"
- "sync 0x11\n"
+ "sync 0x12\n"
".set pop\n" ::: "memory");
}
diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp
index 465e2a4b45..8b4245ccdc 100644
--- a/src/corelib/global/qlogging.cpp
+++ b/src/corelib/global/qlogging.cpp
@@ -1345,12 +1345,9 @@ static void qDefaultMsgHandler(QtMsgType type, const char *buf)
qDefaultMessageHandler(type, emptyContext, QString::fromLocal8Bit(buf));
}
-#if defined(Q_COMPILER_THREAD_LOCAL) || (defined(Q_CC_MSVC) && !defined(Q_OS_WINCE))
-#if defined(Q_CC_MSVC)
-static __declspec(thread) bool msgHandlerGrabbed = false;
-#else
+#if defined(Q_COMPILER_THREAD_LOCAL)
+
static thread_local bool msgHandlerGrabbed = false;
-#endif
static bool grabMessageHandler()
{
@@ -1369,7 +1366,7 @@ static void ungrabMessageHandler()
#else
static bool grabMessageHandler() { return true; }
static void ungrabMessageHandler() { }
-#endif // (Q_COMPILER_THREAD_LOCAL) || ((Q_CC_MSVC) && !(Q_OS_WINCE))
+#endif // (Q_COMPILER_THREAD_LOCAL)
static void qt_message_print(QtMsgType msgType, const QMessageLogContext &context, const QString &message)
{
diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc
index 8dca48d80d..044ba66a4c 100644
--- a/src/corelib/global/qnamespace.qdoc
+++ b/src/corelib/global/qnamespace.qdoc
@@ -125,7 +125,7 @@
to author a plugin. This includes avoiding loading our nib for the main
menu and not taking possession of the native menu bar. When setting this
attribute to true will also set the AA_DontUseNativeMenuBar attribute
- to true.
+ to true. It also disables native event filters.
\value AA_DontUseNativeMenuBar All menubars created while this attribute is
set to true won't be used as a native menubar (e.g, the menubar at
diff --git a/src/corelib/global/qprocessordetection.h b/src/corelib/global/qprocessordetection.h
index c9fb728593..47d6dcd7f6 100644
--- a/src/corelib/global/qprocessordetection.h
+++ b/src/corelib/global/qprocessordetection.h
@@ -169,6 +169,7 @@
#elif defined(__i386) || defined(__i386__) || defined(_M_IX86)
# define Q_PROCESSOR_X86_32
# define Q_BYTE_ORDER Q_LITTLE_ENDIAN
+# define Q_PROCESSOR_WORDSIZE 4
/*
* We define Q_PROCESSOR_X86 == 6 for anything above a equivalent or better
diff --git a/src/corelib/io/qdir_p.h b/src/corelib/io/qdir_p.h
index bf7726db2f..4d2f25f9ba 100644
--- a/src/corelib/io/qdir_p.h
+++ b/src/corelib/io/qdir_p.h
@@ -42,6 +42,17 @@
#ifndef QDIR_P_H
#define QDIR_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qfilesystementry_p.h"
#include "qfilesystemmetadata_p.h"
diff --git a/src/corelib/io/qfile.cpp b/src/corelib/io/qfile.cpp
index 82aee331c5..feecbd0281 100644
--- a/src/corelib/io/qfile.cpp
+++ b/src/corelib/io/qfile.cpp
@@ -167,7 +167,7 @@ QAbstractFileEngine *QFilePrivate::engine() const
disk into a 16-bit Unicode QString. By default, it assumes that
the user system's local 8-bit encoding is used (e.g., UTF-8
on most unix based operating systems; see QTextCodec::codecForLocale() for
- details). This can be changed using setCodec().
+ details). This can be changed using \l QTextStream::setCodec().
To write text, we can use operator<<(), which is overloaded to
take a QTextStream on the left and various data types (including
@@ -987,8 +987,8 @@ bool QFile::open(FILE *fh, OpenMode mode, FileHandleFlags handleFlags)
those cases, size() returns \c 0. See QIODevice::isSequential()
for more information.
- \warning For Windows CE you may not be able to call seek(), setSize(),
- fileTime(). size() returns \c 0.
+ \warning For Windows CE you may not be able to call seek(), and size()
+ returns \c 0.
\warning Since this function opens the file without specifying the file name,
you cannot use this QFile with a QFileInfo.
diff --git a/src/corelib/io/qfiledevice.cpp b/src/corelib/io/qfiledevice.cpp
index 33cb6037f5..bb81877857 100644
--- a/src/corelib/io/qfiledevice.cpp
+++ b/src/corelib/io/qfiledevice.cpp
@@ -269,7 +269,7 @@ int QFileDevice::handle() const
/*!
Returns the name of the file.
- The default implementation in QFileDevice returns QString().
+ The default implementation in QFileDevice returns a null string.
*/
QString QFileDevice::fileName() const
{
diff --git a/src/corelib/io/qfilesystemwatcher_fsevents.mm b/src/corelib/io/qfilesystemwatcher_fsevents.mm
index 085396da6d..e713769735 100644
--- a/src/corelib/io/qfilesystemwatcher_fsevents.mm
+++ b/src/corelib/io/qfilesystemwatcher_fsevents.mm
@@ -496,6 +496,7 @@ QStringList QFseventsFileSystemWatcherEngine::removePaths(const QStringList &pat
bool QFseventsFileSystemWatcherEngine::startStream()
{
Q_ASSERT(stream == 0);
+ Q_AUTORELEASE_POOL(pool)
if (stream) // This shouldn't happen, but let's be nice and handle it.
stopStream();
diff --git a/src/corelib/io/qfsfileengine.cpp b/src/corelib/io/qfsfileengine.cpp
index 3c4a2fac0b..de39f0b619 100644
--- a/src/corelib/io/qfsfileengine.cpp
+++ b/src/corelib/io/qfsfileengine.cpp
@@ -752,6 +752,9 @@ qint64 QFSFileEnginePrivate::writeFdFh(const char *data, qint64 len)
if (len && writtenBytes == 0) {
writtenBytes = -1;
q->setError(errno == ENOSPC ? QFile::ResourceError : QFile::WriteError, qt_error_string(errno));
+ } else {
+ // reset the cached size, if any
+ metaData.clearFlags(QFileSystemMetaData::SizeAttribute);
}
return writtenBytes;
diff --git a/src/corelib/io/qiodevice.cpp b/src/corelib/io/qiodevice.cpp
index 51a574987e..06f7fb17cd 100644
--- a/src/corelib/io/qiodevice.cpp
+++ b/src/corelib/io/qiodevice.cpp
@@ -217,7 +217,7 @@ QIODevicePrivate::~QIODevicePrivate()
\li waitFor....() - Subclasses of QIODevice implement blocking
functions for device-specific operations. For example, QProcess
- has a function called waitForStarted() which suspends operation in
+ has a function called \l {QProcess::}{waitForStarted()} which suspends operation in
the calling thread until the process has started.
\endlist
@@ -730,8 +730,7 @@ qint64 QIODevice::bytesAvailable() const
return d->buffer.size();
}
-/*!
- For buffered devices, this function returns the number of bytes
+/*! For buffered devices, this function returns the number of bytes
waiting to be written. For devices with no buffer, this function
returns 0.
@@ -943,9 +942,10 @@ qint64 QIODevice::read(char *data, qint64 maxSize)
data read as a QByteArray.
This function has no way of reporting errors; returning an empty
- QByteArray() can mean either that no data was currently available
+ QByteArray can mean either that no data was currently available
for reading, or that an error occurred.
*/
+
QByteArray QIODevice::read(qint64 maxSize)
{
Q_D(QIODevice);
@@ -994,10 +994,10 @@ QByteArray QIODevice::read(qint64 maxSize)
\overload
Reads all available data from the device, and returns it as a
- QByteArray.
+ byte array.
This function has no way of reporting errors; returning an empty
- QByteArray() can mean either that no data was currently available
+ QByteArray can mean either that no data was currently available
for reading, or that an error occurred.
*/
QByteArray QIODevice::readAll()
@@ -1177,10 +1177,10 @@ qint64 QIODevice::readLine(char *data, qint64 maxSize)
\overload
Reads a line from the device, but no more than \a maxSize characters,
- and returns the result as a QByteArray.
+ and returns the result as a byte array.
This function has no way of reporting errors; returning an empty
- QByteArray() can mean either that no data was currently available
+ QByteArray can mean either that no data was currently available
for reading, or that an error occurred.
*/
QByteArray QIODevice::readLine(qint64 maxSize)
@@ -1531,7 +1531,7 @@ qint64 QIODevice::peek(char *data, qint64 maxSize)
\snippet code/src_corelib_io_qiodevice.cpp 5
This function has no way of reporting errors; returning an empty
- QByteArray() can mean either that no data was currently available
+ QByteArray can mean either that no data was currently available
for peeking, or that an error occurred.
\sa read()
diff --git a/src/corelib/io/qprocess.cpp b/src/corelib/io/qprocess.cpp
index b03e96d0f6..66036fca90 100644
--- a/src/corelib/io/qprocess.cpp
+++ b/src/corelib/io/qprocess.cpp
@@ -1689,8 +1689,8 @@ void QProcess::setEnvironment(const QStringList &environment)
\deprecated
Returns the environment that QProcess will use when starting a
process, or an empty QStringList if no environment has been set
- using setEnvironment() or setEnvironmentHash(). If no environment
- has been set, the environment of the calling process will be used.
+ using setEnvironment(). If no environment has been set, the
+ environment of the calling process will be used.
\note The environment settings are ignored on Windows CE,
as there is no concept of an environment.
@@ -2016,7 +2016,7 @@ QByteArray QProcess::readAllStandardError()
\note No further splitting of the arguments is performed.
\b{Windows:} The arguments are quoted and joined into a command line
- that is compatible with the CommandLineToArgvW() Windows function.
+ that is compatible with the \c CommandLineToArgvW() Windows function.
For programs that have different command line quoting requirements,
you need to use setNativeArguments().
@@ -2320,8 +2320,8 @@ int QProcess::exitCode() const
Returns the exit status of the last process that finished.
- On Windows, if the process was terminated with TerminateProcess()
- from another application this function will still return NormalExit
+ On Windows, if the process was terminated with TerminateProcess() from
+ another application, this function will still return NormalExit
unless the exit code is less than 0.
*/
QProcess::ExitStatus QProcess::exitStatus() const
diff --git a/src/corelib/io/qtemporaryfile.cpp b/src/corelib/io/qtemporaryfile.cpp
index bc6c2f1f06..54b59e802e 100644
--- a/src/corelib/io/qtemporaryfile.cpp
+++ b/src/corelib/io/qtemporaryfile.cpp
@@ -703,18 +703,20 @@ void QTemporaryFile::setFileTemplate(const QString &name)
/*!
- If \a file is not already a native file then a QTemporaryFile is created
- in the tempPath() and \a file is copied into the temporary file, then a
- pointer to the temporary file is returned. If \a file is already a native
- file, a QTemporaryFile is not created, no copy is made and 0 is returned.
+ If \a file is not already a native file, then a QTemporaryFile is created
+ in QDir::tempPath(), the contents of \a file is copied into it, and a pointer
+ to the temporary file is returned. Does nothing and returns \c 0 if \a file
+ is already a native file.
For example:
+ \code
QFile f(":/resources/file.txt");
QTemporaryFile::createNativeFile(f); // Returns a pointer to a temporary file
QFile f("/users/qt/file.txt");
QTemporaryFile::createNativeFile(f); // Returns 0
+ \endcode
\sa QFileInfo::isNativePath()
*/
diff --git a/src/corelib/io/qtemporaryfile_p.h b/src/corelib/io/qtemporaryfile_p.h
index fe637c8dfd..46e9d169f4 100644
--- a/src/corelib/io/qtemporaryfile_p.h
+++ b/src/corelib/io/qtemporaryfile_p.h
@@ -42,6 +42,17 @@
#ifndef QTEMPORARYFILE_P_H
#define QTEMPORARYFILE_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtCore/qglobal.h>
#ifndef QT_NO_TEMPORARYFILE
diff --git a/src/corelib/io/qtextstream.cpp b/src/corelib/io/qtextstream.cpp
index 4002ce8694..974a7c2be4 100644
--- a/src/corelib/io/qtextstream.cpp
+++ b/src/corelib/io/qtextstream.cpp
@@ -2824,7 +2824,7 @@ QTextStream &reset(QTextStream &stream)
/*!
\relates QTextStream
- Calls skipWhiteSpace() on \a stream and returns \a stream.
+ Calls \l {QTextStream::}{skipWhiteSpace()} on \a stream and returns \a stream.
\sa {QTextStream manipulators}
*/
diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp
index 51c48b88d7..5700b9ab24 100644
--- a/src/corelib/io/qurl.cpp
+++ b/src/corelib/io/qurl.cpp
@@ -2338,7 +2338,7 @@ void QUrl::setHost(const QString &host, ParsingMode mode)
as DNS requests or in HTTP request headers). If that flag is not present,
this function returns the International Domain Name (IDN) in Unicode form,
according to the list of permissible top-level domains (see
- idnWhiteList()).
+ idnWhitelist()).
All other flags are ignored. Host names cannot contain control or percent
characters, so the returned value can be considered fully decoded.
@@ -2679,8 +2679,8 @@ void QUrl::setQuery(const QUrlQuery &query)
Sets the query string of the URL to an encoded version of \a
query. The contents of \a query are converted to a string
internally, each pair delimited by the character returned by
- pairDelimiter(), and the key and value are delimited by
- valueDelimiter().
+ queryPairDelimiter(), and the key and value are delimited by
+ queryValueDelimiter().
\note This method does not encode spaces (ASCII 0x20) as plus (+) signs,
like HTML forms do. If you need that kind of encoding, you must encode
@@ -2699,8 +2699,8 @@ void QUrl::setQuery(const QUrlQuery &query)
Sets the query string of the URL to the encoded version of \a
query. The contents of \a query are converted to a string
internally, each pair delimited by the character returned by
- pairDelimiter(), and the key and value are delimited by
- valueDelimiter().
+ queryPairDelimiter(), and the key and value are delimited by
+ queryValueDelimiter().
\obsolete Use QUrlQuery and setQuery().
@@ -2714,11 +2714,11 @@ void QUrl::setQuery(const QUrlQuery &query)
Inserts the pair \a key = \a value into the query string of the
URL.
- The key/value pair is encoded before it is added to the query. The
+ The key-value pair is encoded before it is added to the query. The
pair is converted into separate strings internally. The \a key and
\a value is first encoded into UTF-8 and then delimited by the
- character returned by valueDelimiter(). Each key/value pair is
- delimited by the character returned by pairDelimiter().
+ character returned by queryValueDelimiter(). Each key-value pair is
+ delimited by the character returned by queryPairDelimiter().
\note This method does not encode spaces (ASCII 0x20) as plus (+) signs,
like HTML forms do. If you need that kind of encoding, you must encode
@@ -2952,9 +2952,8 @@ QString QUrl::query(ComponentFormattingOptions options) const
The fragment is sometimes also referred to as the URL "reference".
Passing an argument of QString() (a null QString) will unset the fragment.
- Passing an argument of QString("") (an empty but not null QString)
- will set the fragment to an empty string (as if the original URL
- had a lone "#").
+ Passing an argument of QString("") (an empty but not null QString) will set the
+ fragment to an empty string (as if the original URL had a lone "#").
The \a fragment data is interpreted according to \a mode: in StrictMode,
any '%' characters must be followed by exactly two hexadecimal characters
@@ -3029,10 +3028,10 @@ QString QUrl::fragment(ComponentFormattingOptions options) const
The fragment is sometimes also referred to as the URL "reference".
- Passing an argument of QByteArray() (a null QByteArray) will unset
- the fragment. Passing an argument of QByteArray("") (an empty but
- not null QByteArray) will set the fragment to an empty string (as
- if the original URL had a lone "#").
+ Passing an argument of QByteArray() (a null QByteArray) will unset the fragment.
+ Passing an argument of QByteArray("") (an empty but not null QByteArray)
+ will set the fragment to an empty string (as if the original URL
+ had a lone "#").
\obsolete Use setFragment(), which has the same behavior of null / empty.
diff --git a/src/corelib/json/qjsonvalue.cpp b/src/corelib/json/qjsonvalue.cpp
index 2d957070ab..de4336d728 100644
--- a/src/corelib/json/qjsonvalue.cpp
+++ b/src/corelib/json/qjsonvalue.cpp
@@ -420,17 +420,17 @@ QJsonValue QJsonValue::fromVariant(const QVariant &variant)
}
/*!
- Converts the value to a QVariant.
+ Converts the value to a \l {QVariant::}{QVariant()}.
The QJsonValue types will be converted as follows:
- \value Null QVariant()
+ \value Null {QVariant::}{QVariant()}
\value Bool QMetaType::Bool
\value Double QMetaType::Double
\value String QString
\value Array QVariantList
\value Object QVariantMap
- \value Undefined QVariant()
+ \value Undefined {QVariant::}{QVariant()}
\sa fromVariant()
*/
@@ -553,7 +553,7 @@ QJsonArray QJsonValue::toArray(const QJsonArray &defaultValue) const
Converts the value to an array and returns it.
- If type() is not Array, a QJsonArray() will be returned.
+ If type() is not Array, a \l{QJsonArray::}{QJsonArray()} will be returned.
*/
QJsonArray QJsonValue::toArray() const
{
@@ -578,8 +578,8 @@ QJsonObject QJsonValue::toObject(const QJsonObject &defaultValue) const
Converts the value to an object and returns it.
- If type() is not Object, the QJsonObject() will be returned.
- */
+ If type() is not Object, the \l {QJsonObject::}{QJsonObject()} will be returned.
+*/
QJsonObject QJsonValue::toObject() const
{
return toObject(QJsonObject());
diff --git a/src/corelib/kernel/kernel.pri b/src/corelib/kernel/kernel.pri
index 819c10e99f..55625f3571 100644
--- a/src/corelib/kernel/kernel.pri
+++ b/src/corelib/kernel/kernel.pri
@@ -169,7 +169,7 @@ blackberry {
kernel/qeventdispatcher_blackberry_p.h
}
-qqnx_pps {
+qqnx_pps:!blackberry-playbook {
LIBS_PRIVATE += -lpps
SOURCES += \
kernel/qppsattribute.cpp \
diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp
index 7f2e28e800..436bb59bbc 100644
--- a/src/corelib/kernel/qcoreapplication.cpp
+++ b/src/corelib/kernel/qcoreapplication.cpp
@@ -2533,6 +2533,9 @@ void QCoreApplication::removeLibraryPath(const QString &path)
\note The filter function set here receives native messages,
i.e. MSG or XCB event structs.
+ \note Native event filters will be disabled when the application the
+ Qt::AA_MacPluginApplication attribute is set.
+
For maximum portability, you should always try to use QEvents
and QObject::installEventFilter() whenever possible.
@@ -2542,6 +2545,11 @@ void QCoreApplication::removeLibraryPath(const QString &path)
*/
void QCoreApplication::installNativeEventFilter(QAbstractNativeEventFilter *filterObj)
{
+ if (QCoreApplication::testAttribute(Qt::AA_MacPluginApplication)) {
+ qWarning("Native event filters are not applied when the Qt::AA_MacPluginApplication attribute is set");
+ return;
+ }
+
QAbstractEventDispatcher *eventDispatcher = QAbstractEventDispatcher::instance(QCoreApplicationPrivate::theMainThread);
if (!filterObj || !eventDispatcher)
return;
diff --git a/src/corelib/kernel/qeventloop_p.h b/src/corelib/kernel/qeventloop_p.h
index 30c61ca759..1a1743260b 100644
--- a/src/corelib/kernel/qeventloop_p.h
+++ b/src/corelib/kernel/qeventloop_p.h
@@ -42,6 +42,17 @@
#ifndef QEVENTLOOP_P_H
#define QEVENTLOOP_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qobject_p.h"
QT_BEGIN_NAMESPACE
diff --git a/src/corelib/kernel/qjni.cpp b/src/corelib/kernel/qjni.cpp
index 4581b70ca7..b240185d7e 100644
--- a/src/corelib/kernel/qjni.cpp
+++ b/src/corelib/kernel/qjni.cpp
@@ -86,15 +86,14 @@ Q_GLOBAL_STATIC(JClassHash, cachedClasses)
static jclass getCachedClass(JNIEnv *env, const char *className)
{
jclass clazz = 0;
- QString key = QLatin1String(className);
- QHash<QString, jclass>::iterator it = cachedClasses->find(key);
+ QString classDotEnc = QString::fromLatin1(className).replace(QLatin1Char('/'), QLatin1Char('.'));
+ QHash<QString, jclass>::iterator it = cachedClasses->find(classDotEnc);
if (it == cachedClasses->end()) {
QJNIObjectPrivate classLoader = QtAndroidPrivate::classLoader();
if (!classLoader.isValid())
return 0;
- QJNIObjectPrivate stringName = QJNIObjectPrivate::fromString(QString::fromLatin1(className).replace(QLatin1Char('/'),
- QLatin1Char('.')));
+ QJNIObjectPrivate stringName = QJNIObjectPrivate::fromString(classDotEnc);
QJNIObjectPrivate classObject = classLoader.callObjectMethod("loadClass",
"(Ljava/lang/String;)Ljava/lang/Class;",
stringName.object());
@@ -102,7 +101,7 @@ static jclass getCachedClass(JNIEnv *env, const char *className)
if (!exceptionCheckAndClear(env) && classObject.isValid())
clazz = static_cast<jclass>(env->NewGlobalRef(classObject.object()));
- cachedClasses->insert(key, clazz);
+ cachedClasses->insert(classDotEnc, clazz);
} else {
clazz = it.value();
}
diff --git a/src/corelib/kernel/qmetaobject_moc_p.h b/src/corelib/kernel/qmetaobject_moc_p.h
index d26cd54e5d..1a7ca63ae1 100644
--- a/src/corelib/kernel/qmetaobject_moc_p.h
+++ b/src/corelib/kernel/qmetaobject_moc_p.h
@@ -43,6 +43,17 @@
# error "Include qmetaobject_p.h (or moc's utils.h) before including this file."
#endif
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
QT_BEGIN_NAMESPACE
// This function is shared with moc.cpp. This file should be included where needed.
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp
index 45bf4b62c5..2c53ed8f17 100644
--- a/src/corelib/kernel/qobject.cpp
+++ b/src/corelib/kernel/qobject.cpp
@@ -1644,9 +1644,10 @@ void QObject::killTimer(int id)
int at = d->extraData ? d->extraData->runningTimers.indexOf(id) : -1;
if (at == -1) {
// timer isn't owned by this object
- qWarning("QObject::killTimer(): Error: timer id %d is not valid for object %p (%s), timer has not been killed",
+ qWarning("QObject::killTimer(): Error: timer id %d is not valid for object %p (%s, %s), timer has not been killed",
id,
this,
+ metaObject()->className(),
qPrintable(objectName()));
return;
}
diff --git a/src/corelib/mimetypes/qmimedatabase_p.h b/src/corelib/mimetypes/qmimedatabase_p.h
index 78bb6c2780..d0546cf5ce 100644
--- a/src/corelib/mimetypes/qmimedatabase_p.h
+++ b/src/corelib/mimetypes/qmimedatabase_p.h
@@ -42,6 +42,17 @@
#ifndef QMIMEDATABASE_P_H
#define QMIMEDATABASE_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtCore/qhash.h>
#include <QtCore/qmutex.h>
diff --git a/src/corelib/mimetypes/qmimeglobpattern_p.h b/src/corelib/mimetypes/qmimeglobpattern_p.h
index ca22aa9588..05d701e787 100644
--- a/src/corelib/mimetypes/qmimeglobpattern_p.h
+++ b/src/corelib/mimetypes/qmimeglobpattern_p.h
@@ -42,6 +42,17 @@
#ifndef QMIMEGLOBPATTERN_P_H
#define QMIMEGLOBPATTERN_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtCore/qstringlist.h>
#include <QtCore/qhash.h>
diff --git a/src/corelib/mimetypes/qmimemagicrule_p.h b/src/corelib/mimetypes/qmimemagicrule_p.h
index c252440d6c..aeed1908a7 100644
--- a/src/corelib/mimetypes/qmimemagicrule_p.h
+++ b/src/corelib/mimetypes/qmimemagicrule_p.h
@@ -42,6 +42,17 @@
#ifndef QMIMEMAGICRULE_P_H
#define QMIMEMAGICRULE_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtCore/qbytearray.h>
#include <QtCore/qscopedpointer.h>
#include <QtCore/qlist.h>
diff --git a/src/corelib/mimetypes/qmimemagicrulematcher_p.h b/src/corelib/mimetypes/qmimemagicrulematcher_p.h
index 159342482f..49de59f55a 100644
--- a/src/corelib/mimetypes/qmimemagicrulematcher_p.h
+++ b/src/corelib/mimetypes/qmimemagicrulematcher_p.h
@@ -42,6 +42,17 @@
#ifndef QMIMEMAGICRULEMATCHER_P_H
#define QMIMEMAGICRULEMATCHER_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtCore/qbytearray.h>
#include <QtCore/qlist.h>
#include <QtCore/qstring.h>
diff --git a/src/corelib/mimetypes/qmimeprovider_p.h b/src/corelib/mimetypes/qmimeprovider_p.h
index 4a263093bd..f79373bb0a 100644
--- a/src/corelib/mimetypes/qmimeprovider_p.h
+++ b/src/corelib/mimetypes/qmimeprovider_p.h
@@ -42,6 +42,17 @@
#ifndef QMIMEPROVIDER_P_H
#define QMIMEPROVIDER_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtCore/qdatetime.h>
#include "qmimedatabase_p.h"
#include <QtCore/qset.h>
diff --git a/src/corelib/mimetypes/qmimetype_p.h b/src/corelib/mimetypes/qmimetype_p.h
index c500520fe1..637c85d8ca 100644
--- a/src/corelib/mimetypes/qmimetype_p.h
+++ b/src/corelib/mimetypes/qmimetype_p.h
@@ -42,6 +42,17 @@
#ifndef QMIMETYPE_P_H
#define QMIMETYPE_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qmimetype.h"
#include <QtCore/qhash.h>
diff --git a/src/corelib/mimetypes/qmimetypeparser_p.h b/src/corelib/mimetypes/qmimetypeparser_p.h
index c92bb81be4..ef7a12cdd5 100644
--- a/src/corelib/mimetypes/qmimetypeparser_p.h
+++ b/src/corelib/mimetypes/qmimetypeparser_p.h
@@ -43,6 +43,17 @@
#ifndef QMIMETYPEPARSER_P_H
#define QMIMETYPEPARSER_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qmimedatabase_p.h"
#include "qmimeprovider_p.h"
diff --git a/src/corelib/plugin/qsystemlibrary_p.h b/src/corelib/plugin/qsystemlibrary_p.h
index 4a2c86990f..8b0fd57faf 100644
--- a/src/corelib/plugin/qsystemlibrary_p.h
+++ b/src/corelib/plugin/qsystemlibrary_p.h
@@ -42,6 +42,17 @@
#ifndef QSYSTEMLIBRARY_P_H
#define QSYSTEMLIBRARY_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtCore/qglobal.h>
#ifdef Q_OS_WIN
# include <QtCore/qstring.h>
diff --git a/src/corelib/thread/qbasicatomic.h b/src/corelib/thread/qbasicatomic.h
index cf69d34589..0fe4d20bc5 100644
--- a/src/corelib/thread/qbasicatomic.h
+++ b/src/corelib/thread/qbasicatomic.h
@@ -62,8 +62,6 @@
# include "QtCore/qatomic_ia64.h"
#elif defined(Q_PROCESSOR_MIPS)
# include "QtCore/qatomic_mips.h"
-#elif defined(Q_PROCESSOR_SPARC)
-# include "QtCore/qatomic_sparc.h"
#elif defined(Q_PROCESSOR_X86)
# include <QtCore/qatomic_x86.h>
diff --git a/src/corelib/tools/qcollator_macx.cpp b/src/corelib/tools/qcollator_macx.cpp
index 52fb059a9e..151ddc8778 100644
--- a/src/corelib/tools/qcollator_macx.cpp
+++ b/src/corelib/tools/qcollator_macx.cpp
@@ -64,7 +64,7 @@ void QCollatorPrivate::init()
if (caseSensitivity == Qt::CaseInsensitive)
options |= kUCCollateCaseInsensitiveMask;
if (numericMode)
- options |= kUCCollateDigitsAsNumberMask;
+ options |= kUCCollateDigitsAsNumberMask | kUCCollateDigitsOverrideMask;
if (ignorePunctuation)
options |= kUCCollatePunctuationSignificantMask;
diff --git a/src/corelib/tools/qcollator_p.h b/src/corelib/tools/qcollator_p.h
index 00b6ce7290..62e3eeb576 100644
--- a/src/corelib/tools/qcollator_p.h
+++ b/src/corelib/tools/qcollator_p.h
@@ -43,6 +43,17 @@
#ifndef QCOLLATOR_P_H
#define QCOLLATOR_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qcollator.h"
#include <QVector>
#ifdef QT_USE_ICU
diff --git a/src/corelib/tools/qregularexpression.cpp b/src/corelib/tools/qregularexpression.cpp
index 7c1c1efaee..cafa1a1070 100644
--- a/src/corelib/tools/qregularexpression.cpp
+++ b/src/corelib/tools/qregularexpression.cpp
@@ -43,6 +43,8 @@
#include "qregularexpression.h"
+#ifndef QT_NO_REGULAREXPRESSION
+
#include <QtCore/qcoreapplication.h>
#include <QtCore/qmutex.h>
#include <QtCore/qvector.h>
@@ -2582,3 +2584,5 @@ static const char *pcreCompileErrorCodes[] =
#endif // #if 0
QT_END_NAMESPACE
+
+#endif // QT_NO_REGULAREXPRESSION
diff --git a/src/corelib/tools/qsimd_p.h b/src/corelib/tools/qsimd_p.h
index 084e09db63..f0c4c7ad52 100644
--- a/src/corelib/tools/qsimd_p.h
+++ b/src/corelib/tools/qsimd_p.h
@@ -42,6 +42,17 @@
#ifndef QSIMD_P_H
#define QSIMD_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <qglobal.h>
#include <qatomic.h>
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp
index 2ce8a3a45b..33326f141b 100644
--- a/src/corelib/tools/qstring.cpp
+++ b/src/corelib/tools/qstring.cpp
@@ -1327,9 +1327,6 @@ const QString::Null QString::null = { };
Returns a copy of the \a str string. The given string is converted
to Unicode using the fromUtf8() function.
- This constructor is only available if Qt is configured with STL
- compatibility enabled.
-
\sa fromLatin1(), fromLocal8Bit(), fromUtf8(), QByteArray::fromStdString()
*/
@@ -1362,7 +1359,7 @@ const QString::Null QString::null = { };
wchar_t is 2 bytes wide (e.g. windows) and in ucs4 on platforms
where wchar_t is 4 bytes wide (most Unix systems).
- This operator is mostly useful to pass a QString to a function
+ This method is mostly useful to pass a QString to a function
that accepts a std::wstring object.
\sa utf16(), toLatin1(), toUtf8(), toLocal8Bit()
@@ -7861,12 +7858,9 @@ bool QString::isRightToLeft() const
QString. The Unicode data is converted into 8-bit characters using
the toUtf8() function.
- This operator is mostly useful to pass a QString to a function
+ This method is mostly useful to pass a QString to a function
that accepts a std::string object.
- If the QString contains non-Latin1 Unicode characters, using this
- can lead to loss of information.
-
\sa toLatin1(), toUtf8(), toLocal8Bit(), QByteArray::toStdString()
*/
diff --git a/src/corelib/tools/qstringiterator_p.h b/src/corelib/tools/qstringiterator_p.h
index c3986f0477..4ae705b085 100644
--- a/src/corelib/tools/qstringiterator_p.h
+++ b/src/corelib/tools/qstringiterator_p.h
@@ -43,6 +43,17 @@
#ifndef QSTRINGITERATOR_H
#define QSTRINGITERATOR_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtCore/qstring.h>
QT_BEGIN_NAMESPACE
diff --git a/src/corelib/tools/qunicodetools.cpp b/src/corelib/tools/qunicodetools.cpp
index fc36d07a4a..bb2c032e57 100644
--- a/src/corelib/tools/qunicodetools.cpp
+++ b/src/corelib/tools/qunicodetools.cpp
@@ -710,6 +710,7 @@ Q_CORE_EXPORT void initScripts(const ushort *string, int length, uchar *scripts)
script = QChar::Script(prop->script);
}
+#if 0 // ### Disabled due to regressions. The font selection algorithm is not prepared for this change.
if (Q_LIKELY(script != QChar::Script_Common)) {
// override preceding Common-s
while (sor > 0 && scripts[sor - 1] == QChar::Script_Common)
@@ -719,6 +720,7 @@ Q_CORE_EXPORT void initScripts(const ushort *string, int length, uchar *scripts)
if (sor > 0)
script = scripts[sor - 1];
}
+#endif
while (sor < eor)
scripts[sor++] = script;
@@ -726,6 +728,8 @@ Q_CORE_EXPORT void initScripts(const ushort *string, int length, uchar *scripts)
script = prop->script;
}
eor = length;
+
+#if 0 // ### Disabled due to regressions. The font selection algorithm is not prepared for this change.
if (Q_LIKELY(script != QChar::Script_Common)) {
// override preceding Common-s
while (sor > 0 && scripts[sor - 1] == QChar::Script_Common)
@@ -735,6 +739,8 @@ Q_CORE_EXPORT void initScripts(const ushort *string, int length, uchar *scripts)
if (sor > 0)
script = scripts[sor - 1];
}
+#endif
+
while (sor < eor)
scripts[sor++] = script;
}