From 7d0e1bb75dcb8d6d4fa843f95610fd1adec803f0 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Tue, 13 Sep 2011 09:57:15 +1000 Subject: Backport imports directory caching performance optimization Backported from Qt5 change a6da3b26 Change-Id: Ib1715f3d5c144775e475426ce4471000b5ae0645 Task-number: QTBUG-15899 --- src/declarative/qml/qdeclarativedirparser.cpp | 29 +++++++ src/declarative/qml/qdeclarativedirparser_p.h | 4 + src/declarative/qml/qdeclarativeimport.cpp | 103 ++++++++++++------------- src/declarative/qml/qdeclarativeimport_p.h | 2 + src/declarative/qml/qdeclarativetypeloader.cpp | 99 +++++++++++++++++++++++- src/declarative/qml/qdeclarativetypeloader_p.h | 9 +++ 6 files changed, 190 insertions(+), 56 deletions(-) diff --git a/src/declarative/qml/qdeclarativedirparser.cpp b/src/declarative/qml/qdeclarativedirparser.cpp index 0a7a749..401eea9 100644 --- a/src/declarative/qml/qdeclarativedirparser.cpp +++ b/src/declarative/qml/qdeclarativedirparser.cpp @@ -41,8 +41,10 @@ #include "private/qdeclarativedirparser_p.h" #include "qdeclarativeerror.h" +#include #include +#include #include QT_BEGIN_NAMESPACE @@ -66,6 +68,16 @@ void QDeclarativeDirParser::setUrl(const QUrl &url) _url = url; } +QString QDeclarativeDirParser::fileSource() const +{ + return _filePathSouce; +} + +void QDeclarativeDirParser::setFileSource(const QString &filePath) +{ + _filePathSouce = filePath; +} + QString QDeclarativeDirParser::source() const { return _source; @@ -92,6 +104,23 @@ bool QDeclarativeDirParser::parse() _plugins.clear(); _components.clear(); + if (_source.isEmpty() && !_filePathSouce.isEmpty()) { + QFile file(_filePathSouce); + if (!QDeclarative_isFileCaseCorrect(_filePathSouce)) { + QDeclarativeError error; + error.setDescription(QString::fromUtf8("cannot load module \"%1\": File name case mismatch for \"%2\"").arg(_url.toString()).arg(_filePathSouce)); + _errors.prepend(error); + return false; + } else if (file.open(QFile::ReadOnly)) { + _source = QString::fromUtf8(file.readAll()); + } else { + QDeclarativeError error; + error.setDescription(QString::fromUtf8("module \"%1\" definition \"%2\" not readable").arg(_url.toString()).arg(_filePathSouce)); + _errors.prepend(error); + return false; + } + } + QTextStream stream(&_source); int lineNumber = 0; diff --git a/src/declarative/qml/qdeclarativedirparser_p.h b/src/declarative/qml/qdeclarativedirparser_p.h index 7db7d8c..347b229 100644 --- a/src/declarative/qml/qdeclarativedirparser_p.h +++ b/src/declarative/qml/qdeclarativedirparser_p.h @@ -73,6 +73,9 @@ public: QString source() const; void setSource(const QString &source); + QString fileSource() const; + void setFileSource(const QString &filePath); + bool isParsed() const; bool parse(); @@ -116,6 +119,7 @@ private: QList _errors; QUrl _url; QString _source; + QString _filePathSouce; QList _components; QList _plugins; unsigned _isParsed: 1; diff --git a/src/declarative/qml/qdeclarativeimport.cpp b/src/declarative/qml/qdeclarativeimport.cpp index 6e0b348..44fc849 100644 --- a/src/declarative/qml/qdeclarativeimport.cpp +++ b/src/declarative/qml/qdeclarativeimport.cpp @@ -79,16 +79,16 @@ public: QList qmlDirComponents; - bool find_helper(int i, const QByteArray& type, int *vmajor, int *vminor, + bool find_helper(QDeclarativeTypeLoader *typeLoader, int i, const QByteArray& type, int *vmajor, int *vminor, QDeclarativeType** type_return, QUrl* url_return, QUrl *base = 0, bool *typeRecursionDetected = 0); - bool find(const QByteArray& type, int *vmajor, int *vminor, QDeclarativeType** type_return, + bool find(QDeclarativeTypeLoader *typeLoader, const QByteArray& type, int *vmajor, int *vminor, QDeclarativeType** type_return, QUrl* url_return, QUrl *base = 0, QString *errorString = 0); }; class QDeclarativeImportsPrivate { public: - QDeclarativeImportsPrivate(); + QDeclarativeImportsPrivate(QDeclarativeTypeLoader *loader); ~QDeclarativeImportsPrivate(); bool importExtension(const QString &absoluteFilePath, const QString &uri, @@ -111,6 +111,7 @@ public: QSet qmlDirFilesForWhichPluginsHaveBeenLoaded; QDeclarativeImportedNamespace unqualifiedset; QHash set; + QDeclarativeTypeLoader *typeLoader; }; /*! @@ -134,9 +135,12 @@ QDeclarativeImports::operator =(const QDeclarativeImports ©) return *this; } -QDeclarativeImports::QDeclarativeImports() -: d(new QDeclarativeImportsPrivate) -{ +QDeclarativeImports::QDeclarativeImports() + : d(new QDeclarativeImportsPrivate(0)){ +} + +QDeclarativeImports::QDeclarativeImports(QDeclarativeTypeLoader *typeLoader) + : d(new QDeclarativeImportsPrivate(typeLoader)){ } QDeclarativeImports::~QDeclarativeImports() @@ -268,10 +272,11 @@ bool QDeclarativeImports::resolveType(QDeclarativeImportedNamespace* ns, const Q QDeclarativeType** type_return, QUrl* url_return, int *vmaj, int *vmin) const { - return ns->find(type,vmaj,vmin,type_return,url_return); + Q_ASSERT(d->typeLoader); + return ns->find(d->typeLoader,type,vmaj,vmin,type_return,url_return); } -bool QDeclarativeImportedNamespace::find_helper(int i, const QByteArray& type, int *vmajor, int *vminor, +bool QDeclarativeImportedNamespace::find_helper(QDeclarativeTypeLoader *typeLoader, int i, const QByteArray& type, int *vmajor, int *vminor, QDeclarativeType** type_return, QUrl* url_return, QUrl *base, bool *typeRecursionDetected) { @@ -291,7 +296,6 @@ bool QDeclarativeImportedNamespace::find_helper(int i, const QByteArray& type, i return true; } - QUrl url = QUrl(urls.at(i) + QLatin1Char('/') + QString::fromUtf8(type) + QLatin1String(".qml")); QDeclarativeDirComponents qmldircomponents = qmlDirComponents.at(i); bool typeWasDeclaredInQmldir = false; @@ -303,6 +307,7 @@ bool QDeclarativeImportedNamespace::find_helper(int i, const QByteArray& type, i // importing version -1 means import ALL versions if ((vmaj == -1) || (c.majorVersion < vmaj || (c.majorVersion == vmaj && vmin >= c.minorVersion))) { + QUrl url = QUrl(urls.at(i) + QLatin1Char('/') + QString::fromUtf8(type) + QLatin1String(".qml")); QUrl candidate = url.resolved(QUrl(c.fileName)); if (c.internal && base) { if (base->resolved(QUrl(c.fileName)) != candidate) @@ -323,8 +328,9 @@ bool QDeclarativeImportedNamespace::find_helper(int i, const QByteArray& type, i if (!typeWasDeclaredInQmldir && !isLibrary.at(i)) { // XXX search non-files too! (eg. zip files, see QT-524) - QFileInfo f(QDeclarativeEnginePrivate::urlToLocalFileOrQrc(url)); - if (f.exists()) { + QUrl url = QUrl(urls.at(i) + QLatin1Char('/') + QString::fromUtf8(type) + QLatin1String(".qml")); + QString file = QDeclarativeEnginePrivate::urlToLocalFileOrQrc(url); + if (!typeLoader->absoluteFilePath(file).isEmpty()) { if (base && *base == url) { // no recursion if (typeRecursionDetected) *typeRecursionDetected = true; @@ -338,9 +344,8 @@ bool QDeclarativeImportedNamespace::find_helper(int i, const QByteArray& type, i return false; } -QDeclarativeImportsPrivate::QDeclarativeImportsPrivate() -: ref(1) -{ +QDeclarativeImportsPrivate::QDeclarativeImportsPrivate(QDeclarativeTypeLoader *loader) + : ref(1), typeLoader(loader){ } QDeclarativeImportsPrivate::~QDeclarativeImportsPrivate() @@ -353,33 +358,19 @@ bool QDeclarativeImportsPrivate::importExtension(const QString &absoluteFilePath QDeclarativeImportDatabase *database, QDeclarativeDirComponents* components, QString *errorString) { - QFile file(absoluteFilePath); - QString filecontent; - if (!QDeclarative_isFileCaseCorrect(absoluteFilePath)) { - if (errorString) - *errorString = QDeclarativeImportDatabase::tr("cannot load module \"%1\": File name case mismatch for \"%2\"").arg(uri).arg(absoluteFilePath); - return false; - } else if (file.open(QFile::ReadOnly)) { - filecontent = QString::fromUtf8(file.readAll()); - if (qmlImportTrace()) - qDebug().nospace() << "QDeclarativeImports(" << qPrintable(base.toString()) << "::importExtension: " - << "loaded " << absoluteFilePath; - } else { + Q_ASSERT(typeLoader); + const QDeclarativeDirParser *qmldirParser = typeLoader->qmlDirParser(absoluteFilePath); + if (qmldirParser->hasError()) { if (errorString) *errorString = QDeclarativeImportDatabase::tr("module \"%1\" definition \"%2\" not readable").arg(uri).arg(absoluteFilePath); return false; } - QDir dir = QFileInfo(file).dir(); - - QDeclarativeDirParser qmldirParser; - qmldirParser.setSource(filecontent); - qmldirParser.parse(); if (! qmlDirFilesForWhichPluginsHaveBeenLoaded.contains(absoluteFilePath)) { qmlDirFilesForWhichPluginsHaveBeenLoaded.insert(absoluteFilePath); - - foreach (const QDeclarativeDirParser::Plugin &plugin, qmldirParser.plugins()) { + QDir dir = QFileInfo(absoluteFilePath).dir(); + foreach (const QDeclarativeDirParser::Plugin &plugin, qmldirParser->plugins()) { QString resolvedFilePath = database->resolvePlugin(dir, plugin.path, plugin.name); #if defined(QT_LIBINFIX) && defined(Q_OS_SYMBIAN) @@ -404,7 +395,7 @@ bool QDeclarativeImportsPrivate::importExtension(const QString &absoluteFilePath } if (components) - *components = qmldirParser.components(); + *components = qmldirParser->components(); return true; } @@ -445,6 +436,7 @@ bool QDeclarativeImportsPrivate::add(const QDeclarativeDirComponents &qmldircomp QDeclarativeScriptParser::Import::Type importType, QDeclarativeImportDatabase *database, QString *errorString) { + Q_ASSERT(typeLoader); QDeclarativeDirComponents qmldircomponents = qmldircomponentsnetwork; QString uri = uri_arg; QDeclarativeImportedNamespace *s; @@ -462,20 +454,20 @@ bool QDeclarativeImportsPrivate::add(const QDeclarativeDirComponents &qmldircomp url.replace(QLatin1Char('.'), QLatin1Char('/')); bool found = false; QString dir; - + QString qmldir; // step 1: search for extension with fully encoded version number if (vmaj >= 0 && vmin >= 0) { foreach (const QString &p, database->fileImportPath) { dir = p+QLatin1Char('/')+url; + qmldir = dir+QString(QLatin1String(".%1.%2")).arg(vmaj).arg(vmin)+QLatin1String("/qmldir"); - QFileInfo fi(dir+QString(QLatin1String(".%1.%2")).arg(vmaj).arg(vmin)+QLatin1String("/qmldir")); - const QString absoluteFilePath = fi.absoluteFilePath(); - - if (fi.isFile()) { + QString absoluteFilePath = typeLoader->absoluteFilePath(qmldir); + if (!absoluteFilePath.isEmpty()) { found = true; - url = QUrl::fromLocalFile(fi.absolutePath()).toString(); + QString absolutePath = absoluteFilePath.left(absoluteFilePath.lastIndexOf(QLatin1Char('/'))); + url = QUrl::fromLocalFile(absolutePath).toString(); uri = resolvedUri(dir, database); if (!importExtension(absoluteFilePath, uri, database, &qmldircomponents, errorString)) return false; @@ -487,14 +479,14 @@ bool QDeclarativeImportsPrivate::add(const QDeclarativeDirComponents &qmldircomp if (vmaj >= 0 && vmin >= 0) { foreach (const QString &p, database->fileImportPath) { dir = p+QLatin1Char('/')+url; + qmldir = dir+QString(QLatin1String(".%1")).arg(vmaj)+QLatin1String("/qmldir"); - QFileInfo fi(dir+QString(QLatin1String(".%1")).arg(vmaj)+QLatin1String("/qmldir")); - const QString absoluteFilePath = fi.absoluteFilePath(); - - if (fi.isFile()) { + QString absoluteFilePath = typeLoader->absoluteFilePath(qmldir); + if (!absoluteFilePath.isEmpty()) { found = true; - url = QUrl::fromLocalFile(fi.absolutePath()).toString(); + QString absolutePath = absoluteFilePath.left(absoluteFilePath.lastIndexOf(QLatin1Char('/'))); + url = QUrl::fromLocalFile(absolutePath).toString(); uri = resolvedUri(dir, database); if (!importExtension(absoluteFilePath, uri, database, &qmldircomponents, errorString)) return false; @@ -507,14 +499,14 @@ bool QDeclarativeImportsPrivate::add(const QDeclarativeDirComponents &qmldircomp foreach (const QString &p, database->fileImportPath) { dir = p+QLatin1Char('/')+url; + qmldir = dir+QLatin1String("/qmldir"); - QFileInfo fi(dir+QLatin1String("/qmldir")); - const QString absoluteFilePath = fi.absoluteFilePath(); - - if (fi.isFile()) { + QString absoluteFilePath = typeLoader->absoluteFilePath(qmldir); + if (!absoluteFilePath.isEmpty()) { found = true; - url = QUrl::fromLocalFile(fi.absolutePath()).toString(); + QString absolutePath = absoluteFilePath.left(absoluteFilePath.lastIndexOf(QLatin1Char('/'))); + url = QUrl::fromLocalFile(absolutePath).toString(); uri = resolvedUri(dir, database); if (!importExtension(absoluteFilePath, uri, database, &qmldircomponents, errorString)) return false; @@ -552,7 +544,7 @@ bool QDeclarativeImportsPrivate::add(const QDeclarativeDirComponents &qmldircomp uri = resolvedUri(QDeclarativeEnginePrivate::urlToLocalFileOrQrc(base.resolved(QUrl(uri))), database); if (uri.endsWith(QLatin1Char('/'))) uri.chop(1); - if (QFile::exists(localFileOrQrc)) { + if (!typeLoader->absoluteFilePath(localFileOrQrc).isEmpty()) { if (!importExtension(localFileOrQrc,uri,database,&qmldircomponents,errorString)) return false; } @@ -615,6 +607,7 @@ bool QDeclarativeImportsPrivate::add(const QDeclarativeDirComponents &qmldircomp bool QDeclarativeImportsPrivate::find(const QByteArray& type, int *vmajor, int *vminor, QDeclarativeType** type_return, QUrl* url_return, QString *errorString) { + Q_ASSERT(typeLoader); QDeclarativeImportedNamespace *s = 0; int slash = type.indexOf('/'); if (slash >= 0) { @@ -636,7 +629,7 @@ bool QDeclarativeImportsPrivate::find(const QByteArray& type, int *vmajor, int * } QByteArray unqualifiedtype = slash < 0 ? type : type.mid(slash+1); // common-case opt (QString::mid works fine, but slower) if (s) { - if (s->find(unqualifiedtype,vmajor,vminor,type_return,url_return, &base, errorString)) + if (s->find(typeLoader, unqualifiedtype,vmajor,vminor,type_return,url_return, &base, errorString)) return true; if (s->urls.count() == 1 && !s->isLibrary[0] && url_return && s != &unqualifiedset) { // qualified, and only 1 url @@ -653,16 +646,16 @@ QDeclarativeImportedNamespace *QDeclarativeImportsPrivate::findNamespace(const Q return set.value(type); } -bool QDeclarativeImportedNamespace::find(const QByteArray& type, int *vmajor, int *vminor, QDeclarativeType** type_return, +bool QDeclarativeImportedNamespace::find(QDeclarativeTypeLoader *typeLoader, const QByteArray& type, int *vmajor, int *vminor, QDeclarativeType** type_return, QUrl* url_return, QUrl *base, QString *errorString) { bool typeRecursionDetected = false; for (int i=0; i #include #include +#include #include QT_BEGIN_NAMESPACE +/* +Returns the set of QML files in path (qmldir, *.qml, *.js). The caller +is responsible for deleting the returned data. +*/ +static QSet *qmlFilesInDirectory(const QString &path) +{ + QDirIterator dir(path, QDir::Files); + if (!dir.hasNext()) + return 0; + QSet *files = new QSet; + while (dir.hasNext()) { + dir.next(); + QString fileName = dir.fileName(); + if (fileName == QLatin1String("qmldir") + || fileName.endsWith(QLatin1String(".qml")) + || fileName.endsWith(QLatin1String(".js"))) { +#if defined(Q_OS_WIN32) || defined(Q_OS_WINCE) || defined(Q_OS_DARWIN) || defined(Q_OS_SYMBIAN) + fileName = fileName.toLower(); +#endif + files->insert(fileName); + } + } + return files; +} + + /*! \class QDeclarativeDataBlob \brief The QDeclarativeDataBlob encapsulates a data request that can be issued to a QDeclarativeDataLoader. @@ -715,6 +742,72 @@ QDeclarativeQmldirData *QDeclarativeTypeLoader::getQmldir(const QUrl &url) return qmldirData; } +/*! +Returns the absolute filename of path via a directory cache for files named +"qmldir", "*.qml", "*.js" +Returns a empty string if the path does not exist. +*/ +QString QDeclarativeTypeLoader::absoluteFilePath(const QString &path) +{ + if (path.isEmpty()) + return QString(); + if (path.at(0) == QLatin1Char(':')) { + // qrc resource + QFileInfo fileInfo(path); + return fileInfo.isFile() ? fileInfo.absoluteFilePath() : QString(); + } +#if defined(Q_OS_WIN32) || defined(Q_OS_WINCE) || defined(Q_OS_DARWIN) || defined(Q_OS_SYMBIAN) + QString lowPath(path.toLower()); +#else + QString lowPath(path); +#endif + int lastSlash = lowPath.lastIndexOf(QLatin1Char('/')); + QString dirPath = lowPath.left(lastSlash); + + StringSet *fileSet = 0; + QHash::const_iterator it = m_importDirCache.find(dirPath); + if (it == m_importDirCache.end()) { + StringSet *files = qmlFilesInDirectory(path.left(lastSlash)); + m_importDirCache.insert(dirPath, files); + fileSet = files; + } else { + fileSet = *it; + } + if (!fileSet) + return QString(); + + QString absoluteFilePath = fileSet->contains(QString(lowPath.constData()+lastSlash+1, lowPath.length()-lastSlash-1)) ? path : QString(); + if (absoluteFilePath.length() > 2 && absoluteFilePath.at(0) != QLatin1Char('/') && absoluteFilePath.at(1) != QLatin1Char(':')) + absoluteFilePath = QFileInfo(absoluteFilePath).absoluteFilePath(); + + return absoluteFilePath; +} + +/*! +Return a QDeclarativeDirParser for absoluteFilePath. The QDeclarativeDirParser may be cached. +*/ +const QDeclarativeDirParser *QDeclarativeTypeLoader::qmlDirParser(const QString &absoluteFilePath) +{ + QDeclarativeDirParser *qmldirParser; +#if defined(Q_OS_WIN32) || defined(Q_OS_WINCE) || defined(Q_OS_DARWIN) || defined(Q_OS_SYMBIAN) + QString lowPath(absoluteFilePath.toLower()); +#else + QString lowPath(absoluteFilePath); +#endif + QHash::const_iterator it = m_importQmlDirCache.find(lowPath); + if (it == m_importQmlDirCache.end()) { + qmldirParser = new QDeclarativeDirParser; + qmldirParser->setFileSource(absoluteFilePath); + qmldirParser->setUrl(QUrl::fromLocalFile(absoluteFilePath)); + qmldirParser->parse(); + m_importQmlDirCache.insert(lowPath, qmldirParser); + } else { + qmldirParser = *it; + } + + return qmldirParser; +} + void QDeclarativeTypeLoader::clearCache() { for (TypeCache::Iterator iter = m_typeCache.begin(); iter != m_typeCache.end(); ++iter) @@ -723,16 +816,20 @@ void QDeclarativeTypeLoader::clearCache() (*iter)->release(); for (QmldirCache::Iterator iter = m_qmldirCache.begin(); iter != m_qmldirCache.end(); ++iter) (*iter)->release(); + qDeleteAll(m_importDirCache); + qDeleteAll(m_importQmlDirCache); m_typeCache.clear(); m_scriptCache.clear(); m_qmldirCache.clear(); + m_importDirCache.clear(); + m_importQmlDirCache.clear(); } QDeclarativeTypeData::QDeclarativeTypeData(const QUrl &url, QDeclarativeTypeLoader::Options options, QDeclarativeTypeLoader *manager) -: QDeclarativeDataBlob(url, QmlFile), m_options(options), m_typesResolved(false), +: QDeclarativeDataBlob(url, QmlFile), m_options(options), m_imports(manager), m_typesResolved(false), m_compiledData(0), m_typeLoader(manager) { } diff --git a/src/declarative/qml/qdeclarativetypeloader_p.h b/src/declarative/qml/qdeclarativetypeloader_p.h index 56b6636..c0dce3e 100644 --- a/src/declarative/qml/qdeclarativetypeloader_p.h +++ b/src/declarative/qml/qdeclarativetypeloader_p.h @@ -198,14 +198,23 @@ public: QDeclarativeScriptData *getScript(const QUrl &); QDeclarativeQmldirData *getQmldir(const QUrl &); + + QString absoluteFilePath(const QString &path); + const QDeclarativeDirParser *qmlDirParser(const QString &absoluteFilePath); + private: typedef QHash TypeCache; typedef QHash ScriptCache; typedef QHash QmldirCache; + typedef QSet StringSet; + typedef QHash ImportDirCache; + typedef QHash ImportQmlDirCache; TypeCache m_typeCache; ScriptCache m_scriptCache; QmldirCache m_qmldirCache; + ImportDirCache m_importDirCache; + ImportQmlDirCache m_importQmlDirCache; }; Q_DECLARE_OPERATORS_FOR_FLAGS(QDeclarativeTypeLoader::Options) -- cgit v0.12 From 09cd2f818208a83489fae034b80e6497b7cc83af Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Wed, 14 Sep 2011 16:24:30 +1000 Subject: Fix StrictlyEnforceRange with snapOneItem/Row and header behavior, pt 2 Change cf23188de237009136fa1480ab8fd9e3ca364769 changed the positioning of a view with StrictlyEnforceRange, snapOneItem/Row, and a header, such that the view was positioned at the beginning of the header, rather than on the first item. Change f85819fe083ae7c6804c884de68e906d153a6d11 partially fixed the problem. This change handles the case of the header/footer being large enough to cause a snap item not to be found when the view is dragged beyond the first/last item. In this case snap to the currentItem. Change-Id: I08b7e61496a79f71c3b40fafaca985ae90f88503 Task-number: QTTH-1501 Reviewed-by: Bea Lam --- src/declarative/graphicsitems/qdeclarativegridview.cpp | 10 ++++++++++ src/declarative/graphicsitems/qdeclarativelistview.cpp | 12 +++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp index 5a5b60e..ff88e31 100644 --- a/src/declarative/graphicsitems/qdeclarativegridview.cpp +++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp @@ -1081,7 +1081,17 @@ void QDeclarativeGridViewPrivate::fixup(AxisData &data, qreal minExtent, qreal m tempPosition -= bias; } FxGridItem *topItem = snapItemAt(tempPosition+highlightStart); + if (!topItem && strictHighlightRange && currentItem) { + // StrictlyEnforceRange always keeps an item in range + updateHighlight(); + topItem = currentItem; + } FxGridItem *bottomItem = snapItemAt(tempPosition+highlightEnd); + if (!bottomItem && strictHighlightRange && currentItem) { + // StrictlyEnforceRange always keeps an item in range + updateHighlight(); + bottomItem = currentItem; + } qreal pos; if (topItem && bottomItem && strictHighlightRange) { qreal topPos = qMin(topItem->rowPos() - highlightStart, -maxExtent); diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp index 70be7a7..6c8e99b 100644 --- a/src/declarative/graphicsitems/qdeclarativelistview.cpp +++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp @@ -1324,10 +1324,20 @@ void QDeclarativeListViewPrivate::fixup(AxisData &data, qreal minExtent, qreal m tempPosition -= bias; } FxListItem *topItem = snapItemAt(tempPosition+highlightStart); + if (!topItem && strictHighlightRange && currentItem) { + // StrictlyEnforceRange always keeps an item in range + updateHighlight(); + topItem = currentItem; + } FxListItem *bottomItem = snapItemAt(tempPosition+highlightEnd); + if (!bottomItem && strictHighlightRange && currentItem) { + // StrictlyEnforceRange always keeps an item in range + updateHighlight(); + bottomItem = currentItem; + } qreal pos; bool isInBounds = -position() > maxExtent && -position() <= minExtent; - if (topItem && isInBounds) { + if (topItem && (isInBounds || strictHighlightRange)) { if (topItem->index == 0 && header && tempPosition+highlightStart < header->position()+header->size()/2 && !strictHighlightRange) { pos = isRightToLeft() ? - header->position() + highlightStart - size() : header->position() - highlightStart; } else { -- cgit v0.12 From 633e03367031ef6e36dddc27a85e7a5c05285d65 Mon Sep 17 00:00:00 2001 From: Damian Jansen Date: Tue, 4 Oct 2011 14:53:19 +1000 Subject: Fix deployment for declarative tests, examples on Symbian Task-number: QTBUG-21306 Reviewed-by: Rohan McGovern --- examples/declarative/cppextensions/imageprovider/imageprovider.pro | 2 +- examples/declarative/cppextensions/qwidgets/qwidgets.pro | 2 +- src/imports/folderlistmodel/folderlistmodel.pro | 4 ++-- src/imports/gestures/gestures.pro | 6 +++--- src/imports/particles/particles.pro | 6 +++--- src/imports/shaders/shaders.pro | 2 +- tests/auto/declarative/examples/examples.pro | 2 +- tests/auto/declarative/moduleqt47/moduleqt47.pro | 2 +- tests/auto/declarative/parserstress/parserstress.pro | 2 +- tests/auto/declarative/qdeclarativeanchors/qdeclarativeanchors.pro | 2 +- .../qdeclarativeanimatedimage/qdeclarativeanimatedimage.pro | 2 +- .../declarative/qdeclarativeanimations/qdeclarativeanimations.pro | 2 +- .../declarative/qdeclarativebehaviors/qdeclarativebehaviors.pro | 2 +- tests/auto/declarative/qdeclarativebinding/qdeclarativebinding.pro | 2 +- .../declarative/qdeclarativeborderimage/qdeclarativeborderimage.pro | 2 +- .../declarative/qdeclarativeconnection/qdeclarativeconnection.pro | 2 +- tests/auto/declarative/qdeclarativedom/qdeclarativedom.pro | 2 +- .../declarative/qdeclarativeecmascript/qdeclarativeecmascript.pro | 2 +- .../declarative/qdeclarativeflickable/qdeclarativeflickable.pro | 2 +- .../auto/declarative/qdeclarativeflipable/qdeclarativeflipable.pro | 2 +- .../declarative/qdeclarativefocusscope/qdeclarativefocusscope.pro | 2 +- .../qdeclarativefolderlistmodel/qdeclarativefolderlistmodel.pro | 2 +- .../declarative/qdeclarativefontloader/qdeclarativefontloader.pro | 2 +- .../auto/declarative/qdeclarativegridview/qdeclarativegridview.pro | 2 +- tests/auto/declarative/qdeclarativeimage/qdeclarativeimage.pro | 2 +- tests/auto/declarative/qdeclarativeinfo/qdeclarativeinfo.pro | 2 +- tests/auto/declarative/qdeclarativeitem/qdeclarativeitem.pro | 2 +- .../auto/declarative/qdeclarativelanguage/qdeclarativelanguage.pro | 2 +- .../declarative/qdeclarativelayoutitem/qdeclarativelayoutitem.pro | 2 +- .../declarative/qdeclarativelistmodel/qdeclarativelistmodel.pro | 2 +- .../auto/declarative/qdeclarativelistview/qdeclarativelistview.pro | 2 +- tests/auto/declarative/qdeclarativeloader/qdeclarativeloader.pro | 2 +- .../declarative/qdeclarativemousearea/qdeclarativemousearea.pro | 2 +- .../declarative/qdeclarativeparticles/qdeclarativeparticles.pro | 2 +- .../auto/declarative/qdeclarativepathview/qdeclarativepathview.pro | 2 +- .../declarative/qdeclarativepincharea/qdeclarativepincharea.pro | 2 +- .../declarative/qdeclarativepixmapcache/qdeclarativepixmapcache.pro | 2 +- .../declarative/qdeclarativepositioners/qdeclarativepositioners.pro | 2 +- .../auto/declarative/qdeclarativeproperty/qdeclarativeproperty.pro | 2 +- tests/auto/declarative/qdeclarativeqt/qdeclarativeqt.pro | 2 +- .../auto/declarative/qdeclarativerepeater/qdeclarativerepeater.pro | 2 +- .../qdeclarativescriptdebugging/qdeclarativescriptdebugging.pro | 2 +- .../qdeclarativesmoothedanimation/qdeclarativesmoothedanimation.pro | 2 +- .../qdeclarativespringanimation/qdeclarativespringanimation.pro | 2 +- .../declarative/qdeclarativesqldatabase/qdeclarativesqldatabase.pro | 2 +- tests/auto/declarative/qdeclarativestates/qdeclarativestates.pro | 2 +- tests/auto/declarative/qdeclarativetext/qdeclarativetext.pro | 2 +- .../auto/declarative/qdeclarativetextedit/qdeclarativetextedit.pro | 2 +- .../declarative/qdeclarativetextinput/qdeclarativetextinput.pro | 2 +- .../declarative/qdeclarativevaluetypes/qdeclarativevaluetypes.pro | 2 +- tests/auto/declarative/qdeclarativeview/qdeclarativeview.pro | 2 +- tests/auto/declarative/qdeclarativeviewer/qdeclarativeviewer.pro | 2 +- .../qdeclarativevisualdatamodel/qdeclarativevisualdatamodel.pro | 2 +- tests/auto/declarative/qdeclarativewebview/qdeclarativewebview.pro | 2 +- .../qdeclarativeworkerscript/qdeclarativeworkerscript.pro | 2 +- .../qdeclarativexmlhttprequest/qdeclarativexmlhttprequest.pro | 2 +- .../qdeclarativexmllistmodel/qdeclarativexmllistmodel.pro | 2 +- tests/auto/declarative/qmlvisual/qmlvisual.pro | 2 +- tests/benchmarks/declarative/binding/binding.pro | 2 +- .../benchmarks/declarative/qdeclarativeimage/qdeclarativeimage.pro | 2 +- tests/benchmarks/declarative/script/script.pro | 2 +- 61 files changed, 66 insertions(+), 66 deletions(-) diff --git a/examples/declarative/cppextensions/imageprovider/imageprovider.pro b/examples/declarative/cppextensions/imageprovider/imageprovider.pro index 7149986..9797a3f 100644 --- a/examples/declarative/cppextensions/imageprovider/imageprovider.pro +++ b/examples/declarative/cppextensions/imageprovider/imageprovider.pro @@ -24,5 +24,5 @@ symbian:{ importFiles.sources = ImageProviderCore/qmlimageproviderplugin.dll ImageProviderCore/qmldir importFiles.path = ImageProviderCore - DEPLOYMENT = importFiles + DEPLOYMENT += importFiles } diff --git a/examples/declarative/cppextensions/qwidgets/qwidgets.pro b/examples/declarative/cppextensions/qwidgets/qwidgets.pro index 2e610f9..3353a8d 100644 --- a/examples/declarative/cppextensions/qwidgets/qwidgets.pro +++ b/examples/declarative/cppextensions/qwidgets/qwidgets.pro @@ -20,5 +20,5 @@ symbian:{ importFiles.sources = QWidgets/qmlqwidgetsplugin.dll QWidgets/qmldir importFiles.path = QWidgets - DEPLOYMENT = importFiles + DEPLOYMENT += importFiles } diff --git a/src/imports/folderlistmodel/folderlistmodel.pro b/src/imports/folderlistmodel/folderlistmodel.pro index 8964ab0..d369ed1 100644 --- a/src/imports/folderlistmodel/folderlistmodel.pro +++ b/src/imports/folderlistmodel/folderlistmodel.pro @@ -19,8 +19,8 @@ symbian:{ isEmpty(DESTDIR):importFiles.sources = qmlfolderlistmodelplugin$${QT_LIBINFIX}.dll qmldir else:importFiles.sources = $$DESTDIR/qmlfolderlistmodelplugin$${QT_LIBINFIX}.dll qmldir importFiles.path = $$QT_IMPORTS_BASE_DIR/$$TARGETPATH - - DEPLOYMENT = importFiles + + DEPLOYMENT += importFiles } INSTALLS += target qmldir diff --git a/src/imports/gestures/gestures.pro b/src/imports/gestures/gestures.pro index a4c914d..f9e71fa 100644 --- a/src/imports/gestures/gestures.pro +++ b/src/imports/gestures/gestures.pro @@ -15,12 +15,12 @@ qmldir.path += $$[QT_INSTALL_IMPORTS]/$$TARGETPATH symbian:{ TARGET.UID3 = 0x2002131F - + isEmpty(DESTDIR):importFiles.sources = qmlgesturesplugin$${QT_LIBINFIX}.dll qmldir else:importFiles.sources = $$DESTDIR/qmlgesturesplugin$${QT_LIBINFIX}.dll qmldir importFiles.path = $$QT_IMPORTS_BASE_DIR/$$TARGETPATH - - DEPLOYMENT = importFiles + + DEPLOYMENT += importFiles } INSTALLS += target qmldir diff --git a/src/imports/particles/particles.pro b/src/imports/particles/particles.pro index bb9da01..59cc16a 100644 --- a/src/imports/particles/particles.pro +++ b/src/imports/particles/particles.pro @@ -19,12 +19,12 @@ qmldir.path += $$[QT_INSTALL_IMPORTS]/$$TARGETPATH symbian:{ TARGET.UID3 = 0x2002131E - + isEmpty(DESTDIR):importFiles.sources = qmlparticlesplugin$${QT_LIBINFIX}.dll qmldir else:importFiles.sources = $$DESTDIR/qmlparticlesplugin$${QT_LIBINFIX}.dll qmldir importFiles.path = $$QT_IMPORTS_BASE_DIR/$$TARGETPATH - - DEPLOYMENT = importFiles + + DEPLOYMENT += importFiles } INSTALLS += target qmldir diff --git a/src/imports/shaders/shaders.pro b/src/imports/shaders/shaders.pro index d7a6275..51a9a91 100644 --- a/src/imports/shaders/shaders.pro +++ b/src/imports/shaders/shaders.pro @@ -32,7 +32,7 @@ symbian:{ isEmpty(DESTDIR):importFiles.sources = qmlparticlesplugin$${QT_LIBINFIX}.dll qmldir else:importFiles.sources = $$DESTDIR/qmlparticlesplugin$${QT_LIBINFIX}.dll qmldir importFiles.path = $$QT_IMPORTS_BASE_DIR/$$TARGETPATH - DEPLOYMENT = importFiles + DEPLOYMENT += importFiles } INSTALLS += target qmldir diff --git a/tests/auto/declarative/examples/examples.pro b/tests/auto/declarative/examples/examples.pro index 2e243b4..1a0dc55 100644 --- a/tests/auto/declarative/examples/examples.pro +++ b/tests/auto/declarative/examples/examples.pro @@ -9,7 +9,7 @@ include(../../../../tools/qml/qml.pri) symbian: { importFiles.sources = data importFiles.path = . - DEPLOYMENT = importFiles + DEPLOYMENT += importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/auto/declarative/moduleqt47/moduleqt47.pro b/tests/auto/declarative/moduleqt47/moduleqt47.pro index 4ee634e..711e24c 100644 --- a/tests/auto/declarative/moduleqt47/moduleqt47.pro +++ b/tests/auto/declarative/moduleqt47/moduleqt47.pro @@ -7,7 +7,7 @@ SOURCES += tst_moduleqt47.cpp symbian: { importFiles.sources = data importFiles.path = . - DEPLOYMENT = importFiles + DEPLOYMENT += importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/auto/declarative/parserstress/parserstress.pro b/tests/auto/declarative/parserstress/parserstress.pro index bb1d69f..17f297b 100644 --- a/tests/auto/declarative/parserstress/parserstress.pro +++ b/tests/auto/declarative/parserstress/parserstress.pro @@ -7,7 +7,7 @@ SOURCES += tst_parserstress.cpp symbian: { importFiles.sources = ..\\..\\qscriptjstestsuite\\tests importFiles.path = . - DEPLOYMENT = importFiles + DEPLOYMENT += importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/auto/declarative/qdeclarativeanchors/qdeclarativeanchors.pro b/tests/auto/declarative/qdeclarativeanchors/qdeclarativeanchors.pro index 9798bb6..6295079 100644 --- a/tests/auto/declarative/qdeclarativeanchors/qdeclarativeanchors.pro +++ b/tests/auto/declarative/qdeclarativeanchors/qdeclarativeanchors.pro @@ -6,7 +6,7 @@ macx:CONFIG -= app_bundle symbian: { importFiles.sources = data importFiles.path = . - DEPLOYMENT = importFiles + DEPLOYMENT += importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/auto/declarative/qdeclarativeanimatedimage/qdeclarativeanimatedimage.pro b/tests/auto/declarative/qdeclarativeanimatedimage/qdeclarativeanimatedimage.pro index 0a2f0f2..8c2259a 100644 --- a/tests/auto/declarative/qdeclarativeanimatedimage/qdeclarativeanimatedimage.pro +++ b/tests/auto/declarative/qdeclarativeanimatedimage/qdeclarativeanimatedimage.pro @@ -7,7 +7,7 @@ macx:CONFIG -= app_bundle symbian: { importFiles.sources = data importFiles.path = . - DEPLOYMENT = importFiles + DEPLOYMENT += importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/auto/declarative/qdeclarativeanimations/qdeclarativeanimations.pro b/tests/auto/declarative/qdeclarativeanimations/qdeclarativeanimations.pro index ed47dca..578f37b 100644 --- a/tests/auto/declarative/qdeclarativeanimations/qdeclarativeanimations.pro +++ b/tests/auto/declarative/qdeclarativeanimations/qdeclarativeanimations.pro @@ -6,7 +6,7 @@ macx:CONFIG -= app_bundle symbian: { importFiles.sources = data importFiles.path = . - DEPLOYMENT = importFiles + DEPLOYMENT += importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/auto/declarative/qdeclarativebehaviors/qdeclarativebehaviors.pro b/tests/auto/declarative/qdeclarativebehaviors/qdeclarativebehaviors.pro index cfb59ef..7ba3a7d 100644 --- a/tests/auto/declarative/qdeclarativebehaviors/qdeclarativebehaviors.pro +++ b/tests/auto/declarative/qdeclarativebehaviors/qdeclarativebehaviors.pro @@ -6,7 +6,7 @@ macx:CONFIG -= app_bundle symbian: { importFiles.sources = data importFiles.path = . - DEPLOYMENT = importFiles + DEPLOYMENT += importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/auto/declarative/qdeclarativebinding/qdeclarativebinding.pro b/tests/auto/declarative/qdeclarativebinding/qdeclarativebinding.pro index a7ba2a8..0cdaada 100644 --- a/tests/auto/declarative/qdeclarativebinding/qdeclarativebinding.pro +++ b/tests/auto/declarative/qdeclarativebinding/qdeclarativebinding.pro @@ -7,7 +7,7 @@ SOURCES += tst_qdeclarativebinding.cpp symbian: { importFiles.sources = data importFiles.path = . - DEPLOYMENT = importFiles + DEPLOYMENT += importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/auto/declarative/qdeclarativeborderimage/qdeclarativeborderimage.pro b/tests/auto/declarative/qdeclarativeborderimage/qdeclarativeborderimage.pro index a21761b..0e41c13 100644 --- a/tests/auto/declarative/qdeclarativeborderimage/qdeclarativeborderimage.pro +++ b/tests/auto/declarative/qdeclarativeborderimage/qdeclarativeborderimage.pro @@ -8,7 +8,7 @@ SOURCES += tst_qdeclarativeborderimage.cpp ../shared/testhttpserver.cpp symbian: { importFiles.sources = data importFiles.path = . - DEPLOYMENT = importFiles + DEPLOYMENT += importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/auto/declarative/qdeclarativeconnection/qdeclarativeconnection.pro b/tests/auto/declarative/qdeclarativeconnection/qdeclarativeconnection.pro index d06ce4f..33d81ba 100644 --- a/tests/auto/declarative/qdeclarativeconnection/qdeclarativeconnection.pro +++ b/tests/auto/declarative/qdeclarativeconnection/qdeclarativeconnection.pro @@ -7,7 +7,7 @@ SOURCES += tst_qdeclarativeconnection.cpp symbian: { importFiles.sources = data importFiles.path = . - DEPLOYMENT = importFiles + DEPLOYMENT += importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/auto/declarative/qdeclarativedom/qdeclarativedom.pro b/tests/auto/declarative/qdeclarativedom/qdeclarativedom.pro index 415d4e2..1866a43 100644 --- a/tests/auto/declarative/qdeclarativedom/qdeclarativedom.pro +++ b/tests/auto/declarative/qdeclarativedom/qdeclarativedom.pro @@ -7,7 +7,7 @@ SOURCES += tst_qdeclarativedom.cpp symbian: { importFiles.sources = data importFiles.path = . - DEPLOYMENT = importFiles + DEPLOYMENT += importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/auto/declarative/qdeclarativeecmascript/qdeclarativeecmascript.pro b/tests/auto/declarative/qdeclarativeecmascript/qdeclarativeecmascript.pro index 58cad34..2eb333a 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/qdeclarativeecmascript.pro +++ b/tests/auto/declarative/qdeclarativeecmascript/qdeclarativeecmascript.pro @@ -15,7 +15,7 @@ INCLUDEPATH += ../shared symbian: { importFiles.sources = data importFiles.path = . - DEPLOYMENT = importFiles + DEPLOYMENT += importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/auto/declarative/qdeclarativeflickable/qdeclarativeflickable.pro b/tests/auto/declarative/qdeclarativeflickable/qdeclarativeflickable.pro index be0ba6c..3f8b5e9 100644 --- a/tests/auto/declarative/qdeclarativeflickable/qdeclarativeflickable.pro +++ b/tests/auto/declarative/qdeclarativeflickable/qdeclarativeflickable.pro @@ -7,7 +7,7 @@ SOURCES += tst_qdeclarativeflickable.cpp symbian: { importFiles.sources = data importFiles.path = . - DEPLOYMENT = importFiles + DEPLOYMENT += importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/auto/declarative/qdeclarativeflipable/qdeclarativeflipable.pro b/tests/auto/declarative/qdeclarativeflipable/qdeclarativeflipable.pro index 759e80b..cb42418 100644 --- a/tests/auto/declarative/qdeclarativeflipable/qdeclarativeflipable.pro +++ b/tests/auto/declarative/qdeclarativeflipable/qdeclarativeflipable.pro @@ -7,7 +7,7 @@ SOURCES += tst_qdeclarativeflipable.cpp symbian: { importFiles.sources = data importFiles.path = . - DEPLOYMENT = importFiles + DEPLOYMENT += importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/auto/declarative/qdeclarativefocusscope/qdeclarativefocusscope.pro b/tests/auto/declarative/qdeclarativefocusscope/qdeclarativefocusscope.pro index 24749c6..3724a78 100644 --- a/tests/auto/declarative/qdeclarativefocusscope/qdeclarativefocusscope.pro +++ b/tests/auto/declarative/qdeclarativefocusscope/qdeclarativefocusscope.pro @@ -6,7 +6,7 @@ macx:CONFIG -= app_bundle symbian: { importFiles.sources = data importFiles.path = . - DEPLOYMENT = importFiles + DEPLOYMENT += importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/auto/declarative/qdeclarativefolderlistmodel/qdeclarativefolderlistmodel.pro b/tests/auto/declarative/qdeclarativefolderlistmodel/qdeclarativefolderlistmodel.pro index 91bf4a7..3299786 100644 --- a/tests/auto/declarative/qdeclarativefolderlistmodel/qdeclarativefolderlistmodel.pro +++ b/tests/auto/declarative/qdeclarativefolderlistmodel/qdeclarativefolderlistmodel.pro @@ -7,7 +7,7 @@ SOURCES += tst_qdeclarativefolderlistmodel.cpp symbian: { importFiles.sources = data importFiles.path = . - DEPLOYMENT = importFiles + DEPLOYMENT += importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/auto/declarative/qdeclarativefontloader/qdeclarativefontloader.pro b/tests/auto/declarative/qdeclarativefontloader/qdeclarativefontloader.pro index 01dca26..fbd2550 100644 --- a/tests/auto/declarative/qdeclarativefontloader/qdeclarativefontloader.pro +++ b/tests/auto/declarative/qdeclarativefontloader/qdeclarativefontloader.pro @@ -8,7 +8,7 @@ SOURCES += tst_qdeclarativefontloader.cpp ../shared/testhttpserver.cpp symbian: { importFiles.sources = data importFiles.path = . - DEPLOYMENT = importFiles + DEPLOYMENT += importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/auto/declarative/qdeclarativegridview/qdeclarativegridview.pro b/tests/auto/declarative/qdeclarativegridview/qdeclarativegridview.pro index a99a1b9..4ea1e47 100644 --- a/tests/auto/declarative/qdeclarativegridview/qdeclarativegridview.pro +++ b/tests/auto/declarative/qdeclarativegridview/qdeclarativegridview.pro @@ -7,7 +7,7 @@ SOURCES += tst_qdeclarativegridview.cpp symbian: { importFiles.sources = data importFiles.path = . - DEPLOYMENT = importFiles + DEPLOYMENT += importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/auto/declarative/qdeclarativeimage/qdeclarativeimage.pro b/tests/auto/declarative/qdeclarativeimage/qdeclarativeimage.pro index 244a1e1..e5db298 100644 --- a/tests/auto/declarative/qdeclarativeimage/qdeclarativeimage.pro +++ b/tests/auto/declarative/qdeclarativeimage/qdeclarativeimage.pro @@ -8,7 +8,7 @@ SOURCES += tst_qdeclarativeimage.cpp ../shared/testhttpserver.cpp symbian: { importFiles.sources = data importFiles.path = . - DEPLOYMENT = importFiles + DEPLOYMENT += importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/auto/declarative/qdeclarativeinfo/qdeclarativeinfo.pro b/tests/auto/declarative/qdeclarativeinfo/qdeclarativeinfo.pro index 2c20e7e..188ea23 100644 --- a/tests/auto/declarative/qdeclarativeinfo/qdeclarativeinfo.pro +++ b/tests/auto/declarative/qdeclarativeinfo/qdeclarativeinfo.pro @@ -7,7 +7,7 @@ SOURCES += tst_qdeclarativeinfo.cpp symbian: { importFiles.sources = data importFiles.path = . - DEPLOYMENT = importFiles + DEPLOYMENT += importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/auto/declarative/qdeclarativeitem/qdeclarativeitem.pro b/tests/auto/declarative/qdeclarativeitem/qdeclarativeitem.pro index f4901c4..26bd624 100644 --- a/tests/auto/declarative/qdeclarativeitem/qdeclarativeitem.pro +++ b/tests/auto/declarative/qdeclarativeitem/qdeclarativeitem.pro @@ -7,7 +7,7 @@ SOURCES += tst_qdeclarativeitem.cpp symbian: { importFiles.sources = data importFiles.path = . - DEPLOYMENT = importFiles + DEPLOYMENT += importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/auto/declarative/qdeclarativelanguage/qdeclarativelanguage.pro b/tests/auto/declarative/qdeclarativelanguage/qdeclarativelanguage.pro index 43c451f..d702082 100644 --- a/tests/auto/declarative/qdeclarativelanguage/qdeclarativelanguage.pro +++ b/tests/auto/declarative/qdeclarativelanguage/qdeclarativelanguage.pro @@ -14,7 +14,7 @@ SOURCES += ../shared/testhttpserver.cpp symbian: { importFiles.sources = data importFiles.path = . - DEPLOYMENT = importFiles + DEPLOYMENT += importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/auto/declarative/qdeclarativelayoutitem/qdeclarativelayoutitem.pro b/tests/auto/declarative/qdeclarativelayoutitem/qdeclarativelayoutitem.pro index 5076e51..b74ea98 100644 --- a/tests/auto/declarative/qdeclarativelayoutitem/qdeclarativelayoutitem.pro +++ b/tests/auto/declarative/qdeclarativelayoutitem/qdeclarativelayoutitem.pro @@ -7,7 +7,7 @@ SOURCES += tst_qdeclarativelayoutitem.cpp symbian: { importFiles.sources = data importFiles.path = . - DEPLOYMENT = importFiles + DEPLOYMENT += importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/auto/declarative/qdeclarativelistmodel/qdeclarativelistmodel.pro b/tests/auto/declarative/qdeclarativelistmodel/qdeclarativelistmodel.pro index e90db49..d1146b1 100644 --- a/tests/auto/declarative/qdeclarativelistmodel/qdeclarativelistmodel.pro +++ b/tests/auto/declarative/qdeclarativelistmodel/qdeclarativelistmodel.pro @@ -8,7 +8,7 @@ SOURCES += tst_qdeclarativelistmodel.cpp symbian: { importFiles.sources = data importFiles.path = . - DEPLOYMENT = importFiles + DEPLOYMENT += importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/auto/declarative/qdeclarativelistview/qdeclarativelistview.pro b/tests/auto/declarative/qdeclarativelistview/qdeclarativelistview.pro index 8c99f08..e3df2c3 100644 --- a/tests/auto/declarative/qdeclarativelistview/qdeclarativelistview.pro +++ b/tests/auto/declarative/qdeclarativelistview/qdeclarativelistview.pro @@ -8,7 +8,7 @@ SOURCES += tst_qdeclarativelistview.cpp incrementalmodel.cpp symbian: { importFiles.sources = data importFiles.path = . - DEPLOYMENT = importFiles + DEPLOYMENT += importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/auto/declarative/qdeclarativeloader/qdeclarativeloader.pro b/tests/auto/declarative/qdeclarativeloader/qdeclarativeloader.pro index b07bf9e..29b9eb9 100644 --- a/tests/auto/declarative/qdeclarativeloader/qdeclarativeloader.pro +++ b/tests/auto/declarative/qdeclarativeloader/qdeclarativeloader.pro @@ -10,7 +10,7 @@ SOURCES += tst_qdeclarativeloader.cpp \ symbian: { importFiles.sources = data importFiles.path = . - DEPLOYMENT = importFiles + DEPLOYMENT += importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/auto/declarative/qdeclarativemousearea/qdeclarativemousearea.pro b/tests/auto/declarative/qdeclarativemousearea/qdeclarativemousearea.pro index 3d39aa8..fec73c5 100644 --- a/tests/auto/declarative/qdeclarativemousearea/qdeclarativemousearea.pro +++ b/tests/auto/declarative/qdeclarativemousearea/qdeclarativemousearea.pro @@ -8,7 +8,7 @@ SOURCES += tst_qdeclarativemousearea.cpp ../shared/testhttpserver.cpp symbian: { importFiles.sources = data importFiles.path = . - DEPLOYMENT = importFiles + DEPLOYMENT += importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/auto/declarative/qdeclarativeparticles/qdeclarativeparticles.pro b/tests/auto/declarative/qdeclarativeparticles/qdeclarativeparticles.pro index f9ca90f..9762b7c 100644 --- a/tests/auto/declarative/qdeclarativeparticles/qdeclarativeparticles.pro +++ b/tests/auto/declarative/qdeclarativeparticles/qdeclarativeparticles.pro @@ -7,7 +7,7 @@ SOURCES += tst_qdeclarativeparticles.cpp symbian: { importFiles.sources = data importFiles.path = . - DEPLOYMENT = importFiles + DEPLOYMENT += importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/auto/declarative/qdeclarativepathview/qdeclarativepathview.pro b/tests/auto/declarative/qdeclarativepathview/qdeclarativepathview.pro index 04fd26b..3270c5e 100644 --- a/tests/auto/declarative/qdeclarativepathview/qdeclarativepathview.pro +++ b/tests/auto/declarative/qdeclarativepathview/qdeclarativepathview.pro @@ -7,7 +7,7 @@ SOURCES += tst_qdeclarativepathview.cpp symbian: { importFiles.sources = data importFiles.path = . - DEPLOYMENT = importFiles + DEPLOYMENT += importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/auto/declarative/qdeclarativepincharea/qdeclarativepincharea.pro b/tests/auto/declarative/qdeclarativepincharea/qdeclarativepincharea.pro index 2c13644..3bdb3fc 100644 --- a/tests/auto/declarative/qdeclarativepincharea/qdeclarativepincharea.pro +++ b/tests/auto/declarative/qdeclarativepincharea/qdeclarativepincharea.pro @@ -7,7 +7,7 @@ SOURCES += tst_qdeclarativepincharea.cpp symbian: { importFiles.sources = data importFiles.path = . - DEPLOYMENT = importFiles + DEPLOYMENT += importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/auto/declarative/qdeclarativepixmapcache/qdeclarativepixmapcache.pro b/tests/auto/declarative/qdeclarativepixmapcache/qdeclarativepixmapcache.pro index 3130364..2e2c6bc 100644 --- a/tests/auto/declarative/qdeclarativepixmapcache/qdeclarativepixmapcache.pro +++ b/tests/auto/declarative/qdeclarativepixmapcache/qdeclarativepixmapcache.pro @@ -12,7 +12,7 @@ SOURCES += ../shared/testhttpserver.cpp symbian: { importFiles.sources = data importFiles.path = . - DEPLOYMENT = importFiles + DEPLOYMENT += importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/auto/declarative/qdeclarativepositioners/qdeclarativepositioners.pro b/tests/auto/declarative/qdeclarativepositioners/qdeclarativepositioners.pro index 5dc7bb8..f2c9eee 100644 --- a/tests/auto/declarative/qdeclarativepositioners/qdeclarativepositioners.pro +++ b/tests/auto/declarative/qdeclarativepositioners/qdeclarativepositioners.pro @@ -6,7 +6,7 @@ macx:CONFIG -= app_bundle symbian: { importFiles.sources = data importFiles.path = . - DEPLOYMENT = importFiles + DEPLOYMENT += importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/auto/declarative/qdeclarativeproperty/qdeclarativeproperty.pro b/tests/auto/declarative/qdeclarativeproperty/qdeclarativeproperty.pro index 4121a33..504a371 100644 --- a/tests/auto/declarative/qdeclarativeproperty/qdeclarativeproperty.pro +++ b/tests/auto/declarative/qdeclarativeproperty/qdeclarativeproperty.pro @@ -7,7 +7,7 @@ SOURCES += tst_qdeclarativeproperty.cpp symbian: { importFiles.sources = data importFiles.path = . - DEPLOYMENT = importFiles + DEPLOYMENT += importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/auto/declarative/qdeclarativeqt/qdeclarativeqt.pro b/tests/auto/declarative/qdeclarativeqt/qdeclarativeqt.pro index 9e698fe..a963140 100644 --- a/tests/auto/declarative/qdeclarativeqt/qdeclarativeqt.pro +++ b/tests/auto/declarative/qdeclarativeqt/qdeclarativeqt.pro @@ -6,7 +6,7 @@ macx:CONFIG -= app_bundle symbian: { importFiles.sources = data importFiles.path = . - DEPLOYMENT = importFiles + DEPLOYMENT += importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/auto/declarative/qdeclarativerepeater/qdeclarativerepeater.pro b/tests/auto/declarative/qdeclarativerepeater/qdeclarativerepeater.pro index f3ff9ed..0f3773c 100644 --- a/tests/auto/declarative/qdeclarativerepeater/qdeclarativerepeater.pro +++ b/tests/auto/declarative/qdeclarativerepeater/qdeclarativerepeater.pro @@ -7,7 +7,7 @@ SOURCES += tst_qdeclarativerepeater.cpp symbian: { importFiles.sources = data importFiles.path = . - DEPLOYMENT = importFiles + DEPLOYMENT += importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/auto/declarative/qdeclarativescriptdebugging/qdeclarativescriptdebugging.pro b/tests/auto/declarative/qdeclarativescriptdebugging/qdeclarativescriptdebugging.pro index c2d30a0..8a63355 100644 --- a/tests/auto/declarative/qdeclarativescriptdebugging/qdeclarativescriptdebugging.pro +++ b/tests/auto/declarative/qdeclarativescriptdebugging/qdeclarativescriptdebugging.pro @@ -11,7 +11,7 @@ INCLUDEPATH += ../shared symbian: { importFiles.sources = data importFiles.path = . - DEPLOYMENT = importFiles + DEPLOYMENT += importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/auto/declarative/qdeclarativesmoothedanimation/qdeclarativesmoothedanimation.pro b/tests/auto/declarative/qdeclarativesmoothedanimation/qdeclarativesmoothedanimation.pro index 872aeb9..e770d46 100644 --- a/tests/auto/declarative/qdeclarativesmoothedanimation/qdeclarativesmoothedanimation.pro +++ b/tests/auto/declarative/qdeclarativesmoothedanimation/qdeclarativesmoothedanimation.pro @@ -7,7 +7,7 @@ SOURCES += tst_qdeclarativesmoothedanimation.cpp symbian: { importFiles.sources = data importFiles.path = . - DEPLOYMENT = importFiles + DEPLOYMENT += importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/auto/declarative/qdeclarativespringanimation/qdeclarativespringanimation.pro b/tests/auto/declarative/qdeclarativespringanimation/qdeclarativespringanimation.pro index 213b262..07bcbe7 100644 --- a/tests/auto/declarative/qdeclarativespringanimation/qdeclarativespringanimation.pro +++ b/tests/auto/declarative/qdeclarativespringanimation/qdeclarativespringanimation.pro @@ -7,7 +7,7 @@ SOURCES += tst_qdeclarativespringanimation.cpp symbian: { importFiles.sources = data importFiles.path = . - DEPLOYMENT = importFiles + DEPLOYMENT += importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/auto/declarative/qdeclarativesqldatabase/qdeclarativesqldatabase.pro b/tests/auto/declarative/qdeclarativesqldatabase/qdeclarativesqldatabase.pro index 1462c9a..400512d 100644 --- a/tests/auto/declarative/qdeclarativesqldatabase/qdeclarativesqldatabase.pro +++ b/tests/auto/declarative/qdeclarativesqldatabase/qdeclarativesqldatabase.pro @@ -8,7 +8,7 @@ SOURCES += tst_qdeclarativesqldatabase.cpp symbian: { importFiles.sources = data importFiles.path = . - DEPLOYMENT = importFiles + DEPLOYMENT += importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/auto/declarative/qdeclarativestates/qdeclarativestates.pro b/tests/auto/declarative/qdeclarativestates/qdeclarativestates.pro index 2bae041..cb3e0fe 100644 --- a/tests/auto/declarative/qdeclarativestates/qdeclarativestates.pro +++ b/tests/auto/declarative/qdeclarativestates/qdeclarativestates.pro @@ -7,7 +7,7 @@ SOURCES += tst_qdeclarativestates.cpp symbian: { importFiles.sources = data importFiles.path = . - DEPLOYMENT = importFiles + DEPLOYMENT += importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/auto/declarative/qdeclarativetext/qdeclarativetext.pro b/tests/auto/declarative/qdeclarativetext/qdeclarativetext.pro index c1a36fd..28a9fcd 100644 --- a/tests/auto/declarative/qdeclarativetext/qdeclarativetext.pro +++ b/tests/auto/declarative/qdeclarativetext/qdeclarativetext.pro @@ -12,7 +12,7 @@ SOURCES += ../shared/testhttpserver.cpp symbian: { importFiles.sources = data importFiles.path = . - DEPLOYMENT = importFiles + DEPLOYMENT += importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/auto/declarative/qdeclarativetextedit/qdeclarativetextedit.pro b/tests/auto/declarative/qdeclarativetextedit/qdeclarativetextedit.pro index 4b6bd49..8606eb0 100644 --- a/tests/auto/declarative/qdeclarativetextedit/qdeclarativetextedit.pro +++ b/tests/auto/declarative/qdeclarativetextedit/qdeclarativetextedit.pro @@ -8,7 +8,7 @@ HEADERS += ../shared/testhttpserver.h symbian: { importFiles.sources = data importFiles.path = . - DEPLOYMENT = importFiles + DEPLOYMENT += importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/auto/declarative/qdeclarativetextinput/qdeclarativetextinput.pro b/tests/auto/declarative/qdeclarativetextinput/qdeclarativetextinput.pro index 8f42448..7d178d7 100644 --- a/tests/auto/declarative/qdeclarativetextinput/qdeclarativetextinput.pro +++ b/tests/auto/declarative/qdeclarativetextinput/qdeclarativetextinput.pro @@ -7,7 +7,7 @@ SOURCES += tst_qdeclarativetextinput.cpp symbian: { importFiles.sources = data importFiles.path = . - DEPLOYMENT = importFiles + DEPLOYMENT += importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/auto/declarative/qdeclarativevaluetypes/qdeclarativevaluetypes.pro b/tests/auto/declarative/qdeclarativevaluetypes/qdeclarativevaluetypes.pro index 90e46d3..56c3cd4 100644 --- a/tests/auto/declarative/qdeclarativevaluetypes/qdeclarativevaluetypes.pro +++ b/tests/auto/declarative/qdeclarativevaluetypes/qdeclarativevaluetypes.pro @@ -10,7 +10,7 @@ SOURCES += tst_qdeclarativevaluetypes.cpp \ symbian: { importFiles.sources = data importFiles.path = . - DEPLOYMENT = importFiles + DEPLOYMENT += importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/auto/declarative/qdeclarativeview/qdeclarativeview.pro b/tests/auto/declarative/qdeclarativeview/qdeclarativeview.pro index 21a9195..2f0a474 100644 --- a/tests/auto/declarative/qdeclarativeview/qdeclarativeview.pro +++ b/tests/auto/declarative/qdeclarativeview/qdeclarativeview.pro @@ -7,7 +7,7 @@ SOURCES += tst_qdeclarativeview.cpp symbian: { importFiles.sources = data importFiles.path = . - DEPLOYMENT = importFiles + DEPLOYMENT += importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/auto/declarative/qdeclarativeviewer/qdeclarativeviewer.pro b/tests/auto/declarative/qdeclarativeviewer/qdeclarativeviewer.pro index 6189916..08adf26 100644 --- a/tests/auto/declarative/qdeclarativeviewer/qdeclarativeviewer.pro +++ b/tests/auto/declarative/qdeclarativeviewer/qdeclarativeviewer.pro @@ -9,7 +9,7 @@ SOURCES += tst_qdeclarativeviewer.cpp symbian: { importFiles.sources = data importFiles.path = . - DEPLOYMENT = importFiles + DEPLOYMENT += importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/auto/declarative/qdeclarativevisualdatamodel/qdeclarativevisualdatamodel.pro b/tests/auto/declarative/qdeclarativevisualdatamodel/qdeclarativevisualdatamodel.pro index 92e5f60..d0d9b36 100644 --- a/tests/auto/declarative/qdeclarativevisualdatamodel/qdeclarativevisualdatamodel.pro +++ b/tests/auto/declarative/qdeclarativevisualdatamodel/qdeclarativevisualdatamodel.pro @@ -7,7 +7,7 @@ SOURCES += tst_qdeclarativevisualdatamodel.cpp symbian: { importFiles.sources = data importFiles.path = . - DEPLOYMENT = importFiles + DEPLOYMENT += importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/auto/declarative/qdeclarativewebview/qdeclarativewebview.pro b/tests/auto/declarative/qdeclarativewebview/qdeclarativewebview.pro index 562a9fb..2ab27a1 100644 --- a/tests/auto/declarative/qdeclarativewebview/qdeclarativewebview.pro +++ b/tests/auto/declarative/qdeclarativewebview/qdeclarativewebview.pro @@ -8,7 +8,7 @@ SOURCES += tst_qdeclarativewebview.cpp symbian: { importFiles.sources = data importFiles.path = . - DEPLOYMENT = importFiles + DEPLOYMENT += importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/auto/declarative/qdeclarativeworkerscript/qdeclarativeworkerscript.pro b/tests/auto/declarative/qdeclarativeworkerscript/qdeclarativeworkerscript.pro index 2f8f23d..9d4e0ed 100644 --- a/tests/auto/declarative/qdeclarativeworkerscript/qdeclarativeworkerscript.pro +++ b/tests/auto/declarative/qdeclarativeworkerscript/qdeclarativeworkerscript.pro @@ -7,7 +7,7 @@ SOURCES += tst_qdeclarativeworkerscript.cpp symbian: { importFiles.sources = data importFiles.path = . - DEPLOYMENT = importFiles + DEPLOYMENT += importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/qdeclarativexmlhttprequest.pro b/tests/auto/declarative/qdeclarativexmlhttprequest/qdeclarativexmlhttprequest.pro index 619b239..bfd47c5 100644 --- a/tests/auto/declarative/qdeclarativexmlhttprequest/qdeclarativexmlhttprequest.pro +++ b/tests/auto/declarative/qdeclarativexmlhttprequest/qdeclarativexmlhttprequest.pro @@ -11,7 +11,7 @@ SOURCES += tst_qdeclarativexmlhttprequest.cpp \ symbian: { importFiles.sources = data importFiles.path = . - DEPLOYMENT = importFiles + DEPLOYMENT += importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/auto/declarative/qdeclarativexmllistmodel/qdeclarativexmllistmodel.pro b/tests/auto/declarative/qdeclarativexmllistmodel/qdeclarativexmllistmodel.pro index efcea12..80c5711 100644 --- a/tests/auto/declarative/qdeclarativexmllistmodel/qdeclarativexmllistmodel.pro +++ b/tests/auto/declarative/qdeclarativexmllistmodel/qdeclarativexmllistmodel.pro @@ -11,7 +11,7 @@ SOURCES += tst_qdeclarativexmllistmodel.cpp symbian: { importFiles.sources = data importFiles.path = . - DEPLOYMENT = importFiles + DEPLOYMENT += importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/auto/declarative/qmlvisual/qmlvisual.pro b/tests/auto/declarative/qmlvisual/qmlvisual.pro index b2c5b4f..0977fe4 100644 --- a/tests/auto/declarative/qmlvisual/qmlvisual.pro +++ b/tests/auto/declarative/qmlvisual/qmlvisual.pro @@ -27,7 +27,7 @@ symbian: { repeater \ selftest_noimages \ webview - DEPLOYMENT = importFiles + DEPLOYMENT += importFiles } else { DEFINES += QT_TEST_SOURCE_DIR=\"\\\"$$PWD\\\"\" } diff --git a/tests/benchmarks/declarative/binding/binding.pro b/tests/benchmarks/declarative/binding/binding.pro index c1a8223..b93977a 100644 --- a/tests/benchmarks/declarative/binding/binding.pro +++ b/tests/benchmarks/declarative/binding/binding.pro @@ -10,7 +10,7 @@ HEADERS += testtypes.h symbian { data.sources = data data.path = . - DEPLOYMENT = data + DEPLOYMENT += data } else { # Define SRCDIR equal to test's source directory DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/benchmarks/declarative/qdeclarativeimage/qdeclarativeimage.pro b/tests/benchmarks/declarative/qdeclarativeimage/qdeclarativeimage.pro index a68792b..313282b 100644 --- a/tests/benchmarks/declarative/qdeclarativeimage/qdeclarativeimage.pro +++ b/tests/benchmarks/declarative/qdeclarativeimage/qdeclarativeimage.pro @@ -10,7 +10,7 @@ SOURCES += tst_qdeclarativeimage.cpp symbian { importFiles.sources = image.png importFiles.path = - DEPLOYMENT = importFiles + DEPLOYMENT += importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/benchmarks/declarative/script/script.pro b/tests/benchmarks/declarative/script/script.pro index 685ba03..759c6dd 100644 --- a/tests/benchmarks/declarative/script/script.pro +++ b/tests/benchmarks/declarative/script/script.pro @@ -10,7 +10,7 @@ SOURCES += tst_script.cpp symbian { importFiles.sources = data importFiles.path = - DEPLOYMENT = importFiles + DEPLOYMENT += importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" } -- cgit v0.12 From ed430f5b82df464e8c144bd809eb82f441c0197d Mon Sep 17 00:00:00 2001 From: Damian Jansen Date: Wed, 5 Oct 2011 13:50:08 +1000 Subject: Fix more test DEPLOYMENT statements for Symbian Reviewed-by: Rohan McGovern --- tests/auto/qapplication/test/test.pro | 2 +- tests/auto/qaudioinput/qaudioinput.pro | 2 +- tests/auto/qaudiooutput/qaudiooutput.pro | 2 +- tests/auto/qchar/qchar.pro | 4 ++-- tests/auto/qclipboard/test/test.pro | 6 +++--- tests/auto/qfile/test/test.pro | 2 +- tests/auto/qfileinfo/qfileinfo.pro | 4 ++-- tests/auto/qhttp/qhttp.pro | 4 ++-- tests/auto/qlocalsocket/test/test.pro | 4 ++-- tests/auto/qsound/qsound.pro | 2 +- 10 files changed, 16 insertions(+), 16 deletions(-) diff --git a/tests/auto/qapplication/test/test.pro b/tests/auto/qapplication/test/test.pro index d946e7e..e1193c2 100644 --- a/tests/auto/qapplication/test/test.pro +++ b/tests/auto/qapplication/test/test.pro @@ -8,7 +8,7 @@ wince* { additional.path = desktopsettingsaware someTest.sources = test.pro someTest.path = test - DEPLOYMENT = additional deploy someTest + DEPLOYMENT += additional deploy someTest } symbian: { diff --git a/tests/auto/qaudioinput/qaudioinput.pro b/tests/auto/qaudioinput/qaudioinput.pro index 5eb1613..0bbbb19 100644 --- a/tests/auto/qaudioinput/qaudioinput.pro +++ b/tests/auto/qaudioinput/qaudioinput.pro @@ -6,7 +6,7 @@ QT = core multimedia wince* { deploy.sources += 4.wav - DEPLOYMENT = deploy + DEPLOYMENT += deploy DEFINES += SRCDIR=\\\"\\\" QT += gui } else { diff --git a/tests/auto/qaudiooutput/qaudiooutput.pro b/tests/auto/qaudiooutput/qaudiooutput.pro index e1734e0..09d7ae3 100644 --- a/tests/auto/qaudiooutput/qaudiooutput.pro +++ b/tests/auto/qaudiooutput/qaudiooutput.pro @@ -6,7 +6,7 @@ QT = core multimedia wince*|symbian: { deploy.sources += 4.wav - DEPLOYMENT = deploy + DEPLOYMENT += deploy !symbian { DEFINES += SRCDIR=\\\"\\\" QT += gui diff --git a/tests/auto/qchar/qchar.pro b/tests/auto/qchar/qchar.pro index 3813e4e..2cb5201 100644 --- a/tests/auto/qchar/qchar.pro +++ b/tests/auto/qchar/qchar.pro @@ -4,8 +4,8 @@ SOURCES += tst_qchar.cpp QT = core wince*|symbian: { -deploy.sources += NormalizationTest.txt -DEPLOYMENT = deploy + deploy.sources += NormalizationTest.txt + DEPLOYMENT += deploy } symbian: { diff --git a/tests/auto/qclipboard/test/test.pro b/tests/auto/qclipboard/test/test.pro index 97b0c9c..9043f69 100644 --- a/tests/auto/qclipboard/test/test.pro +++ b/tests/auto/qclipboard/test/test.pro @@ -15,7 +15,7 @@ wince*|symbian: { copier.path = copier paster.sources = ../paster/paster.exe paster.path = paster - + symbian: { LIBS += -lbafl -lestor -letext @@ -27,6 +27,6 @@ wince*|symbian: { reg_resource.sources += $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/paster_reg.rsc reg_resource.path = $$REG_RESOURCE_IMPORT_DIR } - - DEPLOYMENT = copier paster rsc reg_resource + + DEPLOYMENT += copier paster rsc reg_resource } \ No newline at end of file diff --git a/tests/auto/qfile/test/test.pro b/tests/auto/qfile/test/test.pro index 70c93ce..9a2d847 100644 --- a/tests/auto/qfile/test/test.pro +++ b/tests/auto/qfile/test/test.pro @@ -10,7 +10,7 @@ wince*|symbian { resour.sources += ..\\resources\\file1.ext1 resour.path = resources - DEPLOYMENT = files resour + DEPLOYMENT += files resour } wince* { diff --git a/tests/auto/qfileinfo/qfileinfo.pro b/tests/auto/qfileinfo/qfileinfo.pro index 30656e2..8f04178 100644 --- a/tests/auto/qfileinfo/qfileinfo.pro +++ b/tests/auto/qfileinfo/qfileinfo.pro @@ -10,14 +10,14 @@ wince*:|symbian: { deploy.sources += qfileinfo.qrc tst_qfileinfo.cpp res.sources = resources\\file1 resources\\file1.ext1 resources\\file1.ext1.ext2 res.path = resources - DEPLOYMENT = deploy res + DEPLOYMENT += deploy res } symbian { TARGET.CAPABILITY=AllFiles LIBS *= -lefsrv INCLUDEPATH *= $$MW_LAYER_SYSTEMINCLUDE # Needed for e32svr.h in S^3 envs - } +} # support for running test from shadow build directory wince* { diff --git a/tests/auto/qhttp/qhttp.pro b/tests/auto/qhttp/qhttp.pro index c0be518..b7b78f1 100644 --- a/tests/auto/qhttp/qhttp.pro +++ b/tests/auto/qhttp/qhttp.pro @@ -11,7 +11,7 @@ wince*: { cgi.path = webserver/cgi-bin addFiles.sources = rfc3252.txt trolltech addFiles.path = . - DEPLOYMENT = addFiles webFiles cgi + DEPLOYMENT += addFiles webFiles cgi DEFINES += SRCDIR=\\\"\\\" } else:symbian { webFiles.sources = webserver/* @@ -20,7 +20,7 @@ wince*: { cgi.path = webserver/cgi-bin addFiles.sources = rfc3252.txt trolltech addFiles.path = . - DEPLOYMENT = addFiles webFiles cgi + DEPLOYMENT += addFiles webFiles cgi TARGET.CAPABILITY = NetworkServices } else:vxworks*: { DEFINES += SRCDIR=\\\"\\\" diff --git a/tests/auto/qlocalsocket/test/test.pro b/tests/auto/qlocalsocket/test/test.pro index 687aae2..ffdadd3 100644 --- a/tests/auto/qlocalsocket/test/test.pro +++ b/tests/auto/qlocalsocket/test/test.pro @@ -42,9 +42,9 @@ symbian { wince*|symbian { scriptFiles.sources = ../lackey/scripts/*.js scriptFiles.path = lackey/scripts - DEPLOYMENT = additionalFiles scriptFiles + DEPLOYMENT += additionalFiles scriptFiles QT += script # for easy deployment of QtScript - + requires(contains(QT_CONFIG,script)) } diff --git a/tests/auto/qsound/qsound.pro b/tests/auto/qsound/qsound.pro index bb1981c..e3279f3 100644 --- a/tests/auto/qsound/qsound.pro +++ b/tests/auto/qsound/qsound.pro @@ -3,7 +3,7 @@ SOURCES += tst_qsound.cpp wince*|symbian: { deploy.sources += 4.wav - DEPLOYMENT = deploy + DEPLOYMENT += deploy !symbian:DEFINES += SRCDIR=\\\"\\\" } else { DEFINES += SRCDIR=\\\"$$PWD/\\\" -- cgit v0.12 From c47cd8f01ea5d3f2a6d0ea73572d9735947919a0 Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Tue, 11 Oct 2011 15:51:58 +0100 Subject: Symbian - fix deleteLater not working from RunL deleteLater stores the loop level in the deferred delete event to prevent the object being deleted by a nested event loop. However as symbian active object RunL functions are called directly from the active scheduler, the loop level is incorrect at that point. (It is normally set by QCoreApplication::notifyInternal) To solve this, the loop level is adjusted before calling RunIfReady so that it is correct during RunL functions. It is then adjusted back for the specific active objects in the event dispatcher that call into QCoreApplication - sendPostedEvents, sendEvent. Task-number: QTBUG-21928 Reviewed-by: mread --- src/corelib/kernel/qeventdispatcher_symbian.cpp | 29 +++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/src/corelib/kernel/qeventdispatcher_symbian.cpp b/src/corelib/kernel/qeventdispatcher_symbian.cpp index 5e2bc4f..b796728 100644 --- a/src/corelib/kernel/qeventdispatcher_symbian.cpp +++ b/src/corelib/kernel/qeventdispatcher_symbian.cpp @@ -61,6 +61,24 @@ QT_BEGIN_NAMESPACE #define NULLTIMER_PRIORITY CActive::EPriorityLow #define COMPLETE_DEFERRED_ACTIVE_OBJECTS_PRIORITY CActive::EPriorityIdle +class Incrementer { + int &variable; +public: + inline Incrementer(int &variable) : variable(variable) + { ++variable; } + inline ~Incrementer() + { --variable; } +}; + +class Decrementer { + int &variable; +public: + inline Decrementer(int &variable) : variable(variable) + { --variable; } + inline ~Decrementer() + { ++variable; } +}; + static inline int qt_pipe_write(int socket, const char *data, qint64 len) { return ::write(socket, data, len); @@ -830,6 +848,8 @@ bool QEventDispatcherSymbian::processEvents ( QEventLoop::ProcessEventsFlags fla #endif while (1) { + //native active object callbacks are logically part of the event loop, so inc nesting level + Incrementer inc(d->threadData->loopLevel); if (block) { // This is where Qt will spend most of its time. CActiveScheduler::Current()->WaitForAnyRequest(); @@ -894,6 +914,7 @@ bool QEventDispatcherSymbian::processEvents ( QEventLoop::ProcessEventsFlags fla void QEventDispatcherSymbian::timerFired(int timerId) { + Q_D(QAbstractEventDispatcher); QHash::iterator i = m_timerList.find(timerId); if (i == m_timerList.end()) { // The timer has been deleted. Ignore this event. @@ -912,6 +933,8 @@ void QEventDispatcherSymbian::timerFired(int timerId) m_insideTimerEvent = true; QTimerEvent event(timerInfo->timerId); + //undo the added nesting level around RunIfReady, since Qt's event system also nests + Decrementer dec(d->threadData->loopLevel); QCoreApplication::sendEvent(timerInfo->receiver, &event); m_insideTimerEvent = oldInsideTimerEventValue; @@ -922,6 +945,7 @@ void QEventDispatcherSymbian::timerFired(int timerId) void QEventDispatcherSymbian::socketFired(QSocketActiveObject *socketAO) { + Q_D(QAbstractEventDispatcher); if (m_noSocketEvents) { m_deferredSocketEvents.append(socketAO); return; @@ -929,6 +953,8 @@ void QEventDispatcherSymbian::socketFired(QSocketActiveObject *socketAO) QEvent e(QEvent::SockAct); socketAO->m_inSocketEvent = true; + //undo the added nesting level around RunIfReady, since Qt's event system also nests + Decrementer dec(d->threadData->loopLevel); QCoreApplication::sendEvent(socketAO->m_notifier, &e); socketAO->m_inSocketEvent = false; @@ -943,6 +969,7 @@ void QEventDispatcherSymbian::socketFired(QSocketActiveObject *socketAO) void QEventDispatcherSymbian::wakeUpWasCalled() { + Q_D(QAbstractEventDispatcher); // The reactivation should happen in RunL, right before the call to this function. // This is because m_wakeUpDone is the "signal" that the object can be completed // once more. @@ -952,6 +979,8 @@ void QEventDispatcherSymbian::wakeUpWasCalled() // the sendPostedEvents was done, but before the object was ready to be completed // again. This could deadlock the application if there are no other posted events. m_wakeUpDone.fetchAndStoreOrdered(0); + //undo the added nesting level around RunIfReady, since Qt's event system also nests + Decrementer dec(d->threadData->loopLevel); sendPostedEvents(); } -- cgit v0.12 From 3f42986b357c5066adb9755454bc4bcc4915ab9f Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Wed, 12 Oct 2011 09:35:42 +1000 Subject: Backport more imports directory caching changes. Fixes error reporting on Windows. Change-Id: I49b559aa9d0c227be4e8e3d0fdc43c402273a302 Task-number: QTBUG-15899 Reviewed-by: Damian Jansen --- src/declarative/qml/qdeclarativedirparser.cpp | 15 +++++++++++---- src/declarative/qml/qdeclarativedirparser_p.h | 2 +- src/declarative/qml/qdeclarativeimport.cpp | 9 ++++++--- src/declarative/qml/qdeclarativetypeloader.cpp | 9 ++------- 4 files changed, 20 insertions(+), 15 deletions(-) diff --git a/src/declarative/qml/qdeclarativedirparser.cpp b/src/declarative/qml/qdeclarativedirparser.cpp index 401eea9..fcc74da 100644 --- a/src/declarative/qml/qdeclarativedirparser.cpp +++ b/src/declarative/qml/qdeclarativedirparser.cpp @@ -108,14 +108,14 @@ bool QDeclarativeDirParser::parse() QFile file(_filePathSouce); if (!QDeclarative_isFileCaseCorrect(_filePathSouce)) { QDeclarativeError error; - error.setDescription(QString::fromUtf8("cannot load module \"%1\": File name case mismatch for \"%2\"").arg(_url.toString()).arg(_filePathSouce)); + error.setDescription(QString::fromUtf8("cannot load module \"$$URI$$\": File name case mismatch for \"%1\"").arg(_filePathSouce)); _errors.prepend(error); return false; } else if (file.open(QFile::ReadOnly)) { _source = QString::fromUtf8(file.readAll()); } else { QDeclarativeError error; - error.setDescription(QString::fromUtf8("module \"%1\" definition \"%2\" not readable").arg(_url.toString()).arg(_filePathSouce)); + error.setDescription(QString::fromUtf8("module \"$$URI$$\" definition \"%1\" not readable").arg(_filePathSouce)); _errors.prepend(error); return false; } @@ -243,9 +243,16 @@ bool QDeclarativeDirParser::hasError() const return false; } -QList QDeclarativeDirParser::errors() const +QList QDeclarativeDirParser::errors(const QString &uri) const { - return _errors; + QList errors = _errors; + for (int i = 0; i < errors.size(); ++i) { + QDeclarativeError &e = errors[i]; + QString description = e.description(); + description.replace(QLatin1String("$$URI$$"), uri); + e.setDescription(description); + } + return errors; } QList QDeclarativeDirParser::plugins() const diff --git a/src/declarative/qml/qdeclarativedirparser_p.h b/src/declarative/qml/qdeclarativedirparser_p.h index 347b229..bc84a42 100644 --- a/src/declarative/qml/qdeclarativedirparser_p.h +++ b/src/declarative/qml/qdeclarativedirparser_p.h @@ -80,7 +80,7 @@ public: bool parse(); bool hasError() const; - QList errors() const; + QList errors(const QString &uri) const; struct Plugin { diff --git a/src/declarative/qml/qdeclarativeimport.cpp b/src/declarative/qml/qdeclarativeimport.cpp index 44fc849..734d63e 100644 --- a/src/declarative/qml/qdeclarativeimport.cpp +++ b/src/declarative/qml/qdeclarativeimport.cpp @@ -361,8 +361,11 @@ bool QDeclarativeImportsPrivate::importExtension(const QString &absoluteFilePath Q_ASSERT(typeLoader); const QDeclarativeDirParser *qmldirParser = typeLoader->qmlDirParser(absoluteFilePath); if (qmldirParser->hasError()) { - if (errorString) - *errorString = QDeclarativeImportDatabase::tr("module \"%1\" definition \"%2\" not readable").arg(uri).arg(absoluteFilePath); + if (errorString) { + const QList qmldirErrors = qmldirParser->errors(uri); + for (int i = 0; i < qmldirErrors.size(); ++i) + *errorString += qmldirErrors.at(i).description(); + } return false; } @@ -1022,7 +1025,7 @@ bool QDeclarativeImportDatabase::importPlugin(const QString &filePath, const QSt if (!engineInitialized || !typesRegistered) { if (!QDeclarative_isFileCaseCorrect(absoluteFilePath)) { if (errorString) - *errorString = tr("File name case mismatch for \"%2\"").arg(absoluteFilePath); + *errorString = tr("File name case mismatch for \"%1\"").arg(absoluteFilePath); return false; } QPluginLoader loader(absoluteFilePath); diff --git a/src/declarative/qml/qdeclarativetypeloader.cpp b/src/declarative/qml/qdeclarativetypeloader.cpp index cd199ad..5e20617 100644 --- a/src/declarative/qml/qdeclarativetypeloader.cpp +++ b/src/declarative/qml/qdeclarativetypeloader.cpp @@ -789,18 +789,13 @@ Return a QDeclarativeDirParser for absoluteFilePath. The QDeclarativeDirParser const QDeclarativeDirParser *QDeclarativeTypeLoader::qmlDirParser(const QString &absoluteFilePath) { QDeclarativeDirParser *qmldirParser; -#if defined(Q_OS_WIN32) || defined(Q_OS_WINCE) || defined(Q_OS_DARWIN) || defined(Q_OS_SYMBIAN) - QString lowPath(absoluteFilePath.toLower()); -#else - QString lowPath(absoluteFilePath); -#endif - QHash::const_iterator it = m_importQmlDirCache.find(lowPath); + QHash::const_iterator it = m_importQmlDirCache.find(absoluteFilePath); if (it == m_importQmlDirCache.end()) { qmldirParser = new QDeclarativeDirParser; qmldirParser->setFileSource(absoluteFilePath); qmldirParser->setUrl(QUrl::fromLocalFile(absoluteFilePath)); qmldirParser->parse(); - m_importQmlDirCache.insert(lowPath, qmldirParser); + m_importQmlDirCache.insert(absoluteFilePath, qmldirParser); } else { qmldirParser = *it; } -- cgit v0.12 From 61f165239c4e87a8f6bcd594553b8fcea1a7f8d0 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Wed, 12 Oct 2011 17:02:12 +1000 Subject: Cannot flick to the end of a horizontal list view width LayoutMirroring minXExtent calculated the offset due to highlight range incorrectly (reversed) when mirroring enabled. Also us same algorithm for fixup() in GridView and ListView uses. Change-Id: Id7e7e540a894d6f520685b237d34b4186bc427b6 Task-number: QTBUG-21756 Reviewed-by: Bea Lam --- .../graphicsitems/qdeclarativegridview.cpp | 23 +++++++++------------- .../graphicsitems/qdeclarativelistview.cpp | 2 +- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp index ff88e31..03cc335 100644 --- a/src/declarative/graphicsitems/qdeclarativegridview.cpp +++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp @@ -1093,23 +1093,17 @@ void QDeclarativeGridViewPrivate::fixup(AxisData &data, qreal minExtent, qreal m bottomItem = currentItem; } qreal pos; - if (topItem && bottomItem && strictHighlightRange) { - qreal topPos = qMin(topItem->rowPos() - highlightStart, -maxExtent); - qreal bottomPos = qMax(bottomItem->rowPos() - highlightEnd, -minExtent); - pos = qAbs(data.move + topPos) < qAbs(data.move + bottomPos) ? topPos : bottomPos; - } else if (topItem) { - qreal headerPos = 0; - if (header) - headerPos = isRightToLeftTopToBottom() ? header->rowPos() + cellWidth - headerSize() : header->rowPos(); - if (topItem->index == 0 && header && tempPosition+highlightStart < headerPos+headerSize()/2 && !strictHighlightRange) { - pos = isRightToLeftTopToBottom() ? - headerPos + highlightStart - size() : headerPos - highlightStart; + bool isInBounds = -position() > maxExtent && -position() <= minExtent; + if (topItem && (isInBounds || strictHighlightRange)) { + if (topItem->index == 0 && header && tempPosition+highlightStart < header->rowPos()+headerSize()/2 && !strictHighlightRange) { + pos = isRightToLeftTopToBottom() ? - header->rowPos() + highlightStart - size() : header->rowPos() - highlightStart; } else { if (isRightToLeftTopToBottom()) pos = qMax(qMin(-topItem->rowPos() + highlightStart - size(), -maxExtent), -minExtent); else pos = qMax(qMin(topItem->rowPos() - highlightStart, -maxExtent), -minExtent); } - } else if (bottomItem) { + } else if (bottomItem && isInBounds) { if (isRightToLeftTopToBottom()) pos = qMax(qMin(-bottomItem->rowPos() + highlightEnd - size(), -maxExtent), -minExtent); else @@ -2255,9 +2249,10 @@ qreal QDeclarativeGridView::minXExtent() const qreal extent = -d->startPosition(); qreal highlightStart; qreal highlightEnd; - qreal endPositionFirstItem; + qreal endPositionFirstItem = 0; if (d->isRightToLeftTopToBottom()) { - endPositionFirstItem = d->rowPosAt(d->model->count()-1); + if (d->model && d->model->count()) + endPositionFirstItem = d->rowPosAt(d->model->count()-1); highlightStart = d->highlightRangeStartValid ? d->highlightRangeStart - (d->lastPosition()-endPositionFirstItem) : d->size() - (d->lastPosition()-endPositionFirstItem); @@ -2272,7 +2267,7 @@ qreal QDeclarativeGridView::minXExtent() const extent += d->header->item->width(); } if (d->haveHighlightRange && d->highlightRange == StrictlyEnforceRange) { - extent += highlightStart; + extent += d->isRightToLeftTopToBottom() ? -highlightStart : highlightStart; extent = qMax(extent, -(endPositionFirstItem - highlightEnd)); } return extent; diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp index 6c8e99b..2db29fe 100644 --- a/src/declarative/graphicsitems/qdeclarativelistview.cpp +++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp @@ -2762,7 +2762,7 @@ qreal QDeclarativeListView::minXExtent() const d->minExtent += d->header->size(); } if (d->haveHighlightRange && d->highlightRange == StrictlyEnforceRange) { - d->minExtent += highlightStart; + d->minExtent += d->isRightToLeft() ? -highlightStart : highlightStart; d->minExtent = qMax(d->minExtent, -(endPositionFirstItem - highlightEnd + 1)); } d->minExtentDirty = false; -- cgit v0.12 From 3ae56c0e4cfdd30579dbbff97fbf37af1da73a78 Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Thu, 13 Oct 2011 15:45:47 +0100 Subject: symbian - search drives for translation files Qt may be installed on a different drive from the application, particularly the case when Qt is included in ROM (Z:) and the application is on C: With this change, if QTranslator::load() specifies an absolute directory in the filesystem (e.g. "/resource/qt/translations") without a drive letter, then the symbian search paths are used. Note that this example path is the one returned by QLibraryInfo so applications using the example code from http://doc.qt.nokia.com/latest/internationalization.html#produce-translations will work as expected. Task-number: QT-5246 Reviewed-by: mread --- src/corelib/kernel/qtranslator.cpp | 40 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/src/corelib/kernel/qtranslator.cpp b/src/corelib/kernel/qtranslator.cpp index 3672846..1a9acbb 100644 --- a/src/corelib/kernel/qtranslator.cpp +++ b/src/corelib/kernel/qtranslator.cpp @@ -50,6 +50,7 @@ #include "qcoreapplication.h" #include "qcoreapplication_p.h" #include "qdatastream.h" +#include "qdir.h" #include "qfile.h" #include "qmap.h" #include "qalgorithms.h" @@ -61,6 +62,10 @@ #include "private/qcore_unix_p.h" #endif +#ifdef Q_OS_SYMBIAN +#include "private/qcore_symbian_p.h" +#endif + // most of the headers below are already included in qplatformdefs.h // also this lacks Large File support but that's probably irrelevant #if defined(QT_USE_MMAP) @@ -402,11 +407,24 @@ bool QTranslator::load(const QString & filename, const QString & directory, QString prefix; if (QFileInfo(filename).isRelative()) { +#ifdef Q_OS_SYMBIAN + if(directory.isEmpty()) + prefix = QCoreApplication::applicationDirPath(); + else + prefix = QFileInfo(directory).absoluteFilePath(); //TFindFile doesn't like dirty paths + if (prefix.length() > 2 && prefix.at(1) == QLatin1Char(':') && prefix.at(0).isLetter()) + prefix[0] = QLatin1Char('Y'); +#else prefix = directory; - if (prefix.length() && !prefix.endsWith(QLatin1Char('/'))) - prefix += QLatin1Char('/'); +#endif + if (prefix.length() && !prefix.endsWith(QLatin1Char('/'))) + prefix += QLatin1Char('/'); } +#ifdef Q_OS_SYMBIAN + QString nativePrefix = QDir::toNativeSeparators(prefix); +#endif + QString fname = filename; QString realname; QString delims; @@ -415,6 +433,24 @@ bool QTranslator::load(const QString & filename, const QString & directory, for (;;) { QFileInfo fi; +#ifdef Q_OS_SYMBIAN + //search for translations on other drives, e.g. Qt may be in Z, while app is in C + //note this uses symbian search rules, i.e. y:->a:, followed by z: + TFindFile finder(qt_s60GetRFs()); + QString fname2 = fname + (suffix.isNull() ? QString::fromLatin1(".qm") : suffix); + TInt err = finder.FindByDir( + qt_QString2TPtrC(fname2), + qt_QString2TPtrC(nativePrefix)); + if (err != KErrNone) + err = finder.FindByDir(qt_QString2TPtrC(fname), qt_QString2TPtrC(nativePrefix)); + if (err == KErrNone) { + fi.setFile(qt_TDesC2QString(finder.File())); + realname = fi.canonicalFilePath(); + if (fi.isReadable() && fi.isFile()) + break; + } +#endif + realname = prefix + fname + (suffix.isNull() ? QString::fromLatin1(".qm") : suffix); fi.setFile(realname); if (fi.isReadable() && fi.isFile()) -- cgit v0.12 From 5dec90ff13cd96ca4f341cf5e8360037edf5eeb3 Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Thu, 13 Oct 2011 15:45:47 +0100 Subject: symbian - search drives for translation files Qt may be installed on a different drive from the application, particularly the case when Qt is included in ROM (Z:) and the application is on C: With this change, if QTranslator::load() specifies an absolute directory in the filesystem (e.g. "/resource/qt/translations") without a drive letter, then the symbian search paths are used. Note that this example path is the one returned by QLibraryInfo so applications using the example code from http://doc.qt.nokia.com/latest/internationalization.html#produce-translations will work as expected. Task-number: QT-5246 Reviewed-by: mread --- src/corelib/kernel/qtranslator.cpp | 40 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/src/corelib/kernel/qtranslator.cpp b/src/corelib/kernel/qtranslator.cpp index 3672846..8c08760 100644 --- a/src/corelib/kernel/qtranslator.cpp +++ b/src/corelib/kernel/qtranslator.cpp @@ -50,6 +50,7 @@ #include "qcoreapplication.h" #include "qcoreapplication_p.h" #include "qdatastream.h" +#include "qdir.h" #include "qfile.h" #include "qmap.h" #include "qalgorithms.h" @@ -61,6 +62,10 @@ #include "private/qcore_unix_p.h" #endif +#ifdef Q_OS_SYMBIAN +#include "private/qcore_symbian_p.h" +#endif + // most of the headers below are already included in qplatformdefs.h // also this lacks Large File support but that's probably irrelevant #if defined(QT_USE_MMAP) @@ -402,11 +407,24 @@ bool QTranslator::load(const QString & filename, const QString & directory, QString prefix; if (QFileInfo(filename).isRelative()) { +#ifdef Q_OS_SYMBIAN + if (directory.isEmpty()) + prefix = QCoreApplication::applicationDirPath(); + else + prefix = QFileInfo(directory).absoluteFilePath(); //TFindFile doesn't like dirty paths + if (prefix.length() > 2 && prefix.at(1) == QLatin1Char(':') && prefix.at(0).isLetter()) + prefix[0] = QLatin1Char('Y'); +#else prefix = directory; - if (prefix.length() && !prefix.endsWith(QLatin1Char('/'))) - prefix += QLatin1Char('/'); +#endif + if (prefix.length() && !prefix.endsWith(QLatin1Char('/'))) + prefix += QLatin1Char('/'); } +#ifdef Q_OS_SYMBIAN + QString nativePrefix = QDir::toNativeSeparators(prefix); +#endif + QString fname = filename; QString realname; QString delims; @@ -415,6 +433,24 @@ bool QTranslator::load(const QString & filename, const QString & directory, for (;;) { QFileInfo fi; +#ifdef Q_OS_SYMBIAN + //search for translations on other drives, e.g. Qt may be in Z, while app is in C + //note this uses symbian search rules, i.e. y:->a:, followed by z: + TFindFile finder(qt_s60GetRFs()); + QString fname2 = fname + (suffix.isNull() ? QString::fromLatin1(".qm") : suffix); + TInt err = finder.FindByDir( + qt_QString2TPtrC(fname2), + qt_QString2TPtrC(nativePrefix)); + if (err != KErrNone) + err = finder.FindByDir(qt_QString2TPtrC(fname), qt_QString2TPtrC(nativePrefix)); + if (err == KErrNone) { + fi.setFile(qt_TDesC2QString(finder.File())); + realname = fi.canonicalFilePath(); + if (fi.isReadable() && fi.isFile()) + break; + } +#endif + realname = prefix + fname + (suffix.isNull() ? QString::fromLatin1(".qm") : suffix); fi.setFile(realname); if (fi.isReadable() && fi.isFile()) -- cgit v0.12 From 2543ed5b1b18864797b3a11c9bd13887c7567e86 Mon Sep 17 00:00:00 2001 From: Jani Hautakangas Date: Fri, 14 Oct 2011 13:00:15 +0300 Subject: Add new signals to indicate GPU resource usage. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit QML elements that use GPU resources directly needs to know when Qt releases GPU resources and when they are available again. Task-number: QT-5310 Reviewed-by: Samuel Rødal --- src/gui/kernel/qapplication.cpp | 28 ++++++++++++++++++++++++++++ src/gui/kernel/qapplication.h | 4 ++++ src/gui/kernel/qapplication_p.h | 3 +++ src/gui/kernel/qapplication_s60.cpp | 24 ++++++++++++++++++++++++ src/s60installs/eabi/QtGuiu.def | 7 +++++++ 5 files changed, 66 insertions(+) diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp index 34ce9a8..34decef 100644 --- a/src/gui/kernel/qapplication.cpp +++ b/src/gui/kernel/qapplication.cpp @@ -3389,7 +3389,35 @@ QString QApplication::sessionKey() const } #endif +/*! + \since 4.7.4 + \fn void QApplication::aboutToReleaseGpuResources() + + This signal is emitted when application is about to release all + GPU resources accociated to contexts owned by application. + + The signal is particularly useful if your application has allocated + GPU resources directly apart from Qt and needs to do some last-second + cleanup. + + \warning This signal is only emitted on Symbian. + + \sa aboutToUseGpuResources() +*/ +/*! + \since 4.7.4 + \fn void QApplication::aboutToUseGpuResources() + + This signal is emitted when application is about to use GPU resources. + + The signal is particularly useful if your application needs to know + when GPU resources are be available. + + \warning This signal is only emitted on Symbian. + + \sa aboutToFreeGpuResources() +*/ /*! \since 4.2 diff --git a/src/gui/kernel/qapplication.h b/src/gui/kernel/qapplication.h index cbf0117..32ff91b 100644 --- a/src/gui/kernel/qapplication.h +++ b/src/gui/kernel/qapplication.h @@ -298,6 +298,10 @@ Q_SIGNALS: void commitDataRequest(QSessionManager &sessionManager); void saveStateRequest(QSessionManager &sessionManager); #endif +#ifdef Q_OS_SYMBIAN + void aboutToReleaseGpuResources(); + void aboutToUseGpuResources(); +#endif public: QString styleSheet() const; diff --git a/src/gui/kernel/qapplication_p.h b/src/gui/kernel/qapplication_p.h index 99822e2..abdee49 100644 --- a/src/gui/kernel/qapplication_p.h +++ b/src/gui/kernel/qapplication_p.h @@ -523,6 +523,9 @@ public: int symbianResourceChange(const QSymbianEvent *symbianEvent); void _q_aboutToQuit(); + + void emitAboutToReleaseGpuResources(); + void emitAboutToUseGpuResources(); #endif #if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined (Q_WS_QWS) || defined(Q_WS_MAC) void sendSyntheticEnterLeave(QWidget *widget); diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index a53d273..5c657a4 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -207,6 +207,9 @@ void QS60Data::controlVisibilityChanged(CCoeControl *control, bool visible) if (QTLWExtra *topData = qt_widget_private(window)->maybeTopData()) { QWidgetBackingStoreTracker &backingStore = topData->backingStore; if (visible) { + QApplicationPrivate *d = QApplicationPrivate::instance(); + d->emitAboutToUseGpuResources(); + if (backingStore.data()) { backingStore.registerWidget(widget); } else { @@ -216,6 +219,9 @@ void QS60Data::controlVisibilityChanged(CCoeControl *control, bool visible) widget->repaint(); } } else { + QApplicationPrivate *d = QApplicationPrivate::instance(); + d->emitAboutToReleaseGpuResources(); + // In certain special scenarios we may get an ENotVisible event // without a previous EPartiallyVisible. The backingstore must // still be destroyed, hence the registerWidget() call below. @@ -2704,6 +2710,24 @@ void QApplicationPrivate::_q_aboutToQuit() #endif } +void QApplicationPrivate::emitAboutToReleaseGpuResources() +{ +#ifdef Q_SYMBIAN_SUPPORTS_SURFACES + Q_Q(QApplication); + QPointer guard(q); + emit q->aboutToReleaseGpuResources(); +#endif +} + +void QApplicationPrivate::emitAboutToUseGpuResources() +{ +#ifdef Q_SYMBIAN_SUPPORTS_SURFACES + Q_Q(QApplication); + QPointer guard(q); + emit q->aboutToUseGpuResources(); +#endif +} + QS60ThreadLocalData::QS60ThreadLocalData() { CCoeEnv *env = CCoeEnv::Static(); diff --git a/src/s60installs/eabi/QtGuiu.def b/src/s60installs/eabi/QtGuiu.def index 6028a6d..723fcf6 100644 --- a/src/s60installs/eabi/QtGuiu.def +++ b/src/s60installs/eabi/QtGuiu.def @@ -12198,4 +12198,11 @@ EXPORTS _ZNK11QPixmapData15toVolatileImageEv @ 12197 NONAME _ZNK14QVolatileImage13constImageRefEv @ 12198 NONAME _Z43qt_s60_setPartialScreenAutomaticTranslationb @ 12199 NONAME + _ZN11QTextEngine16getClusterLengthEPtPK17HB_CharAttributesiiiPi @ 12200 NONAME + _ZN11QTextEngine18positionInLigatureEPK11QScriptItemi6QFixedS3_ib @ 12201 NONAME + _ZN12QApplication22aboutToUseGpuResourcesEv @ 12202 NONAME + _ZN12QApplication26aboutToReleaseGpuResourcesEv @ 12203 NONAME + _ZN14QWidgetPrivate16_q_cleanupWinIdsEv @ 12204 NONAME + _ZN19QApplicationPrivate26emitAboutToUseGpuResourcesEv @ 12205 NONAME + _ZN19QApplicationPrivate30emitAboutToReleaseGpuResourcesEv @ 12206 NONAME -- cgit v0.12 From 968d4a3c2c01d6afdfeb2537b960169968942d9d Mon Sep 17 00:00:00 2001 From: Jani Hautakangas Date: Fri, 14 Oct 2011 19:36:08 +0300 Subject: Typo fix Reviewed-by: trustme --- src/gui/kernel/qapplication.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp index 34decef..9d8b590 100644 --- a/src/gui/kernel/qapplication.cpp +++ b/src/gui/kernel/qapplication.cpp @@ -3394,7 +3394,7 @@ QString QApplication::sessionKey() const \fn void QApplication::aboutToReleaseGpuResources() This signal is emitted when application is about to release all - GPU resources accociated to contexts owned by application. + GPU resources associated to contexts owned by application. The signal is particularly useful if your application has allocated GPU resources directly apart from Qt and needs to do some last-second -- cgit v0.12 From 93c64e1be3a2d68eb504d7c4f7c60f66ce1ff650 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Fri, 30 Sep 2011 13:33:56 +1000 Subject: Fix crash on exit when overriding signal handlers in states. Change-Id: I0e73948f18aa1b78c7e92677167673b84a90a450 Task-number: QTBUG-21617 Reviewed-by: Martin Jones --- .../util/qdeclarativepropertychanges.cpp | 5 ++-- .../data/signalOverrideCrash3.qml | 27 ++++++++++++++++++++++ .../qdeclarativestates/tst_qdeclarativestates.cpp | 17 ++++++++++++++ 3 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 tests/auto/declarative/qdeclarativestates/data/signalOverrideCrash3.qml diff --git a/src/declarative/util/qdeclarativepropertychanges.cpp b/src/declarative/util/qdeclarativepropertychanges.cpp index 5cdf785..f86274f 100644 --- a/src/declarative/util/qdeclarativepropertychanges.cpp +++ b/src/declarative/util/qdeclarativepropertychanges.cpp @@ -171,7 +171,8 @@ public: reverseExpression = rewindExpression; } - /*virtual void copyOriginals(QDeclarativeActionEvent *other) + virtual bool needsCopy() { return true; } + virtual void copyOriginals(QDeclarativeActionEvent *other) { QDeclarativeReplaceSignalHandler *rsh = static_cast(other); saveCurrentValues(); @@ -182,7 +183,7 @@ public: ownedExpression = rsh->ownedExpression; rsh->ownedExpression = 0; } - }*/ + } virtual void rewind() { ownedExpression = QDeclarativePropertyPrivate::setSignalExpression(property, rewindExpression); diff --git a/tests/auto/declarative/qdeclarativestates/data/signalOverrideCrash3.qml b/tests/auto/declarative/qdeclarativestates/data/signalOverrideCrash3.qml new file mode 100644 index 0000000..ed1f22f --- /dev/null +++ b/tests/auto/declarative/qdeclarativestates/data/signalOverrideCrash3.qml @@ -0,0 +1,27 @@ +import QtQuick 1.0 + +Rectangle { + id: myRect + width: 400 + height: 400 + + onHeightChanged: console.log("base state") + + states: [ + State { + name: "state1" + PropertyChanges { + target: myRect + onHeightChanged: console.log("state1") + color: "green" + } + }, + State { + name: "state2"; + PropertyChanges { + target: myRect + onHeightChanged: console.log("state2") + color: "red" + } + }] +} diff --git a/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp b/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp index 9fafa7d..e90e6fb 100644 --- a/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp +++ b/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp @@ -113,6 +113,7 @@ private slots: void signalOverride(); void signalOverrideCrash(); void signalOverrideCrash2(); + void signalOverrideCrash3(); void parentChange(); void parentChangeErrors(); void anchorChanges(); @@ -520,6 +521,22 @@ void tst_qdeclarativestates::signalOverrideCrash2() delete rect; } +void tst_qdeclarativestates::signalOverrideCrash3() +{ + QDeclarativeEngine engine; + + QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/signalOverrideCrash3.qml"); + QDeclarativeRectangle *rect = qobject_cast(rectComponent.create()); + QVERIFY(rect != 0); + + QDeclarativeItemPrivate::get(rect)->setState("state1"); + QDeclarativeItemPrivate::get(rect)->setState(""); + QDeclarativeItemPrivate::get(rect)->setState("state2"); + QDeclarativeItemPrivate::get(rect)->setState(""); + + delete rect; +} + void tst_qdeclarativestates::parentChange() { QDeclarativeEngine engine; -- cgit v0.12 From 17e0607ef47e455f56894e134541c46b42e7cdd9 Mon Sep 17 00:00:00 2001 From: Jani Hautakangas Date: Tue, 18 Oct 2011 12:52:30 +0300 Subject: Update def files Reviewed-by: TRUSTME --- src/s60installs/bwins/QtGuiu.def | 6 +++++- src/s60installs/eabi/QtGuiu.def | 11 ++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/s60installs/bwins/QtGuiu.def b/src/s60installs/bwins/QtGuiu.def index 40cdcde..c66bb89 100644 --- a/src/s60installs/bwins/QtGuiu.def +++ b/src/s60installs/bwins/QtGuiu.def @@ -13113,5 +13113,9 @@ EXPORTS ?hasBCM2727@QSymbianGraphicsSystemEx@@SA_NXZ @ 13112 NONAME ; bool QSymbianGraphicsSystemEx::hasBCM2727(void) ?constImageRef@QVolatileImage@@QBEABVQImage@@XZ @ 13113 NONAME ; class QImage const & QVolatileImage::constImageRef(void) const ?toVolatileImage@QPixmapData@@UBE?AVQVolatileImage@@XZ @ 13114 NONAME ; class QVolatileImage QPixmapData::toVolatileImage(void) const - ?qt_s60_setPartialScreenAutomaticTranslation@@YAX_N@Z @ 13115 NONAME ; void qt_s60_setPartialScreenAutomaticTranslation(bool) + ?qt_s60_setPartialScreenAutomaticTranslation@@YAX_N@Z @ 13115 NONAME ; void qt_s60_setPartialScreenAutomaticTranslation(bool) + ?aboutToUseGpuResources@QApplication@@IAEXXZ @ 13116 NONAME ; void QApplication::aboutToUseGpuResources(void) + ?aboutToReleaseGpuResources@QApplication@@IAEXXZ @ 13117 NONAME ; void QApplication::aboutToReleaseGpuResources(void) + ?emitAboutToUseGpuResources@QApplicationPrivate@@QAEXXZ @ 13118 NONAME ; void QApplicationPrivate::emitAboutToUseGpuResources(void) + ?emitAboutToReleaseGpuResources@QApplicationPrivate@@QAEXXZ @ 13119 NONAME ; void QApplicationPrivate::emitAboutToReleaseGpuResources(void) diff --git a/src/s60installs/eabi/QtGuiu.def b/src/s60installs/eabi/QtGuiu.def index 723fcf6..9d39b90 100644 --- a/src/s60installs/eabi/QtGuiu.def +++ b/src/s60installs/eabi/QtGuiu.def @@ -12198,11 +12198,8 @@ EXPORTS _ZNK11QPixmapData15toVolatileImageEv @ 12197 NONAME _ZNK14QVolatileImage13constImageRefEv @ 12198 NONAME _Z43qt_s60_setPartialScreenAutomaticTranslationb @ 12199 NONAME - _ZN11QTextEngine16getClusterLengthEPtPK17HB_CharAttributesiiiPi @ 12200 NONAME - _ZN11QTextEngine18positionInLigatureEPK11QScriptItemi6QFixedS3_ib @ 12201 NONAME - _ZN12QApplication22aboutToUseGpuResourcesEv @ 12202 NONAME - _ZN12QApplication26aboutToReleaseGpuResourcesEv @ 12203 NONAME - _ZN14QWidgetPrivate16_q_cleanupWinIdsEv @ 12204 NONAME - _ZN19QApplicationPrivate26emitAboutToUseGpuResourcesEv @ 12205 NONAME - _ZN19QApplicationPrivate30emitAboutToReleaseGpuResourcesEv @ 12206 NONAME + _ZN12QApplication22aboutToUseGpuResourcesEv @ 12200 NONAME + _ZN12QApplication26aboutToReleaseGpuResourcesEv @ 12201 NONAME + _ZN19QApplicationPrivate26emitAboutToUseGpuResourcesEv @ 12202 NONAME + _ZN19QApplicationPrivate30emitAboutToReleaseGpuResourcesEv @ 12203 NONAME -- cgit v0.12 From e15d2359aa9f78ae4d6b427531001b907980a595 Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Mon, 17 Oct 2011 15:57:31 +0100 Subject: Symbian - fix compile error when default configured New code assumed building with OpenGL/OpenVG, which is the production configuration, but not the default configuration Reviewed-By: Jani Hautakangas Task-Number: QTBUG-21996 --- src/gui/painting/qgraphicssystemex_symbian.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/painting/qgraphicssystemex_symbian.cpp b/src/gui/painting/qgraphicssystemex_symbian.cpp index 32e040f..5a182ff 100644 --- a/src/gui/painting/qgraphicssystemex_symbian.cpp +++ b/src/gui/painting/qgraphicssystemex_symbian.cpp @@ -46,7 +46,7 @@ #include -#ifdef Q_SYMBIAN_SUPPORTS_SURFACES +#if defined(Q_SYMBIAN_SUPPORTS_SURFACES) && !defined (QT_NO_EGL) #include "private/qegl_p.h" #endif @@ -55,7 +55,7 @@ QT_BEGIN_NAMESPACE static bool bcm2727Initialized = false; static bool bcm2727 = false; -#ifdef Q_SYMBIAN_SUPPORTS_SURFACES +#if defined(Q_SYMBIAN_SUPPORTS_SURFACES) && !defined (QT_NO_EGL) typedef EGLBoolean (*NOK_resource_profiling)(EGLDisplay, EGLint, EGLint*, EGLint, EGLint*); #define EGL_PROF_TOTAL_MEMORY_NOK 0x3070 #endif @@ -69,7 +69,7 @@ bool QSymbianGraphicsSystemEx::hasBCM2727() if (bcm2727Initialized) return bcm2727; -#ifdef Q_SYMBIAN_SUPPORTS_SURFACES +#if defined(Q_SYMBIAN_SUPPORTS_SURFACES) && !defined (QT_NO_EGL) EGLDisplay display = QEgl::display(); #if 1 // Hacky but fast ~0ms. -- cgit v0.12 From b9a3d4bf7827aa631995d47233d47583917a5a7f Mon Sep 17 00:00:00 2001 From: Jani Hautakangas Date: Tue, 18 Oct 2011 13:04:21 +0300 Subject: Fix to QGLWidget crash QGLWidget crashed due to regression caused by fix to QTTH-1553. Crash only occurred if application was locked to landscape mode but started when device was in portrait mode. Task-number: QTTH-1597 Reviewed-by: Laszlo Agocs --- src/opengl/qgl.cpp | 7 +++++-- src/opengl/qgl_p.h | 2 ++ src/opengl/qgl_symbian.cpp | 18 +++++++++++------- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index ca16cca..3b3da43 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -4297,7 +4297,7 @@ bool QGLWidget::event(QEvent *e) // if we've reparented a window that has the current context // bound, we need to rebind that context to the new window id if (d->glcx == QGLContext::currentContext()) - makeCurrent(); + makeCurrent(); // Shouldn't happen but keep it here just for sure if (testAttribute(Qt::WA_TranslucentBackground)) setContext(new QGLContext(d->glcx->requestedFormat(), this)); @@ -4305,8 +4305,11 @@ bool QGLWidget::event(QEvent *e) // A re-parent is likely to destroy the Symbian window and re-create it. It is important // that we free the EGL surface _before_ the winID changes - otherwise we can leak. - if (e->type() == QEvent::ParentAboutToChange) + if (e->type() == QEvent::ParentAboutToChange) { + if (d->glcx == QGLContext::currentContext()) + d->glcx->doneCurrent(); d->glcx->d_func()->destroyEglSurfaceForDevice(); + } if ((e->type() == QEvent::ParentChange) || (e->type() == QEvent::WindowStateChange)) { // The window may have been re-created during re-parent or state change - if so, the EGL diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h index 2ca8dc9..c56b2db 100644 --- a/src/opengl/qgl_p.h +++ b/src/opengl/qgl_p.h @@ -175,6 +175,7 @@ public: #endif #if defined(Q_OS_SYMBIAN) , eglSurfaceWindowId(0) + , surfaceSizeInitialized(false) #endif { isGLWidget = 1; @@ -220,6 +221,7 @@ public: #ifdef Q_OS_SYMBIAN void recreateEglSurface(); WId eglSurfaceWindowId; + bool surfaceSizeInitialized : 1; #endif }; diff --git a/src/opengl/qgl_symbian.cpp b/src/opengl/qgl_symbian.cpp index b8e5c22..94c63fc 100644 --- a/src/opengl/qgl_symbian.cpp +++ b/src/opengl/qgl_symbian.cpp @@ -259,7 +259,7 @@ bool QGLContext::chooseContext(const QGLContext* shareContext) // almost same as return true; } -void QGLWidget::resizeEvent(QResizeEvent *) +void QGLWidget::resizeEvent(QResizeEvent *e) { Q_D(QGLWidget); if (!isValid()) @@ -270,17 +270,18 @@ void QGLWidget::resizeEvent(QResizeEvent *) if (this == qt_gl_share_widget()) return; - if (QGLContext::currentContext()) - doneCurrent(); - - // Symbian needs to recreate the surface on resize. - d->recreateEglSurface(); + if (!d->surfaceSizeInitialized || e->oldSize() != e->size()) { + // On Symbian we need to recreate the surface on resize. + d->recreateEglSurface(); + d->surfaceSizeInitialized = true; + } makeCurrent(); + if (!d->glcx->initialized()) glInit(); + resizeGL(width(), height()); - //handle overlay } const QGLContext* QGLWidget::overlayContext() const @@ -363,6 +364,9 @@ void QGLWidgetPrivate::recreateEglSurface() WId currentId = q->winId(); if (glcx->d_func()->eglSurface != EGL_NO_SURFACE) { + if (glcx == QGLContext::currentContext()) + glcx->doneCurrent(); + eglDestroySurface(glcx->d_func()->eglContext->display(), glcx->d_func()->eglSurface); } -- cgit v0.12 From 20b00a46fefcbfd75c6c8d758a42ad0d31ae9a84 Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Tue, 18 Oct 2011 14:32:43 +0200 Subject: Fix the build for makefile build system of Symbian All includes for private headers should have private directory info. Reviewed-by: Shane Kearns --- src/gui/widgets/qlabel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/widgets/qlabel.cpp b/src/gui/widgets/qlabel.cpp index c0be3e1..2b6eeb7 100644 --- a/src/gui/widgets/qlabel.cpp +++ b/src/gui/widgets/qlabel.cpp @@ -60,7 +60,7 @@ #endif #ifdef Q_OS_SYMBIAN -#include "qt_s60_p.h" +#include "private/qt_s60_p.h" #endif QT_BEGIN_NAMESPACE -- cgit v0.12 From b7179d6f284e277b84c54226be05832a25576387 Mon Sep 17 00:00:00 2001 From: mread Date: Tue, 18 Oct 2011 13:45:28 +0100 Subject: Fixed access to null threadData in ~QObjectPrivate If a class derived from QObjectPrivate throws an exception in its constructor, ~QObjectPrivate will be invoked with threadData being null. This change tests for null before accessing threadData. Task-number: QTBUG-4871 incidental finding Reviewed-by: Shane Kearns --- src/corelib/kernel/qobject.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index 5d6e4d7..1f716bc 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -163,14 +163,15 @@ QObjectPrivate::~QObjectPrivate() { if (pendTimer) { // unregister pending timers - if (threadData->eventDispatcher) + if (threadData && threadData->eventDispatcher) threadData->eventDispatcher->unregisterTimers(q_ptr); } if (postedEvents) QCoreApplication::removePostedEvents(q_ptr, 0); - threadData->deref(); + if (threadData) + threadData->deref(); delete static_cast(metaObject); #ifdef QT_JAMBI_BUILD -- cgit v0.12 From c838a413ee15b5ee872769f914f76ed3925b2201 Mon Sep 17 00:00:00 2001 From: mread Date: Tue, 18 Oct 2011 13:51:56 +0100 Subject: Catch potential throw in ~QSymbianControl The call to topData() in ~QSymbianControl can create the required object if it does not already exist. This can then throw an exception if it fails, which is not allowed to escape the destructor. So it is caught and ignored. Task-number: QTBUG-4871 incidental finding Reviewed-by: Shane Kearns --- src/gui/kernel/qapplication_s60.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 7d198ce..f1221eb 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -584,7 +584,11 @@ QSymbianControl::~QSymbianControl() { // Ensure backing store is deleted before the top-level // window is destroyed - qt_widget_private(qwidget)->topData()->backingStore.destroy(); + QT_TRY { + qt_widget_private(qwidget)->topData()->backingStore.destroy(); + } QT_CATCH(const std::exception&) { + // ignore exceptions, nothing can be done + } if (S60->curWin == this) S60->curWin = 0; -- cgit v0.12 From c9ae5814eb40acdb683004277573a09c6b78aba9 Mon Sep 17 00:00:00 2001 From: mread Date: Tue, 18 Oct 2011 13:59:51 +0100 Subject: QS60StyleAnimation exception safety QS60StyleAnimation had a number of exception safety problems. - Exceptions from QS60StyleAnimation/V2 could panic a TRAP harness. - Pointers could be uninitialised on exception in constructor. Problems solved by switching to QScopedPointer and simplifying the code. Task-number: QTBUG-4871 incidental finding Reviewed-by: Sami Merila --- src/gui/styles/qs60style_p.h | 4 ++-- src/gui/styles/qs60style_s60.cpp | 10 +++------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/gui/styles/qs60style_p.h b/src/gui/styles/qs60style_p.h index 2fa8c7f..ad55761 100644 --- a/src/gui/styles/qs60style_p.h +++ b/src/gui/styles/qs60style_p.h @@ -473,8 +473,8 @@ public: private: //data members //TODO: consider changing these to non-pointers as the classes are rather small anyway - AnimationData *m_defaultData; - AnimationDataV2 *m_currentData; + QScopedPointer m_defaultData; + QScopedPointer m_currentData; }; #endif //Q_WS_S60 diff --git a/src/gui/styles/qs60style_s60.cpp b/src/gui/styles/qs60style_s60.cpp index cfb10fa..eb59115 100644 --- a/src/gui/styles/qs60style_s60.cpp +++ b/src/gui/styles/qs60style_s60.cpp @@ -132,14 +132,12 @@ AnimationDataV2::~AnimationDataV2() QS60StyleAnimation::QS60StyleAnimation(const QS60StyleEnums::SkinParts part, int frames, int interval) { - QT_TRAP_THROWING(m_defaultData = new (ELeave) AnimationData(part, frames, interval)); - QT_TRAP_THROWING(m_currentData = new (ELeave) AnimationDataV2(*m_defaultData)); + m_defaultData.reset(new AnimationData(part, frames, interval)); + m_currentData.reset(new AnimationDataV2(*m_defaultData)); } QS60StyleAnimation::~QS60StyleAnimation() { - delete m_currentData; - delete m_defaultData; } void QS60StyleAnimation::setAnimationObject(CAknBitmapAnimation* animation) @@ -152,9 +150,7 @@ void QS60StyleAnimation::setAnimationObject(CAknBitmapAnimation* animation) void QS60StyleAnimation::resetToDefaults() { - delete m_currentData; - m_currentData = 0; - QT_TRAP_THROWING(m_currentData = new (ELeave) AnimationDataV2(*m_defaultData)); + m_currentData.reset(new AnimationDataV2(*m_defaultData)); } class QS60StyleModeSpecifics -- cgit v0.12 From 72bf6105214bfc26cff33632f7f4bdeed9cdf362 Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Tue, 18 Oct 2011 16:18:06 +0100 Subject: FTP - fix interoperability issues with SIZE command Certain FTP servers refuse the SIZE command in ASCII mode (proftpd) or refuse the SIZE command in ASCII mode for large files. This is a security feature, as the SIZE command requires reading the whole file and counting line ends which can cause denial of services. In binary mode, the file size on disc is reported, which is a relatively quick operation. Qt had two problems here: 1. when size command fails, the total size was reported as -1, whereas the documentation of QFtp::dataTransferProgress states it should be reported as 0 (so that QProgressDialog can display a wait note rather than progress bar) 2. SIZE command was sent before setting the type of the transfer to ASCII / Binary. This is a problem as the size reported by the server is incorrect. Also it usually means sending ASCII SIZE for Binary transfers, which results in the 550 error on FTP servers with DOS protection. Task-Number: QTTH-1428 Reviewed-By: Peter Hartmann --- src/network/access/qftp.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/network/access/qftp.cpp b/src/network/access/qftp.cpp index 50a3b1e..eccfea6 100644 --- a/src/network/access/qftp.cpp +++ b/src/network/access/qftp.cpp @@ -1851,11 +1851,11 @@ int QFtp::cd(const QString &dir) int QFtp::get(const QString &file, QIODevice *dev, TransferType type) { QStringList cmds; - cmds << QLatin1String("SIZE ") + file + QLatin1String("\r\n"); if (type == Binary) cmds << QLatin1String("TYPE I\r\n"); else cmds << QLatin1String("TYPE A\r\n"); + cmds << QLatin1String("SIZE ") + file + QLatin1String("\r\n"); cmds << QLatin1String(d_func()->transferMode == Passive ? "PASV\r\n" : "PORT\r\n"); cmds << QLatin1String("RETR ") + file + QLatin1String("\r\n"); return d_func()->addCommand(new QFtpCommand(Get, cmds, dev)); @@ -2336,7 +2336,7 @@ void QFtpPrivate::_q_piError(int errorCode, const QString &text) // non-fatal errors if (c->command == QFtp::Get && pi.currentCommand().startsWith(QLatin1String("SIZE "))) { - pi.dtp.setBytesTotal(-1); + pi.dtp.setBytesTotal(0); return; } else if (c->command==QFtp::Put && pi.currentCommand().startsWith(QLatin1String("ALLO "))) { return; -- cgit v0.12 From f90c18e09e8b2e275230080cb51656e3f8a31fba Mon Sep 17 00:00:00 2001 From: Jerome Pasion Date: Wed, 19 Oct 2011 10:43:24 +0200 Subject: Doc: adding link to the Qt Quick Components for Symbian page. Reviewed-by: Geir Vattekar --- doc/src/declarative/declarativeui.qdoc | 1 + doc/src/mainpage.qdoc | 1 + doc/src/platforms/supported-platforms.qdoc | 5 +++++ doc/src/qt-webpages.qdoc | 5 +++++ 4 files changed, 12 insertions(+) diff --git a/doc/src/declarative/declarativeui.qdoc b/doc/src/declarative/declarativeui.qdoc index cecccf6..4201cf1 100644 --- a/doc/src/declarative/declarativeui.qdoc +++ b/doc/src/declarative/declarativeui.qdoc @@ -82,6 +82,7 @@ Qt applications. \section1 QML Add-Ons \list +\o \l{Qt Quick Components for Symbian 1.1}{Qt Quick Components for Symbian} - a native component set for the Symbian^3 platform \o \l{QtWebKit QML Module} \o \l{http://doc.qt.nokia.com/qtmobility-1.1.0/qml-plugins.html}{Mobility QML Plugins} \endlist diff --git a/doc/src/mainpage.qdoc b/doc/src/mainpage.qdoc index 41818ee..154d14c 100644 --- a/doc/src/mainpage.qdoc +++ b/doc/src/mainpage.qdoc @@ -110,6 +110,7 @@ applications using layouts and Qt Quick interfaces with QML. \o \l{Qt Quick} - create UIs using QML \list \o \l{external: Developing Qt Quick Applications}{Creator's QML Design Mode} - design Qt Quick interfaces using Creator's design mode + \o \l{Qt Quick Components for Symbian 1.1}{Qt Quick Components for Symbian} - a native QML component set for the Symbian^3 platform \endlist \o \l{Widgets and Layouts} - primary elements for C++ based interfaces \list diff --git a/doc/src/platforms/supported-platforms.qdoc b/doc/src/platforms/supported-platforms.qdoc index ba59c37..92bf12d 100644 --- a/doc/src/platforms/supported-platforms.qdoc +++ b/doc/src/platforms/supported-platforms.qdoc @@ -465,6 +465,8 @@ \o \l{Platform and Compiler Notes - Symbian}{Platform Notes - Symbian} - Platform specific notes. \o \l{Getting Started Guides}{Getting started} + \o \l{Qt Quick Components for Symbian 1.1}{Qt Quick Components for Symbian} + - provides a QML component set for the Symbian^3 platform \endlist \section1 Key Features for Symbian Development @@ -481,6 +483,9 @@ time and lines of code required for traditional UI styling with Qt Style Sheets. + The \l{Qt Quick Components for Symbian 1.1}{Qt Quick Components for Symbian 1.1} + provides a native QML component set. + \section2 Graphics Features Qt for Symbian contains a powerful paint engine that provides diff --git a/doc/src/qt-webpages.qdoc b/doc/src/qt-webpages.qdoc index f67ff83..c4d400d 100644 --- a/doc/src/qt-webpages.qdoc +++ b/doc/src/qt-webpages.qdoc @@ -554,3 +554,8 @@ \externalpage http://labs.qt.nokia.com/2011/05/03/qt-modules-maturity-level/ \title Qt Modules' Maturity Level - Description */ + +/*! + \externalpage http://doc.qt.nokia.com/qtquick-components-symbian-1.1/index.html + \title Qt Quick Components for Symbian 1.1 +*/ \ No newline at end of file -- cgit v0.12 From 20542f9546637bd649c928226249be0ffc91841b Mon Sep 17 00:00:00 2001 From: Jani Hautakangas Date: Wed, 19 Oct 2011 09:39:22 +0300 Subject: Workaround to VideoCore III scissor bug. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some versions of VideoCore III drivers seem to pollute and use stencil buffer when using glScissors. Workaround is to clear stencil buffer before disabling scissoring. Task-number: QT-5308 Reviewed-by: Samuel Rødal --- src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp | 2 ++ src/opengl/qgl.cpp | 2 ++ src/opengl/qgl_egl.cpp | 11 ++++++++++- src/opengl/qgl_p.h | 2 ++ 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index 047d589..999a074 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -2059,6 +2059,8 @@ void QGL2PaintEngineExPrivate::updateClipScissorTest() currentScissorBounds = bounds; if (bounds == QRect(0, 0, width, height)) { + if (ctx->d_func()->workaround_brokenScissor) + clearClip(0); glDisable(GL_SCISSOR_TEST); } else { glEnable(GL_SCISSOR_TEST); diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index 3b3da43..af160d8 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -1716,6 +1716,8 @@ void QGLContextPrivate::init(QPaintDevice *dev, const QGLFormat &format) workaround_brokenTextureFromPixmap = false; workaround_brokenTextureFromPixmap_init = false; + workaround_brokenScissor = false; + for (int i = 0; i < QT_GL_VERTEX_ARRAY_TRACKED_COUNT; ++i) vertexAttributeArraysEnabledState[i] = false; } diff --git a/src/opengl/qgl_egl.cpp b/src/opengl/qgl_egl.cpp index a589118..07134cf 100644 --- a/src/opengl/qgl_egl.cpp +++ b/src/opengl/qgl_egl.cpp @@ -192,7 +192,9 @@ void QGLContext::makeCurrent() if (!d->workaroundsCached) { d->workaroundsCached = true; const char *renderer = reinterpret_cast(glGetString(GL_RENDERER)); - if (renderer && (strstr(renderer, "SGX") || strstr(renderer, "MBX"))) { + if (!renderer) + return; + if ((strstr(renderer, "SGX") || strstr(renderer, "MBX"))) { // PowerVR MBX/SGX chips needs to clear all buffers when starting to render // a new frame, otherwise there will be a performance penalty to pay for // each frame. @@ -229,6 +231,13 @@ void QGLContext::makeCurrent() d->workaround_brokenFBOReadBack = true; } } + } else if (strstr(renderer, "VideoCore III")) { + // Some versions of VideoCore III drivers seem to pollute and use + // stencil buffer when using glScissors even if stencil test is disabled. + // Workaround is to clear stencil buffer before disabling scissoring. + + // qDebug() << "Found VideoCore III driver, enabling brokenDisableScissorTest"; + d->workaround_brokenScissor = true; } } } diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h index c56b2db..d76f0b0 100644 --- a/src/opengl/qgl_p.h +++ b/src/opengl/qgl_p.h @@ -415,6 +415,8 @@ public: uint workaround_brokenTextureFromPixmap : 1; uint workaround_brokenTextureFromPixmap_init : 1; + uint workaround_brokenScissor : 1; + QPaintDevice *paintDevice; QColor transpColor; QGLContext *q_ptr; -- cgit v0.12 From 29495592d27505feff024d574e1333809794c304 Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Wed, 19 Oct 2011 11:07:40 +0100 Subject: Use QBasicAtomicInt as a static variable QAtomicInt has a constructor, so QBasicAtomicInt needs to be used instead to allow compile time initialisation. Task-Number: QTBUG-20343 Reviewed-By: Olivier Goffart --- src/network/access/qnetworkaccessbackend.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/network/access/qnetworkaccessbackend.cpp b/src/network/access/qnetworkaccessbackend.cpp index 88c45d1..1dc1268 100644 --- a/src/network/access/qnetworkaccessbackend.cpp +++ b/src/network/access/qnetworkaccessbackend.cpp @@ -72,10 +72,10 @@ public: QMutex mutex; //this is used to avoid (re)constructing factory data from destructors of other global classes - static QAtomicInt valid; + static QBasicAtomicInt valid; }; Q_GLOBAL_STATIC(QNetworkAccessBackendFactoryData, factoryData) -QAtomicInt QNetworkAccessBackendFactoryData::valid; +QBasicAtomicInt QNetworkAccessBackendFactoryData::valid = Q_BASIC_ATOMIC_INITIALIZER(0); QNetworkAccessBackendFactory::QNetworkAccessBackendFactory() { -- cgit v0.12 From 55c2ea18c522bd8700f43884124e02b460cdb5e2 Mon Sep 17 00:00:00 2001 From: aavit Date: Wed, 19 Oct 2011 14:02:24 +0200 Subject: Fixes: the png_handle_cHRM crash bug in bundled libpng 1.5.4 The PNG Development Group explains that libpng 1.5.4 (only) introduced a divide-by-zero bug in png_handle_cHRM(), which could lead to crashes (denial of service) for certain malformed PNGs. Ref. http://www.libpng.org/pub/png/libpng.html Task-number: QTBUG-22168 --- src/3rdparty/libpng/pngrutil.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/3rdparty/libpng/pngrutil.c b/src/3rdparty/libpng/pngrutil.c index 07e46e2..daf3c5e 100644 --- a/src/3rdparty/libpng/pngrutil.c +++ b/src/3rdparty/libpng/pngrutil.c @@ -1037,12 +1037,14 @@ png_handle_cHRM(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) */ png_uint_32 w = y_red + y_green + y_blue; - png_ptr->rgb_to_gray_red_coeff = (png_uint_16)(((png_uint_32)y_red * - 32768)/w); - png_ptr->rgb_to_gray_green_coeff = (png_uint_16)(((png_uint_32)y_green - * 32768)/w); - png_ptr->rgb_to_gray_blue_coeff = (png_uint_16)(((png_uint_32)y_blue * - 32768)/w); + if (w != 0) { + png_ptr->rgb_to_gray_red_coeff = (png_uint_16)(((png_uint_32)y_red * + 32768)/w); + png_ptr->rgb_to_gray_green_coeff = (png_uint_16)(((png_uint_32)y_green + * 32768)/w); + png_ptr->rgb_to_gray_blue_coeff = (png_uint_16)(((png_uint_32)y_blue * + 32768)/w); + } } } #endif -- cgit v0.12 From 104c22a68c422152ff3cf03eb3615e7826fefbd0 Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Wed, 19 Oct 2011 14:00:28 +0100 Subject: Fix FTP example to handle failure to open network session The example code only dealt with successful opening of the session. If the session open failed, the application is stuck because the connect button is disabled. Moved the session open to be part of connection. Handled session open failure by puttin the UI back in the default state where connection button is enabled. Task-Number: QTBUG-9909 Reviewed-By: Miikka Heikkinen --- examples/network/qftp/ftpwindow.cpp | 56 +++++++++++++++++++++---------------- examples/network/qftp/ftpwindow.h | 3 ++ 2 files changed, 35 insertions(+), 24 deletions(-) diff --git a/examples/network/qftp/ftpwindow.cpp b/examples/network/qftp/ftpwindow.cpp index c0a2b73..fcdabe6 100644 --- a/examples/network/qftp/ftpwindow.cpp +++ b/examples/network/qftp/ftpwindow.cpp @@ -114,29 +114,6 @@ FtpWindow::FtpWindow(QWidget *parent) mainLayout->addWidget(buttonBox); setLayout(mainLayout); - QNetworkConfigurationManager manager; - if (manager.capabilities() & QNetworkConfigurationManager::NetworkSessionRequired) { - // Get saved network configuration - QSettings settings(QSettings::UserScope, QLatin1String("Trolltech")); - settings.beginGroup(QLatin1String("QtNetwork")); - const QString id = settings.value(QLatin1String("DefaultNetworkConfiguration")).toString(); - settings.endGroup(); - - // If the saved network configuration is not currently discovered use the system default - QNetworkConfiguration config = manager.configurationFromIdentifier(id); - if ((config.state() & QNetworkConfiguration::Discovered) != - QNetworkConfiguration::Discovered) { - config = manager.defaultConfiguration(); - } - - networkSession = new QNetworkSession(config, this); - connect(networkSession, SIGNAL(opened()), this, SLOT(enableConnectButton())); - - connectButton->setEnabled(false); - statusLabel->setText(tr("Opening network session.")); - networkSession->open(); - } - setWindowTitle(tr("FTP")); } @@ -169,6 +146,37 @@ void FtpWindow::connectOrDisconnect() setCursor(Qt::WaitCursor); #endif + if (!networkSession || !networkSession->isOpen()) { + if (manager.capabilities() & QNetworkConfigurationManager::NetworkSessionRequired) { + if (!networkSession) { + // Get saved network configuration + QSettings settings(QSettings::UserScope, QLatin1String("Trolltech")); + settings.beginGroup(QLatin1String("QtNetwork")); + const QString id = settings.value(QLatin1String("DefaultNetworkConfiguration")).toString(); + settings.endGroup(); + + // If the saved network configuration is not currently discovered use the system default + QNetworkConfiguration config = manager.configurationFromIdentifier(id); + if ((config.state() & QNetworkConfiguration::Discovered) != + QNetworkConfiguration::Discovered) { + config = manager.defaultConfiguration(); + } + + networkSession = new QNetworkSession(config, this); + connect(networkSession, SIGNAL(opened()), this, SLOT(connectToFtp())); + connect(networkSession, SIGNAL(error(QNetworkSession::SessionError)), this, SLOT(enableConnectButton())); + } + connectButton->setEnabled(false); + statusLabel->setText(tr("Opening network session.")); + networkSession->open(); + return; + } + } + connectToFtp(); +} + +void FtpWindow::connectToFtp() +{ //![1] ftp = new QFtp(this); connect(ftp, SIGNAL(commandFinished(int,bool)), @@ -407,7 +415,7 @@ void FtpWindow::enableConnectButton() settings.setValue(QLatin1String("DefaultNetworkConfiguration"), id); settings.endGroup(); - connectButton->setEnabled(networkSession->isOpen()); + connectButton->setEnabled(true); statusLabel->setText(tr("Please enter the name of an FTP server.")); } diff --git a/examples/network/qftp/ftpwindow.h b/examples/network/qftp/ftpwindow.h index a9df99d..f060bfc 100644 --- a/examples/network/qftp/ftpwindow.h +++ b/examples/network/qftp/ftpwindow.h @@ -43,6 +43,7 @@ #include #include +#include QT_BEGIN_NAMESPACE class QDialogButtonBox; @@ -71,6 +72,7 @@ private slots: void connectOrDisconnect(); void downloadFile(); void cancelDownload(); + void connectToFtp(); void ftpCommandFinished(int commandId, bool error); void addToList(const QUrlInfo &urlInfo); @@ -101,6 +103,7 @@ private: QFile *file; QNetworkSession *networkSession; + QNetworkConfigurationManager manager; //![1] }; -- cgit v0.12 From fc050e950734eaaf268c99f50310b8ec2312e089 Mon Sep 17 00:00:00 2001 From: Pasi Pentikainen Date: Wed, 19 Oct 2011 19:14:28 +0300 Subject: Symbian Linuxification building case changes Changes the libraries to match the case of files for building Symbian in linux. Reviewed-by: Miikka Heikkinen --- src/gui/dialogs/dialogs.pri | 6 +----- src/gui/styles/styles.pri | 6 +----- src/gui/util/util.pri | 6 +----- src/plugins/bearer/symbian/symbian.pri | 6 +----- src/plugins/phonon/mmf/mmf.pro | 12 ++---------- 5 files changed, 6 insertions(+), 30 deletions(-) diff --git a/src/gui/dialogs/dialogs.pri b/src/gui/dialogs/dialogs.pri index 1dddb44..fc1ea9e 100644 --- a/src/gui/dialogs/dialogs.pri +++ b/src/gui/dialogs/dialogs.pri @@ -109,11 +109,7 @@ SOURCES += \ dialogs/qprintpreviewdialog.cpp symbian:contains(QT_CONFIG, s60) { - contains(CONFIG, is_using_gnupoc) { - LIBS += -lcommondialogs - } else { - LIBS += -lCommonDialogs - } + LIBS += -lcommondialogs SOURCES += dialogs/qfiledialog_symbian.cpp \ dialogs/qcolordialog_symbian.cpp } diff --git a/src/gui/styles/styles.pri b/src/gui/styles/styles.pri index b6eeec9..45ed8eb 100644 --- a/src/gui/styles/styles.pri +++ b/src/gui/styles/styles.pri @@ -172,11 +172,7 @@ contains( styles, s60 ):contains(QT_CONFIG, s60) { symbian { SOURCES += styles/qs60style_s60.cpp LIBS += -legul -lbmpanim - contains(CONFIG, is_using_gnupoc) { - LIBS += -laknicon -laknskins -laknskinsrv -lfontutils - } else { - LIBS += -lAknIcon -lAKNSKINS -lAKNSKINSRV -lFontUtils - } + LIBS += -laknicon -laknskins -laknskinsrv -lfontutils } else { SOURCES += styles/qs60style_simulated.cpp RESOURCES += styles/qstyle_s60_simulated.qrc diff --git a/src/gui/util/util.pri b/src/gui/util/util.pri index 7395604..7cf1a55 100644 --- a/src/gui/util/util.pri +++ b/src/gui/util/util.pri @@ -57,9 +57,5 @@ symbian { DEFINES += USE_SCHEMEHANDLER } - contains(CONFIG, is_using_gnupoc) { - LIBS += -ldirectorylocalizer - } else { - LIBS += -lDirectoryLocalizer - } + LIBS += -ldirectorylocalizer } diff --git a/src/plugins/bearer/symbian/symbian.pri b/src/plugins/bearer/symbian/symbian.pri index 8d92f57..74dc4ee 100644 --- a/src/plugins/bearer/symbian/symbian.pri +++ b/src/plugins/bearer/symbian/symbian.pri @@ -21,11 +21,7 @@ LIBS += -lcommdb \ -lefsrv \ -lnetmeta -is_using_gnupoc { - LIBS += -lconnmon -} else { - LIBS += -lConnMon -} +LIBS += -lconnmon QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/bearer target.path += $$[QT_INSTALL_PLUGINS]/bearer diff --git a/src/plugins/phonon/mmf/mmf.pro b/src/plugins/phonon/mmf/mmf.pro index a84c5ac..5144f35 100644 --- a/src/plugins/phonon/mmf/mmf.pro +++ b/src/plugins/phonon/mmf/mmf.pro @@ -103,11 +103,7 @@ symbian { exists($${EPOCROOT}epoc32/include/mw/downloadmgrclient.h) { HEADERS += $$PHONON_MMF_DIR/download.h SOURCES += $$PHONON_MMF_DIR/download.cpp - contains(CONFIG, is_using_gnupoc) { - LIBS += -ldownloadmgr - } else { - LIBS += -lDownloadMgr - } + LIBS += -ldownloadmgr DEFINES += PHONON_MMF_PROGRESSIVE_DOWNLOAD } } @@ -129,11 +125,7 @@ symbian { LIBS += -lmediaclientaudiostream # For CMdaAudioOutputStream # These are for effects. - is_using_gnupoc { - LIBS += -laudioequalizereffect -lbassboosteffect -ldistanceattenuationeffect -ldopplerbase -leffectbase -lenvironmentalreverbeffect -llistenerdopplereffect -llistenerlocationeffect -llistenerorientationeffect -llocationbase -lloudnesseffect -lorientationbase -lsourcedopplereffect -lsourcelocationeffect -lsourceorientationeffect -lstereowideningeffect - } else { - LIBS += -lAudioEqualizerEffect -lBassBoostEffect -lDistanceAttenuationEffect -lDopplerbase -lEffectBase -lEnvironmentalReverbEffect -lListenerDopplerEffect -lListenerLocationEffect -lListenerOrientationEffect -lLocationBase -lLoudnessEffect -lOrientationBase -lSourceDopplerEffect -lSourceLocationEffect -lSourceOrientationEffect -lStereoWideningEffect - } + LIBS += -laudioequalizereffect -lbassboosteffect -ldistanceattenuationeffect -ldopplerbase -leffectbase -lenvironmentalreverbeffect -llistenerdopplereffect -llistenerlocationeffect -llistenerorientationeffect -llocationbase -lloudnesseffect -lorientationbase -lsourcedopplereffect -lsourcelocationeffect -lsourceorientationeffect -lstereowideningeffect # This is to allow IAP to be specified LIBS += -lcommdb -- cgit v0.12 From 2be143ebb5246bb2f9b674bb09d23df5b2b6c504 Mon Sep 17 00:00:00 2001 From: Sami Merila Date: Thu, 20 Oct 2011 16:46:12 +0300 Subject: Accepting predicted text using hardware keyboard replaces unwanted part Current implementation of Symbian input context assumes that predicted word replacement happens so that the original typed text is at the end of the surrounded text. The logic fails, if to-be-predicted text is in the middle of, or in the beginning of another, already accepted word. As a fix, input context need to store the original cursor position, when reset() was called (this happens when word selection list appears). Input context is already storing a copy of a preedit string in this situation. Then, when word replacement happens, this stored cursor position is used instead of current cursor position (the native side might temporarily move the cursor to the end when word selection list opens or closes) to replace the typed word with one selected from suggested word list. Stored cursor position is dismissed immediately after used, or if cached preedit string is dismissed. Task-number: QTBUG-22147 Reviewed-by: Miikka Heikkinen --- src/gui/inputmethod/qcoefepinputcontext_p.h | 1 + src/gui/inputmethod/qcoefepinputcontext_s60.cpp | 37 +++++++++++++++++++++++-- 2 files changed, 35 insertions(+), 3 deletions(-) diff --git a/src/gui/inputmethod/qcoefepinputcontext_p.h b/src/gui/inputmethod/qcoefepinputcontext_p.h index 8c30838..cefae5e 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_p.h +++ b/src/gui/inputmethod/qcoefepinputcontext_p.h @@ -162,6 +162,7 @@ private: QBasicTimer m_tempPreeditStringTimeout; bool m_hasTempPreeditString; QString m_cachedPreeditString; + int m_cachedCursorAndAnchorPosition; int m_splitViewResizeBy; Qt::WindowStates m_splitViewPreviousWindowStates; diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp index 79005ce..66ab4c8 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp +++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp @@ -115,6 +115,7 @@ QCoeFepInputContext::QCoeFepInputContext(QObject *parent) m_formatRetriever(0), m_pointerHandler(0), m_hasTempPreeditString(false), + m_cachedCursorAndAnchorPosition(-1), m_splitViewResizeBy(0), m_splitViewPreviousWindowStates(Qt::WindowNoState) { @@ -158,9 +159,18 @@ void QCoeFepInputContext::reset() } // Store a copy of preedit text, if prediction is active and input context is reseted. // This is to ensure that we can replace preedit string after losing focus to FEP manager's - // internal sub-windows. - if (m_cachedPreeditString.isEmpty() && !(currentHints & Qt::ImhNoPredictiveText)) + // internal sub-windows. Additionally, store the cursor position if there is no selected text. + // This allows input context to replace preedit strings if they are not at the end of current + // text. + if (m_cachedPreeditString.isEmpty() && !(currentHints & Qt::ImhNoPredictiveText)) { m_cachedPreeditString = m_preeditString; + if (focusWidget()) { + int cursor = focusWidget()->inputMethodQuery(Qt::ImCursorPosition).toInt(); + int anchor = focusWidget()->inputMethodQuery(Qt::ImAnchorPosition).toInt(); + if (cursor == anchor) + m_cachedCursorAndAnchorPosition = cursor; + } + } commitCurrentString(true); } @@ -196,6 +206,7 @@ void QCoeFepInputContext::setFocusWidget(QWidget *w) void QCoeFepInputContext::widgetDestroyed(QWidget *w) { m_cachedPreeditString.clear(); + m_cachedCursorAndAnchorPosition = -1; // Make sure that the input capabilities of whatever new widget got focused are queried. CCoeControl *ctrl = w->effectiveWinId(); @@ -981,6 +992,7 @@ void QCoeFepInputContext::StartFepInlineEditL(const TDesC& aInitialInlineText, return; m_cachedPreeditString.clear(); + m_cachedCursorAndAnchorPosition = -1; commitTemporaryPreeditString(); @@ -1039,8 +1051,16 @@ void QCoeFepInputContext::UpdateFepInlineTextL(const TDesC& aNewInlineText, QString newPreeditString = qt_TDesC2QString(aNewInlineText); QInputMethodEvent event(newPreeditString, attributes); if (!m_cachedPreeditString.isEmpty()) { - event.setCommitString(QLatin1String(""), -m_cachedPreeditString.length(), m_cachedPreeditString.length()); + int cursorPos = w->inputMethodQuery(Qt::ImCursorPosition).toInt(); + // Predicted word is either replaced from the end of the word (normal case), + // or from stored location, if the predicted word is either in the beginning of, + // or in the middle of already committed word. + int diff = cursorPos - m_cachedCursorAndAnchorPosition; + int replaceLocation = (diff != m_cachedPreeditString.length()) ? diff : m_cachedPreeditString.length(); + + event.setCommitString(QLatin1String(""), -replaceLocation, m_cachedPreeditString.length()); m_cachedPreeditString.clear(); + m_cachedCursorAndAnchorPosition = -1; } else if (newPreeditString.isEmpty() && m_preeditString.isEmpty()) { // In Symbian world this means "erase last character". event.setCommitString(QLatin1String(""), -1, 1); @@ -1138,6 +1158,10 @@ void QCoeFepInputContext::SetCursorSelectionForFepL(const TCursorSelection& aCur int pos = aCursorSelection.iAnchorPos; int length = aCursorSelection.iCursorPos - pos; + if (m_cachedCursorAndAnchorPosition != -1) { + pos = m_cachedCursorAndAnchorPosition; + length = 0; + } QList attributes; attributes << QInputMethodEvent::Attribute(QInputMethodEvent::Selection, pos, length, QVariant()); @@ -1155,6 +1179,13 @@ void QCoeFepInputContext::GetCursorSelectionForFep(TCursorSelection& aCursorSele int cursor = w->inputMethodQuery(Qt::ImCursorPosition).toInt() + m_preeditString.size(); int anchor = w->inputMethodQuery(Qt::ImAnchorPosition).toInt() + m_preeditString.size(); + + // If the position is stored, use that value, so that word replacement from proposed word + // lists are added to the correct position. + if (m_cachedCursorAndAnchorPosition != -1) { + cursor = m_cachedCursorAndAnchorPosition; + anchor = m_cachedCursorAndAnchorPosition; + } QString text = w->inputMethodQuery(Qt::ImSurroundingText).value(); int combinedSize = text.size() + m_preeditString.size(); if (combinedSize < anchor || combinedSize < cursor) { -- cgit v0.12 From 67dd642ca7cd7f61ba5de83218a3933ffe12f10e Mon Sep 17 00:00:00 2001 From: Jerome Pasion Date: Wed, 19 Oct 2011 10:43:24 +0200 Subject: Doc: adding link to the Qt Quick Components for Symbian page. Reviewed-by: Geir Vattekar --- doc/src/declarative/declarativeui.qdoc | 1 + doc/src/mainpage.qdoc | 1 + doc/src/platforms/supported-platforms.qdoc | 5 ++ doc/src/qt-webpages.qdoc | 118 +++++++++++++++++++++++++++++ 4 files changed, 125 insertions(+) diff --git a/doc/src/declarative/declarativeui.qdoc b/doc/src/declarative/declarativeui.qdoc index d1d82d8..bddd05b 100644 --- a/doc/src/declarative/declarativeui.qdoc +++ b/doc/src/declarative/declarativeui.qdoc @@ -82,6 +82,7 @@ Qt applications. \section1 QML Add-Ons \list +\o \l{Qt Quick Components for Symbian}{Qt Quick Components for Symbian} - a native component set for the Symbian^3 platform \o \l{QtWebKit QML Module} \o \l{http://doc.qt.nokia.com/qtmobility-1.1.0/qml-plugins.html}{Mobility QML Plugins} \endlist diff --git a/doc/src/mainpage.qdoc b/doc/src/mainpage.qdoc index 41818ee..6865f10 100644 --- a/doc/src/mainpage.qdoc +++ b/doc/src/mainpage.qdoc @@ -110,6 +110,7 @@ applications using layouts and Qt Quick interfaces with QML. \o \l{Qt Quick} - create UIs using QML \list \o \l{external: Developing Qt Quick Applications}{Creator's QML Design Mode} - design Qt Quick interfaces using Creator's design mode + \o \l{Qt Quick Components for Symbian}{Qt Quick Components for Symbian} - a native QML component set for the Symbian^3 platform \endlist \o \l{Widgets and Layouts} - primary elements for C++ based interfaces \list diff --git a/doc/src/platforms/supported-platforms.qdoc b/doc/src/platforms/supported-platforms.qdoc index ba59c37..eee6555 100644 --- a/doc/src/platforms/supported-platforms.qdoc +++ b/doc/src/platforms/supported-platforms.qdoc @@ -465,6 +465,8 @@ \o \l{Platform and Compiler Notes - Symbian}{Platform Notes - Symbian} - Platform specific notes. \o \l{Getting Started Guides}{Getting started} + \o \l{Qt Quick Components for Symbian}{Qt Quick Components for Symbian} + - provides a QML component set for the Symbian^3 platform \endlist \section1 Key Features for Symbian Development @@ -481,6 +483,9 @@ time and lines of code required for traditional UI styling with Qt Style Sheets. + The \l{Qt Quick Components for Symbian}{Qt Quick Components for Symbian} + provides a native QML component set. + \section2 Graphics Features Qt for Symbian contains a powerful paint engine that provides diff --git a/doc/src/qt-webpages.qdoc b/doc/src/qt-webpages.qdoc index 742de73..16bc665 100644 --- a/doc/src/qt-webpages.qdoc +++ b/doc/src/qt-webpages.qdoc @@ -318,3 +318,121 @@ \title Qt Developer Days 2010 */ +/*! + \externalpage http://developer.qt.nokia.com/elearning/watch/qt_essentials_widget_edition_fundamentals_of_qt_part_2_hello_world_in_qtcre + \title Qt Essentials - Fundamentals of Qt part 1 +*/ +/*! + \externalpage http://developer.qt.nokia.com/elearning/watch/qt_essentials_widget_edition_fundamentals_of_qt_part_1_your_first_qt_applic + \title Qt Essentials - Fundamentals of Qt part 2 +*/ +/*! + \externalpage http://developer.qt.nokia.com/elearning/watch/qt_essentials_widget_edition_application_creation_part_1_mainwindows + \title Qt Essentials - Application Creation part 1 +*/ +/*! + \externalpage http://developer.qt.nokia.com/elearning/watch/application_creation_part_2_settings_resources_and_application_deployment + \title Qt Essentials - Application Creation part 2 +*/ +/*! + \externalpage http://developer.qt.nokia.com/elearning/watch/application_creation_part_3_translation_for_developers + \title Qt Essentials - Application Creation part 3 +*/ +/*! + \externalpage http://developer.qt.nokia.com/elearning/watch/widgets_part_1_common_widgets + \title Qt Essentials - Widgets part 1 +*/ +/*! + \externalpage http://developer.qt.nokia.com/elearning/watch/widgets_part_2_layout_management + \title Qt Essentials - Widgets part 2 +*/ +/*! + \externalpage http://developer.qt.nokia.com/elearning/watch/widgets_part_3_guidelines_for_custom_widgets + \title Qt Essentials - Widgets part 3 +*/ +/*! + \externalpage http://developer.qt.nokia.com/elearning/watch/graphics_view_part_1_using_graphicsview_classes + \title Qt Essentials - Graphics View part 1 +*/ +/*! + \externalpage http://developer.qt.nokia.com/elearning/watch/graphics_view_part_2_transformations_and_coordinate_systems + \title Qt Essentials - Graphics View part 2 +*/ +/*! + \externalpage http://developer.qt.nokia.com/elearning/watch/graphics_view_part_3_creating_custom_items + \title Qt Essentials - Graphics View part 3 +*/ +/*! + \externalpage http://developer.qt.nokia.com/elearning/watch/model_view_part_1_model_view_concept + \title Qt Essentials - Model/View I part 1 +*/ +/*! + \externalpage http://developer.qt.nokia.com/elearning/watch/model_view_part_2_showing_simple_data + \title Qt Essentials - Model/View I part 2 +*/ +/*! + \externalpage http://developer.qt.nokia.com/elearning/watch/model_view_part_3_proxy_models + \title Qt Essentials - Model/View I part 3 +*/ +/*! + \externalpage http://developer.qt.nokia.com/elearning/watch/model_view_part_4_custom_models + \title Qt Essentials - Model/View I part 4 +*/ +/*! + \externalpage http://developer.qt.nokia.com/elearning/watch/model_view_ii_part_1_editing_item_data + \title Qt Essentials - Model/View II part 1 +*/ +/*! + \externalpage + \title Qt Essentials - Model/View II part 2 +*/ +/*! + \externalpage http://developer.qt.nokia.com/elearning/watch/model_view_ii_part_3_data_widget_mapper + \title Qt Essentials - Model/View II part 3 +*/ +/*! + \externalpage http://developer.qt.nokia.com/elearning/watch/model_view_ii_part_4_custom_tree_model + \title Qt Essentials - Model/View II part 4 +*/ +/*! + \externalpage http://developer.qt.nokia.com/elearning/watch/model_view_ii_part_5_drag_and_drop + \title Qt Essentials - Model/View II part 5 +*/ +/*! + \externalpage http://qt.nokia.com/certification + \title Qt Certification +*/ +/*! + \externalpage http://qt.nokia.com/developer/learning/certification/exams/preparation-prerequisites + \title Qt Certification Exam Preparation and Prerequisites +*/ + +/*! + \externalpage http://qt.nokia.com/developer/learning/online/training/materials + \title Download Qt training materials +*/ + +/*! + \externalpage http://qt.nokia.com/partners/qt-in-education/qt-in-education-course-material/ + \title Qt in Education Course Material +*/ + +/*! + \externalpage http://developer.qt.nokia.com/ + \title Qt Developer Network +*/ + +/*! + \externalpage http://developer.qt.nokia.com/wiki/Qt_Modules_Maturity_Level + \title Qt Modules' Maturity Levels - Modules List +*/ + +/*! + \externalpage http://labs.qt.nokia.com/2011/05/03/qt-modules-maturity-level/ + \title Qt Modules' Maturity Level - Description +*/ + +/*! + \externalpage http://doc.qt.nokia.com/qtquick-components-symbian-latest/index.html + \title Qt Quick Components for Symbian +*/ -- cgit v0.12 From 65c5f90299193d1ef658b9b17cab551e03fbe14a Mon Sep 17 00:00:00 2001 From: Sami Merila Date: Thu, 20 Oct 2011 16:46:12 +0300 Subject: Accepting predicted text using hardware keyboard replaces unwanted part Current implementation of Symbian input context assumes that predicted word replacement happens so that the original typed text is at the end of the surrounded text. The logic fails, if to-be-predicted text is in the middle of, or in the beginning of another, already accepted word. As a fix, input context need to store the original cursor position, when reset() was called (this happens when word selection list appears). Input context is already storing a copy of a preedit string in this situation. Then, when word replacement happens, this stored cursor position is used instead of current cursor position (the native side might temporarily move the cursor to the end when word selection list opens or closes) to replace the typed word with one selected from suggested word list. Stored cursor position is dismissed immediately after used, or if cached preedit string is dismissed. Task-number: QTBUG-22147 Reviewed-by: Miikka Heikkinen --- src/gui/inputmethod/qcoefepinputcontext_p.h | 1 + src/gui/inputmethod/qcoefepinputcontext_s60.cpp | 37 +++++++++++++++++++++++-- 2 files changed, 35 insertions(+), 3 deletions(-) diff --git a/src/gui/inputmethod/qcoefepinputcontext_p.h b/src/gui/inputmethod/qcoefepinputcontext_p.h index 8c30838..cefae5e 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_p.h +++ b/src/gui/inputmethod/qcoefepinputcontext_p.h @@ -162,6 +162,7 @@ private: QBasicTimer m_tempPreeditStringTimeout; bool m_hasTempPreeditString; QString m_cachedPreeditString; + int m_cachedCursorAndAnchorPosition; int m_splitViewResizeBy; Qt::WindowStates m_splitViewPreviousWindowStates; diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp index 79005ce..66ab4c8 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp +++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp @@ -115,6 +115,7 @@ QCoeFepInputContext::QCoeFepInputContext(QObject *parent) m_formatRetriever(0), m_pointerHandler(0), m_hasTempPreeditString(false), + m_cachedCursorAndAnchorPosition(-1), m_splitViewResizeBy(0), m_splitViewPreviousWindowStates(Qt::WindowNoState) { @@ -158,9 +159,18 @@ void QCoeFepInputContext::reset() } // Store a copy of preedit text, if prediction is active and input context is reseted. // This is to ensure that we can replace preedit string after losing focus to FEP manager's - // internal sub-windows. - if (m_cachedPreeditString.isEmpty() && !(currentHints & Qt::ImhNoPredictiveText)) + // internal sub-windows. Additionally, store the cursor position if there is no selected text. + // This allows input context to replace preedit strings if they are not at the end of current + // text. + if (m_cachedPreeditString.isEmpty() && !(currentHints & Qt::ImhNoPredictiveText)) { m_cachedPreeditString = m_preeditString; + if (focusWidget()) { + int cursor = focusWidget()->inputMethodQuery(Qt::ImCursorPosition).toInt(); + int anchor = focusWidget()->inputMethodQuery(Qt::ImAnchorPosition).toInt(); + if (cursor == anchor) + m_cachedCursorAndAnchorPosition = cursor; + } + } commitCurrentString(true); } @@ -196,6 +206,7 @@ void QCoeFepInputContext::setFocusWidget(QWidget *w) void QCoeFepInputContext::widgetDestroyed(QWidget *w) { m_cachedPreeditString.clear(); + m_cachedCursorAndAnchorPosition = -1; // Make sure that the input capabilities of whatever new widget got focused are queried. CCoeControl *ctrl = w->effectiveWinId(); @@ -981,6 +992,7 @@ void QCoeFepInputContext::StartFepInlineEditL(const TDesC& aInitialInlineText, return; m_cachedPreeditString.clear(); + m_cachedCursorAndAnchorPosition = -1; commitTemporaryPreeditString(); @@ -1039,8 +1051,16 @@ void QCoeFepInputContext::UpdateFepInlineTextL(const TDesC& aNewInlineText, QString newPreeditString = qt_TDesC2QString(aNewInlineText); QInputMethodEvent event(newPreeditString, attributes); if (!m_cachedPreeditString.isEmpty()) { - event.setCommitString(QLatin1String(""), -m_cachedPreeditString.length(), m_cachedPreeditString.length()); + int cursorPos = w->inputMethodQuery(Qt::ImCursorPosition).toInt(); + // Predicted word is either replaced from the end of the word (normal case), + // or from stored location, if the predicted word is either in the beginning of, + // or in the middle of already committed word. + int diff = cursorPos - m_cachedCursorAndAnchorPosition; + int replaceLocation = (diff != m_cachedPreeditString.length()) ? diff : m_cachedPreeditString.length(); + + event.setCommitString(QLatin1String(""), -replaceLocation, m_cachedPreeditString.length()); m_cachedPreeditString.clear(); + m_cachedCursorAndAnchorPosition = -1; } else if (newPreeditString.isEmpty() && m_preeditString.isEmpty()) { // In Symbian world this means "erase last character". event.setCommitString(QLatin1String(""), -1, 1); @@ -1138,6 +1158,10 @@ void QCoeFepInputContext::SetCursorSelectionForFepL(const TCursorSelection& aCur int pos = aCursorSelection.iAnchorPos; int length = aCursorSelection.iCursorPos - pos; + if (m_cachedCursorAndAnchorPosition != -1) { + pos = m_cachedCursorAndAnchorPosition; + length = 0; + } QList attributes; attributes << QInputMethodEvent::Attribute(QInputMethodEvent::Selection, pos, length, QVariant()); @@ -1155,6 +1179,13 @@ void QCoeFepInputContext::GetCursorSelectionForFep(TCursorSelection& aCursorSele int cursor = w->inputMethodQuery(Qt::ImCursorPosition).toInt() + m_preeditString.size(); int anchor = w->inputMethodQuery(Qt::ImAnchorPosition).toInt() + m_preeditString.size(); + + // If the position is stored, use that value, so that word replacement from proposed word + // lists are added to the correct position. + if (m_cachedCursorAndAnchorPosition != -1) { + cursor = m_cachedCursorAndAnchorPosition; + anchor = m_cachedCursorAndAnchorPosition; + } QString text = w->inputMethodQuery(Qt::ImSurroundingText).value(); int combinedSize = text.size() + m_preeditString.size(); if (combinedSize < anchor || combinedSize < cursor) { -- cgit v0.12 From e2b892c48c986c38f431b1af98023d16af53bc96 Mon Sep 17 00:00:00 2001 From: Casper van Donderen Date: Fri, 21 Oct 2011 12:14:58 +0200 Subject: Fix security problem on webpage due to bad JS Reviewed-by: Trust Me --- doc/src/template/scripts/functions.js | 13 +------------ tools/qdoc3/doc/config/scripts/functions.js | 13 +------------ tools/qdoc3/test/qt-html-templates-online.qdocconf | 13 ------------- tools/qdoc3/test/qt-html-templates_ja_JP-online.qdocconf | 11 ----------- tools/qdoc3/test/qt-html-templates_zh_CN-online.qdocconf | 11 ----------- 5 files changed, 2 insertions(+), 59 deletions(-) diff --git a/doc/src/template/scripts/functions.js b/doc/src/template/scripts/functions.js index 3ab4a08..af204d8 100755 --- a/doc/src/template/scripts/functions.js +++ b/doc/src/template/scripts/functions.js @@ -183,17 +183,6 @@ var blankRE=/^\s*$/; function CheckEmptyAndLoadList() { - /* Start Extracting information for feedback and adding this to the feedback form */ - var pageUrl = window.location.pathname; - var pageVal = $('title').html(); - $('#pageType').removeClass('red'); - $('#feedUrl').remove(); - $('#pageVal').remove(); - $('.menuAlert').remove(); - $('#feedform').append(''); - $('#feedform').append(''); - /* End Extracting information for feedback and adding this to the feedback form */ - /* extracts search query */ var value = document.getElementById('pageType').value; /* if the search is less than three chars long remove class names and remove elements from old search*/ @@ -255,4 +244,4 @@ function CheckEmptyAndLoadList() }); }, 500); /* timer set to 500 ms */ }); - }); \ No newline at end of file + }); diff --git a/tools/qdoc3/doc/config/scripts/functions.js b/tools/qdoc3/doc/config/scripts/functions.js index 62bc535..af204d8 100755 --- a/tools/qdoc3/doc/config/scripts/functions.js +++ b/tools/qdoc3/doc/config/scripts/functions.js @@ -183,17 +183,6 @@ var blankRE=/^\s*$/; function CheckEmptyAndLoadList() { - /* Start Extracting information for feedback and adding this to the feedback form */ - var pageUrl = window.location.href; - var pageVal = $('title').html(); - $('#pageType').removeClass('red'); - $('#feedUrl').remove(); - $('#pageVal').remove(); - $('.menuAlert').remove(); - $('#feedform').append(''); - $('#feedform').append(''); - /* End Extracting information for feedback and adding this to the feedback form */ - /* extracts search query */ var value = document.getElementById('pageType').value; /* if the search is less than three chars long remove class names and remove elements from old search*/ @@ -255,4 +244,4 @@ function CheckEmptyAndLoadList() }); }, 500); /* timer set to 500 ms */ }); - }); \ No newline at end of file + }); diff --git a/tools/qdoc3/test/qt-html-templates-online.qdocconf b/tools/qdoc3/test/qt-html-templates-online.qdocconf index 77ab3c5..af78088 100644 --- a/tools/qdoc3/test/qt-html-templates-online.qdocconf +++ b/tools/qdoc3/test/qt-html-templates-online.qdocconf @@ -142,8 +142,6 @@ HTML.postpostheader = \ "
\n" HTML.footer = \ - "
\n" \ - " [+] Documentation Feedback
\n" \ "
\n" \ " \n" \ " \n" \ @@ -169,17 +167,6 @@ HTML.footer = \ " Free Documentation License version 1.3\n" \ " as published by the Free Software Foundation.

