summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorSergio Ahumada <sahumada@blackberry.com>2014-03-13 15:57:03 +0100
committerSergio Ahumada <sahumada@blackberry.com>2014-03-13 15:57:11 +0100
commit27016b89ae49da091527548af0ca9022ec4d7902 (patch)
treede408d49d52dd6a73e75a612ef51342d6ee44638 /src/corelib
parent3683bc97d2ebc0de3272fc09656b90a88f5eb326 (diff)
parentfbaa6d3ca6fc2693c5c8a1cd8e565803adc97730 (diff)
Merge remote-tracking branch 'origin/stable' into dev
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/corelib.pro2
-rw-r--r--src/corelib/doc/snippets/code/src_corelib_global_qglobal.cpp2
-rw-r--r--src/corelib/doc/snippets/qbytearraylist/qbytearraylist.pro2
-rw-r--r--src/corelib/doc/src/eventsandfilters.qdoc2
-rw-r--r--src/corelib/global/qcompilerdetection.h2
-rw-r--r--src/corelib/global/qglobal.cpp16
-rw-r--r--src/corelib/io/qdebug.h6
-rw-r--r--src/corelib/io/qfilesystementry.cpp2
-rw-r--r--src/corelib/io/qloggingcategory.cpp17
-rw-r--r--src/corelib/io/qloggingregistry.cpp145
-rw-r--r--src/corelib/io/qloggingregistry_p.h9
-rw-r--r--src/corelib/io/qprocess_unix.cpp8
-rw-r--r--src/corelib/itemmodels/qsortfilterproxymodel.cpp1
-rw-r--r--src/corelib/json/qjsonvalue.cpp56
-rw-r--r--src/corelib/kernel/qcoreevent.cpp1
-rw-r--r--src/corelib/kernel/qcoreevent.h2
-rw-r--r--src/corelib/thread/qgenericatomic.h8
-rw-r--r--src/corelib/thread/qthread_win.cpp8
-rw-r--r--src/corelib/tools/qbytearray.cpp85
-rw-r--r--src/corelib/tools/qbytearray.h18
-rw-r--r--src/corelib/tools/qbytearray_mac.mm (renamed from src/corelib/doc/snippets/qbytearraylist/main.cpp)64
-rw-r--r--src/corelib/tools/qbytearraylist.cpp258
-rw-r--r--src/corelib/tools/qbytearraylist.h124
-rw-r--r--src/corelib/tools/qdatetimeparser_p.h2
-rw-r--r--src/corelib/tools/qeasingcurve.cpp16
-rw-r--r--src/corelib/tools/qstring.cpp134
-rw-r--r--src/corelib/tools/qvarlengtharray.qdoc8
-rw-r--r--src/corelib/tools/qvector.cpp5
-rw-r--r--src/corelib/tools/tools.pri5
29 files changed, 441 insertions, 567 deletions
diff --git a/src/corelib/corelib.pro b/src/corelib/corelib.pro
index 79c90e0664..812aee3252 100644
--- a/src/corelib/corelib.pro
+++ b/src/corelib/corelib.pro
@@ -11,6 +11,8 @@ DEFINES += QT_NO_USING_NAMESPACE
win32-msvc*|win32-icc:QMAKE_LFLAGS += /BASE:0x67000000
irix-cc*:QMAKE_CXXFLAGS += -no_prelink -ptused
+CONFIG += optimize_full
+
# otherwise mingw headers do not declare common functions like putenv
mingw:QMAKE_CXXFLAGS_CXX11 = -std=gnu++0x
diff --git a/src/corelib/doc/snippets/code/src_corelib_global_qglobal.cpp b/src/corelib/doc/snippets/code/src_corelib_global_qglobal.cpp
index 3a18eb8007..b907c9acb1 100644
--- a/src/corelib/doc/snippets/code/src_corelib_global_qglobal.cpp
+++ b/src/corelib/doc/snippets/code/src_corelib_global_qglobal.cpp
@@ -195,7 +195,7 @@ int divide(int a, int b)
//! [18]
-ASSERT: "b == 0" in file div.cpp, line 7
+ASSERT: "b != 0" in file div.cpp, line 7
//! [18]
diff --git a/src/corelib/doc/snippets/qbytearraylist/qbytearraylist.pro b/src/corelib/doc/snippets/qbytearraylist/qbytearraylist.pro
deleted file mode 100644
index 87397b491d..0000000000
--- a/src/corelib/doc/snippets/qbytearraylist/qbytearraylist.pro
+++ /dev/null
@@ -1,2 +0,0 @@
-QT = core
-SOURCES = main.cpp
diff --git a/src/corelib/doc/src/eventsandfilters.qdoc b/src/corelib/doc/src/eventsandfilters.qdoc
index cd31e36dee..a880cc8187 100644
--- a/src/corelib/doc/src/eventsandfilters.qdoc
+++ b/src/corelib/doc/src/eventsandfilters.qdoc
@@ -208,7 +208,7 @@
\l{QCoreApplication::}{postEvent()} is also used during object
initialization, since the posted event will typically be dispatched
very soon after the initialization of the object is complete.
- When implementing a widget, it is important to realise that events
+ When implementing a widget, it is important to realize that events
can be delivered very early in its lifetime so, in its constructor,
be sure to initialize member variables early on, before there's any
chance that it might receive an event.
diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h
index a9f143502e..dfa3d83fb8 100644
--- a/src/corelib/global/qcompilerdetection.h
+++ b/src/corelib/global/qcompilerdetection.h
@@ -860,7 +860,7 @@
#ifdef Q_COMPILER_NULLPTR
# define Q_NULLPTR nullptr
#else
-# define Q_NULLPTR 0
+# define Q_NULLPTR NULL
#endif
#ifdef Q_COMPILER_DEFAULT_MEMBERS
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index 710f7e8ba1..c15305322b 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -394,7 +394,7 @@ Q_STATIC_ASSERT_X(UCHAR_MAX == 255, "Qt assumes that char is 8 bits");
\fn bool QFlags::testFlag(Enum flag) const
\since 4.2
- Returns \c true if the \a flag is set, otherwise false.
+ Returns \c true if the \a flag is set, otherwise \c false.
*/
/*!
@@ -1937,7 +1937,7 @@ const QSysInfo::WinVersion QSysInfo::WindowsVersion = QSysInfo::windowsVersion()
\relates <QtGlobal>
Prints a warning message containing the source code file name and
- line number if \a test is false.
+ line number if \a test is \c false.
Q_ASSERT() is useful for testing pre- and post-conditions
during development. It does nothing if \c QT_NO_DEBUG was defined
@@ -1960,7 +1960,7 @@ const QSysInfo::WinVersion QSysInfo::WindowsVersion = QSysInfo::windowsVersion()
\relates <QtGlobal>
Prints the message \a what together with the location \a where,
- the source file name and line number if \a test is false.
+ the source file name and line number if \a test is \c false.
Q_ASSERT_X is useful for testing pre- and post-conditions during
development. It does nothing if \c QT_NO_DEBUG was defined during
@@ -1983,18 +1983,18 @@ const QSysInfo::WinVersion QSysInfo::WindowsVersion = QSysInfo::windowsVersion()
\relates <QtGlobal>
\since 5.0
- Causes the compiler to assume that \a expr is true. This macro is useful
+ Causes the compiler to assume that \a expr is \c true. This macro is useful
for improving code generation, by providing the compiler with hints about
conditions that it would not otherwise know about. However, there is no
guarantee that the compiler will actually use those hints.
This macro could be considered a "lighter" version of \l{Q_ASSERT()}. While
- Q_ASSERT will abort the program's execution if the condition is false,
+ Q_ASSERT will abort the program's execution if the condition is \c false,
Q_ASSUME will tell the compiler not to generate code for those conditions.
Therefore, it is important that the assumptions always hold, otherwise
undefined behaviour may occur.
- If \a expr is a constantly false condition, Q_ASSUME will tell the compiler
+ If \a expr is a constantly \c false condition, Q_ASSUME will tell the compiler
that the current code execution cannot be reached. That is, Q_ASSUME(false)
is equivalent to Q_UNREACHABLE().
@@ -3346,6 +3346,8 @@ bool QInternal::activateCallbacks(Callback cb, void **parameters)
It expands to "std::move" if your compiler supports that C++11 function, or to nothing
otherwise.
+
+ qMove takes an rvalue reference to its parameter \a x, and converts it to an xvalue.
*/
/*!
@@ -3426,7 +3428,7 @@ bool QInternal::activateCallbacks(Callback cb, void **parameters)
\relates <QtGlobal>
\since 5.0
- This macro marks a function as non-throwing if \a x is true. If
+ This macro marks a function as non-throwing if \a x is \c true. If
the function does nevertheless throw, the behaviour is defined:
std::terminate() is called.
diff --git a/src/corelib/io/qdebug.h b/src/corelib/io/qdebug.h
index 00177b659e..bdaaa05768 100644
--- a/src/corelib/io/qdebug.h
+++ b/src/corelib/io/qdebug.h
@@ -110,10 +110,8 @@ public:
inline QDebug &operator<<(unsigned int t) { stream->ts << t; return maybeSpace(); }
inline QDebug &operator<<(signed long t) { stream->ts << t; return maybeSpace(); }
inline QDebug &operator<<(unsigned long t) { stream->ts << t; return maybeSpace(); }
- inline QDebug &operator<<(qint64 t)
- { stream->ts << QString::number(t); return maybeSpace(); }
- inline QDebug &operator<<(quint64 t)
- { stream->ts << QString::number(t); return maybeSpace(); }
+ inline QDebug &operator<<(qint64 t) { stream->ts << t; return maybeSpace(); }
+ inline QDebug &operator<<(quint64 t) { stream->ts << t; return maybeSpace(); }
inline QDebug &operator<<(float t) { stream->ts << t; return maybeSpace(); }
inline QDebug &operator<<(double t) { stream->ts << t; return maybeSpace(); }
inline QDebug &operator<<(const char* t) { stream->ts << QString::fromUtf8(t); return maybeSpace(); }
diff --git a/src/corelib/io/qfilesystementry.cpp b/src/corelib/io/qfilesystementry.cpp
index 42a724670e..5365ca9bcc 100644
--- a/src/corelib/io/qfilesystementry.cpp
+++ b/src/corelib/io/qfilesystementry.cpp
@@ -195,7 +195,7 @@ QString QFileSystemEntry::path() const
if (m_lastSeparator == -1) {
#if defined(Q_OS_WIN)
if (m_filePath.length() >= 2 && m_filePath.at(1) == QLatin1Char(':'))
- return QFSFileEngine::currentPath(m_filePath.left(2));
+ return m_filePath.left(2);
#endif
return QString(QLatin1Char('.'));
}
diff --git a/src/corelib/io/qloggingcategory.cpp b/src/corelib/io/qloggingcategory.cpp
index eb8aeaca50..08ecd67dc8 100644
--- a/src/corelib/io/qloggingcategory.cpp
+++ b/src/corelib/io/qloggingcategory.cpp
@@ -108,8 +108,9 @@ Q_GLOBAL_STATIC_WITH_ARGS(QLoggingCategory, qtDefaultCategory,
Rules are evaluated in text order, from first to last. That is, if two rules
apply to a category/type, the rule that comes later is applied.
- Rules can be set via \l setFilterRules(). Since Qt 5.3 logging rules
- are also automatically loaded from the \c [Rules] section of a logging
+ Rules can be set via \l setFilterRules(). Since Qt 5.3 logging rules can also
+ be set in the \c QT_LOGGING_RULES environment variable, and
+ are automatically loaded from the \c [Rules] section of a logging
configuration file. Such configuration files are looked up in the QtProject
configuration directory, or explicitly set in a \c QT_LOGGING_CONF
environment variable.
@@ -117,13 +118,15 @@ Q_GLOBAL_STATIC_WITH_ARGS(QLoggingCategory, qtDefaultCategory,
Rules set by \l setFilterRules() take precedence over rules specified
in the QtProject configuration directory, and can, in turn, be
overwritten by rules from the configuration file specified by
- \c QT_LOGGING_CONF.
+ \c QT_LOGGING_CONF, and rules set by \c QT_LOGGING_RULES.
+
Order of evaluation:
\list
\li Rules from QtProject/qlogging.ini
\li Rules set by \l setFilterRules()
\li Rules from file in \c QT_LOGGING_CONF
+ \li Rules from environment variable QT_LOGGING_RULES
\endlist
The \c QtProject/qlogging.ini file is looked up in all directories returned
@@ -137,6 +140,9 @@ Q_GLOBAL_STATIC_WITH_ARGS(QLoggingCategory, qtDefaultCategory,
QCoreApplication::applicationDirPath() + \c "/data"
\endlist
+ Set the \c QT_LOGGING_DEBUG environment variable to see from where
+ logging rules are loaded.
+
\section2 Installing a Custom Filter
As a lower-level alternative to the text rules you can also implement a
@@ -341,9 +347,8 @@ QLoggingCategory::installFilter(QLoggingCategory::CategoryFilter filter)
\snippet qloggingcategory/main.cpp 2
\note The rules might be ignored if a custom category filter is installed
- with \l installFilter(), or if the user defined a custom logging
- configuration file in the \c QT_LOGGING_CONF environment variable.
-
+ with \l installFilter(), or if the user defined \c QT_LOGGING_CONF or \c QT_LOGGING_RULES
+ environment variable.
*/
void QLoggingCategory::setFilterRules(const QString &rules)
{
diff --git a/src/corelib/io/qloggingregistry.cpp b/src/corelib/io/qloggingregistry.cpp
index 2619743ff4..23f1ffbd16 100644
--- a/src/corelib/io/qloggingregistry.cpp
+++ b/src/corelib/io/qloggingregistry.cpp
@@ -45,6 +45,13 @@
#include <QtCore/qfile.h>
#include <QtCore/qstandardpaths.h>
#include <QtCore/qtextstream.h>
+#include <QtCore/qdir.h>
+
+// We can't use the default macros because this would lead to recursion.
+// Instead let's define our own one that unconditionally logs...
+#define debugMsg QMessageLogger(__FILE__, __LINE__, __FUNCTION__, "qt.core.logging").debug
+#define warnMsg QMessageLogger(__FILE__, __LINE__, __FUNCTION__, "qt.core.logging").warning
+
QT_BEGIN_NAMESPACE
@@ -64,12 +71,12 @@ QLoggingRule::QLoggingRule() :
\internal
Constructs a logging rule.
*/
-QLoggingRule::QLoggingRule(const QString &pattern, bool enabled) :
- pattern(pattern),
+QLoggingRule::QLoggingRule(const QStringRef &pattern, bool enabled) :
+ messageType(-1),
flags(Invalid),
enabled(enabled)
{
- parse();
+ parse(pattern);
}
/*!
@@ -77,48 +84,33 @@ QLoggingRule::QLoggingRule(const QString &pattern, bool enabled) :
Return value 1 means filter passed, 0 means filter doesn't influence this
category, -1 means category doesn't pass this filter.
*/
-int QLoggingRule::pass(const QString &categoryName, QtMsgType msgType) const
+int QLoggingRule::pass(const QString &cat, QtMsgType msgType) const
{
- QString fullCategory = categoryName;
- switch (msgType) {
- case QtDebugMsg:
- fullCategory += QLatin1String(".debug");
- break;
- case QtWarningMsg:
- fullCategory += QLatin1String(".warning");
- break;
- case QtCriticalMsg:
- fullCategory += QLatin1String(".critical");
- break;
- default:
- break;
- }
+ // check message type
+ if (messageType > -1 && messageType != msgType)
+ return 0;
if (flags == FullText) {
- // can be
- // qtproject.org.debug = true
- // or
- // qtproject.org = true
- if (pattern == categoryName
- || pattern == fullCategory)
+ // full match
+ if (category == cat)
return (enabled ? 1 : -1);
+ else
+ return 0;
}
- int idx = 0;
- if (flags == MidFilter) {
- // e.g. *.qtproject*
- idx = fullCategory.indexOf(pattern);
- if (idx >= 0)
- return (enabled ? 1 : -1);
- } else {
- idx = fullCategory.indexOf(pattern);
- if (flags == LeftFilter) {
- // e.g. org.qtproject.*
+ const int idx = cat.indexOf(category);
+ if (idx >= 0) {
+ if (flags == MidFilter) {
+ // matches somewhere
+ if (idx >= 0)
+ return (enabled ? 1 : -1);
+ } else if (flags == LeftFilter) {
+ // matches left
if (idx == 0)
return (enabled ? 1 : -1);
} else if (flags == RightFilter) {
- // e.g. *.qtproject
- if (idx == (fullCategory.count() - pattern.count()))
+ // matches right
+ if (idx == (cat.count() - category.count()))
return (enabled ? 1 : -1);
}
}
@@ -127,30 +119,51 @@ int QLoggingRule::pass(const QString &categoryName, QtMsgType msgType) const
/*!
\internal
- Parses the category and checks which kind of wildcard the filter can contain.
+ Parses \a pattern.
Allowed is f.ex.:
- org.qtproject.logging FullText
- org.qtproject.* LeftFilter
- *.qtproject RightFilter
- *.qtproject* MidFilter
+ qt.core.io.debug FullText, QtDebugMsg
+ qt.core.* LeftFilter, all types
+ *.io.warning RightFilter, QtWarningMsg
+ *.core.* MidFilter
*/
-void QLoggingRule::parse()
+void QLoggingRule::parse(const QStringRef &pattern)
{
- int index = pattern.indexOf(QLatin1Char('*'));
- if (index < 0) {
+ QStringRef p;
+
+ // strip trailing ".messagetype"
+ if (pattern.endsWith(QLatin1String(".debug"))) {
+ p = QStringRef(pattern.string(), pattern.position(),
+ pattern.length() - strlen(".debug"));
+ messageType = QtDebugMsg;
+ } else if (pattern.endsWith(QLatin1String(".warning"))) {
+ p = QStringRef(pattern.string(), pattern.position(),
+ pattern.length() - strlen(".warning"));
+ messageType = QtWarningMsg;
+ } else if (pattern.endsWith(QLatin1String(".critical"))) {
+ p = QStringRef(pattern.string(), pattern.position(),
+ pattern.length() - strlen(".critical"));
+ messageType = QtCriticalMsg;
+ } else {
+ p = pattern;
+ }
+
+ flags = Invalid;
+ if (!p.contains(QLatin1Char('*'))) {
flags = FullText;
} else {
- flags = Invalid;
- if (index == 0) {
- flags |= RightFilter;
- pattern = pattern.remove(0, 1);
- index = pattern.indexOf(QLatin1Char('*'));
- }
- if (index == (pattern.length() - 1)) {
+ if (p.endsWith(QLatin1Char('*'))) {
flags |= LeftFilter;
- pattern = pattern.remove(pattern.length() - 1, 1);
+ p = QStringRef(p.string(), p.position(), p.length() - 1);
+ }
+ if (p.startsWith(QLatin1Char('*'))) {
+ flags |= RightFilter;
+ p = QStringRef(p.string(), p.position() + 1, p.length() - 1);
}
+ if (p.contains(QLatin1Char('*'))) // '*' only supported at start/end
+ flags = Invalid;
}
+
+ category = p.toString();
}
/*!
@@ -207,7 +220,7 @@ void QLoggingSettingsParser::setContent(QTextStream &stream)
int equalPos = line.indexOf(QLatin1Char('='));
if ((equalPos != -1)
&& (line.lastIndexOf(QLatin1Char('=')) == equalPos)) {
- const QString pattern = line.left(equalPos);
+ const QStringRef pattern = line.leftRef(equalPos);
const QStringRef value = line.midRef(equalPos + 1);
bool enabled = (value.compare(QLatin1String("true"),
Qt::CaseInsensitive) == 0);
@@ -226,10 +239,16 @@ QLoggingRegistry::QLoggingRegistry()
{
}
+static bool qtLoggingDebug()
+{
+ static const bool debugEnv = qEnvironmentVariableIsSet("QT_LOGGING_DEBUG");
+ return debugEnv;
+}
+
/*!
\internal
Initializes the rules database by loading
- .config/QtProject/qtlogging.ini and $QT_LOGGING_CONF.
+ $QT_LOGGING_CONF, $QT_LOGGING_RULES, and .config/QtProject/qtlogging.ini.
*/
void QLoggingRegistry::init()
{
@@ -241,9 +260,20 @@ void QLoggingRegistry::init()
QTextStream stream(&file);
QLoggingSettingsParser parser;
parser.setContent(stream);
+ if (qtLoggingDebug())
+ debugMsg("Loading \"%s\" ...",
+ QDir::toNativeSeparators(file.fileName()).toUtf8().constData());
envRules = parser.rules();
}
}
+ const QByteArray rulesSrc = qgetenv("QT_LOGGING_RULES");
+ if (!rulesSrc.isEmpty()) {
+ QTextStream stream(rulesSrc);
+ QLoggingSettingsParser parser;
+ parser.setSection(QStringLiteral("Rules"));
+ parser.setContent(stream);
+ envRules += parser.rules();
+ }
// get rules from qt configuration
QString envPath = QStandardPaths::locate(QStandardPaths::GenericConfigLocation,
@@ -254,6 +284,9 @@ void QLoggingRegistry::init()
QTextStream stream(&file);
QLoggingSettingsParser parser;
parser.setContent(stream);
+ if (qtLoggingDebug())
+ debugMsg("Loading \"%s\" ...",
+ QDir::toNativeSeparators(envPath).toUtf8().constData());
configRules = parser.rules();
}
}
@@ -302,6 +335,10 @@ void QLoggingRegistry::setApiRules(const QString &content)
parser.setContent(content);
QMutexLocker locker(&registryMutex);
+
+ if (qtLoggingDebug())
+ debugMsg("Loading logging rules set by Qt API ...");
+
apiRules = parser.rules();
updateRules();
diff --git a/src/corelib/io/qloggingregistry_p.h b/src/corelib/io/qloggingregistry_p.h
index d4b97d42b8..21896bb268 100644
--- a/src/corelib/io/qloggingregistry_p.h
+++ b/src/corelib/io/qloggingregistry_p.h
@@ -64,11 +64,11 @@ class tst_QLoggingRegistry;
QT_BEGIN_NAMESPACE
-class QLoggingRule
+class Q_AUTOTEST_EXPORT QLoggingRule
{
public:
QLoggingRule();
- QLoggingRule(const QString &pattern, bool enabled);
+ QLoggingRule(const QStringRef &pattern, bool enabled);
int pass(const QString &categoryName, QtMsgType type) const;
enum PatternFlag {
@@ -80,12 +80,13 @@ public:
};
Q_DECLARE_FLAGS(PatternFlags, PatternFlag)
- QString pattern;
+ QString category;
+ int messageType;
PatternFlags flags;
bool enabled;
private:
- void parse();
+ void parse(const QStringRef &pattern);
};
Q_DECLARE_OPERATORS_FOR_FLAGS(QLoggingRule::PatternFlags)
diff --git a/src/corelib/io/qprocess_unix.cpp b/src/corelib/io/qprocess_unix.cpp
index 4076ec5855..0e917ef438 100644
--- a/src/corelib/io/qprocess_unix.cpp
+++ b/src/corelib/io/qprocess_unix.cpp
@@ -880,18 +880,18 @@ void QProcessPrivate::execChild(const char *workingDir, char **path, char **argv
// copy the stdin socket if asked to (without closing on exec)
if (inputChannelMode != QProcess::ForwardedInputChannel)
- qt_safe_dup2(stdinChannel.pipe[0], fileno(stdin), 0);
+ qt_safe_dup2(stdinChannel.pipe[0], STDIN_FILENO, 0);
// copy the stdout and stderr if asked to
if (processChannelMode != QProcess::ForwardedChannels) {
if (processChannelMode != QProcess::ForwardedOutputChannel)
- qt_safe_dup2(stdoutChannel.pipe[1], fileno(stdout), 0);
+ qt_safe_dup2(stdoutChannel.pipe[1], STDOUT_FILENO, 0);
// merge stdout and stderr if asked to
if (processChannelMode == QProcess::MergedChannels) {
- qt_safe_dup2(fileno(stdout), fileno(stderr), 0);
+ qt_safe_dup2(STDOUT_FILENO, STDERR_FILENO, 0);
} else if (processChannelMode != QProcess::ForwardedErrorChannel) {
- qt_safe_dup2(stderrChannel.pipe[1], fileno(stderr), 0);
+ qt_safe_dup2(stderrChannel.pipe[1], STDERR_FILENO, 0);
}
}
diff --git a/src/corelib/itemmodels/qsortfilterproxymodel.cpp b/src/corelib/itemmodels/qsortfilterproxymodel.cpp
index 1e377abf3e..55c4885d92 100644
--- a/src/corelib/itemmodels/qsortfilterproxymodel.cpp
+++ b/src/corelib/itemmodels/qsortfilterproxymodel.cpp
@@ -2610,6 +2610,7 @@ void QSortFilterProxyModel::invalidateFilter()
\li QMetaType::UInt
\li QMetaType::LongLong
\li QMetaType::ULongLong
+ \li QMetaType::Float
\li QMetaType::Double
\li QMetaType::QChar
\li QMetaType::QDate
diff --git a/src/corelib/json/qjsonvalue.cpp b/src/corelib/json/qjsonvalue.cpp
index 487a431b8f..4c4838d314 100644
--- a/src/corelib/json/qjsonvalue.cpp
+++ b/src/corelib/json/qjsonvalue.cpp
@@ -343,18 +343,47 @@ QJsonValue &QJsonValue::operator =(const QJsonValue &other)
The conversion will convert QVariant types as follows:
- \list
- \li QMetaType::Bool to Bool
- \li QMetaType::Int
- \li QMetaType::Double
- \li QMetaType::LongLong
- \li QMetaType::ULongLong
- \li QMetaType::UInt to Double
- \li QMetaType::QString to String
- \li QMetaType::QStringList
- \li QMetaType::QVariantList to Array
- \li QMetaType::QVariantMap to Object
- \endlist
+ \table
+ \header
+ \li Source type
+ \li Destination type
+ \row
+ \li
+ \list
+ \li QMetaType::Bool
+ \endlist
+ \li QJsonValue::Bool
+ \row
+ \li
+ \list
+ \li QMetaType::Int
+ \li QMetaType::UInt
+ \li QMetaType::LongLong
+ \li QMetaType::ULongLong
+ \li QMetaType::Float
+ \li QMetaType::Double
+ \endlist
+ \li QJsonValue::Double
+ \row
+ \li
+ \list
+ \li QMetaType::QString
+ \endlist
+ \li QJsonValue::String
+ \row
+ \li
+ \list
+ \li QMetaType::QStringList
+ \li QMetaType::QVariantList
+ \endlist
+ \li QJsonValue::Array
+ \row
+ \li
+ \list
+ \li QMetaType::QVariantMap
+ \endlist
+ \li QJsonValue::Object
+ \endtable
For all other QVariant types a conversion to a QString will be attempted. If the returned string
is empty, a Null QJsonValue will be stored, otherwise a String value using the returned QString.
@@ -363,10 +392,11 @@ QJsonValue &QJsonValue::operator =(const QJsonValue &other)
*/
QJsonValue QJsonValue::fromVariant(const QVariant &variant)
{
- switch (variant.type()) {
+ switch (variant.userType()) {
case QVariant::Bool:
return QJsonValue(variant.toBool());
case QVariant::Int:
+ case QMetaType::Float:
case QVariant::Double:
case QVariant::LongLong:
case QVariant::ULongLong:
diff --git a/src/corelib/kernel/qcoreevent.cpp b/src/corelib/kernel/qcoreevent.cpp
index cce385352e..62c76c1a40 100644
--- a/src/corelib/kernel/qcoreevent.cpp
+++ b/src/corelib/kernel/qcoreevent.cpp
@@ -274,6 +274,7 @@ QT_BEGIN_NAMESPACE
\omitvalue NetworkReplyUpdated
\omitvalue FutureCallOut
\omitvalue NativeGesture
+ \omitvalue WindowChangeInternal
*/
/*!
diff --git a/src/corelib/kernel/qcoreevent.h b/src/corelib/kernel/qcoreevent.h
index e974c4d226..3ee0eaaa61 100644
--- a/src/corelib/kernel/qcoreevent.h
+++ b/src/corelib/kernel/qcoreevent.h
@@ -278,6 +278,8 @@ public:
StyleAnimationUpdate = 213, // style animation target should be updated
ApplicationStateChange = 214,
+ WindowChangeInternal = 215, // internal for QQuickWidget
+
// 512 reserved for Qt Jambi's MetaCall event
// 513 reserved for Qt Jambi's DeleteOnMainThread event
diff --git a/src/corelib/thread/qgenericatomic.h b/src/corelib/thread/qgenericatomic.h
index 0c66d45855..aeed199c97 100644
--- a/src/corelib/thread/qgenericatomic.h
+++ b/src/corelib/thread/qgenericatomic.h
@@ -264,12 +264,8 @@ template <typename BaseClass> struct QGenericAtomicOps
template <typename T> static inline always_inline
T fetchAndSubRelaxed(T &_q_value, typename QAtomicAdditiveType<T>::AdditiveT operand) Q_DECL_NOTHROW
{
- // implement fetchAndSub on top of testAndSet
- Q_FOREVER {
- T tmp = BaseClass::load(_q_value);
- if (BaseClass::testAndSetRelaxed(_q_value, tmp, T(tmp - operand)))
- return tmp;
- }
+ // implement fetchAndSub on top of fetchAndAdd
+ return fetchAndAddRelaxed(_q_value, -operand);
}
template <typename T> static inline always_inline
diff --git a/src/corelib/thread/qthread_win.cpp b/src/corelib/thread/qthread_win.cpp
index db5c13157c..a12636778e 100644
--- a/src/corelib/thread/qthread_win.cpp
+++ b/src/corelib/thread/qthread_win.cpp
@@ -504,22 +504,22 @@ void QThread::usleep(unsigned long usecs)
void QThread::yieldCurrentThread()
{
- std::this_thread::yield();
+ msleep(1);
}
void QThread::sleep(unsigned long secs)
{
- std::this_thread::sleep_for(std::chrono::seconds(secs));
+ msleep(secs * 1000);
}
void QThread::msleep(unsigned long msecs)
{
- std::this_thread::sleep_for(std::chrono::milliseconds(msecs));
+ WaitForSingleObjectEx(GetCurrentThread(), msecs, FALSE);
}
void QThread::usleep(unsigned long usecs)
{
- std::this_thread::sleep_for(std::chrono::microseconds(usecs));
+ msleep((usecs / 1000) + 1);
}
#endif // Q_OS_WINRT
diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp
index 52207dcd4e..9c2a242e8e 100644
--- a/src/corelib/tools/qbytearray.cpp
+++ b/src/corelib/tools/qbytearray.cpp
@@ -4186,6 +4186,91 @@ QByteArray QByteArray::fromPercentEncoding(const QByteArray &input, char percent
return tmp;
}
+/*! \fn QByteArray QByteArray::fromCFData(CFDataRef data)
+ \since 5.3
+
+ Constructs a new QByteArray containing a copy of the CFData \a data.
+
+ \sa fromRawCFData(), fromRawData(), toRawCFData(), toCFData()
+*/
+
+/*! \fn QByteArray QByteArray::fromRawCFData(CFDataRef data)
+ \since 5.3
+
+ Constructs a QByteArray that uses the bytes of the CFData \a data.
+
+ The \a data's bytes are not copied.
+
+ The caller guarantees that the CFData will not be deleted
+ or modified as long as this QByteArray object exists.
+
+ \sa fromCFData(), fromRawData(), toRawCFData(), toCFData()
+*/
+
+/*! \fn CFDataRef QByteArray::toCFData() const
+ \since 5.3
+
+ Creates a CFData from a QByteArray. The caller owns the CFData object
+ and is responsible for releasing it.
+
+ \sa toRawCFData(), fromCFData(), fromRawCFData(), fromRawData()
+*/
+
+/*! \fn CFDataRef QByteArray::toRawCFData() const
+ \since 5.3
+
+ Constructs a CFData that uses the bytes of the QByteArray.
+
+ The QByteArray's bytes are not copied.
+
+ The caller guarantees that the QByteArray will not be deleted
+ or modified as long as this CFData object exists.
+
+ \sa toCFData(), fromRawCFData(), fromCFData(), fromRawData()
+*/
+
+/*! \fn QByteArray QByteArray::fromNSData(const NSData *data)
+ \since 5.3
+
+ Constructs a new QByteArray containing a copy of the NSData \a data.
+
+ \sa fromRawNSData(), fromRawData(), toNSData(), toRawNSData()
+*/
+
+/*! \fn QByteArray QByteArray::fromRawNSData(const NSData *data)
+ \since 5.3
+
+ Constructs a QByteArray that uses the bytes of the NSData \a data.
+
+ The \a data's bytes are not copied.
+
+ The caller guarantees that the NSData will not be deleted
+ or modified as long as this QByteArray object exists.
+
+ \sa fromNSData(), fromRawData(), toRawNSData(), toNSData()
+*/
+
+/*! \fn NSData QByteArray::toNSData() const
+ \since 5.3
+
+ Creates a NSData from a QByteArray. The NSData object is autoreleased.
+
+ \sa fromNSData(), fromRawNSData(), fromRawData(), toRawNSData()
+*/
+
+/*! \fn NSData QByteArray::toRawNSData() const
+ \since 5.3
+
+ Constructs a NSData that uses the bytes of the QByteArray.
+
+ The QByteArray's bytes are not copied.
+
+ The caller guarantees that the QByteArray will not be deleted
+ or modified as long as this NSData object exists.
+
+ \sa fromRawNSData(), fromNSData(), fromRawData(), toNSData()
+*/
+
static inline bool q_strchr(const char str[], char chr)
{
if (!str) return false;
diff --git a/src/corelib/tools/qbytearray.h b/src/corelib/tools/qbytearray.h
index ae8166db81..b0a6971964 100644
--- a/src/corelib/tools/qbytearray.h
+++ b/src/corelib/tools/qbytearray.h
@@ -65,6 +65,12 @@
#endif
+#ifdef Q_OS_MAC
+Q_FORWARD_DECLARE_CF_TYPE(CFData);
+# ifdef __OBJC__
+Q_FORWARD_DECLARE_OBJC_CLASS(NSData);
+# endif
+#endif
QT_BEGIN_NAMESPACE
@@ -354,6 +360,18 @@ public:
static QByteArray fromHex(const QByteArray &hexEncoded);
static QByteArray fromPercentEncoding(const QByteArray &pctEncoded, char percent = '%');
+#if defined(Q_OS_MAC) || defined(Q_QDOC)
+ static QByteArray fromCFData(CFDataRef data);
+ static QByteArray fromRawCFData(CFDataRef data);
+ CFDataRef toCFData() const Q_DECL_CF_RETURNS_RETAINED;
+ CFDataRef toRawCFData() const Q_DECL_CF_RETURNS_RETAINED;
+# if defined(__OBJC__) || defined(Q_QDOC)
+ static QByteArray fromNSData(const NSData *data);
+ static QByteArray fromRawNSData(const NSData *data);
+ NSData *toNSData() const Q_DECL_NS_RETURNS_AUTORELEASED;
+ NSData *toRawNSData() const Q_DECL_NS_RETURNS_AUTORELEASED;
+# endif
+#endif
typedef char *iterator;
typedef const char *const_iterator;
diff --git a/src/corelib/doc/snippets/qbytearraylist/main.cpp b/src/corelib/tools/qbytearray_mac.mm
index 59f7af52e2..8bddf20dc6 100644
--- a/src/corelib/doc/snippets/qbytearraylist/main.cpp
+++ b/src/corelib/tools/qbytearray_mac.mm
@@ -1,6 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 by Southwest Research Institute (R)
+** Copyright (C) 2014 Samuel Gaist <samuel.gaist@edeltech.ch>
+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the QtCore module of the Qt Toolkit.
@@ -39,13 +40,62 @@
**
****************************************************************************/
+#include "qbytearray.h"
-#include <QByteArrayList>
+#import <Foundation/Foundation.h>
-int main(int, char **)
+QT_BEGIN_NAMESPACE
+
+QByteArray QByteArray::fromCFData(CFDataRef data)
{
- QByteArray ba1, ba2, ba3;
-//! [0]
- QByteArrayList longerList = (QByteArrayList() << ba1 << ba2 << ba3);
-//! [0]
+ if (!data)
+ return QByteArray();
+
+ return QByteArray(reinterpret_cast<const char *>(CFDataGetBytePtr(data)), CFDataGetLength(data));
}
+
+QByteArray QByteArray::fromRawCFData(CFDataRef data)
+{
+ if (!data)
+ return QByteArray();
+
+ return QByteArray::fromRawData(reinterpret_cast<const char *>(CFDataGetBytePtr(data)), CFDataGetLength(data));
+}
+
+CFDataRef QByteArray::toCFData() const
+{
+ return CFDataCreate(kCFAllocatorDefault, reinterpret_cast<const UInt8 *>(data()), length());
+}
+
+CFDataRef QByteArray::toRawCFData() const
+{
+ return CFDataCreateWithBytesNoCopy(kCFAllocatorDefault, reinterpret_cast<const UInt8 *>(data()),
+ length(), kCFAllocatorNull);
+}
+
+QByteArray QByteArray::fromNSData(const NSData *data)
+{
+ if (!data)
+ return QByteArray();
+ return QByteArray(reinterpret_cast<const char *>([data bytes]), [data length]);
+}
+
+QByteArray QByteArray::fromRawNSData(const NSData *data)
+{
+ if (!data)
+ return QByteArray();
+ return QByteArray::fromRawData(reinterpret_cast<const char *>([data bytes]), [data length]);
+}
+
+NSData *QByteArray::toNSData() const
+{
+ return [NSData dataWithBytes:constData() length:size()];
+}
+
+NSData *QByteArray::toRawNSData() const
+{
+ // const_cast is fine here because NSData is immutable thus will never modify bytes we're giving it
+ return [NSData dataWithBytesNoCopy:const_cast<char *>(constData()) length:size() freeWhenDone:NO];
+}
+
+QT_END_NAMESPACE
diff --git a/src/corelib/tools/qbytearraylist.cpp b/src/corelib/tools/qbytearraylist.cpp
deleted file mode 100644
index 817342d682..0000000000
--- a/src/corelib/tools/qbytearraylist.cpp
+++ /dev/null
@@ -1,258 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 by Southwest Research Institute (R)
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the QtCore module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <qbytearraylist.h>
-
-QT_BEGIN_NAMESPACE
-
-/*! \typedef QByteArrayListIterator
- \relates QByteArrayList
-
- The QByteArrayListIterator type definition provides a Java-style const
- iterator for QByteArrayList.
-
- QByteArrayList provides both \l{Java-style iterators} and
- \l{STL-style iterators}. The Java-style const iterator is simply
- a type definition for QListIterator<QByteArray>.
-
- \sa QMutableByteArrayListIterator, QByteArrayList::const_iterator
-*/
-
-/*! \typedef QMutableByteArrayListIterator
- \relates QByteArrayList
-
- The QByteArrayListIterator type definition provides a Java-style
- non-const iterator for QByteArrayList.
-
- QByteArrayList provides both \l{Java-style iterators} and
- \l{STL-style iterators}. The Java-style non-const iterator is
- simply a type definition for QMutableListIterator<QByteArray>.
-
- \sa QByteArrayListIterator, QByteArrayList::iterator
-*/
-
-/*!
- \class QByteArrayList
- \inmodule QtCore
- \since 5.3
- \brief The QByteArrayList class provides a list of byte arrays.
-
- \ingroup tools
- \ingroup shared
- \ingroup string-processing
-
- \reentrant
-
- QByteArrayList inherits from QList<QByteArray>. Like QList, QByteArrayList is
- \l{implicitly shared}. It provides fast index-based access as well as fast
- insertions and removals. Passing string lists as value parameters is both
- fast and safe.
-
- All of QList's functionality also applies to QByteArrayList. For example, you
- can use isEmpty() to test whether the list is empty, and you can call
- functions like append(), prepend(), insert(), replace(), removeAll(),
- removeAt(), removeFirst(), removeLast(), and removeOne() to modify a
- QByteArrayList. In addition, QByteArrayList provides several join()
- methods for concatenating the list into a single QByteArray.
-
- The purpose of QByteArrayList is quite different from that of QStringList.
- Whereas QStringList has many methods for manipulation of elements within
- the list, QByteArrayList does not.
- Normally, QStringList should be used whenever working with a list of printable
- strings. QByteArrayList should be used to handle and efficiently join large blobs
- of binary data, as when sequentially receiving serialized data through a
- QIODevice.
-
- \sa QByteArray, QStringList
-*/
-
-/*!
- \fn QByteArrayList::QByteArrayList()
-
- Constructs an empty byte array list.
-*/
-
-/*!
- \fn QByteArrayList::QByteArrayList(const QByteArray &ba)
-
- Constructs a byte array list that contains the given byte array,
- \a ba. Longer lists are easily created like this:
-
- \snippet qbytearraylist/main.cpp 0
-
- \sa append()
-*/
-
-/*!
- \fn QByteArrayList::QByteArrayList(const QByteArrayList &other)
-
- Constructs a copy of the \a other byte array list.
-
- This operation takes \l{constant time} because QByteArrayList is
- \l{implicitly shared}, making the process of returning a
- QByteArrayList from a function very fast. If a shared instance is
- modified, it will be copied (copy-on-write), and that takes
- \l{linear time}.
-
- \sa operator=()
-*/
-
-/*!
- \fn QByteArrayList::QByteArrayList(const QList<QByteArray> &other)
-
- Constructs a copy of \a other.
-
- This operation takes \l{constant time}, because QByteArrayList is
- \l{implicitly shared}. This makes returning a QByteArrayList from a
- function very fast. If a shared instance is modified, it will be
- copied (copy-on-write), and that takes \l{linear time}.
-
- \sa operator=()
-*/
-
-/*! \fn QByteArrayList::QByteArrayList(std::initializer_list<QByteArray> args)
-
- Construct a list from a std::initializer_list given by \a args.
-
- This constructor is only enabled if the compiler supports C++11 initializer
- lists.
-*/
-
-/*!
- \fn QByteArray QByteArrayList::join() const
-
- Joins all the byte arrays into a single byte array.
-*/
-
-/*!
- \fn QByteArray QByteArrayList::join(const QByteArray &separator) const
-
- Joins all the byte arrays into a single byte array with each
- element separated by the given \a separator.
-*/
-
-int QByteArrayList_joinedSize(const QByteArrayList *that, int seplen)
-{
- int totalLength = 0;
- const int size = that->size();
-
- for (int i = 0; i < size; ++i)
- totalLength += that->at(i).size();
-
- if (size > 0)
- totalLength += seplen * (size - 1);
-
- return totalLength;
-}
-
-/*!
- \fn QByteArray QByteArrayList::join(char separator) const
-
- Joins all the byte arrays into a single byte array with each
- element separated by the given \a separator.
-*/
-QByteArray QtPrivate::QByteArrayList_join(const QByteArrayList *that, const char *sep, int seplen)
-{
- int totalLength = QByteArrayList_joinedSize(that, seplen);
- QByteArray res;
- if (totalLength == 0)
- return res;
- res.reserve(totalLength);
- for (int i = 0; i < that->size(); ++i) {
- if (i)
- res.append(sep, seplen);
- res += that->at(i);
- }
- return res;
-}
-
-/*!
- \fn QByteArrayList operator+(const QByteArrayList &list1, const QByteArrayList &list2)
- \relates QByteArrayList
-
- Returns a byte array list that is the concatenation of \a list1 and \a list2.
-*/
-
-/*!
- \fn QByteArrayList& operator+=(QByteArrayList &list1, const QByteArrayList &list2)
- \relates QByteArrayList
-
- Appends \a list2 to \a list1 and returns a reference to \a list1.
-*/
-
-/*!
- \fn QByteArrayList &QByteArrayList::operator<<(const QByteArray &ba)
-
- Appends the given byte array, \a ba, to this byte array list and returns
- a reference to the byte array list.
-
- \sa append()
-*/
-
-/*!
- \fn QByteArrayList &QByteArrayList::operator<<(const QByteArrayList &other)
-
- \overload
-
- Appends the \a other byte array list to the byte array list and returns a reference to
- the latter byte array list.
-*/
-
-/*!
- \fn QDataStream &operator>>(QDataStream &in, QByteArrayList &list)
- \relates QByteArrayList
-
- Reads a byte array list from the given \a in stream into the specified
- \a list.
-
- \sa {Serializing Qt Data Types}
-*/
-
-/*!
- \fn QDataStream &operator<<(QDataStream &out, const QByteArrayList &list)
- \relates QByteArrayList
-
- Writes the given byte array \a list to the specified \a out stream.
-
- \sa {Serializing Qt Data Types}
-*/
-
-QT_END_NAMESPACE
diff --git a/src/corelib/tools/qbytearraylist.h b/src/corelib/tools/qbytearraylist.h
deleted file mode 100644
index 882bc68f09..0000000000
--- a/src/corelib/tools/qbytearraylist.h
+++ /dev/null
@@ -1,124 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 by Southwest Research Institute (R)
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the QtCore module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-
-#ifndef QBYTEARRAYLIST_H
-#define QBYTEARRAYLIST_H
-
-#include <QtCore/qdatastream.h>
-#include <QtCore/qlist.h>
-#include <QtCore/qbytearray.h>
-
-QT_BEGIN_NAMESPACE
-
-
-typedef QListIterator<QByteArray> QByteArrayListIterator;
-typedef QMutableListIterator<QByteArray> QMutableByteArrayListIterator;
-
-class QByteArrayList : public QList<QByteArray>
-{
-public:
- inline QByteArrayList() { }
- inline explicit QByteArrayList(const QByteArray &i) { append(i); }
- inline QByteArrayList(const QByteArrayList &l) : QList<QByteArray>(l) { }
- inline QByteArrayList(const QList<QByteArray> &l) : QList<QByteArray>(l) { }
-#ifdef Q_COMPILER_INITIALIZER_LISTS
- inline QByteArrayList(std::initializer_list<QByteArray> args) : QList<QByteArray>(args) { }
-#endif
-
- inline QByteArray join() const;
- inline QByteArray join(const QByteArray &sep) const;
- inline QByteArray join(char sep) const;
-
- inline QByteArrayList &operator<<(const QByteArray &str)
- { append(str); return *this; }
- inline QByteArrayList &operator<<(const QByteArrayList &l)
- { *this += l; return *this; }
-};
-
-Q_DECLARE_TYPEINFO(QByteArrayList, Q_MOVABLE_TYPE);
-
-namespace QtPrivate {
- QByteArray Q_CORE_EXPORT QByteArrayList_join(const QByteArrayList *that, const char *s, int l);
-}
-
-inline QByteArray QByteArrayList::join() const
-{
- return QtPrivate::QByteArrayList_join(this, 0, 0);
-}
-
-inline QByteArray QByteArrayList::join(const QByteArray &sep) const
-{
- return QtPrivate::QByteArrayList_join(this, sep.constData(), sep.size());
-}
-
-inline QByteArray QByteArrayList::join(char sep) const
-{
- return QtPrivate::QByteArrayList_join(this, &sep, 1);
-}
-
-inline QByteArrayList operator+(const QByteArrayList &lhs, const QByteArrayList &rhs)
-{
- QByteArrayList res = lhs;
- res += rhs;
- return res;
-}
-
-inline QByteArrayList& operator+=(QByteArrayList &lhs, const QByteArrayList &rhs)
-{
- lhs.append( rhs );
- return lhs;
-}
-
-#ifndef QT_NO_DATASTREAM
-inline QDataStream &operator>>(QDataStream &in, QByteArrayList &list)
-{
- return operator>>(in, static_cast<QList<QByteArray> &>(list));
-}
-inline QDataStream &operator<<(QDataStream &out, const QByteArrayList &list)
-{
- return operator<<(out, static_cast<const QList<QByteArray> &>(list));
-}
-#endif // QT_NO_DATASTREAM
-
-QT_END_NAMESPACE
-
-#endif // QBYTEARRAYLIST_H
diff --git a/src/corelib/tools/qdatetimeparser_p.h b/src/corelib/tools/qdatetimeparser_p.h
index 2b4f59a23a..e2513b43a5 100644
--- a/src/corelib/tools/qdatetimeparser_p.h
+++ b/src/corelib/tools/qdatetimeparser_p.h
@@ -241,7 +241,7 @@ public:
3. User increments month: 31/03/2000
At step 1, cachedDay stores 31. At step 2, the 31 is invalid for February, so the cachedDay is not updated.
- At step 3, the the month is changed to March, for which 31 is a valid day. Since 29 < 31, the day is set to cachedDay.
+ At step 3, the month is changed to March, for which 31 is a valid day. Since 29 < 31, the day is set to cachedDay.
This is good for when users have selected their desired day and are scrolling up or down in the month or year section
and do not want smaller months (or non-leap years) to alter the day that they chose.
*/
diff --git a/src/corelib/tools/qeasingcurve.cpp b/src/corelib/tools/qeasingcurve.cpp
index 2708901866..409ebd1de5 100644
--- a/src/corelib/tools/qeasingcurve.cpp
+++ b/src/corelib/tools/qeasingcurve.cpp
@@ -1232,6 +1232,8 @@ void QEasingCurve::setOvershoot(qreal overshoot)
It is only applicable if type() is QEasingCurve::BezierSpline.
Note that the spline implicitly starts at (0.0, 0.0) and has to end at (1.0, 1.0) to
be a valid easing curve.
+ \a c1 and \a c2 are the control points used for drawing the curve.
+ \a endPoint is the endpoint of the curve.
*/
void QEasingCurve::addCubicBezierSegment(const QPointF & c1, const QPointF & c2, const QPointF & endPoint)
{
@@ -1290,8 +1292,12 @@ QVector<QPointF> static inline tcbToBezier(const TCBPoints &tcbPoints)
It is only applicable if type() is QEasingCurve::TCBSpline.
The spline has to start explitly at (0.0, 0.0) and has to end at (1.0, 1.0) to
be a valid easing curve.
- The three parameters are called tension, continuity and bias. All three parameters are
- valid between -1 and 1 and define the tangent of the control point.
+ The tension \a t changes the length of the tangent vector.
+ The continuity \a c changes the sharpness in change between the tangents.
+ The bias \a b changes the direction of the tangent vector.
+ \a nextPoint is the sample position.
+ All three parameters are valid between -1 and 1 and define the
+ tangent of the control point.
If all three parameters are 0 the resulting spline is a Catmull-Rom spline.
The begin and endpoint always have a bias of -1 and 1, since the outer tangent is not defined.
*/
@@ -1390,7 +1396,7 @@ void QEasingCurve::setType(Type type)
/*!
Sets a custom easing curve that is defined by the user in the function \a func.
The signature of the function is qreal myEasingFunction(qreal progress),
- where \e progress and the return value is considered to be normalized between 0 and 1.
+ where \e progress and the return value are considered to be normalized between 0 and 1.
(In some cases the return value can be outside that range)
After calling this function type() will return QEasingCurve::Custom.
\a func cannot be zero.
@@ -1420,8 +1426,8 @@ QEasingCurve::EasingFunction QEasingCurve::customType() const
/*!
Return the effective progress for the easing curve at \a progress.
- While \a progress must be between 0 and 1, the returned effective progress
- can be outside those bounds. For instance, QEasingCurve::InBack will
+ Whereas \a progress must be between 0 and 1, the returned effective progress
+ can be outside those bounds. For example, QEasingCurve::InBack will
return negative values in the beginning of the function.
*/
qreal QEasingCurve::valueForProgress(qreal progress) const
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp
index 116da9e383..7547ba8c19 100644
--- a/src/corelib/tools/qstring.cpp
+++ b/src/corelib/tools/qstring.cpp
@@ -1617,7 +1617,7 @@ void QString::resize(int size)
This function is useful for code that needs to build up a long
string and wants to avoid repeated reallocation. In this example,
- we want to add to the string until some condition is true, and
+ we want to add to the string until some condition is \c true, and
we're fairly sure that size is large enough to make a call to
reserve() worthwhile:
@@ -2534,6 +2534,9 @@ bool QString::operator==(QLatin1String other) const
QT_NO_CAST_FROM_ASCII when you compile your applications. This
can be useful if you want to ensure that all user-visible strings
go through QObject::tr(), for example.
+
+ Returns \c true if this string is lexically equal to the parameter
+ string \a other. Otherwise returns \c false.
*/
/*! \fn bool QString::operator==(const char *other) const
@@ -2563,9 +2566,11 @@ bool operator<(const QString &s1, const QString &s2)
{
return ucstrcmp(s1.constData(), s1.length(), s2.constData(), s2.length()) < 0;
}
-
/*!
- \overload operator<()
+ \overload operator<()
+ \relates QString
+ Returns \c true if this string is lexically less than the parameter
+ string called \a other; otherwise returns \c false.
*/
bool QString::operator<(QLatin1String other) const
{
@@ -2592,6 +2597,9 @@ bool QString::operator<(QLatin1String other) const
/*! \fn bool QString::operator<(const char *other) const
+ Returns \c true if this string is lexically less than string \a other.
+ Otherwise returns \c false.
+
\overload operator<()
The \a other const char pointer is converted to a QString using
@@ -2616,6 +2624,9 @@ bool QString::operator<(QLatin1String other) const
/*! \fn bool QString::operator<=(QLatin1String other) const
+ Returns \c true if this string is lexically less than or equal to
+ parameter string \a other. Otherwise returns \c false.
+
\overload operator<=()
*/
@@ -2658,7 +2669,10 @@ bool QString::operator<(QLatin1String other) const
*/
/*!
- \overload operator>()
+ \overload operator>()
+ \relates QString
+ Returns \c true if this string is lexically greater than the parameter
+ string \a other; otherwise returns \c false.
*/
bool QString::operator>(QLatin1String other) const
{
@@ -2710,6 +2724,9 @@ bool QString::operator>(QLatin1String other) const
/*! \fn bool QString::operator>=(QLatin1String other) const
+ Returns \c true if this string is lexically greater than or equal to parameter
+ string \a other. Otherwise returns \c false.
+
\overload operator>=()
*/
@@ -2754,6 +2771,9 @@ bool QString::operator>(QLatin1String other) const
/*! \fn bool QString::operator!=(QLatin1String other) const
+ Returns \c true if this string is not equal to parameter string \a other.
+ Otherwise returns \c false.
+
\overload operator!=()
*/
@@ -4082,7 +4102,7 @@ QString QString::mid(int position, int n) const
/*!
Returns \c true if the string starts with \a s; otherwise returns
- false.
+ \c false.
If \a cs is Qt::CaseSensitive (default), the search is
case sensitive; otherwise the search is case insensitive.
@@ -4109,7 +4129,7 @@ bool QString::startsWith(QLatin1String s, Qt::CaseSensitivity cs) const
\overload startsWith()
Returns \c true if the string starts with \a c; otherwise returns
- false.
+ \c false.
*/
bool QString::startsWith(QChar c, Qt::CaseSensitivity cs) const
{
@@ -4138,7 +4158,7 @@ bool QString::startsWith(const QStringRef &s, Qt::CaseSensitivity cs) const
/*!
Returns \c true if the string ends with \a s; otherwise returns
- false.
+ \c false.
If \a cs is Qt::CaseSensitive (default), the search is case
sensitive; otherwise the search is case insensitive.
@@ -4181,7 +4201,7 @@ bool QString::endsWith(QLatin1String s, Qt::CaseSensitivity cs) const
/*!
Returns \c true if the string ends with \a c; otherwise returns
- false.
+ \c false.
\overload endsWith()
*/
@@ -4581,7 +4601,7 @@ QString& QString::setUnicode(const QChar *unicode, int size)
replaced with a single space.
Whitespace means any character for which QChar::isSpace() returns
- true. This includes the ASCII characters '\\t', '\\n', '\\v',
+ \c true. This includes the ASCII characters '\\t', '\\n', '\\v',
'\\f', '\\r', and ' '.
Example:
@@ -4671,7 +4691,7 @@ QString QString::simplified() const
the end.
Whitespace means any character for which QChar::isSpace() returns
- true. This includes the ASCII characters '\\t', '\\n', '\\v',
+ \c true. This includes the ASCII characters '\\t', '\\n', '\\v',
'\\f', '\\r', and ' '.
Example:
@@ -4866,7 +4886,7 @@ QString& QString::fill(QChar ch, int size)
/*! \fn bool QString::isEmpty() const
Returns \c true if the string has no characters; otherwise returns
- false.
+ \c false.
Example:
@@ -4981,7 +5001,7 @@ QString& QString::fill(QChar ch, int size)
\relates QString
Returns \c true if \a s1 is not equal to \a s2; otherwise returns
- false.
+ \c false.
For \a s1 != 0, this is equivalent to \c {compare(} \a s1, \a s2
\c {) != 0}. Note that no string is equal to \a s1 being 0.
@@ -5389,12 +5409,12 @@ const ushort *QString::utf16() const
Returns a string of size \a width that contains this string
padded by the \a fill character.
- If \a truncate is false and the size() of the string is more than
+ If \a truncate is \c false and the size() of the string is more than
\a width, then the returned string is a copy of the string.
\snippet qstring/main.cpp 32
- If \a truncate is true and the size() of the string is more than
+ If \a truncate is \c true and the size() of the string is more than
\a width, then any characters in a copy of the string after
position \a width are removed, and the copy is returned.
@@ -5430,7 +5450,7 @@ QString QString::leftJustified(int width, QChar fill, bool truncate) const
\snippet qstring/main.cpp 49
- If \a truncate is false and the size() of the string is more than
+ If \a truncate is \c false and the size() of the string is more than
\a width, then the returned string is a copy of the string.
If \a truncate is true and the size() of the string is more than
@@ -6053,8 +6073,8 @@ QString &QString::vsprintf(const char* cformat, va_list ap)
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to false; otherwise
- *\a{ok} is set to true.
+ If a conversion error occurs, *\a{ok} is set to \c false; otherwise
+ *\a{ok} is set to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -6093,8 +6113,8 @@ qlonglong QString::toIntegral_helper(const QChar *data, int len, bool *ok, int b
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to false; otherwise
- *\a{ok} is set to true.
+ If a conversion error occurs, *\a{ok} is set to \c false; otherwise
+ *\a{ok} is set to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -6134,8 +6154,8 @@ qulonglong QString::toIntegral_helper(const QChar *data, uint len, bool *ok, int
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to false; otherwise
- *\a{ok} is set to true.
+ If a conversion error occurs, *\a{ok} is set to \c false; otherwise
+ *\a{ok} is set to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -6163,8 +6183,8 @@ long QString::toLong(bool *ok, int base) const
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to false; otherwise
- *\a{ok} is set to true.
+ If a conversion error occurs, *\a{ok} is set to \c false; otherwise
+ *\a{ok} is set to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -6191,8 +6211,8 @@ ulong QString::toULong(bool *ok, int base) const
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to false; otherwise
- *\a{ok} is set to true.
+ If a conversion error occurs, *\a{ok} is set to \c false; otherwise
+ *\a{ok} is set to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -6218,8 +6238,8 @@ int QString::toInt(bool *ok, int base) const
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to false; otherwise
- *\a{ok} is set to true.
+ If a conversion error occurs, *\a{ok} is set to \c false; otherwise
+ *\a{ok} is set to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -6245,8 +6265,8 @@ uint QString::toUInt(bool *ok, int base) const
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to false; otherwise
- *\a{ok} is set to true.
+ If a conversion error occurs, *\a{ok} is set to \c false; otherwise
+ *\a{ok} is set to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -6272,8 +6292,8 @@ short QString::toShort(bool *ok, int base) const
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to false; otherwise
- *\a{ok} is set to true.
+ If a conversion error occurs, *\a{ok} is set to \c false; otherwise
+ *\a{ok} is set to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -6300,8 +6320,8 @@ ushort QString::toUShort(bool *ok, int base) const
Returns 0.0 if the conversion fails.
- If a conversion error occurs, \c{*}\a{ok} is set to false;
- otherwise \c{*}\a{ok} is set to true.
+ If a conversion error occurs, \c{*}\a{ok} is set to \c false;
+ otherwise \c{*}\a{ok} is set to \c true.
\snippet qstring/main.cpp 66
@@ -6332,8 +6352,8 @@ double QString::toDouble(bool *ok) const
/*!
Returns the string converted to a \c float value.
- If a conversion error occurs, *\a{ok} is set to false; otherwise
- *\a{ok} is set to true. Returns 0.0 if the conversion fails.
+ If a conversion error occurs, *\a{ok} is set to \c false; otherwise
+ *\a{ok} is set to \c true. Returns 0.0 if the conversion fails.
The string conversion will always happen in the 'C' locale. For locale
dependent conversion use QLocale::toFloat()
@@ -8276,7 +8296,7 @@ ownership of it, no memory is freed when instances are destroyed.
\fn bool QStringRef::isEmpty() const
Returns \c true if the string reference has no characters; otherwise returns
- false.
+ \c false.
A string reference is empty if its size is zero.
@@ -9523,7 +9543,7 @@ QVector<uint> QStringRef::toUcs4() const
the end.
Whitespace means any character for which QChar::isSpace() returns
- true. This includes the ASCII characters '\\t', '\\n', '\\v',
+ \c true. This includes the ASCII characters '\\t', '\\n', '\\v',
'\\f', '\\r', and ' '.
Unlike QString::simplified(), trimmed() leaves internal whitespace alone.
@@ -9555,8 +9575,8 @@ QStringRef QStringRef::trimmed() const
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to false; otherwise
- *\a{ok} is set to true.
+ If a conversion error occurs, *\a{ok} is set to \c false; otherwise
+ *\a{ok} is set to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -9580,8 +9600,8 @@ qint64 QStringRef::toLongLong(bool *ok, int base) const
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to false; otherwise
- *\a{ok} is set to true.
+ If a conversion error occurs, *\a{ok} is set to \c false; otherwise
+ *\a{ok} is set to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -9607,8 +9627,8 @@ quint64 QStringRef::toULongLong(bool *ok, int base) const
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to false; otherwise
- *\a{ok} is set to true.
+ If a conversion error occurs, *\a{ok} is set to \c false; otherwise
+ *\a{ok} is set to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -9634,8 +9654,8 @@ long QStringRef::toLong(bool *ok, int base) const
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to false; otherwise
- *\a{ok} is set to true.
+ If a conversion error occurs, *\a{ok} is set to \c false; otherwise
+ *\a{ok} is set to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -9660,8 +9680,8 @@ ulong QStringRef::toULong(bool *ok, int base) const
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to false; otherwise
- *\a{ok} is set to true.
+ If a conversion error occurs, *\a{ok} is set to \c false; otherwise
+ *\a{ok} is set to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -9685,8 +9705,8 @@ int QStringRef::toInt(bool *ok, int base) const
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to false; otherwise
- *\a{ok} is set to true.
+ If a conversion error occurs, *\a{ok} is set to \c false; otherwise
+ *\a{ok} is set to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -9710,8 +9730,8 @@ uint QStringRef::toUInt(bool *ok, int base) const
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to false; otherwise
- *\a{ok} is set to true.
+ If a conversion error occurs, *\a{ok} is set to \c false; otherwise
+ *\a{ok} is set to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -9735,8 +9755,8 @@ short QStringRef::toShort(bool *ok, int base) const
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to false; otherwise
- *\a{ok} is set to true.
+ If a conversion error occurs, *\a{ok} is set to \c false; otherwise
+ *\a{ok} is set to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -9761,8 +9781,8 @@ ushort QStringRef::toUShort(bool *ok, int base) const
Returns 0.0 if the conversion fails.
- If a conversion error occurs, \c{*}\a{ok} is set to false;
- otherwise \c{*}\a{ok} is set to true.
+ If a conversion error occurs, \c{*}\a{ok} is set to \c false;
+ otherwise \c{*}\a{ok} is set to \c true.
The string conversion will always happen in the 'C' locale. For locale
dependent conversion use QLocale::toDouble()
@@ -9784,8 +9804,8 @@ double QStringRef::toDouble(bool *ok) const
/*!
Returns the string converted to a \c float value.
- If a conversion error occurs, *\a{ok} is set to false; otherwise
- *\a{ok} is set to true. Returns 0.0 if the conversion fails.
+ If a conversion error occurs, *\a{ok} is set to \c false; otherwise
+ *\a{ok} is set to \c true. Returns 0.0 if the conversion fails.
The string conversion will always happen in the 'C' locale. For locale
dependent conversion use QLocale::toFloat()
diff --git a/src/corelib/tools/qvarlengtharray.qdoc b/src/corelib/tools/qvarlengtharray.qdoc
index 05d9258c86..73036ceaed 100644
--- a/src/corelib/tools/qvarlengtharray.qdoc
+++ b/src/corelib/tools/qvarlengtharray.qdoc
@@ -189,6 +189,8 @@
/*! \fn bool QVarLengthArray::empty() const
\since 5.0
+ Returns \c true if the array has size 0; otherwise returns \c false.
+
Same as isEmpty(). Provided for STL-compatibility.
*/
@@ -285,7 +287,8 @@
\fn void QVarLengthArray::push_back(const T &t)
\since 5.0
- Same as append(). Provided for STL-compatibility.
+ Appends item \a t to the array, extending the array if necessary.
+ Provided for STL-compatibility.
*/
/*!
@@ -665,8 +668,7 @@
/*! \fn QVarLengthArray &QVarLengthArray::operator+=(const T &value)
\since 4.8
- Appends \a value to the array and returns a reference to this
- vector.
+ Appends \a value to the array and returns a reference to this vector.
\sa append(), operator<<()
*/
diff --git a/src/corelib/tools/qvector.cpp b/src/corelib/tools/qvector.cpp
index 4beb0f939c..89396540e0 100644
--- a/src/corelib/tools/qvector.cpp
+++ b/src/corelib/tools/qvector.cpp
@@ -565,6 +565,7 @@
/*! \fn void QVector::removeAt(int i)
\since 5.2
+ Removes the element at index position \a i.
Equivalent to
\code
remove(i);
@@ -588,6 +589,8 @@
/*! \fn T QVector::takeAt(int i)
\since 5.2
+ Removes the element at index position \a i and returns it.
+
Equivalent to
\code
T t = at(i);
@@ -907,7 +910,7 @@
/*! \fn bool QVector::empty() const
This function is provided for STL compatibility. It is equivalent
- to isEmpty(), returning true if the vector is empty; otherwise
+ to isEmpty(), returning \c true if the vector is empty; otherwise
returns \c false.
*/
diff --git a/src/corelib/tools/tools.pri b/src/corelib/tools/tools.pri
index 1e4a503778..863cf03439 100644
--- a/src/corelib/tools/tools.pri
+++ b/src/corelib/tools/tools.pri
@@ -9,7 +9,6 @@ HEADERS += \
tools/qarraydatapointer.h \
tools/qbitarray.h \
tools/qbytearray.h \
- tools/qbytearraylist.h \
tools/qbytearraymatcher.h \
tools/qbytedata_p.h \
tools/qcache.h \
@@ -78,7 +77,6 @@ SOURCES += \
tools/qarraydata.cpp \
tools/qbitarray.cpp \
tools/qbytearray.cpp \
- tools/qbytearraylist.cpp \
tools/qbytearraymatcher.cpp \
tools/qcollator.cpp \
tools/qcommandlineoption.cpp \
@@ -127,7 +125,8 @@ false: SOURCES += $$NO_PCH_SOURCES # Hack for QtCreator
SOURCES += tools/qelapsedtimer_mac.cpp
OBJECTIVE_SOURCES += tools/qlocale_mac.mm \
tools/qtimezoneprivate_mac.mm \
- tools/qstring_mac.mm
+ tools/qstring_mac.mm \
+ tools/qbytearray_mac.mm
}
else:blackberry {
SOURCES += tools/qelapsedtimer_unix.cpp tools/qlocale_blackberry.cpp tools/qtimezoneprivate_tz.cpp