summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-02-26 15:04:38 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-02-26 15:04:38 (GMT)
commitca82ee4ee55e52c75326949148455af1095df014 (patch)
tree8266295822f50094ff49fd60dc5ac70f075925f2 /src/corelib
parent27e403d9c6185c606980bb7881e39a2c88138a13 (diff)
parentb78012c855a8b00fa0d100cd0cf6c8de024dfa69 (diff)
downloadQt-ca82ee4ee55e52c75326949148455af1095df014.zip
Qt-ca82ee4ee55e52c75326949148455af1095df014.tar.gz
Qt-ca82ee4ee55e52c75326949148455af1095df014.tar.bz2
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-s60-public into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/qt-s60-public: (81 commits) Added addMMPRules for adding conditional MMP_RULES Allow overriding TARGET.EPOCHEAPSIZE with MMP_RULES Build break fix for commit d8465414e6fd543cfc20e732030dedd8d2bc685f. Fix for cetest. Speed up compilation of this test with MSVC. New benchmark for QDirIterator Backporting auto-test utility header from master. Fix a signed/unsigned comparison compiler warning Removed an export that shouldn't be exported. Reduced the code and memory footprint of the keymap. Enabled Qt key events to work also when native key code is missing. Cleaning of the patch to QTBUG-3168 Patch to QTBUG-3168 Crash in QGraphicsScenePrivate::setFocusItemHelper Pass the right arguments to QApplication in GraphicsView benchmark. Improvements to itemview keypad navigation in S60. Revert changes made in scroll_sys(). Fix SymbianMakefileGenerator::absolutizePath for clean builds Set the roleNames of proxy models to the roleNames of the source model. Add benchmarks for accessing meta-object properties via QScriptValue ...
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/concurrent/qfuturewatcher.cpp7
-rw-r--r--src/corelib/global/qglobal.h5
-rw-r--r--src/corelib/io/qdatastream.cpp5
-rw-r--r--src/corelib/io/qdir.cpp7
-rw-r--r--src/corelib/io/qfsfileengine_unix.cpp2
-rw-r--r--src/corelib/io/qiodevice.cpp4
-rw-r--r--src/corelib/io/qresource.cpp9
-rw-r--r--src/corelib/io/qurl.cpp25
-rw-r--r--src/corelib/tools/qscopedpointer.cpp55
9 files changed, 101 insertions, 18 deletions
diff --git a/src/corelib/concurrent/qfuturewatcher.cpp b/src/corelib/concurrent/qfuturewatcher.cpp
index 3065205..3b808b8 100644
--- a/src/corelib/concurrent/qfuturewatcher.cpp
+++ b/src/corelib/concurrent/qfuturewatcher.cpp
@@ -499,6 +499,13 @@ void QFutureWatcherBasePrivate::sendCallOutEvent(QFutureCallOutEvent *event)
/*! \fn void QFutureWatcher::setFuture(const QFuture<T> &future)
Starts watching the given \a future.
+
+ One of the signals might be emitted for the current state of the
+ \a future. For example, if the future is already stopped, the
+ finished signal will be emitted.
+
+ To avoid a race condition, it is important to call this function
+ \i after doing the connections.
*/
/*! \fn QFuture<T> QFutureWatcher::future() const
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index 7e7d7d8..4d48b60 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -814,7 +814,7 @@ namespace QT_NAMESPACE {}
# define Q_WS_MAC32
# endif
# elif defined(Q_OS_SYMBIAN)
-# if (defined(__SERIES60_31__) || defined(__S60_32__) || defined(__S60_50__)) && !defined(QT_NO_S60)
+# if !defined(QT_NO_S60)
# define Q_WS_S60
# endif
# elif !defined(Q_WS_QWS)
@@ -2414,10 +2414,11 @@ QT3_SUPPORT Q_CORE_EXPORT const char *qInstallPathSysconf();
#if defined(Q_OS_SYMBIAN)
-#ifdef SYMBIAN_GRAPHICS_USE_GCE
+#ifdef SYMBIAN_BUILD_GCE
//RWsPointerCursor is fixed, so don't use low performance sprites
#define Q_SYMBIAN_FIXED_POINTER_CURSORS
#define Q_SYMBIAN_HAS_EXTENDED_BITMAP_TYPE
+#define Q_SYMBIAN_WINDOW_SIZE_CACHE
//enabling new graphics resources
#define QT_SYMBIAN_SUPPORTS_SGIMAGE
#define QT_SYMBIAN_SUPPORTS_ADVANCED_POINTER
diff --git a/src/corelib/io/qdatastream.cpp b/src/corelib/io/qdatastream.cpp
index fc35bfa..2731ae1 100644
--- a/src/corelib/io/qdatastream.cpp
+++ b/src/corelib/io/qdatastream.cpp
@@ -159,10 +159,9 @@ QT_BEGIN_NAMESPACE
\section1 Reading and writing Qt collection classes
- The Qt collection classes can also be serialized to a QDataStream.
+ The Qt container classes can also be serialized to a QDataStream.
These include QList, QLinkedList, QVector, QSet, QHash, and QMap.
- These classes have have stream operators declared as non-member of
- the class.
+ The stream operators are declared as non-members of the classes.
\target Serializing Qt Classes
\section1 Reading and writing other Qt classes.
diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp
index 7cfdddf..505889e 100644
--- a/src/corelib/io/qdir.cpp
+++ b/src/corelib/io/qdir.cpp
@@ -960,13 +960,14 @@ void QDir::setNameFilters(const QStringList &nameFilters)
/*!
\obsolete
+
+ Use QDir::addSearchPath() with a prefix instead.
+
Adds \a path to the search paths searched in to find resources
that are not specified with an absolute path. The default search
path is to search only in the root (\c{:/}).
- Use QDir::addSearchPath() with a prefix instead.
-
- \sa {The Qt Resource System}, QResource::addSearchPath()
+ \sa {The Qt Resource System}
*/
void QDir::addResourceSearchPath(const QString &path)
{
diff --git a/src/corelib/io/qfsfileengine_unix.cpp b/src/corelib/io/qfsfileengine_unix.cpp
index 9179485..d2fa744 100644
--- a/src/corelib/io/qfsfileengine_unix.cpp
+++ b/src/corelib/io/qfsfileengine_unix.cpp
@@ -1270,7 +1270,7 @@ uchar *QFSFileEnginePrivate::map(qint64 offset, qint64 size, QFile::MemoryMapFla
int pageSize = getpagesize();
int extra = offset % pageSize;
- if (size + extra > (size_t)-1) {
+ if (quint64(size + extra) > quint64((size_t)-1)) {
q->setError(QFile::UnspecifiedError, qt_error_string(int(EINVAL)));
return 0;
}
diff --git a/src/corelib/io/qiodevice.cpp b/src/corelib/io/qiodevice.cpp
index 4e14ba8..662100a 100644
--- a/src/corelib/io/qiodevice.cpp
+++ b/src/corelib/io/qiodevice.cpp
@@ -1003,8 +1003,8 @@ QByteArray QIODevice::readAll()
to a maximum of \a maxSize - 1 bytes, stores the characters in \a
data, and returns the number of bytes read. If a line could not be
read but no error ocurred, this function returns 0. If an error
- occurs, this function returns what it could the length of what
- could be read, or -1 if nothing was read.
+ occurs, this function returns the length of what could be read, or
+ -1 if nothing was read.
A terminating '\0' byte is always appended to \a data, so \a
maxSize must be larger than 1.
diff --git a/src/corelib/io/qresource.cpp b/src/corelib/io/qresource.cpp
index adfbb15..6d33c8b 100644
--- a/src/corelib/io/qresource.cpp
+++ b/src/corelib/io/qresource.cpp
@@ -555,16 +555,15 @@ QStringList QResource::children() const
/*!
\obsolete
+ Use QDir::addSearchPath() with a prefix instead.
+
Adds \a path to the search paths searched in to find resources that are
not specified with an absolute path. The \a path must be an absolute
path (start with \c{/}).
The default search path is to search only in the root (\c{:/}). The last
path added will be consulted first upon next QResource creation.
-
- Use QDir::addSearchPath() with a prefix instead.
*/
-
void
QResource::addSearchPath(const QString &path)
{
@@ -578,6 +577,10 @@ QResource::addSearchPath(const QString &path)
}
/*!
+ \obsolete
+
+ Use QDir::searchPaths() instead.
+
Returns the current search path list. This list is consulted when
creating a relative resource.
diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp
index 0290fb8..acb73fd 100644
--- a/src/corelib/io/qurl.cpp
+++ b/src/corelib/io/qurl.cpp
@@ -437,17 +437,19 @@ static bool QT_FASTCALL _unreserved(const char **ptr)
}
// scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
-static void QT_FASTCALL _scheme(const char **ptr, QUrlParseData *parseData)
+static bool QT_FASTCALL _scheme(const char **ptr, QUrlParseData *parseData)
{
bool first = true;
+ bool isSchemeValid = true;
parseData->scheme = *ptr;
for (;;) {
char ch = **ptr;
if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z')) {
;
- } else if (!first && ((ch >= '0' && ch <= '9') || ch == '+' || ch == '-' || ch == '.')) {
- ;
+ } else if ((ch >= '0' && ch <= '9') || ch == '+' || ch == '-' || ch == '.') {
+ if (first)
+ isSchemeValid = false;
} else {
break;
}
@@ -457,11 +459,14 @@ static void QT_FASTCALL _scheme(const char **ptr, QUrlParseData *parseData)
}
if (**ptr != ':') {
+ isSchemeValid = true;
*ptr = parseData->scheme;
} else {
parseData->schemeLength = *ptr - parseData->scheme;
++(*ptr); // skip ':'
}
+
+ return isSchemeValid;
}
// IPvFuture = "v" 1*HEXDIG "." 1*( unreserved / sub-delims / ":" )
@@ -3743,7 +3748,19 @@ void QUrlPrivate::parse(ParseOptions parseOptions) const
#endif
// optional scheme
- _scheme(ptr, &parseData);
+ bool isSchemeValid = _scheme(ptr, &parseData);
+
+ if (isSchemeValid == false) {
+ that->isValid = false;
+ char ch = *((*ptr)++);
+ that->errorInfo.setParams(*ptr, QT_TRANSLATE_NOOP(QUrl, "unexpected URL scheme"),
+ 0, ch);
+ QURL_SETFLAG(that->stateFlags, Validated | Parsed);
+#if defined (QURL_DEBUG)
+ qDebug("QUrlPrivate::parse(), unrecognized: %c%s", ch, *ptr);
+#endif
+ return;
+ }
// hierpart
_hierPart(ptr, &parseData);
diff --git a/src/corelib/tools/qscopedpointer.cpp b/src/corelib/tools/qscopedpointer.cpp
index 12badf0..e7dd769 100644
--- a/src/corelib/tools/qscopedpointer.cpp
+++ b/src/corelib/tools/qscopedpointer.cpp
@@ -225,4 +225,59 @@ QT_BEGIN_NAMESPACE
Swap this pointer with \a other.
*/
+/*!
+ \class QScopedArrayPointer
+
+ \brief The QScopedArrayPointer class stores a pointer to a
+ dynamically allocated array of objects, and deletes it upon
+ destruction.
+
+ \since 4.6
+ \reentrant
+ \ingroup misc
+
+ A QScopedArrayPointer is a QScopedPointer that defaults to
+ deleting the object it is pointing to with the delete[] operator. It
+ also features operator[] for convenience, so we can write:
+
+ \code
+ void foo()
+ {
+ QScopedArrayPointer<int> i(new int[10]);
+ i[2] = 42;
+ ...
+ return; // our integer array is now deleted using delete[]
+ }
+ \endcode
+*/
+
+/*!
+ \fn QScopedArrayPointer::QScopedArrayPointer(T *p = 0)
+
+ Constructs this QScopedArrayPointer instance and sets its pointer
+ to \a p.
+*/
+
+/*!
+ \fn T *QScopedArrayPointer::operator[](int i)
+
+ Provides access to entry \a i of the scoped pointer's array of
+ objects.
+
+ If the contained pointer is \c null, behavior is undefined.
+
+ \sa isNull()
+*/
+
+/*!
+ \fn T *QScopedArrayPointer::operator[](int i) const
+
+ Provides access to entry \a i of the scoped pointer's array of
+ objects.
+
+ If the contained pointer is \c null, behavior is undefined.
+
+ \sa isNull()
+*/
+
QT_END_NAMESPACE