\n" \ " \n" \ - "
\n" \ - "
X
\n" \ - "
\n" \ - "

Thank you for giving your feedback.

Make sure it is related to this specific page. For more general bugs and \n" \ - " requests, please use the Qt Bug Tracker.

\n" \ - "

\n" \ - "

\n" \ - "
\n" \ - "
\n" \ - "
\n" \ - "
\n" \ "\n" \ " \n" \ " \n" diff --git a/tools/qdoc3/test/qt-html-templates_ja_JP-online.qdocconf b/tools/qdoc3/test/qt-html-templates_ja_JP-online.qdocconf index 8dc17af..ed94494 100644 --- a/tools/qdoc3/test/qt-html-templates_ja_JP-online.qdocconf +++ b/tools/qdoc3/test/qt-html-templates_ja_JP-online.qdocconf @@ -139,8 +139,6 @@ HTML.postpostheader = \ HTML.footer = \ " \n" \ - "
\n" \ - " [+] Documentation Feedback
\n" \ " \n" \ " \n" \ "
\n" \ @@ -164,13 +162,4 @@ HTML.footer = \ " Alternatively, this document may be used under the terms of the GNU\n" \ " Free Documentation License version 1.3\n" \ " as published by the Free Software Foundation.

\n" \ - "
\n" \ - "
\n" \ - "
X
\n" \ - "
\n" \ - "

