summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/concurrent/qtconcurrentfilter.cpp2
-rw-r--r--src/corelib/concurrent/qtconcurrentmap.cpp2
-rw-r--r--src/corelib/concurrent/qtconcurrentresultstore.cpp2
-rw-r--r--src/corelib/corelib.pro5
-rw-r--r--src/corelib/global/qglobal.cpp5
-rw-r--r--src/corelib/global/qlibraryinfo.cpp2
-rw-r--r--src/corelib/io/qfileinfo.cpp4
-rw-r--r--src/corelib/io/qfsfileengine_win.cpp4
-rw-r--r--src/corelib/kernel/qbasictimer.cpp7
-rw-r--r--src/corelib/kernel/qeventdispatcher_unix.cpp31
-rw-r--r--src/corelib/kernel/qeventdispatcher_unix_p.h4
-rw-r--r--src/corelib/kernel/qmetaobject.cpp5
-rw-r--r--src/corelib/thread/qmutexpool.cpp2
-rw-r--r--src/corelib/tools/qbytearraymatcher.h2
-rw-r--r--src/corelib/tools/qpair.qdoc4
-rw-r--r--src/corelib/tools/qsharedpointer.cpp4
-rw-r--r--src/corelib/tools/qsimd_p.h4
-rw-r--r--src/corelib/tools/qstring.cpp13
-rw-r--r--src/corelib/tools/qstringmatcher.h2
19 files changed, 58 insertions, 46 deletions
diff --git a/src/corelib/concurrent/qtconcurrentfilter.cpp b/src/corelib/concurrent/qtconcurrentfilter.cpp
index 36febe7..29c3edb 100644
--- a/src/corelib/concurrent/qtconcurrentfilter.cpp
+++ b/src/corelib/concurrent/qtconcurrentfilter.cpp
@@ -117,7 +117,7 @@
function, and should merge the \e{intermediate} into the \e{result}
variable. QtConcurrent::filteredReduced() guarantees that only one thread
will call reduce at a time, so using a mutex to lock the result variable
- is not neccesary. The QtConcurrent::ReduceOptions enum provides a way to
+ is not necessary. The QtConcurrent::ReduceOptions enum provides a way to
control the order in which the reduction is done.
\section1 Additional API Features
diff --git a/src/corelib/concurrent/qtconcurrentmap.cpp b/src/corelib/concurrent/qtconcurrentmap.cpp
index e74d69c..4303ff6 100644
--- a/src/corelib/concurrent/qtconcurrentmap.cpp
+++ b/src/corelib/concurrent/qtconcurrentmap.cpp
@@ -161,7 +161,7 @@
function, and should merge the \e{intermediate} into the \e{result}
variable. QtConcurrent::mappedReduced() guarantees that only one thread
will call reduce at a time, so using a mutex to lock the result variable
- is not neccesary. The QtConcurrent::ReduceOptions enum provides a way to
+ is not necessary. The QtConcurrent::ReduceOptions enum provides a way to
control the order in which the reduction is done. If
QtConcurrent::UnorderedReduce is used (the default), the order is
undefined, while QtConcurrent::OrderedReduce ensures that the reduction
diff --git a/src/corelib/concurrent/qtconcurrentresultstore.cpp b/src/corelib/concurrent/qtconcurrentresultstore.cpp
index ad4b2cf..65f3afa 100644
--- a/src/corelib/concurrent/qtconcurrentresultstore.cpp
+++ b/src/corelib/concurrent/qtconcurrentresultstore.cpp
@@ -236,7 +236,7 @@ int ResultStoreBase::count() const
return resultCount;
}
-// returns the insert index, calling this funciton with
+// returns the insert index, calling this function with
// index equal to -1 returns the next available index.
int ResultStoreBase::updateInsertIndex(int index, int _count)
{
diff --git a/src/corelib/corelib.pro b/src/corelib/corelib.pro
index bc8ef9f..728bdf9 100644
--- a/src/corelib/corelib.pro
+++ b/src/corelib/corelib.pro
@@ -53,6 +53,9 @@ symbian: {
DEPLOYMENT = partial_upgrade $$DEPLOYMENT
}
-neon: QMAKE_CXXFLAGS *= -mfpu=neon
+neon {
+ DEFINES += QT_HAVE_NEON
+ QMAKE_CXXFLAGS *= -mfpu=neon
+}
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index 0e3a8d3..af35316 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -2914,8 +2914,9 @@ int qrand()
\relates <QtGlobal>
You can use this macro to specify information about a custom type
- \a Type. With accurate type information, Qt's \l{generic
- containers} can choose appropriate storage methods and algorithms.
+ \a Type. With accurate type information, Qt's \l{Container Classes}
+ {generic containers} can choose appropriate storage methods and
+ algorithms.
\a Flags can be one of the following:
diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp
index 3515777..ea7e2e4 100644
--- a/src/corelib/global/qlibraryinfo.cpp
+++ b/src/corelib/global/qlibraryinfo.cpp
@@ -476,7 +476,7 @@ QLibraryInfo::location(LibraryLocation loc)
\value PrefixPath The default prefix for all paths.
\value DocumentationPath The location for documentation upon install.
\value HeadersPath The location for all headers.
- \value LibrariesPath The location of installed librarires.
+ \value LibrariesPath The location of installed libraries.
\value BinariesPath The location of installed Qt binaries (tools and applications).
\value PluginsPath The location of installed Qt plugins.
\value ImportsPath The location of installed QML extensions to import.
diff --git a/src/corelib/io/qfileinfo.cpp b/src/corelib/io/qfileinfo.cpp
index 37591c5..61f7180 100644
--- a/src/corelib/io/qfileinfo.cpp
+++ b/src/corelib/io/qfileinfo.cpp
@@ -797,12 +797,12 @@ QString QFileInfo::suffix() const
\bold{Note:} The QDir returned always corresponds to the object's
parent directory, even if the QFileInfo represents a directory.
- For each of the follwing, dir() returns a QDir for
+ For each of the following, dir() returns a QDir for
\c{"~/examples/191697"}.
\snippet doc/src/snippets/fileinfo/main.cpp 0
- For each of the follwing, dir() returns a QDir for
+ For each of the following, dir() returns a QDir for
\c{"."}.
\snippet doc/src/snippets/fileinfo/main.cpp 1
diff --git a/src/corelib/io/qfsfileengine_win.cpp b/src/corelib/io/qfsfileengine_win.cpp
index 21930e1..35fa04b 100644
--- a/src/corelib/io/qfsfileengine_win.cpp
+++ b/src/corelib/io/qfsfileengine_win.cpp
@@ -1958,6 +1958,10 @@ uchar *QFSFileEnginePrivate::map(qint64 offset, qint64 size,
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL,
NULL);
+ // Since this is a special case, we check if the return value was NULL and if so
+ // we change it to INVALID_HANDLE_VALUE to follow the logic inside this function.
+ if(0 == handle)
+ handle = INVALID_HANDLE_VALUE;
#endif
if (handle == INVALID_HANDLE_VALUE) {
diff --git a/src/corelib/kernel/qbasictimer.cpp b/src/corelib/kernel/qbasictimer.cpp
index d176170..d595ac1 100644
--- a/src/corelib/kernel/qbasictimer.cpp
+++ b/src/corelib/kernel/qbasictimer.cpp
@@ -54,7 +54,8 @@ QT_BEGIN_NAMESPACE
This is a fast, lightweight, and low-level class used by Qt
internally. We recommend using the higher-level QTimer class
rather than this class if you want to use timers in your
- applications.
+ applications. Note that this timer is a repeating timer that
+ will send subsequent timer events unless the stop() function is called.
To use this class, create a QBasicTimer, and call its start()
function with a timeout interval and with a pointer to a QObject
@@ -88,8 +89,8 @@ QT_BEGIN_NAMESPACE
/*!
\fn bool QBasicTimer::isActive() const
- Returns true if the timer is running, has not yet timed
- out, and has not been stopped; otherwise returns false.
+ Returns true if the timer is running and has not been stopped; otherwise
+ returns false.
\sa start() stop()
*/
diff --git a/src/corelib/kernel/qeventdispatcher_unix.cpp b/src/corelib/kernel/qeventdispatcher_unix.cpp
index f7d45ac..9dadd82 100644
--- a/src/corelib/kernel/qeventdispatcher_unix.cpp
+++ b/src/corelib/kernel/qeventdispatcher_unix.cpp
@@ -331,7 +331,7 @@ QTimerInfoList::QTimerInfoList()
}
#endif
- firstTimerInfo = currentTimerInfo = 0;
+ firstTimerInfo = 0;
}
timeval QTimerInfoList::updateCurrentTime()
@@ -445,7 +445,7 @@ bool QTimerInfoList::timerWait(timeval &tm)
// Find first waiting timer not already active
QTimerInfo *t = 0;
for (QTimerInfoList::const_iterator it = constBegin(); it != constEnd(); ++it) {
- if (!(*it)->inTimerEvent) {
+ if (!(*it)->activateRef) {
t = *it;
break;
}
@@ -474,7 +474,7 @@ void QTimerInfoList::registerTimer(int timerId, int interval, QObject *object)
t->interval.tv_usec = (interval % 1000) * 1000;
t->timeout = updateCurrentTime() + t->interval;
t->obj = object;
- t->inTimerEvent = false;
+ t->activateRef = 0;
timerInsert(t);
}
@@ -489,8 +489,8 @@ bool QTimerInfoList::unregisterTimer(int timerId)
removeAt(i);
if (t == firstTimerInfo)
firstTimerInfo = 0;
- if (t == currentTimerInfo)
- currentTimerInfo = 0;
+ if (t->activateRef)
+ *(t->activateRef) = 0;
// release the timer id
if (!QObjectPrivate::get(t->obj)->inThreadChangeEvent)
@@ -515,8 +515,8 @@ bool QTimerInfoList::unregisterTimers(QObject *object)
removeAt(i);
if (t == firstTimerInfo)
firstTimerInfo = 0;
- if (t == currentTimerInfo)
- currentTimerInfo = 0;
+ if (t->activateRef)
+ *(t->activateRef) = 0;
// release the timer id
if (!QObjectPrivate::get(t->obj)->inThreadChangeEvent)
@@ -552,10 +552,7 @@ int QTimerInfoList::activateTimers()
bool firstTime = true;
timeval currentTime;
int n_act = 0, maxCount = count();
-
- QTimerInfo *saveFirstTimerInfo = firstTimerInfo;
- QTimerInfo *saveCurrentTimerInfo = currentTimerInfo;
- firstTimerInfo = currentTimerInfo = 0;
+ firstTimerInfo = 0;
while (maxCount--) {
currentTime = updateCurrentTime();
@@ -567,7 +564,7 @@ int QTimerInfoList::activateTimers()
if (isEmpty())
break;
- currentTimerInfo = first();
+ QTimerInfo *currentTimerInfo = first();
if (currentTime < currentTimerInfo->timeout)
break; // no timer has expired
@@ -594,21 +591,19 @@ int QTimerInfoList::activateTimers()
if (currentTimerInfo->interval.tv_usec > 0 || currentTimerInfo->interval.tv_sec > 0)
n_act++;
- if (!currentTimerInfo->inTimerEvent) {
+ if (!currentTimerInfo->activateRef) {
// send event, but don't allow it to recurse
- currentTimerInfo->inTimerEvent = true;
+ currentTimerInfo->activateRef = &currentTimerInfo;
QTimerEvent e(currentTimerInfo->id);
QCoreApplication::sendEvent(currentTimerInfo->obj, &e);
if (currentTimerInfo)
- currentTimerInfo->inTimerEvent = false;
+ currentTimerInfo->activateRef = 0;
}
}
- firstTimerInfo = saveFirstTimerInfo;
- currentTimerInfo = saveCurrentTimerInfo;
-
+ firstTimerInfo = 0;
return n_act;
}
diff --git a/src/corelib/kernel/qeventdispatcher_unix_p.h b/src/corelib/kernel/qeventdispatcher_unix_p.h
index cbe58de..060a163 100644
--- a/src/corelib/kernel/qeventdispatcher_unix_p.h
+++ b/src/corelib/kernel/qeventdispatcher_unix_p.h
@@ -77,7 +77,7 @@ struct QTimerInfo {
timeval interval; // - timer interval
timeval timeout; // - when to sent event
QObject *obj; // - object to receive event
- bool inTimerEvent;
+ QTimerInfo **activateRef; // - ref from activateTimers
};
class QTimerInfoList : public QList<QTimerInfo*>
@@ -92,7 +92,7 @@ class QTimerInfoList : public QList<QTimerInfo*>
#endif
// state variables used by activateTimers()
- QTimerInfo *firstTimerInfo, *currentTimerInfo;
+ QTimerInfo *firstTimerInfo;
public:
QTimerInfoList();
diff --git a/src/corelib/kernel/qmetaobject.cpp b/src/corelib/kernel/qmetaobject.cpp
index 79a38cd..9854e68 100644
--- a/src/corelib/kernel/qmetaobject.cpp
+++ b/src/corelib/kernel/qmetaobject.cpp
@@ -1009,8 +1009,11 @@ QByteArray QMetaObject::normalizedSignature(const char *method)
int argdepth = 0;
int templdepth = 0;
while (*d) {
- if (argdepth == 1)
+ if (argdepth == 1) {
d = qNormalizeType(d, templdepth, result);
+ if (!*d) //most likely an invalid signature.
+ break;
+ }
if (*d == '(')
++argdepth;
if (*d == ')')
diff --git a/src/corelib/thread/qmutexpool.cpp b/src/corelib/thread/qmutexpool.cpp
index d9abdc5..59211fb 100644
--- a/src/corelib/thread/qmutexpool.cpp
+++ b/src/corelib/thread/qmutexpool.cpp
@@ -46,7 +46,7 @@
QT_BEGIN_NAMESPACE
-// qt_global_mutexpool is here for backwards compatability only,
+// qt_global_mutexpool is here for backwards compatibility only,
// use QMutexpool::instance() in new clode.
Q_CORE_EXPORT QMutexPool *qt_global_mutexpool = 0;
Q_GLOBAL_STATIC_WITH_ARGS(QMutexPool, globalMutexPool, (QMutex::Recursive))
diff --git a/src/corelib/tools/qbytearraymatcher.h b/src/corelib/tools/qbytearraymatcher.h
index 8e7bc21..d3db4e9 100644
--- a/src/corelib/tools/qbytearraymatcher.h
+++ b/src/corelib/tools/qbytearraymatcher.h
@@ -78,7 +78,7 @@ private:
QByteArrayMatcherPrivate *d;
QByteArray q_pattern;
#ifdef Q_CC_RVCT
-// explicitely allow anonymous unions for RVCT to prevent compiler warnings
+// explicitly allow anonymous unions for RVCT to prevent compiler warnings
# pragma push
# pragma anon_unions
#endif
diff --git a/src/corelib/tools/qpair.qdoc b/src/corelib/tools/qpair.qdoc
index e60243f..d49c09e 100644
--- a/src/corelib/tools/qpair.qdoc
+++ b/src/corelib/tools/qpair.qdoc
@@ -35,7 +35,7 @@
pair type is not available. It stores one value of type T1 and
one value of type T2. It can be used as a return value for a
function that needs to return two values, or as the value type of
- a \l{generic container}.
+ a \l{Container classes}{generic container}.
Here's an example of a QPair that stores one QString and one \c
double value:
@@ -53,7 +53,7 @@
requirements; these requirements are documented on a per-function
basis.
- \sa {Generic Containers}
+ \sa {Container Classes}
*/
/*! \typedef QPair::first_type
diff --git a/src/corelib/tools/qsharedpointer.cpp b/src/corelib/tools/qsharedpointer.cpp
index f102598..5fac960 100644
--- a/src/corelib/tools/qsharedpointer.cpp
+++ b/src/corelib/tools/qsharedpointer.cpp
@@ -67,8 +67,8 @@
QSharedPointer and QWeakPointer are thread-safe and operate
atomically on the pointer value. Different threads can also access
- the same QSharedPointer or QWeakPointer object at the same time
- without need for locking mechanisms.
+ the QSharedPointer or QWeakPointer pointing to the same object at
+ the same time without need for locking mechanisms.
It should be noted that, while the pointer value can be accessed
in this manner, QSharedPointer and QWeakPointer provide no
diff --git a/src/corelib/tools/qsimd_p.h b/src/corelib/tools/qsimd_p.h
index 5ff0f97..a3148fb 100644
--- a/src/corelib/tools/qsimd_p.h
+++ b/src/corelib/tools/qsimd_p.h
@@ -150,7 +150,9 @@ enum CPUFeatures {
Q_CORE_EXPORT uint qDetectCPUFeatures();
-Q_CORE_EXPORT uint qDetectCPUFeatures();
+
+#define ALIGNMENT_PROLOGUE_16BYTES(ptr, i, length) \
+ for (; i < static_cast<int>(qMin(static_cast<quintptr>(length), ((4 - ((reinterpret_cast<quintptr>(ptr) >> 2) & 0x3)) & 0x3))); ++i)
QT_END_NAMESPACE
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp
index d6ab5da..2fd9a0b 100644
--- a/src/corelib/tools/qstring.cpp
+++ b/src/corelib/tools/qstring.cpp
@@ -6645,8 +6645,9 @@ QString QString::arg(qlonglong a, int fieldWidth, int base, const QChar &fillCha
QString locale_arg;
if (d.locale_occurrences > 0) {
QLocale locale;
- locale_arg = locale.d()->longLongToString(a, -1, base, fieldWidth,
- flags | QLocalePrivate::ThousandsGroup);
+ if (!locale.numberOptions() & QLocale::OmitGroupSeparator)
+ flags |= QLocalePrivate::ThousandsGroup;
+ locale_arg = locale.d()->longLongToString(a, -1, base, fieldWidth, flags);
}
return replaceArgEscapes(*this, d, fieldWidth, arg, locale_arg, fillChar);
@@ -6688,8 +6689,9 @@ QString QString::arg(qulonglong a, int fieldWidth, int base, const QChar &fillCh
QString locale_arg;
if (d.locale_occurrences > 0) {
QLocale locale;
- locale_arg = locale.d()->unsLongLongToString(a, -1, base, fieldWidth,
- flags | QLocalePrivate::ThousandsGroup);
+ if (!locale.numberOptions() & QLocale::OmitGroupSeparator)
+ flags |= QLocalePrivate::ThousandsGroup;
+ locale_arg = locale.d()->unsLongLongToString(a, -1, base, fieldWidth, flags);
}
return replaceArgEscapes(*this, d, fieldWidth, arg, locale_arg, fillChar);
@@ -6822,7 +6824,8 @@ QString QString::arg(double a, int fieldWidth, char fmt, int prec, const QChar &
if (d.locale_occurrences > 0) {
QLocale locale;
- flags |= QLocalePrivate::ThousandsGroup;
+ if (!locale.numberOptions() & QLocale::OmitGroupSeparator)
+ flags |= QLocalePrivate::ThousandsGroup;
locale_arg = locale.d()->doubleToString(a, prec, form, fieldWidth, flags);
}
diff --git a/src/corelib/tools/qstringmatcher.h b/src/corelib/tools/qstringmatcher.h
index 1aafcb8..451aeb6 100644
--- a/src/corelib/tools/qstringmatcher.h
+++ b/src/corelib/tools/qstringmatcher.h
@@ -78,7 +78,7 @@ private:
QString q_pattern;
Qt::CaseSensitivity q_cs;
#ifdef Q_CC_RVCT
-// explicitely allow anonymous unions for RVCT to prevent compiler warnings
+// explicitly allow anonymous unions for RVCT to prevent compiler warnings
# pragma push
# pragma anon_unions
#endif