\n" \ - "

\n" \ - "
\n" \ - "
\n" \ - "
\n" \ "
\n" diff --git a/tools/qdoc3/test/qt-html-templates_zh_CN-online.qdocconf b/tools/qdoc3/test/qt-html-templates_zh_CN-online.qdocconf index e7e8220..ec0dc18 100644 --- a/tools/qdoc3/test/qt-html-templates_zh_CN-online.qdocconf +++ b/tools/qdoc3/test/qt-html-templates_zh_CN-online.qdocconf @@ -139,8 +139,6 @@ HTML.postpostheader = \ HTML.footer = \ " \n" \ - "
\n" \ - " [+] Documentation Feedback
\n" \ " \n" \ " \n" \ "
\n" \ @@ -164,13 +162,4 @@ HTML.footer = \ " Alternatively, this document may be used under the terms of the GNU\n" \ " Free Documentation License version 1.3\n" \ " as published by the Free Software Foundation.

\n" \ - "
\n" \ - "
\n" \ - "
X
\n" \ - "
\n" \ - "

\n" \ - "

\n" \ - "
\n" \ - "
\n" \ - "
\n" \ "
\n" -- cgit v0.12 From 5195c26208e9e2d80509c8308d590da2ef8a029b Mon Sep 17 00:00:00 2001 From: Sami Merila Date: Fri, 21 Oct 2011 14:40:28 +0300 Subject: Regression caused by 2be143ebb5246bb2f9b674bb09d23df5b2b6c504 After 2be143ebb5246bb2f9b674bb09d23df5b2b6c504, if user opts to spell a word him/herself instead of using the suggested word list, the result is incorrect. The existing preedit string is committed, then cursor is moved to the beginning and user written word is added. E.g. user writes 'tadaa' then selects to spell it again and writes 'radar', in editor there is 'radartadaa'. Regression is caused due to storing the cursor pointer even in cases where there is no stored preedit string. Task-number: QTBUG-22147 Reviewed-by: Miikka Heikkinen --- src/gui/inputmethod/qcoefepinputcontext_s60.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp index 66ab4c8..eeec04b 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp +++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp @@ -164,7 +164,7 @@ void QCoeFepInputContext::reset() // text. if (m_cachedPreeditString.isEmpty() && !(currentHints & Qt::ImhNoPredictiveText)) { m_cachedPreeditString = m_preeditString; - if (focusWidget()) { + if (focusWidget() && !m_cachedPreeditString.isEmpty()) { int cursor = focusWidget()->inputMethodQuery(Qt::ImCursorPosition).toInt(); int anchor = focusWidget()->inputMethodQuery(Qt::ImAnchorPosition).toInt(); if (cursor == anchor) -- cgit v0.12 From 657b33557df8a997d7d440f33fd9fa34e97d1e0a Mon Sep 17 00:00:00 2001 From: Sergio Ahumada Date: Fri, 21 Oct 2011 23:15:05 +0200 Subject: Doc: Fix example code Task-number: QTWEBSITE-281 --- doc/src/getting-started/gettingstartedqt.qdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/getting-started/gettingstartedqt.qdoc b/doc/src/getting-started/gettingstartedqt.qdoc index fc9d799..eda5ee1 100644 --- a/doc/src/getting-started/gettingstartedqt.qdoc +++ b/doc/src/getting-started/gettingstartedqt.qdoc @@ -374,7 +374,7 @@ \code 25 Notepad::Notepad() 26 { -27 saveAction = new QAction(tr("&Open"), this); +27 openAction = new QAction(tr("&Open"), this); 28 saveAction = new QAction(tr("&Save"), this); 29 exitAction = new QAction(tr("E&xit"), this); 30 -- cgit v0.12 From 2a0908069f11ea28255d9f2c636f2a4c0f90125c Mon Sep 17 00:00:00 2001 From: Honglei Zhang Date: Mon, 24 Oct 2011 11:20:11 +0300 Subject: Update SQLite version mentioned in licence document SQLite version has been updated to 3.7.7.1 since Qt 4.8. The version number is corrected in licence document for 3rd party components. Reviewed-by: Trust Me --- doc/src/legal/3rdparty.qdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/legal/3rdparty.qdoc b/doc/src/legal/3rdparty.qdoc index ac1bc9d..2edfdd3 100644 --- a/doc/src/legal/3rdparty.qdoc +++ b/doc/src/legal/3rdparty.qdoc @@ -361,7 +361,7 @@ See \c src/3rdparty/sha1/sha1.cpp for more information about the terms and conditions under which the code is supplied. - \section1 SQLite (\c sqlite) version 3.5.9 + \section1 SQLite (\c sqlite) version 3.6.19 \e{SQLite is a small C library that implements a self-contained, embeddable, zero-configuration SQL database engine.} -- cgit v0.12 From d0c62604036518375ed3390437c4923abc9985e1 Mon Sep 17 00:00:00 2001 From: Honglei Zhang Date: Tue, 25 Oct 2011 13:10:06 +0300 Subject: Update SQLite version number in legal document SQLite version in Qt 4.8 is upcated to 3.7.7.1. Reviewed-by: Trust Me --- doc/src/legal/3rdparty.qdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/legal/3rdparty.qdoc b/doc/src/legal/3rdparty.qdoc index 2edfdd3..d8276b3 100644 --- a/doc/src/legal/3rdparty.qdoc +++ b/doc/src/legal/3rdparty.qdoc @@ -361,7 +361,7 @@ See \c src/3rdparty/sha1/sha1.cpp for more information about the terms and conditions under which the code is supplied. - \section1 SQLite (\c sqlite) version 3.6.19 + \section1 SQLite (\c sqlite) version 3.7.7.1 \e{SQLite is a small C library that implements a self-contained, embeddable, zero-configuration SQL database engine.} -- cgit v0.12 From 6750461b408f7ffa768ba9507dcd64640010fff5 Mon Sep 17 00:00:00 2001 From: Honglei Zhang Date: Tue, 25 Oct 2011 13:16:30 +0300 Subject: Fix QtSql autotest server addresses Fix QtSql autotest server addresses. Old server which are located in Oslo shall not be used. New servers are located in Brisbane. Reviewed-by: Trust Me --- tests/auto/qsqldatabase/tst_databases.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/auto/qsqldatabase/tst_databases.h b/tests/auto/qsqldatabase/tst_databases.h index 497f5a4..95ead61 100644 --- a/tests/auto/qsqldatabase/tst_databases.h +++ b/tests/auto/qsqldatabase/tst_databases.h @@ -246,7 +246,8 @@ public: // addDb( "QMYSQL3", "testdb", "troll", "trond", "horsehead.nokia.troll.no", 3308, "CLIENT_COMPRESS=1;CLIENT_SSL=1" ); // MySQL 4.1.1 // addDb( "QMYSQL3", "testdb", "troll", "trond", "horsehead.nokia.troll.no", 3309, "CLIENT_COMPRESS=1;CLIENT_SSL=1" ); // MySQL 5.0.18 Linux // addDb( "QMYSQL3", "testdb", "troll", "trond", "silence.nokia.troll.no" ); // MySQL 5.1.36 Windows -// addDb( "QMYSQL3", "testdb", "testuser", "Ee4Gabf6_", "mysql4-nokia.trolltech.com.au" ); // MySQL 4.1.22-2.el4 linux + +// addDb( "QMYSQL3", "testdb", "testuser", "Ee4Gabf6_", "bq-mysql41.apac.nokia.com" ); // MySQL 4.1.22-2.el4 linux // addDb( "QMYSQL3", "testdb", "testuser", "Ee4Gabf6_", "bq-mysql50.apac.nokia.com" ); // MySQL 5.0.45-7.el5 linux // addDb( "QMYSQL3", "testdb", "testuser", "Ee4Gabf6_", "bq-mysql51.apac.nokia.com" ); // MySQL 5.1.36-6.7.2.i586 linux @@ -256,13 +257,15 @@ public: // addDb( "QPSQL7", "testdb", "troll", "trond", "horsehead.nokia.troll.no", 5436 ); // V7.4 // addDb( "QPSQL7", "testdb", "troll", "trond", "horsehead.nokia.troll.no", 5437 ); // V8.0.3 // addDb( "QPSQL7", "testdb", "troll", "trond", "silence.nokia.troll.no" ); // V8.2.1, UTF-8 -// addDb( "QPSQL7", "testdb", "testuser", "Ee4Gabf6_", "postgres74-nokia.trolltech.com.au" ); // Version 7.4.19-1.el4_6.1 + +// addDb( "QPSQL7", "testdb", "testuser", "Ee4Gabf6_", "bq-postgres74.apac.nokia.com" ); // Version 7.4.19-1.el4_6.1 // addDb( "QPSQL7", "testdb", "testuser", "Ee4Gabf6_", "bq-pgsql81.apac.nokia.com" ); // Version 8.1.11-1.el5_1.1 // addDb( "QPSQL7", "testdb", "testuser", "Ee4Gabf6_", "bq-pgsql84.apac.nokia.com" ); // Version 8.4.1-2.1.i586 // addDb( "QPSQL7", "testdb", "testuser", "Ee4Gabf6_", "bq-pgsql90.apac.nokia.com" ); // Version 9.0.0 // addDb( "QDB2", "testdb", "troll", "trond", "silence.nokia.troll.no" ); // DB2 v9.1 on silence +// addDb( "QDB2", "testdb", "testuser", "Ee4Gabf6_", "bq-db2-972.apac.nokia.com" ); // DB2 // yes - interbase really wants the physical path on the host machine. // addDb( "QIBASE", "/opt/interbase/qttest.gdb", "SYSDBA", "masterkey", "horsehead.nokia.troll.no" ); @@ -271,6 +274,9 @@ public: // addDb( "QIBASE", "/opt/firebird/databases/testdb.fdb", "testuser", "Ee4Gabf6_", "firebird1-nokia.trolltech.com.au" ); // Firebird 1.5.5 // addDb( "QIBASE", "/opt/firebird/databases/testdb.fdb", "testuser", "Ee4Gabf6_", "firebird2-nokia.trolltech.com.au" ); // Firebird 2.1.1 +// addDb( "QIBASE", "/opt/firebird/databases/testdb.fdb", "testuser", "Ee4Gabf6_", "bq-firebird1.apac.nokia.com" ); // Firebird 1.5.5 +// addDb( "QIBASE", "/opt/firebird/databases/testdb.fdb", "testuser", "Ee4Gabf6_", "bq-firebird2.apac.nokia.com" ); // Firebird 2.1.1 + // use in-memory database to prevent local files // addDb("QSQLITE", ":memory:"); addDb( "QSQLITE", QDir::toNativeSeparators(QDir::tempPath()+"/foo.db") ); -- cgit v0.12 From b31ec8e879761decfda70069262f06b5aa08aa82 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Tue, 25 Oct 2011 16:37:45 +0300 Subject: Improve patch_capabilities script output. Now prefix any actual patching errors with "ERROR:" so that they will be obvious also in QtCreator builds. Task-number: QTBUG-22267 Reviewed-by: Sami Merila --- bin/patch_capabilities.pl | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/bin/patch_capabilities.pl b/bin/patch_capabilities.pl index 0ba8bc5..a6345e0 100755 --- a/bin/patch_capabilities.pl +++ b/bin/patch_capabilities.pl @@ -49,6 +49,7 @@ # # Note: Please make sure to output all changes done to the pkg file in a print statements # starting with "Patching: " to ease integration into IDEs! +# Similarly, any actual error messages should start with "ERROR:" # use File::Copy; @@ -103,13 +104,16 @@ if (@ARGV) # Parse the first given script argument as a ".pkg" file name. my $pkgFileName = shift(@ARGV); my $justCheck = ""; + my $errorPrefix = "ERROR:"; my $msgPrefix = "Patching:"; my $tempPatchPath = ""; if ($pkgFileName eq "-c") { $pkgFileName = shift(@ARGV); $justCheck = true; + # All messages are simply warnings, as no actual patching is attempted. $msgPrefix = "Warning:"; + $errorPrefix = "Warning:"; } if ($pkgFileName eq "-t") { @@ -302,7 +306,7 @@ if (@ARGV) if ($binaryBaseName =~ /\.exe$/) { # Installer refuses to install protected executables in a self signed package, so abort if one is detected. # We can't simply just patch the executable SID, as any registration resources executable uses will be linked to it via SID. - print ("$msgPrefix Executable with SID in the protected range (0x$exeSid) detected: \"$binaryBaseName\". A self-signed sis with protected executables is not supported.\n\n"); + print ("$errorPrefix Executable with SID in the protected range (0x$exeSid) detected: \"$binaryBaseName\". A self-signed sis with protected executables is not supported.\n\n"); $checkFailed = true; } } @@ -315,9 +319,6 @@ if (@ARGV) $_ = trim($_); if ($capabilitiesToAllow =~ /$_/) { push(@capabilitiesToSet, $_); - if (Location =~ /$_/i) { - print ("$msgPrefix \"Location\" capability detected for binary: \"$binaryBaseName\". This capability is not self-signable for S60 3rd edition feature pack 1 devices, so installing this package on those devices will most likely not work.\n\n"); - } } else { push(@capabilitiesToDrop, $_); } @@ -345,7 +346,7 @@ if (@ARGV) if ($binaryBaseName =~ /\.exe$/) { # While libraries often have capabilities they do not themselves need just to enable them to be loaded by wider variety of processes, # executables are more likely to need every capability they have been assigned or they won't function correctly. - print ("$msgPrefix Executable with capabilities incompatible with self-signing detected: \"$binaryBaseName\". (Incompatible capabilities: \"$capsToDropStr\".) Reducing capabilities is only supported for libraries.\n"); + print ("$errorPrefix Executable with capabilities incompatible with self-signing detected: \"$binaryBaseName\". (Incompatible capabilities: \"$capsToDropStr\".) Reducing capabilities is only supported for libraries.\n"); $checkFailed = true; } else { print ("$msgPrefix The following capabilities used in \"$binaryBaseName\" are not compatible with a self-signed package and will be removed: \"$capsToDropStr\".\n"); @@ -368,9 +369,9 @@ if (@ARGV) if ($checkFailed) { print ("\n"); if ($justCheck) { - print ("$msgPrefix The package is not compatible with self-signing.\n"); + print ("$msgPrefix The package is not compatible with self-signing. "); } else { - print ("$msgPrefix Unable to patch the package for self-singing.\n"); + print ("$errorPrefix Unable to patch the package for self-singing. "); } print ("Use a proper developer certificate for signing this package.\n\n"); exit(1); -- cgit v0.12 From c47b2e9c5fc43ef9c55c8ee884e83a33da00ae0b Mon Sep 17 00:00:00 2001 From: Mark Brand Date: Wed, 26 Oct 2011 12:59:31 +0200 Subject: Update changelog for Qt 4.8 --- dist/changes-4.8.0 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dist/changes-4.8.0 b/dist/changes-4.8.0 index 0d494ab..17caec6 100644 --- a/dist/changes-4.8.0 +++ b/dist/changes-4.8.0 @@ -129,6 +129,7 @@ QtGui - QUndoView: Allow different text for undo actions and items - QCommonStyle: Fix overrides from the proxy style [QTBUG-20849] - QWindowsVistaStyle: Draw CE_ProgressBarGroove correctly with PP_TRANSPARENTBAR. + - Removed obsolete -qt-gif configure option. QtNetwork --------- @@ -175,6 +176,11 @@ QtWebKit QtSql ----- - Update sqlite to 3.7.7.1 + - QSqlField now initializes the type of its QVariant value to its own type. + - QSqlField's generated flag now controls generation of SQL insert/update/delete + in QSqlDriver::sqlStatement(). QSqlTableModel initializes the flag to false in + new edit records and sets it to true when a value is set. Applications can still + manipulate generated flags directly to control SQL generation. [QTBUG-13211] QtSvg ----- @@ -226,6 +232,7 @@ Qt for Windows - The small 16x16 version of the default window icon is now being loaded correctly from the IDI_ICON1 resource. - Fixed version checking for untested versions of Windows. (QTBUG-20480) + - Qt libs on MinGW now come with pkg-config .pc files. Qt for Mac OS X --------------- -- cgit v0.12 From e392f641e569be04a7f6a9336b52c77a9ec0c627 Mon Sep 17 00:00:00 2001 From: Pasi Pentikainen Date: Tue, 25 Oct 2011 17:50:02 +0300 Subject: Symbian configuration parameter change for linux building Symbian configuration changed to use opengl es2 parameter which works both with configure.exe (symbian windows building) and configure sh-script (symbian linux building). Reviewed-by: Miikka Heikkinen --- config.profiles/symbian/bld.inf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config.profiles/symbian/bld.inf b/config.profiles/symbian/bld.inf index 21b3614..814e4b2 100644 --- a/config.profiles/symbian/bld.inf +++ b/config.profiles/symbian/bld.inf @@ -81,5 +81,5 @@ translations/qt_zh_tw_symbian.ts /epoc32/include/platform/qt/translations/qt_zh_ PRJ_EXTENSIONS START EXTENSION qt/qtconfig OPTION QT_ROOT .. -OPTION OPTIONS -opensource -confirm-license -openvg -opengl-es-2 -script -no-scripttools -no-webkit -make make -graphicssystem openvg -phonon -phonon-backend -usedeffiles -dont-process -nomake examples -nomake demos -nomake tools -audio-backend -fpu softvfp+vfpv2 -END \ No newline at end of file +OPTION OPTIONS -opensource -confirm-license -openvg -opengl es2 -script -no-scripttools -no-webkit -make make -graphicssystem openvg -phonon -phonon-backend -usedeffiles -dont-process -nomake examples -nomake demos -nomake tools -audio-backend -fpu softvfp+vfpv2 +END -- cgit v0.12 From cc084a1a05c53035bf401aed2e08e3c30a75e509 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Thu, 27 Oct 2011 15:22:45 +1000 Subject: Adding items to a view with no delegate crashes. If there is no delegate then clear state and return. Change-Id: I786b9bc4018706797056fbd1ad25d25663102707 Task-number: QTBUG-22379 Reviewed-by: Andrew den Exter --- src/declarative/graphicsitems/qdeclarativegridview.cpp | 10 ++++++++++ src/declarative/graphicsitems/qdeclarativelistview.cpp | 15 +++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp index 29c714d..feca6b5 100644 --- a/src/declarative/graphicsitems/qdeclarativegridview.cpp +++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp @@ -2852,6 +2852,11 @@ void QDeclarativeGridView::itemsInserted(int modelIndex, int count) addedVisible = true; } FxGridItem *item = d->createItem(modelIndex + i); + if (!item) { + // broken or no delegate + d->clear(); + return; + } d->visibleItems.insert(index, item); item->setPosition(colPos, rowPos); added.append(item); @@ -3042,6 +3047,11 @@ void QDeclarativeGridView::itemsMoved(int from, int to, int count) FxGridItem *movedItem = moved.take(item->index); if (!movedItem) movedItem = d->createItem(item->index); + if (!movedItem) { + // broken or no delegate + d->clear(); + return; + } it = d->visibleItems.insert(it, movedItem); if (it == d->visibleItems.begin() && firstItem) movedItem->setPosition(firstItem->colPos(), firstItem->rowPos()); diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp index 920b6ae..37c34dc 100644 --- a/src/declarative/graphicsitems/qdeclarativelistview.cpp +++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp @@ -3283,6 +3283,11 @@ void QDeclarativeListView::itemsInserted(int modelIndex, int count) addedVisible = true; } FxListItem *item = d->createItem(modelIndex + i); + if (!item) { + // broken or no delegate + d->clear(); + return; + } d->visibleItems.insert(insertionIdx, item); pos -= item->size() + d->spacing; item->setPosition(pos); @@ -3313,6 +3318,11 @@ void QDeclarativeListView::itemsInserted(int modelIndex, int count) addedVisible = true; } FxListItem *item = d->createItem(modelIndex + i); + if (!item) { + // broken or no delegate + d->clear(); + return; + } d->visibleItems.insert(index, item); item->setPosition(pos); added.append(item); @@ -3516,6 +3526,11 @@ void QDeclarativeListView::itemsMoved(int from, int to, int count) FxListItem *movedItem = moved.take(item->index); if (!movedItem) movedItem = d->createItem(item->index); + if (!movedItem) { + // broken or no delegate + d->clear(); + return; + } if (item->index <= firstVisible->index) moveBy -= movedItem->size(); it = d->visibleItems.insert(it, movedItem); -- cgit v0.12 From e5df3b4eeaf5943f5170dda781c3c589fa35a15a Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Thu, 20 Oct 2011 16:55:02 +0100 Subject: QIODevice - disallow setTextMode when not open MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Calling setTextMode() before open() would make the device appear to be already open and cause later errors. Added a qWarning and documentation update to prevent this API misuse Task-number: QTBUG-20905 Change-Id: I2e06cd8e79f4afcf27417ac0eae6ebef980a17aa Reviewed-by: Thiago Macieira (Intel) Reviewed-by: João Abecasis (cherry picked from commit 29c30a20bab4c4ea892b95c08c71bb5f136bb82c) --- src/corelib/io/qiodevice.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/corelib/io/qiodevice.cpp b/src/corelib/io/qiodevice.cpp index dae4e82..56fff90 100644 --- a/src/corelib/io/qiodevice.cpp +++ b/src/corelib/io/qiodevice.cpp @@ -468,11 +468,17 @@ void QIODevice::setOpenMode(OpenMode openMode) otherwise the \l Text flag is removed. This feature is useful for classes that provide custom end-of-line handling on a QIODevice. + The IO device should be opened before calling this function. + \sa open(), setOpenMode() */ void QIODevice::setTextModeEnabled(bool enabled) { Q_D(QIODevice); + if (!isOpen()) { + qWarning("QIODevice::setTextModeEnabled: The device is not open"); + return; + } if (enabled) d->openMode |= Text; else -- cgit v0.12 From 1b928f5e41888150c4d85ff4df8a9fcab9b06d90 Mon Sep 17 00:00:00 2001 From: John Tapsell Date: Thu, 27 Oct 2011 20:52:03 +0200 Subject: Harfbuzz shaper: kerning adjustment does not need to be modified by RTL Merge-request: 1435 Reviewed-by: Oswald Buddenhagen --- src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp b/src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp index 3410782..7f4bb0c 100644 --- a/src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp +++ b/src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp @@ -1293,7 +1293,7 @@ HB_Bool HB_OpenTypePosition(HB_ShaperItem *item, int availableGlyphs, HB_Bool do // (int)(positions[i].x_pos >> 6), (int)(positions[i].y_pos >> 6), // positions[i].back, positions[i].new_advance); - HB_Fixed adjustment = (item->item.bidiLevel % 2) ? -positions[i].x_advance : positions[i].x_advance; + HB_Fixed adjustment = positions[i].x_advance; if (!(face->current_flags & HB_ShaperFlag_UseDesignMetrics)) adjustment = HB_FIXED_ROUND(adjustment); -- cgit v0.12 From 7fe7ec7201891b6dc9e918edfa86ab9bf4ee6e80 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Fri, 28 Oct 2011 11:32:26 +0200 Subject: Revert "Fixed deployment problems with MSVC 2005 and 2008 SP1" This reverts commit ec41d27565ed0b4d517f30563def135d0b4c7a8d. Adding the define _BIND_TO_CURRENT_VCLIBS_VERSION led to linking problems for several people. Also, this leads to problems when using the binary installer for development. Reviewed-by: Andy Shaw --- mkspecs/win32-msvc2005/qmake.conf | 2 +- mkspecs/win32-msvc2008/qmake.conf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mkspecs/win32-msvc2005/qmake.conf b/mkspecs/win32-msvc2005/qmake.conf index a9f725c..5b717e7 100644 --- a/mkspecs/win32-msvc2005/qmake.conf +++ b/mkspecs/win32-msvc2005/qmake.conf @@ -8,7 +8,7 @@ MAKEFILE_GENERATOR = MSVC.NET TEMPLATE = app CONFIG += qt warn_on release incremental flat link_prl precompile_header autogen_precompile_source copy_dir_files debug_and_release debug_and_release_target embed_manifest_dll embed_manifest_exe QT += core gui -DEFINES += UNICODE WIN32 QT_LARGEFILE_SUPPORT _BIND_TO_CURRENT_VCLIBS_VERSION=1 +DEFINES += UNICODE WIN32 QT_LARGEFILE_SUPPORT QMAKE_COMPILER_DEFINES += _MSC_VER=1400 WIN32 QMAKE_CC = cl diff --git a/mkspecs/win32-msvc2008/qmake.conf b/mkspecs/win32-msvc2008/qmake.conf index fd115e7..c765562 100644 --- a/mkspecs/win32-msvc2008/qmake.conf +++ b/mkspecs/win32-msvc2008/qmake.conf @@ -8,7 +8,7 @@ MAKEFILE_GENERATOR = MSVC.NET TEMPLATE = app CONFIG += qt warn_on release incremental flat link_prl precompile_header autogen_precompile_source copy_dir_files debug_and_release debug_and_release_target embed_manifest_dll embed_manifest_exe QT += core gui -DEFINES += UNICODE WIN32 QT_LARGEFILE_SUPPORT _BIND_TO_CURRENT_VCLIBS_VERSION=1 +DEFINES += UNICODE WIN32 QT_LARGEFILE_SUPPORT QMAKE_COMPILER_DEFINES += _MSC_VER=1500 WIN32 QMAKE_CC = cl -- cgit v0.12 From 080fb267e54cd17697d0a7dbe00449c17d461a11 Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Fri, 28 Oct 2011 11:20:07 +0100 Subject: Symbian - disable memory mapping in QNetworkDiskCache The implementation of memory mapped files in Open C requires munmap to be called from the same thread as mmap. As the QIODevice can be handed off to another thread, this breaks application code that works on other operating systems. Task-number: QT-5309 Reviewed-by: Tadaaki Matsumoto --- src/network/access/qnetworkdiskcache.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/network/access/qnetworkdiskcache.cpp b/src/network/access/qnetworkdiskcache.cpp index 3b18fe8..9d91a8f 100644 --- a/src/network/access/qnetworkdiskcache.cpp +++ b/src/network/access/qnetworkdiskcache.cpp @@ -404,7 +404,7 @@ QIODevice *QNetworkDiskCache::data(const QUrl &url) // ### verify that QFile uses the fd size and not the file name qint64 size = file->size() - file->pos(); const uchar *p = 0; -#ifndef Q_OS_WINCE +#if !defined(Q_OS_WINCE) && !defined(Q_OS_SYMBIAN) p = file->map(file->pos(), size); #endif if (p) { -- cgit v0.12 From 1bf8f94aeb8d40ca6ce8e55fc7add2d64ceadd50 Mon Sep 17 00:00:00 2001 From: mread Date: Fri, 28 Oct 2011 12:23:32 +0100 Subject: Removed unix specific mmap use from QString benchmark The mmap flags MAP_ANONYMOUS and MAP_POPULATE are unix specific, and are not supported by Symbian's posix headers. The benchmark code using them, already unix-only, now is removed from Symbian builds. Task-number: QTBUG-18197 Reviewed-by: Shane Kearns --- tests/benchmarks/corelib/tools/qstring/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/benchmarks/corelib/tools/qstring/main.cpp b/tests/benchmarks/corelib/tools/qstring/main.cpp index 5b5f0f7..daefe12 100644 --- a/tests/benchmarks/corelib/tools/qstring/main.cpp +++ b/tests/benchmarks/corelib/tools/qstring/main.cpp @@ -784,7 +784,7 @@ void tst_QString::equals2_data() const static void __attribute__((noinline)) equals2_selftest() { -#ifdef Q_OS_UNIX +#if defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN) const long pagesize = sysconf(_SC_PAGESIZE); void *page1, *page3; ushort *page2; @@ -1341,7 +1341,7 @@ void tst_QString::ucstrncmp() const }; static const int functionCount = sizeof func / sizeof func[0]; -#ifdef Q_OS_UNIX +#if defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN) const long pagesize = sysconf(_SC_PAGESIZE); void *page1, *page3; ushort *page2; -- cgit v0.12 From 16f67b49ae5232d4d0fb19e0333f5e2ef2a65449 Mon Sep 17 00:00:00 2001 From: xiechyong Date: Thu, 27 Oct 2011 21:07:26 -0700 Subject: Fix QFile::copy() returning false but error() being NoError Calling close() after setError() will unset the error. Task-number: QTBUG-11982 Merge-request: 2712 Reviewed-by: ossi --- src/corelib/io/qfile.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/corelib/io/qfile.cpp b/src/corelib/io/qfile.cpp index 06c403a..6f24376 100644 --- a/src/corelib/io/qfile.cpp +++ b/src/corelib/io/qfile.cpp @@ -918,6 +918,7 @@ QFile::copy(const QString &newName) #endif if (error) { out.close(); + close(); d->setError(QFile::CopyError, tr("Cannot open for output")); } else { char block[4096]; @@ -928,6 +929,7 @@ QFile::copy(const QString &newName) break; totalRead += in; if(in != out.write(block, in)) { + close(); d->setError(QFile::CopyError, tr("Failure to write block")); error = true; break; @@ -941,6 +943,7 @@ QFile::copy(const QString &newName) } if (!error && !out.rename(newName)) { error = true; + close(); d->setError(QFile::CopyError, tr("Cannot create %1 for output").arg(newName)); } #ifdef QT_NO_TEMPORARYFILE @@ -951,10 +954,10 @@ QFile::copy(const QString &newName) out.setAutoRemove(false); #endif } - close(); } if(!error) { QFile::setPermissions(newName, permissions()); + close(); unsetError(); return true; } -- cgit v0.12 From f0637d4c663ccfc45d337412c209fee1789f354d Mon Sep 17 00:00:00 2001 From: Jo Asplin Date: Mon, 31 Oct 2011 14:43:10 +0100 Subject: Updated changelog for Qt 4.8 Task-number: QTQAINFRA-226 --- dist/changes-4.8.0 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dist/changes-4.8.0 b/dist/changes-4.8.0 index 56ed764..29e7648 100644 --- a/dist/changes-4.8.0 +++ b/dist/changes-4.8.0 @@ -197,6 +197,8 @@ QtTest ------ - Added -random and -seed options to tests, making the test cases within a test execute in arbitrary order. + - Added -datatags option to list available data tags for each test function. + The test case name is also listed. **************************************************************************** * Database Drivers * -- cgit v0.12 From 9d5c920bb23b949a0b98f1268679a0a2c06dd1d9 Mon Sep 17 00:00:00 2001 From: Peter Hartmann Date: Mon, 31 Oct 2011 16:49:46 +0100 Subject: SSL documentation: correct enum name --- src/network/ssl/qssl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/network/ssl/qssl.cpp b/src/network/ssl/qssl.cpp index 08a05ff..b556328 100644 --- a/src/network/ssl/qssl.cpp +++ b/src/network/ssl/qssl.cpp @@ -131,7 +131,7 @@ QT_BEGIN_NAMESPACE fragments into the data when using block ciphers. When enabled, this prevents some attacks (such as the BEAST attack), however it is incompatible with some servers. - \value SslOptionDisableTickets Disables the SSL session ticket + \value SslOptionDisableSessionTickets Disables the SSL session ticket extension. This can cause slower connection setup, however some servers are not compatible with the extension. \value SslOptionDisableCompression Disables the SSL compression -- cgit v0.12 From 581517a517cb638a5a18f01a5baa527f8d172b87 Mon Sep 17 00:00:00 2001 From: mread Date: Tue, 7 Jun 2011 13:52:19 +0100 Subject: Supporting parallel pointer event delivery on Symbian Symbian's wserv and cone are introducing APIs to send apps position updates for multiple pointers in one message. The change consists of a refactoring of processTouchEvent() to handle multiple pointer changes, enabling receipt of the new messages, and handling of the new messages. Task-number: QTBUG-18286 Reviewed-by: Shane Kearns --- src/gui/kernel/qapplication_s60.cpp | 150 +++++++++++++++++++++++++++--------- src/gui/kernel/qt_s60_p.h | 19 ++++- src/gui/kernel/qwidget_s60.cpp | 6 +- 3 files changed, 136 insertions(+), 39 deletions(-) diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index f1221eb..9acf429 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -92,6 +92,10 @@ #include #endif +#ifdef COE_GROUPED_POINTER_EVENT_VERSION +#include +#endif + QT_BEGIN_NAMESPACE // Goom Events through Window Server @@ -671,71 +675,121 @@ void QSymbianControl::HandleLongTapEventL( const TPoint& aPenEventLocation, cons } #ifdef QT_SYMBIAN_SUPPORTS_ADVANCED_POINTER +#ifdef COE_GROUPED_POINTER_EVENT_VERSION +void QSymbianControl::translateMultiEventPointerEvent(const CCoeEventData &eventData ) +{ + TUint count = eventData.Count(); + QVector touches; + touches.reserve(count); + for (int i = 0; i < count; i++) { + const TPointerEvent *pointerEvent = eventData.Pointer(i); + const TAdvancedPointerEvent *advEvent = pointerEvent->AdvancedPointerEvent(); + if (advEvent) + touches.push_back(TouchEventFromAdvancedPointerEvent(advEvent)); + } + if (touches.size()) + processTouchEvents(touches); +} +#endif + void QSymbianControl::translateAdvancedPointerEvent(const TAdvancedPointerEvent *event) { + processTouchEvents(QVector(1, TouchEventFromAdvancedPointerEvent(event))); +} + +QSymbianControl::TouchEventParams QSymbianControl::TouchEventFromAdvancedPointerEvent(const TAdvancedPointerEvent *event) +{ QApplicationPrivate *d = QApplicationPrivate::instance(); QPointF screenPos = qwidget->mapToGlobal(translatePointForFixedNativeOrientation(event->iPosition)); qreal pressure; - if(d->pressureSupported + if (d->pressureSupported && event->Pressure() > 0) //workaround for misconfigured HAL pressure = event->Pressure() / qreal(d->maxTouchPressure); else pressure = qreal(1.0); - processTouchEvent(event->PointerNumber(), event->iType, screenPos, pressure); + return TouchEventParams(event->PointerNumber(), event->iType, screenPos, pressure); } #endif -void QSymbianControl::processTouchEvent(int pointerNumber, TPointerEvent::TType type, QPointF screenPos, qreal pressure) +QSymbianControl::TouchEventParams::TouchEventParams() +{} + +QSymbianControl::TouchEventParams::TouchEventParams(int pointerNumber, TPointerEvent::TType type, QPointF screenPos, qreal pressure) + : pointerNumber(pointerNumber), + type(type), + screenPos(screenPos), + pressure(pressure) +{} + +void QSymbianControl::processTouchEvents(const QVector &touches) { QRect screenGeometry = qApp->desktop()->screenGeometry(qwidget); QApplicationPrivate *d = QApplicationPrivate::instance(); + // get the maximum pointer number + int numUpdates = touches.size(); + int maxPointerNumber = 0; + for (int i = 0; i < numUpdates; ++i) { + const TouchEventParams &touch = touches[i]; + maxPointerNumber = qMax(maxPointerNumber, touch.pointerNumber); + } + + // ensure there are sufficient touch events in the list, + // touch events will be indexed by pointerNumber QList points = d->appAllTouchPoints; - while (points.count() <= pointerNumber) + while (points.count() <= maxPointerNumber) points.append(QTouchEvent::TouchPoint(points.count())); - Qt::TouchPointStates allStates = 0; + // first set all active touch points to stationary for (int i = 0; i < points.count(); ++i) { QTouchEvent::TouchPoint &touchPoint = points[i]; + if (touchPoint.state() != Qt::TouchPointReleased) { + touchPoint.setState(Qt::TouchPointStationary); + } + } - if (touchPoint.id() == pointerNumber) { - Qt::TouchPointStates state; - switch (type) { - case TPointerEvent::EButton1Down: + // Add all info about moving or state changed touch points + for (int i = 0; i < numUpdates; ++i) { + const TouchEventParams &touch = touches[i]; + QTouchEvent::TouchPoint &touchPoint = points[touch.pointerNumber]; + Qt::TouchPointStates state; + switch (touch.type) { + case TPointerEvent::EButton1Down: #ifdef QT_SYMBIAN_SUPPORTS_ADVANCED_POINTER - case TPointerEvent::EEnterHighPressure: + case TPointerEvent::EEnterHighPressure: #endif - state = Qt::TouchPointPressed; - break; - case TPointerEvent::EButton1Up: + state = Qt::TouchPointPressed; + break; + case TPointerEvent::EButton1Up: #ifdef QT_SYMBIAN_SUPPORTS_ADVANCED_POINTER - case TPointerEvent::EExitCloseProximity: -#endif - state = Qt::TouchPointReleased; - break; - case TPointerEvent::EDrag: - state = Qt::TouchPointMoved; - break; - default: - // how likely is this to happen? - state = Qt::TouchPointStationary; - break; - } - if (pointerNumber == 0) - state |= Qt::TouchPointPrimary; - touchPoint.setState(state); + case TPointerEvent::EExitCloseProximity: +#endif + state = Qt::TouchPointReleased; + break; + case TPointerEvent::EDrag: + state = Qt::TouchPointMoved; + break; + default: + // how likely is this to happen? + state = Qt::TouchPointStationary; + break; + } + if (touch.pointerNumber == 0) + state |= Qt::TouchPointPrimary; + touchPoint.setState(state); - touchPoint.setScreenPos(screenPos); - touchPoint.setNormalizedPos(QPointF(screenPos.x() / screenGeometry.width(), - screenPos.y() / screenGeometry.height())); + touchPoint.setScreenPos(touch.screenPos); + touchPoint.setNormalizedPos(QPointF(touch.screenPos.x() / screenGeometry.width(), + touch.screenPos.y() / screenGeometry.height())); - touchPoint.setPressure(pressure); - } else if (touchPoint.state() != Qt::TouchPointReleased) { - // all other active touch points should be marked as stationary - touchPoint.setState(Qt::TouchPointStationary); - } + touchPoint.setPressure(touch.pressure); + } + // check the resulting state of all touch points + Qt::TouchPointStates allStates = 0; + for (int i = 0; i < points.count(); ++i) { + QTouchEvent::TouchPoint &touchPoint = points[i]; allStates |= touchPoint.state(); } @@ -754,6 +808,28 @@ void QSymbianControl::processTouchEvent(int pointerNumber, TPointerEvent::TType void QSymbianControl::HandlePointerEventL(const TPointerEvent& pEvent) { #ifdef QT_SYMBIAN_SUPPORTS_ADVANCED_POINTER +#ifdef COE_GROUPED_POINTER_EVENT_VERSION + if (pEvent.iType == TPointerEvent::EDataCCoeEventData) { + // only advanced pointers can be data type pointer events + const TAdvancedPointerEvent *advEvent = pEvent.AdvancedPointerEvent(); + if (!advEvent) + return; + const CCoeEventData& eventData = CCoeEventData::EventData(*advEvent); + if (eventData.Type() == CWsEventWithData::EPointerEvent) { + QT_TRYCATCH_LEAVING(translateMultiEventPointerEvent(eventData)); + // pointer 0 events and unnumbered events should also be handled as mouse events + for (int i=0; iAdvancedPointerEvent(); + if (!advEvent || advEvent->PointerNumber() == 0) { + m_longTapDetector->PointerEventL(*pointerEvent); + QT_TRYCATCH_LEAVING(HandlePointerEvent(*pointerEvent)); + } + } + return; + } + } +#endif if (pEvent.IsAdvancedPointerEvent()) { const TAdvancedPointerEvent *advancedPointerEvent = pEvent.AdvancedPointerEvent(); translateAdvancedPointerEvent(advancedPointerEvent); @@ -827,7 +903,7 @@ void QSymbianControl::HandlePointerEvent(const TPointerEvent& pEvent) //Generate single touch event for S60 5.0 (has touchscreen, does not have advanced pointers) #ifndef QT_SYMBIAN_SUPPORTS_ADVANCED_POINTER if (S60->hasTouchscreen) { - processTouchEvent(0, pEvent.iType, QPointF(globalPos), 1.0); + processTouchEvents(QVector(1, TouchEventParams(0, pEvent.iType, QPointF(globalPos), 1.0))); } #endif diff --git a/src/gui/kernel/qt_s60_p.h b/src/gui/kernel/qt_s60_p.h index 5ad5b00..5b5d5ce 100644 --- a/src/gui/kernel/qt_s60_p.h +++ b/src/gui/kernel/qt_s60_p.h @@ -102,6 +102,10 @@ class QSymbianTypeFaceExtras; typedef QHash QSymbianTypeFaceExtrasHash; typedef void (*QThreadLocalReleaseFunc)(); +#ifdef COE_GROUPED_POINTER_EVENT_VERSION +class CCoeEventData; +#endif + class Q_AUTOTEST_EXPORT QS60ThreadLocalData { public: @@ -308,10 +312,23 @@ private: const QPoint &globalPos, Qt::MouseButton button, Qt::KeyboardModifiers modifiers); - void processTouchEvent(int pointerNumber, TPointerEvent::TType type, QPointF screenPos, qreal pressure); + struct TouchEventParams + { + TouchEventParams(); + TouchEventParams(int pointerNumber, TPointerEvent::TType type, QPointF screenPos, qreal pressure); + int pointerNumber; + TPointerEvent::TType type; + QPointF screenPos; + qreal pressure; + }; + void processTouchEvents(const QVector &touches); void HandleLongTapEventL( const TPoint& aPenEventLocation, const TPoint& aPenEventScreenLocation ); #ifdef QT_SYMBIAN_SUPPORTS_ADVANCED_POINTER +#ifdef COE_GROUPED_POINTER_EVENT_VERSION + void translateMultiEventPointerEvent(const CCoeEventData &eventData ); +#endif void translateAdvancedPointerEvent(const TAdvancedPointerEvent *event); + TouchEventParams TouchEventFromAdvancedPointerEvent(const TAdvancedPointerEvent *event); #endif bool isSplitViewWidget(QWidget *widget); bool hasFocusedAndVisibleChild(QWidget *parentWidget); diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp index 396c306..a37c265 100644 --- a/src/gui/kernel/qwidget_s60.cpp +++ b/src/gui/kernel/qwidget_s60.cpp @@ -1040,8 +1040,12 @@ void QWidgetPrivate::registerTouchWindow() RWindow *rwindow = static_cast(q->effectiveWinId()->DrawableWindow()); QSymbianControl *window = static_cast(q->effectiveWinId()); //Enabling advanced pointer events for controls that already have active windows causes a panic. - if (!window->isControlActive()) + if (!window->isControlActive()) { rwindow->EnableAdvancedPointers(); +#ifdef COE_GROUPED_POINTER_EVENT_VERSION + qt_symbian_throwIfError(window->ConfigureEventData(CCoeControl::EEventDataAllowGroupedPointerEvents)); +#endif + } } #endif } -- cgit v0.12 From c0b59df7488281598d750fe6dcf69d578bc81ff4 Mon Sep 17 00:00:00 2001 From: artoka Date: Tue, 1 Nov 2011 13:47:09 +0100 Subject: Fix for QVector::toList - code example documentation. Code example in the documentation used QString values in QVector. Task-number: QTBUG-21067 Merge-request: 2698 Reviewed-by: Casper van Donderen --- doc/src/snippets/code/src_corelib_tools_qvector.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/src/snippets/code/src_corelib_tools_qvector.cpp b/doc/src/snippets/code/src_corelib_tools_qvector.cpp index fc46d91..fc1a7f7 100644 --- a/doc/src/snippets/code/src_corelib_tools_qvector.cpp +++ b/doc/src/snippets/code/src_corelib_tools_qvector.cpp @@ -148,10 +148,10 @@ vector.lastIndexOf("X"); // returns -1 //! [14] -QVector vect; +QVector vect; vect << "red" << "green" << "blue" << "black"; -QList list = vect.toList(); +QList list = vect.toList(); // list: ["red", "green", "blue", "black"] //! [14] -- cgit v0.12 From cb7ec7c0a6bca8a49809fbbcf6082e34184d8f88 Mon Sep 17 00:00:00 2001 From: artoka Date: Tue, 1 Nov 2011 13:47:09 +0100 Subject: Fix multiple typos in documentation. Link typo in the forum nokia icon article. Typo in the Symbian qt introduction document. Typos in the Diagram Scene example documentation. The link url was ending with a slash character in the icon article. Slash characted removed. In the symbian introduction doc there was a missing "p" character in the environment variables listing (QT_SIS_OPTIONS). There was 6 typos in the Diagram Scene example documentation. Task-numbers: QTBUG-13983, QTBUG-11820, QTBUG-14732 Merge-request: 2698 Reviewed-by: Casper van Donderen --- doc/src/examples/diagramscene.qdoc | 12 ++++++------ doc/src/howtos/appicon.qdoc | 2 +- doc/src/platforms/symbian-introduction.qdoc | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/src/examples/diagramscene.qdoc b/doc/src/examples/diagramscene.qdoc index c7b4bfe..0518a33 100644 --- a/doc/src/examples/diagramscene.qdoc +++ b/doc/src/examples/diagramscene.qdoc @@ -149,11 +149,11 @@ Example}{application example} if you need a high-level introduction to actions. - The is the \c createMenus() function: + Here is the \c createMenus() function: \snippet examples/graphicsview/diagramscene/mainwindow.cpp 24 - We create the three menus' of the example. + We create the three menus of the example. The \c createToolbars() function sets up the examples tool bars. The three \l{QToolButton}s in the \c colorToolBar, the \c @@ -199,7 +199,7 @@ each button; we store the diagram's type, i.e., the DiagramItem::DiagramType enum. We use the stored diagram type when we create new diagram items for the scene. The widgets created - with this function is used in the tool box. + with this function are used in the tool box. Here is the \c createColorMenu() function: @@ -443,7 +443,7 @@ In the \c DiagramScene a mouse click can give three different actions: the item under the mouse can be moved, an item may be - inserted, or an arrow may be connected between to diagram items. + inserted, or an arrow may be connected between two diagram items. Which action a mouse click has depends on the mode, given by the Mode enum, the scene is in. The mode is set with the \c setMode() function. @@ -456,7 +456,7 @@ inserted is set with the \c setItemType() slot. The \c MainWindow and \c DiagramScene share responsibility for - the examples functionality. \c MainWindow handles the following + the example's functionality. \c MainWindow handles the following tasks: the deletion of items, text, and arrows; moving diagram items to the back and front; and setting the scale of the scene. @@ -624,7 +624,7 @@ \snippet examples/graphicsview/diagramscene/diagramitem.cpp 0 - In the constructor we create the items polygon according to + In the constructor we create the item's polygon according to \a diagramType. \l{QGraphicsItem}s are not movable or selectable by default, so we must set these properties. diff --git a/doc/src/howtos/appicon.qdoc b/doc/src/howtos/appicon.qdoc index 8e7601f..2879b05 100644 --- a/doc/src/howtos/appicon.qdoc +++ b/doc/src/howtos/appicon.qdoc @@ -205,7 +205,7 @@ In order to set the application icon for Symbian platform applications, you need an SVG-T icon. For information on how to create SVG-T compliant icons, please refer to - \l{http://wiki.forum.nokia.com/index.php/How_to_create_application_icon(SVG)_in_S60_3rd_edition/} + \l{http://wiki.forum.nokia.com/index.php/How_to_create_application_icon(SVG)_in_S60_3rd_edition} Once the icon is available in the correct format and assuming you are using \c qmake to generate your makefiles, you only need to add a single diff --git a/doc/src/platforms/symbian-introduction.qdoc b/doc/src/platforms/symbian-introduction.qdoc index bacdbc8..f6979ef 100644 --- a/doc/src/platforms/symbian-introduction.qdoc +++ b/doc/src/platforms/symbian-introduction.qdoc @@ -205,7 +205,7 @@ \table \row \o \c QT_SIS_OPTIONS \o Options accepted by \c .sis creation. See \l{Supported options for QT_SIS_OPTIONS}{Supported options} - below. By default no otions are given. + below. By default no options are given. \row \o \c QT_SIS_TARGET \o Target for which \c .sis file is created. Accepted values are build targets listed in previous table. By default last build target. -- cgit v0.12 From c4cd84b3cccab731a0ff54e79ae0a5800b28b2a3 Mon Sep 17 00:00:00 2001 From: artoka Date: Tue, 1 Nov 2011 13:47:10 +0100 Subject: Documentation error in SSL document The order of setting environment variable OPENSSL_LIBS and configure was wrong. OPENSSL_LIBS is now instructed to be set first before configure. Task-number: QTBUG-14521 Merge-request: 2698 Reviewed-by: Casper van Donderen --- doc/src/network-programming/ssl.qdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/network-programming/ssl.qdoc b/doc/src/network-programming/ssl.qdoc index 0bbcd8a..ab84a29 100644 --- a/doc/src/network-programming/ssl.qdoc +++ b/doc/src/network-programming/ssl.qdoc @@ -58,7 +58,7 @@ system: \code - ./configure -openssl-linked OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' + OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked \endcode To disable SSL support in a Qt build, configure Qt with the \c{-no-openssl} -- cgit v0.12 From f0c52aaa9cbb8688b2880faf61c4d589d17bc3cb Mon Sep 17 00:00:00 2001 From: artoka Date: Tue, 1 Nov 2011 13:47:11 +0100 Subject: Qmake project file docs lacked information. The qmake project files documentation lacked information about "*="-operator usage. Added couple of links pointing to the qmake advanced usage - page where "*="-usage is explained. Task-number: QTBUG-9675 Merge-request: 2698 Reviewed-by: Casper van Donderen --- doc/src/development/qmake-manual.qdoc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/doc/src/development/qmake-manual.qdoc b/doc/src/development/qmake-manual.qdoc index 0f85469..eabf2b9 100644 --- a/doc/src/development/qmake-manual.qdoc +++ b/doc/src/development/qmake-manual.qdoc @@ -438,7 +438,10 @@ Note, that you must use "+=", not "=", or \l{qmake Manual#qmake}{\c qmake} will not be able to use Qt's configuration to determine the settings - needed for your project. + needed for your project. More information about operators can be found in the + \l{qmake Advanced Usage#Operators} + {Operators} section of the \l{qmake Advanced Usage} + chapter. \section1 Declaring Qt Libraries @@ -464,6 +467,11 @@ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 4 + More information about operators can be found in the + \l{qmake Advanced Usage#Operators} + {Operators} section of the \l{qmake Advanced Usage} + chapter. + The table below shows the options that can be used with the \c QT variable and the features that are associated with each of them: -- cgit v0.12 From adc3ba426acee1c27e8f62c418b5d458784dbefa Mon Sep 17 00:00:00 2001 From: artoka Date: Tue, 1 Nov 2011 13:47:11 +0100 Subject: Fix multiple typos in QLineF documentation. QLineF::angleTo, QLineF::setLength(), QLineF::dx() and QLineF::dy() were missing detailed information QLineF::angleTo - method returns the angle of two lines compared to each other. Documentation stated that the return value is in degrees. This fix adds specific information that the return value (angle) is returned in _positive_ degrees. setLength()-method missed information whether the angle is also changed if the given length is negative. Added mention that angle is also changed. dx() and dy() didn't mention whether the return value is negative or positive. Added mention that positive if p2()>=p1() else negative. Task-numbers: QTBUG-14759, QTBUG-14756, QTBUG-14677 Merge-request: 2698 Reviewed-by: Casper van Donderen --- src/corelib/tools/qline.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/corelib/tools/qline.cpp b/src/corelib/tools/qline.cpp index 9c7c243..7e3dd34 100644 --- a/src/corelib/tools/qline.cpp +++ b/src/corelib/tools/qline.cpp @@ -488,7 +488,8 @@ bool QLineF::isNull() const /*! \fn qreal QLineF::dx() const - Returns the horizontal component of the line's vector. + Returns the horizontal component of the line's vector. + Return value is positive if x2() >= x1() and negative if x2() < x1(). \sa dy(), pointAt() */ @@ -497,6 +498,7 @@ bool QLineF::isNull() const \fn qreal QLineF::dy() const Returns the vertical component of the line's vector. + Return value is positive if y2() >= y1() and negative if y2() < y1(). \sa dx(), pointAt() */ @@ -506,7 +508,8 @@ bool QLineF::isNull() const Sets the length of the line to the given \a length. QLineF will move the end point - p2() - of the line to give the line its new length. - + If the given \a length is negative the angle() is also changed. + If the line is a null line, the length will remain zero regardless of the length specified. @@ -762,7 +765,7 @@ QLineF::IntersectType QLineF::intersect(const QLineF &l, QPointF *intersectionPo \since 4.4 - Returns the angle (in degrees) from this line to the given \a + Returns the angle (in positive degrees) from this line to the given \a line, taking the direction of the lines into account. If the lines do not intersect within their range, it is the intersection point of the extended lines that serves as origin (see -- cgit v0.12 From 6f64d81da628dcc9180170f2ae4d206c5e2c3899 Mon Sep 17 00:00:00 2001 From: artoka Date: Tue, 1 Nov 2011 13:47:12 +0100 Subject: QXmlQuery::bindVariable documentation bug Second code example in the documentation stated that the setQuery-method should be called before bindVariable-method. Changed so that bindVariable-method is called first and then the setQuery-method as it should be. Task-number: QTBUG-17025 Merge-request: 2698 Reviewed-by: Casper van Donderen --- doc/src/snippets/qxmlquery/bindingExample.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/src/snippets/qxmlquery/bindingExample.cpp b/doc/src/snippets/qxmlquery/bindingExample.cpp index 62e19be..a2c53eb 100644 --- a/doc/src/snippets/qxmlquery/bindingExample.cpp +++ b/doc/src/snippets/qxmlquery/bindingExample.cpp @@ -44,6 +44,7 @@ device.open(QIODevice::ReadOnly); QXmlQuery query; - query.setQuery("doc($inputDocument)/query[theDocument]"); query.bindVariable("inputDocument", &device); + query.setQuery("doc($inputDocument)/query[theDocument]"); + //! [0] -- cgit v0.12 From 847e7af62c95a309d1fedbded72a542972f2503d Mon Sep 17 00:00:00 2001 From: artoka Date: Tue, 1 Nov 2011 13:47:13 +0100 Subject: QList document referenced to non existing function QList documentation introduces a QStringList-class and states that it has function: QStringList::find. Function does not exist. Changed so that the mention of the QStringList::find-function is removed from the documentation. Task-number: QTBUG-16164 Merge-request: 2698 Reviewed-by: Casper van Donderen --- src/corelib/tools/qlist.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/corelib/tools/qlist.cpp b/src/corelib/tools/qlist.cpp index 18bfe24..2e95ef8 100644 --- a/src/corelib/tools/qlist.cpp +++ b/src/corelib/tools/qlist.cpp @@ -469,8 +469,8 @@ void **QListData::erase(void **xi) \snippet doc/src/snippets/code/src_corelib_tools_qlistdata.cpp 0 Qt includes a QStringList class that inherits QList\ - and adds a few convenience functions, such as QStringList::join() - and QStringList::find(). (QString::split() creates QStringLists + and adds a convenience function QStringList::join(). + (QString::split() creates QStringLists from strings.) QList stores a list of items. The default constructor creates an -- cgit v0.12 From 24348f5707078a222b439aeee364eb99953059b8 Mon Sep 17 00:00:00 2001 From: artoka Date: Tue, 1 Nov 2011 13:47:14 +0100 Subject: QStyleSheet example used a property that is hidden. In the QStyleSheet documentation an example for boolean used QDialog {etch-disabled-text:1} property that is undocumented. Changed the property to QDialogButtonBox{ dialogbuttonbox-buttons-have-icons: 1; } that is documented. Task-number: QTBUG-11489 Merge-request: 2698 Reviewed-by: Casper van Donderen --- doc/src/snippets/code/doc_src_stylesheet.qdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/snippets/code/doc_src_stylesheet.qdoc b/doc/src/snippets/code/doc_src_stylesheet.qdoc index 99b31c9..b322fc8 100644 --- a/doc/src/snippets/code/doc_src_stylesheet.qdoc +++ b/doc/src/snippets/code/doc_src_stylesheet.qdoc @@ -481,7 +481,7 @@ QTextEdit { background-position: bottom center } //! [81] -QDialog { etch-disabled-text: 1 } +QDialogButtonBox { dialogbuttonbox-buttons-have-icons: 1; } //! [81] -- cgit v0.12 From c462a2e950df19e6a5ef4d034917fddf49385fe0 Mon Sep 17 00:00:00 2001 From: artoka Date: Tue, 1 Nov 2011 13:47:14 +0100 Subject: QNetworkDiskCache documentation missed information Documentation didn't mention which unit (B,kB,MB) is used in setMaximumCacheSize and maximumCacheSize. Added unit to be bytes. Task-number: QTBUG-15562 Merge-request: 2698 Reviewed-by: Casper van Donderen --- src/network/access/qnetworkdiskcache.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/network/access/qnetworkdiskcache.cpp b/src/network/access/qnetworkdiskcache.cpp index 1c515c2..9557f7b 100644 --- a/src/network/access/qnetworkdiskcache.cpp +++ b/src/network/access/qnetworkdiskcache.cpp @@ -478,7 +478,7 @@ void QNetworkDiskCache::updateMetaData(const QNetworkCacheMetaData &metaData) } /*! - Returns the current maximum size for the disk cache. + Returns the current maximum size in bytes for the disk cache. \sa setMaximumCacheSize() */ @@ -489,7 +489,7 @@ qint64 QNetworkDiskCache::maximumCacheSize() const } /*! - Sets the maximum size of the disk cache to be \a size. + Sets the maximum size of the disk cache to be \a size in bytes. If the new size is smaller then the current cache size then the cache will call expire(). -- cgit v0.12 From 511ebd56ee288f0860dd4fdcceac44cd78ea3f7c Mon Sep 17 00:00:00 2001 From: artoka Date: Tue, 1 Nov 2011 13:47:15 +0100 Subject: Invalid links to http://developer.symbian.org Fixed "SBSv2" and "Installing qt for the Symbian platform" links from the installation.qdoc. Fixed platform security link from the external-resources.qdoc. Task-numbers: QTBUG-18313, QTBUG-18313, QTBUG-11312 Merge-request: 2698 Reviewed-by: Casper van Donderen --- doc/src/external-resources.qdoc | 2 +- doc/src/getting-started/installation.qdoc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/src/external-resources.qdoc b/doc/src/external-resources.qdoc index f528bf2..f81f517 100644 --- a/doc/src/external-resources.qdoc +++ b/doc/src/external-resources.qdoc @@ -420,7 +420,7 @@ */ /*! - \externalpage http://developer.symbian.org/wiki/index.php/Platform_Security_%28Fundamentals_of_Symbian_C%2B%2B%29#Self-Signed_Applications + \externalpage http://www.developer.nokia.com/Community/Wiki/Qt_&_Symbian_Platform_Security \title Symbian Platform Security */ diff --git a/doc/src/getting-started/installation.qdoc b/doc/src/getting-started/installation.qdoc index 239f117..a4ae63f 100644 --- a/doc/src/getting-started/installation.qdoc +++ b/doc/src/getting-started/installation.qdoc @@ -590,7 +590,7 @@ the Symbian platform from scratch. The \l{Configuration Options for Qt} page gives a brief overview of these. - SBSv2 (also known as \l{http://developer.symbian.org/wiki/index.php/Introduction_to_RAPTOR} {Raptor}) + SBSv2 (also known as \l{http://projects.developer.nokia.com/raptor/wiki} {Raptor}) is a next-generation Symbian build system. SBSv2 is not officially supported by any of the S60 SDKs currently available from Forum Nokia. @@ -1348,7 +1348,7 @@ We hope you will enjoy using Qt. \endlist - We recommend you to take a look at \l{http://developer.symbian.org/wiki/index.php/Qt_Quick_Start}{Symbian Foundation - Qt Quick Start} + We recommend you to take a look at \l{http://doc.qt.nokia.com/latest/install-symbian.html}{Installing Qt for the Symbian platform} to get more information about how to setup the development environment. \sa {Known Issues} -- cgit v0.12 From 09c2405c1da26156f1aa37e2ff341fea4552c2e3 Mon Sep 17 00:00:00 2001 From: artoka Date: Tue, 1 Nov 2011 13:47:16 +0100 Subject: QPointer made no mention of QWeakPointer QPointer didn't mention QWeakPointer although those are "related" to each other. Added link to "see also" section. Task-number: QTBUG-20721 Merge-request: 2698 Reviewed-by: Casper van Donderen --- src/corelib/kernel/qpointer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/kernel/qpointer.cpp b/src/corelib/kernel/qpointer.cpp index c7fcf4f..87e903f 100644 --- a/src/corelib/kernel/qpointer.cpp +++ b/src/corelib/kernel/qpointer.cpp @@ -97,7 +97,7 @@ Note that class \c T must inherit QObject, or a compilation or link error will result. - \sa QSharedPointer, QObject, QObjectCleanupHandler + \sa QSharedPointer, QWeakPointer, QObject, QObjectCleanupHandler */ /*! -- cgit v0.12 From e71c2a6d13e079e9e4d7a8446f2ef4c6958b18f8 Mon Sep 17 00:00:00 2001 From: artoka Date: Tue, 1 Nov 2011 13:47:17 +0100 Subject: QGLColormap example was invalid QGLColormap example missed int argc and char *argv[] from main - method. Filling the QGLColormap with for - loop was not working because of the 0 - size. Added arguments to main - method and changed the filling so that for-loop uses size of 256. Task-number: QTBUG-3563 Merge-request: 2698 Reviewed-by: Casper van Donderen --- doc/src/snippets/code/src_opengl_qglcolormap.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/src/snippets/code/src_opengl_qglcolormap.cpp b/doc/src/snippets/code/src_opengl_qglcolormap.cpp index 3bd780b..535777d 100644 --- a/doc/src/snippets/code/src_opengl_qglcolormap.cpp +++ b/doc/src/snippets/code/src_opengl_qglcolormap.cpp @@ -42,7 +42,7 @@ #include #include -int main() +int main(int argc, char *argv[]) { QApplication app(argc, argv); @@ -51,7 +51,8 @@ int main() // This will fill the colormap with colors ranging from // black to white. - for (int i = 0; i < colormap.size(); i++) + const int size = 256; + for (int i = 0; i < size; ++i) colormap.setEntry(i, qRgb(i, i, i)); widget.setColormap(colormap); -- cgit v0.12 From 13e20c189e7dd9e86dc1419d745c98e2e4dc7739 Mon Sep 17 00:00:00 2001 From: artoka Date: Tue, 1 Nov 2011 13:47:17 +0100 Subject: Errors in QSqlDriver::handle examples In the examples the const char* variable was compared to QString with "==" operator which doesn't work. Changed the comparison to use qstrcmp - method. Task-number: QTBUG-20089 Merge-request: 2698 Reviewed-by: Casper van Donderen --- doc/src/snippets/code/src_sql_kernel_qsqldriver.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/src/snippets/code/src_sql_kernel_qsqldriver.cpp b/doc/src/snippets/code/src_sql_kernel_qsqldriver.cpp index d49b6e0..1a3772f 100644 --- a/doc/src/snippets/code/src_sql_kernel_qsqldriver.cpp +++ b/doc/src/snippets/code/src_sql_kernel_qsqldriver.cpp @@ -41,7 +41,7 @@ //! [0] QSqlDatabase db = ...; QVariant v = db.driver()->handle(); -if (v.isValid() && qstrcmp(v.typeName(), "sqlite3*")==0) { +if (v.isValid() && qstrcmp(v.typeName(), "sqlite3*") == 0) { // v.data() returns a pointer to the handle sqlite3 *handle = *static_cast(v.data()); if (handle != 0) { // check that it is not NULL @@ -52,12 +52,12 @@ if (v.isValid() && qstrcmp(v.typeName(), "sqlite3*")==0) { //! [1] -if (v.typeName() == "PGconn*") { +if (qstrcmp(v.typeName(), "PGconn*") == 0) { PGconn *handle = *static_cast(v.data()); if (handle != 0) ... } -if (v.typeName() == "MYSQL*") { +if (qstrcmp(v.typeName(), "MYSQL*") == 0) { MYSQL *handle = *static_cast(v.data()); if (handle != 0) ... } -- cgit v0.12 From 473f65b678d5ea6ff342e169ceb63fab7790b090 Mon Sep 17 00:00:00 2001 From: artoka Date: Tue, 1 Nov 2011 13:47:18 +0100 Subject: QSPlitter style-sheet example was invalid QSPlitter::handle:pressed - example missed "image:" text when image is set. Added "image:". Task-number: QTBUG-20069 Merge-request: 2698 Reviewed-by: Casper van Donderen --- doc/src/snippets/code/doc_src_stylesheet.qdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/snippets/code/doc_src_stylesheet.qdoc b/doc/src/snippets/code/doc_src_stylesheet.qdoc index b322fc8..78d76a8 100644 --- a/doc/src/snippets/code/doc_src_stylesheet.qdoc +++ b/doc/src/snippets/code/doc_src_stylesheet.qdoc @@ -1479,7 +1479,7 @@ QSplitter::handle:vertical { } QSplitter::handle:pressed { - url(images/splitter_pressed.png); + image: url(images/splitter_pressed.png); } //! [142] -- cgit v0.12 From b6fe7690e2b7eada35d9240f260bfb5bfb20b585 Mon Sep 17 00:00:00 2001 From: artoka Date: Tue, 1 Nov 2011 13:47:19 +0100 Subject: QWebElement example missed information In the example there was told to use button.evaluateJavaScript("click()"); which doesn't work. Instead of "click()" it should be "this.click()". Changed to "this.click()". Task-number: QTBUG-17029 Merge-request: 2698 Reviewed-by: Casper van Donderen --- .../webkit/Source/WebKit/qt/docs/webkitsnippets/webelement/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty/webkit/Source/WebKit/qt/docs/webkitsnippets/webelement/main.cpp b/src/3rdparty/webkit/Source/WebKit/qt/docs/webkitsnippets/webelement/main.cpp index b1781a6..59c124c 100644 --- a/src/3rdparty/webkit/Source/WebKit/qt/docs/webkitsnippets/webelement/main.cpp +++ b/src/3rdparty/webkit/Source/WebKit/qt/docs/webkitsnippets/webelement/main.cpp @@ -57,7 +57,7 @@ static void findButtonAndClick() */ QWebElement button = document.findFirst("input[type=submit]"); - button.evaluateJavaScript("click()"); + button.evaluateJavaScript("this.click()"); //! [Calling a DOM element method] -- cgit v0.12 From d6a389e9a49694f407bd117bb0167f4011645232 Mon Sep 17 00:00:00 2001 From: artoka Date: Tue, 1 Nov 2011 13:47:19 +0100 Subject: qpaintdevice-qt3.html documentation errors Document instructed to user qApp->x11Info() to access x11Info in the examples. The QApplication doesn't have x11Info() -method, QWidget does. Changed the examples to use QWidget instead of QApplication. Task-number: QTBUG-18544 Merge-request: 2698 Reviewed-by: Casper van Donderen --- src/gui/painting/qpainter.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index fb5ce96..72357a6 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -9509,7 +9509,7 @@ void qt_draw_helper(QPainterPrivate *p, const QPainterPath &path, QPainterPrivat \oldcode void *visual = QPaintDevice::x11AppVisual(screen); \newcode - void *visual = qApp->x11Info(screen).visual(); + void *visual = widget->x11Info().appVisual(screen); \endcode \sa QWidget::x11Info(), QPixmap::x11Info() @@ -9521,7 +9521,7 @@ void qt_draw_helper(QPainterPrivate *p, const QPainterPath &path, QPainterPrivat \oldcode unsigned long colormap = QPaintDevice::x11AppColormap(screen); \newcode - unsigned long colormap = qApp->x11Info(screen).colormap(); + unsigned long colormap = widget->x11Info().appColormap(screen); \endcode \sa QWidget::x11Info(), QPixmap::x11Info() @@ -9533,7 +9533,7 @@ void qt_draw_helper(QPainterPrivate *p, const QPainterPath &path, QPainterPrivat \oldcode Display *display = QPaintDevice::x11AppDisplay(); \newcode - Display *display = qApp->x11Info().display(); + Display *display = widget->x11Info().display(); \endcode \sa QWidget::x11Info(), QPixmap::x11Info() @@ -9545,7 +9545,7 @@ void qt_draw_helper(QPainterPrivate *p, const QPainterPath &path, QPainterPrivat \oldcode int screen = QPaintDevice::x11AppScreen(); \newcode - int screen = qApp->x11Info().screen(); + int screen = widget->x11Info().appScreen(); \endcode \sa QWidget::x11Info(), QPixmap::x11Info() @@ -9557,7 +9557,7 @@ void qt_draw_helper(QPainterPrivate *p, const QPainterPath &path, QPainterPrivat \oldcode int depth = QPaintDevice::x11AppDepth(screen); \newcode - int depth = qApp->x11Info(screen).depth(); + int depth = widget->x11Info().appDepth(screen); \endcode \sa QWidget::x11Info(), QPixmap::x11Info() @@ -9569,7 +9569,7 @@ void qt_draw_helper(QPainterPrivate *p, const QPainterPath &path, QPainterPrivat \oldcode int cells = QPaintDevice::x11AppCells(screen); \newcode - int cells = qApp->x11Info(screen).cells(); + int cells = widget->x11Info().appCells(screen); \endcode \sa QWidget::x11Info(), QPixmap::x11Info() @@ -9581,7 +9581,7 @@ void qt_draw_helper(QPainterPrivate *p, const QPainterPath &path, QPainterPrivat \oldcode unsigned long window = QPaintDevice::x11AppRootWindow(screen); \newcode - unsigned long window = qApp->x11Info(screen).appRootWindow(); + unsigned long window = widget->x11Info().appRootWindow(screen); \endcode \sa QWidget::x11Info(), QPixmap::x11Info() @@ -9593,7 +9593,7 @@ void qt_draw_helper(QPainterPrivate *p, const QPainterPath &path, QPainterPrivat \oldcode bool isDefault = QPaintDevice::x11AppDefaultColormap(screen); \newcode - bool isDefault = qApp->x11Info(screen).defaultColormap(); + bool isDefault = widget->x11Info().appDefaultColormap(screen); \endcode \sa QWidget::x11Info(), QPixmap::x11Info() @@ -9605,7 +9605,7 @@ void qt_draw_helper(QPainterPrivate *p, const QPainterPath &path, QPainterPrivat \oldcode bool isDefault = QPaintDevice::x11AppDefaultVisual(screen); \newcode - bool isDefault = qApp->x11Info(screen).defaultVisual(); + bool isDefault = widget->x11Info().appDefaultVisual(screen); \endcode \sa QWidget::x11Info(), QPixmap::x11Info() @@ -9625,7 +9625,7 @@ void qt_draw_helper(QPainterPrivate *p, const QPainterPath &path, QPainterPrivat \oldcode bool isDefault = QPaintDevice::x11AppDpiX(screen); \newcode - bool isDefault = qApp->x11Info(screen).appDpiX(); + bool isDefault = widget->x11Info().appDpiX(screen); \endcode \sa QWidget::x11Info(), QPixmap::x11Info() @@ -9637,7 +9637,7 @@ void qt_draw_helper(QPainterPrivate *p, const QPainterPath &path, QPainterPrivat \oldcode bool isDefault = QPaintDevice::x11AppDpiY(screen); \newcode - bool isDefault = qApp->x11Info(screen).appDpiY(); + bool isDefault = widget->x11Info().appDpiY(screen); \endcode \sa QWidget::x11Info(), QPixmap::x11Info() -- cgit v0.12 From 7a9574558b303ddf75d17399da08889b5c80fa36 Mon Sep 17 00:00:00 2001 From: artoka Date: Tue, 1 Nov 2011 13:47:20 +0100 Subject: Fridge magnet example code snippet error Documentation states that QTextStream::readLine() is used but the example uses ">>" operator. Changed the example to use readLine()-method. Task-number: QTBUG-7678 Merge-request: 2698 Reviewed-by: Casper van Donderen --- examples/draganddrop/fridgemagnets/dragwidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/draganddrop/fridgemagnets/dragwidget.cpp b/examples/draganddrop/fridgemagnets/dragwidget.cpp index 19abfb6..447f7ac 100644 --- a/examples/draganddrop/fridgemagnets/dragwidget.cpp +++ b/examples/draganddrop/fridgemagnets/dragwidget.cpp @@ -58,7 +58,7 @@ DragWidget::DragWidget(QWidget *parent) while (!inputStream.atEnd()) { QString word; - inputStream >> word; + word = inputStream.readLine(); if (!word.isEmpty()) { DragLabel *wordLabel = new DragLabel(word, this); wordLabel->move(x, y); -- cgit v0.12 From 1575462bf90851fb134db4892e93c04b396543f1 Mon Sep 17 00:00:00 2001 From: artoka Date: Tue, 1 Nov 2011 13:47:21 +0100 Subject: Missing icon in the designer documentation In the documentation there was missing icon in the Object Inspector section. Added reference to editbreaklayout.png icon and cleared a bit the description. Added also the image to the doc/src/images - folder. Task-number: QTBUG-17739 Merge-request: 2698 Reviewed-by: Casper van Donderen --- doc/src/development/designer-manual.qdoc | 6 ++++-- doc/src/images/editbreaklayout.png | Bin 0 -> 1321 bytes 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 doc/src/images/editbreaklayout.png diff --git a/doc/src/development/designer-manual.qdoc b/doc/src/development/designer-manual.qdoc index 348931f..f979547 100644 --- a/doc/src/development/designer-manual.qdoc +++ b/doc/src/development/designer-manual.qdoc @@ -694,8 +694,10 @@ the object's name with the in-place editor. Since Qt 4.5, the \gui{Object Inspector} displays the layout state of - the containers. The broken layout icon ###ICON is displayed if there is - something wrong with the layouts. + the containers. The broken layout icon \inlineimage editbreaklayout.png + is displayed if there is something wrong (e.g. layout missing from the + container) with the layouts. + \endtable */ diff --git a/doc/src/images/editbreaklayout.png b/doc/src/images/editbreaklayout.png new file mode 100644 index 0000000..07c5fae Binary files /dev/null and b/doc/src/images/editbreaklayout.png differ -- cgit v0.12