diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-02-01 06:10:49 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-02-01 06:10:49 (GMT) |
commit | 1b4bb02fcb3da77ddfa6281365ba3210aab9daad (patch) | |
tree | ecaab6c64758f41fa9cb5b376b395831a77e6c83 /src | |
parent | ac6bd40b501c63941a4dfc4c1ba500b0c14f74de (diff) | |
parent | dc1cab966938edc5463f26189607ece134549a22 (diff) | |
download | Qt-1b4bb02fcb3da77ddfa6281365ba3210aab9daad.zip Qt-1b4bb02fcb3da77ddfa6281365ba3210aab9daad.tar.gz Qt-1b4bb02fcb3da77ddfa6281365ba3210aab9daad.tar.bz2 |
Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (35 commits)
Fix build due to missing auto-generated files on dbus example
examples/dbus: update remotecontrolledcar example
examples/dbus: update dbus-chat adaptor/interface files
doc: Fix typo in QEvent::ignore() documentation
doc: Fix qmake-manual warn_on/warn_off references
Use X/Open LFS extensions for 64-bit support on directory iteration
nano-optimizations
code cleanup and styling fixes
QDirPrivate: remove unused q_ptr and Q_DECLARE_PUBLIC
QDir: clear internal file lists cache early
QDirPrivate::setPath: always initialize the file engine
optimize QDir::cd()
QDirPrivate::Data: remove needless clear()-s in constructors
QDir::cleanPath: strip trailing slash for "/:/" on non-win platforms
QDir::entry(Info)List(): really use cached data
Fix QDir::operator[] documentation
Move avkon component transparency check to app initialization.
Fix for symbian dialog background transparency.
Assistant docs: Fix link.
QtHelp docs: Fix illegal namespace name.
...
Diffstat (limited to 'src')
30 files changed, 342 insertions, 276 deletions
diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION index 9dd9377..6fe71d6 100644 --- a/src/3rdparty/webkit/VERSION +++ b/src/3rdparty/webkit/VERSION @@ -8,4 +8,4 @@ The commit imported was from the and has the sha1 checksum - e15bd5454732bab9ffff4e1e5a755f41fd4e2eff + 8f5ca3ba5da63a47d4f90bbd867d3e8453443dd3 diff --git a/src/3rdparty/webkit/WebCore/platform/PopupMenu.h b/src/3rdparty/webkit/WebCore/platform/PopupMenu.h index 2315f02..f2fffb5 100644 --- a/src/3rdparty/webkit/WebCore/platform/PopupMenu.h +++ b/src/3rdparty/webkit/WebCore/platform/PopupMenu.h @@ -44,6 +44,7 @@ typedef struct HBITMAP__* HBITMAP; namespace WebCore { class QWebPopup; } +class QGraphicsProxyWidget; #elif PLATFORM(GTK) typedef struct _GtkMenu GtkMenu; typedef struct _GtkMenuItem GtkMenuItem; @@ -147,6 +148,7 @@ private: void clear(); void populate(const IntRect&); QWebPopup* m_popup; + QGraphicsProxyWidget* m_proxy; #elif PLATFORM(WIN) // ScrollBarClient virtual void valueChanged(Scrollbar*); diff --git a/src/3rdparty/webkit/WebCore/platform/qt/PopupMenuQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/PopupMenuQt.cpp index f6ec4f7..989b34c 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/PopupMenuQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/qt/PopupMenuQt.cpp @@ -1,6 +1,7 @@ /* * This file is part of the popup menu implementation for <select> elements in WebCore. * + * Copyright (C) 2009 Girish Ramakrishnan <girish@forwardbias.in> * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) * Copyright (C) 2006 Apple Computer, Inc. * Copyright (C) 2006 Michael Emmel mike.emmel@gmail.com @@ -35,6 +36,9 @@ #include <QAction> #include <QDebug> +#include <QGraphicsProxyWidget> +#include <QGraphicsScene> +#include <QGraphicsView> #include <QListWidget> #include <QListWidgetItem> #include <QMenu> @@ -46,6 +50,7 @@ namespace WebCore { PopupMenu::PopupMenu(PopupMenuClient* client) : m_popupClient(client) + , m_proxy(0) { m_popup = new QWebPopup(client); } @@ -53,6 +58,7 @@ PopupMenu::PopupMenu(PopupMenuClient* client) PopupMenu::~PopupMenu() { delete m_popup; + delete m_proxy; } void PopupMenu::clear() @@ -92,8 +98,19 @@ void PopupMenu::show(const IntRect& r, FrameView* v, int index) rect.moveTopLeft(v->contentsToWindow(r.topLeft())); rect.setHeight(m_popup->sizeHint().height()); - m_popup->setParent(client->ownerWidget()); - m_popup->setGeometry(rect); + if (QGraphicsView* view = qobject_cast<QGraphicsView*>(client->ownerWidget())) { + if (!m_proxy) { + m_proxy = new QGraphicsProxyWidget; + m_proxy->setWidget(m_popup); + view->scene()->addItem(m_proxy); + } else + m_proxy->setVisible(true); + m_proxy->setGeometry(rect); + } else { + m_popup->setParent(client->ownerWidget()); + m_popup->setGeometry(rect); + } + m_popup->setCurrentIndex(index); m_popup->exec(); } diff --git a/src/3rdparty/webkit/WebCore/platform/qt/QWebPopup.cpp b/src/3rdparty/webkit/WebCore/platform/qt/QWebPopup.cpp index d077079..f7ebbc7 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/QWebPopup.cpp +++ b/src/3rdparty/webkit/WebCore/platform/qt/QWebPopup.cpp @@ -26,6 +26,7 @@ #include <QApplication> #include <QInputContext> #include <QMouseEvent> +#include <QGraphicsProxyWidget> namespace WebCore { @@ -67,6 +68,10 @@ void QWebPopup::hidePopup() } QComboBox::hidePopup(); + + if (QGraphicsProxyWidget* proxy = graphicsProxyWidget()) + proxy->setVisible(false); + if (!m_popupVisible) return; diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp index dc7f17e..250e5e5 100644 --- a/src/corelib/io/qdir.cpp +++ b/src/corelib/io/qdir.cpp @@ -52,13 +52,13 @@ #include "qregexp.h" #include "qvector.h" #include "qalgorithms.h" +#include "qvarlengtharray.h" + #ifdef QT_BUILD_CORE_LIB -# include "qresource.h" +# include "qresource.h" +# include "private/qcoreglobaldata_p.h" #endif -#include "qvarlengtharray.h" - -#include "private/qcoreglobaldata_p.h" #include <stdlib.h> QT_BEGIN_NAMESPACE @@ -83,12 +83,10 @@ static QString driveSpec(const QString &path) //************* QDirPrivate class QDirPrivate { - QDir *q_ptr; - Q_DECLARE_PUBLIC(QDir) - friend struct QScopedPointerDeleter<QDirPrivate>; -protected: - QDirPrivate(QDir*, const QDir *copy=0); + +public: + QDirPrivate(const QDir *copy = 0); ~QDirPrivate(); QString initFileEngine(const QString &file); @@ -96,7 +94,6 @@ protected: void updateFileLists() const; void sortFileList(QDir::SortFlags, QFileInfoList &, QStringList *, QFileInfoList *) const; -private: #ifdef QT3_SUPPORT QChar filterSepChar; bool matchAllDirs; @@ -109,28 +106,30 @@ private: sep = QChar(QLatin1Char(' ')); return sep; } - static inline QStringList splitFilters(const QString &nameFilter, QChar sep=0) { - if(sep == 0) + static inline QStringList splitFilters(const QString &nameFilter, QChar sep = 0) { + if (sep == 0) sep = getFilterSepChar(nameFilter); QStringList ret = nameFilter.split(sep); - for(int i = 0; i < ret.count(); i++) + for (int i = 0; i < ret.count(); ++i) ret[i] = ret[i].trimmed(); return ret; } struct Data { inline Data() - : ref(1), fileEngine(0) - { clear(); } + : ref(1), fileEngine(0), listsDirty(1) + {} inline Data(const Data ©) : ref(1), path(copy.path), nameFilters(copy.nameFilters), sort(copy.sort), - filters(copy.filters), fileEngine(0) - { clear(); } + filters(copy.filters), fileEngine(0), listsDirty(1) + {} inline ~Data() { delete fileEngine; } inline void clear() { listsDirty = 1; + files.clear(); + fileInfos.clear(); } mutable QAtomicInt ref; @@ -147,7 +146,6 @@ private: } *data; inline void setPath(const QString &p) { - detach(false); QString path = p; if ((path.endsWith(QLatin1Char('/')) || path.endsWith(QLatin1Char('\\'))) && path.length() > 1) { @@ -156,12 +154,9 @@ private: #endif path.truncate(path.length() - 1); } - if(!data->fileEngine || !QDir::isRelativePath(path)) - path = initFileEngine(path); - data->fileEngine->setFileName(path); + // set the path to be the qt friendly version so then we can operate on it using just / - data->path = data->fileEngine->fileName(QAbstractFileEngine::DefaultName); - data->clear(); + data->path = initFileEngine(path); } inline void reset() { detach(); @@ -170,18 +165,16 @@ private: void detach(bool createFileEngine = true); }; -QDirPrivate::QDirPrivate(QDir *qq, const QDir *copy) : q_ptr(qq) +QDirPrivate::QDirPrivate(const QDir *copy) #ifdef QT3_SUPPORT - , filterSepChar(0) - , matchAllDirs(false) + : filterSepChar(0), matchAllDirs(false) #endif { - if(copy) { + if (copy) { copy->d_func()->data->ref.ref(); data = copy->d_func()->data; } else { data = new QDirPrivate::Data; - data->clear(); } } @@ -190,18 +183,19 @@ QDirPrivate::~QDirPrivate() if (!data->ref.deref()) delete data; data = 0; - q_ptr = 0; } /* For sorting */ -struct QDirSortItem { +struct QDirSortItem +{ mutable QString filename_cache; mutable QString suffix_cache; QFileInfo item; }; -class QDirSortItemComparator { +class QDirSortItemComparator +{ int qt_cmp_si_sort_flags; public: QDirSortItemComparator(int flags) : qt_cmp_si_sort_flags(flags) {} @@ -240,7 +234,7 @@ bool QDirSortItemComparator::operator()(const QDirSortItem &n1, const QDirSortIt f2->suffix_cache = ic ? f2->item.suffix().toLower() : f2->item.suffix(); - r = qt_cmp_si_sort_flags & QDir::LocaleAware + r = qt_cmp_si_sort_flags & QDir::LocaleAware ? f1->suffix_cache.localeAwareCompare(f2->suffix_cache) : f1->suffix_cache.compare(f2->suffix_cache); } @@ -260,7 +254,7 @@ bool QDirSortItemComparator::operator()(const QDirSortItem &n1, const QDirSortIt f2->filename_cache = ic ? f2->item.fileName().toLower() : f2->item.fileName(); - r = qt_cmp_si_sort_flags & QDir::LocaleAware + r = qt_cmp_si_sort_flags & QDir::LocaleAware ? f1->filename_cache.localeAwareCompare(f2->filename_cache) : f1->filename_cache.compare(f2->filename_cache); } @@ -274,16 +268,13 @@ bool QDirSortItemComparator::operator()(const QDirSortItem &n1, const QDirSortIt inline void QDirPrivate::sortFileList(QDir::SortFlags sort, QFileInfoList &l, QStringList *names, QFileInfoList *infos) const { - if(names) - names->clear(); - if(infos) - infos->clear(); + // names and infos are always empty lists or 0 here int n = l.size(); - if(n > 0) { + if (n > 0) { if (n == 1 || (sort & QDir::SortByMask) == QDir::Unsorted) { - if(infos) + if (infos) *infos = l; - if(names) { + if (names) { for (int i = 0; i < n; ++i) names->append(l.at(i).fileName()); } @@ -291,13 +282,13 @@ inline void QDirPrivate::sortFileList(QDir::SortFlags sort, QFileInfoList &l, QScopedArrayPointer<QDirSortItem> si(new QDirSortItem[n]); for (int i = 0; i < n; ++i) si[i].item = l.at(i); - qSort(si.data(), si.data()+n, QDirSortItemComparator(sort)); + qSort(si.data(), si.data() + n, QDirSortItemComparator(sort)); // put them back in the list(s) - if(infos) { + if (infos) { for (int i = 0; i < n; ++i) infos->append(si[i].item); } - if(names) { + if (names) { for (int i = 0; i < n; ++i) names->append(si[i].item.fileName()); } @@ -307,7 +298,7 @@ inline void QDirPrivate::sortFileList(QDir::SortFlags sort, QFileInfoList &l, inline void QDirPrivate::updateFileLists() const { - if(data->listsDirty) { + if (data->listsDirty) { QFileInfoList l; QDirIterator it(data->path, data->nameFilters, data->filters); while (it.hasNext()) { @@ -319,12 +310,11 @@ inline void QDirPrivate::updateFileLists() const } } -QString QDirPrivate::initFileEngine(const QString &path) +inline QString QDirPrivate::initFileEngine(const QString &path) { detach(false); - delete data->fileEngine; - data->fileEngine = 0; data->clear(); + delete data->fileEngine; data->fileEngine = QAbstractFileEngine::create(path); return data->fileEngine->fileName(QAbstractFileEngine::DefaultName); } @@ -520,8 +510,7 @@ void QDirPrivate::detach(bool createFileEngine) \sa currentPath() */ - -QDir::QDir(const QString &path) : d_ptr(new QDirPrivate(this)) +QDir::QDir(const QString &path) : d_ptr(new QDirPrivate) { Q_D(QDir); d->setPath(path.isEmpty() ? QString::fromLatin1(".") : path); @@ -548,18 +537,17 @@ QDir::QDir(const QString &path) : d_ptr(new QDirPrivate(this)) \sa exists(), setPath(), setNameFilter(), setFilter(), setSorting() */ - QDir::QDir(const QString &path, const QString &nameFilter, - SortFlags sort, Filters filters) : d_ptr(new QDirPrivate(this)) + SortFlags sort, Filters filters) : d_ptr(new QDirPrivate) { Q_D(QDir); d->setPath(path.isEmpty() ? QString::fromLatin1(".") : path); d->data->nameFilters = QDir::nameFiltersFromString(nameFilter); bool empty = d->data->nameFilters.isEmpty(); - if(!empty) { + if (!empty) { empty = true; - for(int i = 0; i < d->data->nameFilters.size(); ++i) { - if(!d->data->nameFilters.at(i).isEmpty()) { + for (int i = 0; i < d->data->nameFilters.size(); ++i) { + if (!d->data->nameFilters.at(i).isEmpty()) { empty = false; break; } @@ -577,8 +565,7 @@ QDir::QDir(const QString &path, const QString &nameFilter, \sa operator=() */ - -QDir::QDir(const QDir &dir) : d_ptr(new QDirPrivate(this, &dir)) +QDir::QDir(const QDir &dir) : d_ptr(new QDirPrivate(&dir)) { } @@ -586,7 +573,6 @@ QDir::QDir(const QDir &dir) : d_ptr(new QDirPrivate(this, &dir)) Destroys the QDir object frees up its resources. This has no effect on the underlying directory in the file system. */ - QDir::~QDir() { } @@ -607,7 +593,6 @@ QDir::~QDir() \sa path(), absolutePath(), exists(), cleanPath(), dirName(), absoluteFilePath(), isRelative(), makeAbsolute() */ - void QDir::setPath(const QString &path) { Q_D(QDir); @@ -624,7 +609,6 @@ void QDir::setPath(const QString &path) \sa setPath(), absolutePath(), exists(), cleanPath(), dirName(), absoluteFilePath(), toNativeSeparators(), makeAbsolute() */ - QString QDir::path() const { Q_D(const QDir); @@ -639,7 +623,6 @@ QString QDir::path() const \sa setPath(), canonicalPath(), exists(), cleanPath(), dirName(), absoluteFilePath() */ - QString QDir::absolutePath() const { Q_D(const QDir); @@ -649,7 +632,6 @@ QString QDir::absolutePath() const return cleanPath(ret); } - /*! Returns the canonical path, i.e. a path without symbolic links or redundant "." or ".." elements. @@ -666,12 +648,11 @@ QString QDir::absolutePath() const \sa path(), absolutePath(), exists(), cleanPath(), dirName(), absoluteFilePath() */ - QString QDir::canonicalPath() const { Q_D(const QDir); - if(!d->data->fileEngine) + if (!d->data->fileEngine) return QLatin1String(""); return cleanPath(d->data->fileEngine->fileName(QAbstractFileEngine::CanonicalName)); } @@ -687,7 +668,6 @@ QString QDir::canonicalPath() const \sa path(), filePath(), absolutePath(), absoluteFilePath() */ - QString QDir::dirName() const { Q_D(const QDir); @@ -706,7 +686,6 @@ QString QDir::dirName() const \sa dirName() absoluteFilePath(), isRelative(), canonicalPath() */ - QString QDir::filePath(const QString &fileName) const { Q_D(const QDir); @@ -714,7 +693,7 @@ QString QDir::filePath(const QString &fileName) const return QString(fileName); QString ret = d->data->path; - if(!fileName.isEmpty()) { + if (!fileName.isEmpty()) { if (!ret.isEmpty() && ret[(int)ret.length()-1] != QLatin1Char('/') && fileName[0] != QLatin1Char('/')) ret += QLatin1Char('/'); ret += fileName; @@ -730,13 +709,12 @@ QString QDir::filePath(const QString &fileName) const \sa relativeFilePath() filePath() canonicalPath() */ - QString QDir::absoluteFilePath(const QString &fileName) const { Q_D(const QDir); if (isAbsolutePath(fileName)) return fileName; - if(!d->data->fileEngine) + if (!d->data->fileEngine) return fileName; QString ret; @@ -744,7 +722,7 @@ QString QDir::absoluteFilePath(const QString &fileName) const if (isRelativePath(d->data->path)) //get pwd ret = QFSFileEngine::currentPath(fileName); #endif - if(!d->data->path.isEmpty() && d->data->path != QLatin1String(".")) { + if (!d->data->path.isEmpty() && d->data->path != QLatin1String(".")) { if (!ret.isEmpty() && !ret.endsWith(QLatin1Char('/'))) ret += QLatin1Char('/'); ret += d->data->path; @@ -764,7 +742,6 @@ QString QDir::absoluteFilePath(const QString &fileName) const \sa absoluteFilePath() filePath() canonicalPath() */ - QString QDir::relativeFilePath(const QString &fileName) const { QString dir = absolutePath(); @@ -851,7 +828,7 @@ QString QDir::toNativeSeparators(const QString &pathName) { QString n(pathName); #if defined(Q_FS_FAT) || defined(Q_OS_OS2EMX) || defined(Q_OS_SYMBIAN) - for (int i=0; i<(int)n.length(); i++) { + for (int i = 0; i < (int)n.length(); ++i) { if (n[i] == QLatin1Char('/')) n[i] = QLatin1Char('\\'); } @@ -875,7 +852,7 @@ QString QDir::fromNativeSeparators(const QString &pathName) { QString n(pathName); #if defined(Q_FS_FAT) || defined(Q_OS_OS2EMX) || defined(Q_OS_SYMBIAN) - for (int i=0; i<(int)n.length(); i++) { + for (int i = 0; i < (int)n.length(); ++i) { if (n[i] == QLatin1Char('\\')) n[i] = QLatin1Char('/'); } @@ -894,7 +871,6 @@ QString QDir::fromNativeSeparators(const QString &pathName) \sa cdUp(), isReadable(), exists(), path() */ - bool QDir::cd(const QString &dirName) { Q_D(QDir); @@ -930,14 +906,13 @@ bool QDir::cd(const QString &dirName) } } } - { - QFileInfo fi(newPath); - if (!(fi.exists() && fi.isDir())) - return false; - } - d->setPath(newPath); - refresh(); + QDir dir(*this); + dir.setPath(newPath); + if (!dir.exists()) + return false; + + *this = dir; return true; } @@ -951,7 +926,6 @@ bool QDir::cd(const QString &dirName) \sa cd(), isReadable(), exists(), path() */ - bool QDir::cdUp() { return cd(QString::fromLatin1("..")); @@ -960,7 +934,6 @@ bool QDir::cdUp() /*! Returns the string list set by setNameFilters() */ - QStringList QDir::nameFilters() const { Q_D(const QDir); @@ -983,10 +956,10 @@ QStringList QDir::nameFilters() const \sa nameFilters(), setFilter() */ - void QDir::setNameFilters(const QStringList &nameFilters) { Q_D(QDir); + d->detach(); d->data->nameFilters = nameFilters; } @@ -1001,7 +974,6 @@ void QDir::setNameFilters(const QStringList &nameFilters) \sa {The Qt Resource System}, QResource::addSearchPath() */ - void QDir::addResourceSearchPath(const QString &path) { #ifdef QT_BUILD_CORE_LIB @@ -1039,7 +1011,7 @@ void QDir::setSearchPaths(const QString &prefix, const QStringList &searchPaths) return; } - for (int i = 0; i < prefix.count(); i++) { + for (int i = 0; i < prefix.count(); ++i) { if (!prefix.at(i).isLetterOrNumber()) { qWarning("QDir::setSearchPaths: Prefix can only contain letters or numbers"); return; @@ -1089,7 +1061,6 @@ QStringList QDir::searchPaths(const QString &prefix) /*! Returns the value set by setFilter() */ - QDir::Filters QDir::filter() const { Q_D(const QDir); @@ -1171,7 +1142,6 @@ QDir::Filters QDir::filter() const \sa filter(), setNameFilters() */ - void QDir::setFilter(Filters filters) { Q_D(QDir); @@ -1185,7 +1155,6 @@ void QDir::setFilter(Filters filters) \sa setSorting() SortFlag */ - QDir::SortFlags QDir::sorting() const { Q_D(const QDir); @@ -1231,7 +1200,6 @@ QDir::SortFlags QDir::sorting() const \sa sorting() SortFlag */ - void QDir::setSorting(SortFlags sort) { Q_D(QDir); @@ -1240,7 +1208,6 @@ void QDir::setSorting(SortFlags sort) d->data->sort = sort; } - /*! Returns the total number of directories and files in the directory. @@ -1248,7 +1215,6 @@ void QDir::setSorting(SortFlags sort) \sa operator[](), entryList() */ - uint QDir::count() const { Q_D(const QDir); @@ -1260,13 +1226,10 @@ uint QDir::count() const /*! Returns the file name at position \a pos in the list of file names. Equivalent to entryList().at(index). - - Returns an empty string if \a pos is out of range or if the - entryList() function failed. + \a pos must be a valid index position in the list (i.e., 0 <= pos < count()). \sa count(), entryList() */ - QString QDir::operator[](int pos) const { Q_D(const QDir); @@ -1294,7 +1257,6 @@ QString QDir::operator[](int pos) const \sa entryInfoList(), setNameFilters(), setSorting(), setFilter() */ - QStringList QDir::entryList(Filters filters, SortFlags sort) const { Q_D(const QDir); @@ -1342,7 +1304,6 @@ QFileInfoList QDir::entryInfoList(Filters filters, SortFlags sort) const \sa entryInfoList(), setNameFilters(), setSorting(), setFilter() */ - QStringList QDir::entryList(const QStringList &nameFilters, Filters filters, SortFlags sort) const { @@ -1356,10 +1317,12 @@ QStringList QDir::entryList(const QStringList &nameFilters, Filters filters, #endif if (sort == NoSort) sort = d->data->sort; - if (filters == NoFilter && sort == NoSort && nameFilters == d->data->nameFilters) { + + if (filters == d->data->filters && sort == d->data->sort && nameFilters == d->data->nameFilters) { d->updateFileLists(); return d->data->files; } + QFileInfoList l; QDirIterator it(d->data->path, nameFilters, filters); while (it.hasNext()) { @@ -1387,7 +1350,6 @@ QStringList QDir::entryList(const QStringList &nameFilters, Filters filters, \sa entryList(), setNameFilters(), setSorting(), setFilter(), isReadable(), exists() */ - QFileInfoList QDir::entryInfoList(const QStringList &nameFilters, Filters filters, SortFlags sort) const { @@ -1401,10 +1363,12 @@ QFileInfoList QDir::entryInfoList(const QStringList &nameFilters, Filters filter #endif if (sort == NoSort) sort = d->data->sort; - if (filters == NoFilter && sort == NoSort && nameFilters == d->data->nameFilters) { + + if (filters == d->data->filters && sort == d->data->sort && nameFilters == d->data->nameFilters) { d->updateFileLists(); return d->data->fileInfos; } + QFileInfoList l; QDirIterator it(d->data->path, nameFilters, filters); while (it.hasNext()) { @@ -1423,7 +1387,6 @@ QFileInfoList QDir::entryInfoList(const QStringList &nameFilters, Filters filter \sa rmdir() */ - bool QDir::mkdir(const QString &dirName) const { Q_D(const QDir); @@ -1432,7 +1395,7 @@ bool QDir::mkdir(const QString &dirName) const qWarning("QDir::mkdir: Empty or null file name(s)"); return false; } - if(!d->data->fileEngine) + if (!d->data->fileEngine) return false; QString fn = filePath(dirName); @@ -1448,7 +1411,6 @@ bool QDir::mkdir(const QString &dirName) const \sa mkdir() */ - bool QDir::rmdir(const QString &dirName) const { Q_D(const QDir); @@ -1457,7 +1419,7 @@ bool QDir::rmdir(const QString &dirName) const qWarning("QDir::rmdir: Empty or null file name(s)"); return false; } - if(!d->data->fileEngine) + if (!d->data->fileEngine) return false; QString fn = filePath(dirName); @@ -1474,7 +1436,6 @@ bool QDir::rmdir(const QString &dirName) const \sa rmpath() */ - bool QDir::mkpath(const QString &dirPath) const { Q_D(const QDir); @@ -1483,7 +1444,7 @@ bool QDir::mkpath(const QString &dirPath) const qWarning("QDir::mkpath: Empty or null file name(s)"); return false; } - if(!d->data->fileEngine) + if (!d->data->fileEngine) return false; QString fn = filePath(dirPath); @@ -1509,7 +1470,7 @@ bool QDir::rmpath(const QString &dirPath) const qWarning("QDir::rmpath: Empty or null file name(s)"); return false; } - if(!d->data->fileEngine) + if (!d->data->fileEngine) return false; QString fn = filePath(dirPath); @@ -1525,17 +1486,16 @@ bool QDir::rmpath(const QString &dirPath) const \sa QFileInfo::isReadable() */ - - bool QDir::isReadable() const { Q_D(const QDir); - if(!d->data->fileEngine) + if (!d->data->fileEngine) return false; - const QAbstractFileEngine::FileFlags info = d->data->fileEngine->fileFlags(QAbstractFileEngine::DirectoryType - |QAbstractFileEngine::PermsMask); - if(!(info & QAbstractFileEngine::DirectoryType)) + const QAbstractFileEngine::FileFlags info = + d->data->fileEngine->fileFlags(QAbstractFileEngine::DirectoryType + | QAbstractFileEngine::PermsMask); + if (!(info & QAbstractFileEngine::DirectoryType)) return false; return info & QAbstractFileEngine::ReadUserPerm; } @@ -1551,19 +1511,17 @@ bool QDir::isReadable() const \sa QFileInfo::exists(), QFile::exists() */ - bool QDir::exists() const { Q_D(const QDir); - if(!d->data->fileEngine) + if (!d->data->fileEngine) return false; const QAbstractFileEngine::FileFlags info = - d->data->fileEngine->fileFlags( - QAbstractFileEngine::DirectoryType - | QAbstractFileEngine::ExistsFlag - | QAbstractFileEngine::Refresh); - if(!(info & QAbstractFileEngine::DirectoryType)) + d->data->fileEngine->fileFlags(QAbstractFileEngine::DirectoryType + | QAbstractFileEngine::ExistsFlag + | QAbstractFileEngine::Refresh); + if (!(info & QAbstractFileEngine::DirectoryType)) return false; return info & QAbstractFileEngine::ExistsFlag; } @@ -1580,12 +1538,11 @@ bool QDir::exists() const \sa root(), rootPath() */ - bool QDir::isRoot() const { Q_D(const QDir); - if(!d->data->fileEngine) + if (!d->data->fileEngine) return true; return d->data->fileEngine->fileFlags(QAbstractFileEngine::FlagsMask) & QAbstractFileEngine::RootFlag; } @@ -1615,12 +1572,11 @@ bool QDir::isRoot() const \sa makeAbsolute() isAbsolute() isAbsolutePath() cleanPath() */ - bool QDir::isRelative() const { Q_D(const QDir); - if(!d->data->fileEngine) + if (!d->data->fileEngine) return false; return d->data->fileEngine->isRelativePath(); } @@ -1633,20 +1589,19 @@ bool QDir::isRelative() const \sa isAbsolute() isAbsolutePath() isRelative() cleanPath() */ - bool QDir::makeAbsolute() // ### What do the return values signify? { Q_D(QDir); - if(!d->data->fileEngine) + if (!d->data->fileEngine) return false; QString absolutePath = d->data->fileEngine->fileName(QAbstractFileEngine::AbsoluteName); - if(QDir::isRelativePath(absolutePath)) + if (QDir::isRelativePath(absolutePath)) return false; d->detach(); d->data->path = absolutePath; d->data->fileEngine->setFileName(absolutePath); - if(!(d->data->fileEngine->fileFlags(QAbstractFileEngine::TypesMask) & QAbstractFileEngine::DirectoryType)) + if (!(d->data->fileEngine->fileFlags(QAbstractFileEngine::TypesMask) & QAbstractFileEngine::DirectoryType)) return false; return true; } @@ -1660,22 +1615,21 @@ bool QDir::makeAbsolute() // ### What do the return values signify? \snippet doc/src/snippets/code/src_corelib_io_qdir.cpp 10 */ - bool QDir::operator==(const QDir &dir) const { const QDirPrivate *d = d_func(); const QDirPrivate *other = dir.d_func(); - if(d->data == other->data) + if (d->data == other->data) return true; Q_ASSERT(d->data->fileEngine && other->data->fileEngine); - if(d->data->fileEngine->caseSensitive() != other->data->fileEngine->caseSensitive()) + if (d->data->fileEngine->caseSensitive() != other->data->fileEngine->caseSensitive()) return false; - if(d->data->filters == other->data->filters + if (d->data->filters == other->data->filters && d->data->sort == other->data->sort && d->data->nameFilters == other->data->nameFilters) { QString dir1 = absolutePath(), dir2 = dir.absolutePath(); - if(!other->data->fileEngine->caseSensitive()) + if (!other->data->fileEngine->caseSensitive()) return (dir1.toLower() == dir2.toLower()); return (dir1 == dir2); @@ -1688,7 +1642,6 @@ bool QDir::operator==(const QDir &dir) const Makes a copy of the \a dir object and assigns it to this QDir object. */ - QDir &QDir::operator=(const QDir &dir) { if (this == &dir) @@ -1707,7 +1660,6 @@ QDir &QDir::operator=(const QDir &dir) Use setPath() instead. */ - QDir &QDir::operator=(const QString &path) { Q_D(QDir); @@ -1728,22 +1680,19 @@ QDir &QDir::operator=(const QString &path) \snippet doc/src/snippets/code/src_corelib_io_qdir.cpp 11 */ - /*! Removes the file, \a fileName. Returns true if the file is removed successfully; otherwise returns false. */ - bool QDir::remove(const QString &fileName) { if (fileName.isEmpty()) { qWarning("QDir::remove: Empty or null file name"); return false; } - QString p = filePath(fileName); - return QFile::remove(p); + return QFile::remove(filePath(fileName)); } /*! @@ -1757,7 +1706,6 @@ bool QDir::remove(const QString &fileName) fail. For example, on at least one file system rename() fails if \a newName points to an open file. */ - bool QDir::rename(const QString &oldName, const QString &newName) { Q_D(QDir); @@ -1766,11 +1714,11 @@ bool QDir::rename(const QString &oldName, const QString &newName) qWarning("QDir::rename: Empty or null file name(s)"); return false; } - if(!d->data->fileEngine) + if (!d->data->fileEngine) return false; QFile file(filePath(oldName)); - if(!file.exists()) + if (!file.exists()) return false; return file.rename(filePath(newName)); } @@ -1785,15 +1733,13 @@ bool QDir::rename(const QString &oldName, const QString &newName) \sa QFileInfo::exists(), QFile::exists() */ - bool QDir::exists(const QString &name) const { if (name.isEmpty()) { qWarning("QDir::exists: Empty or null file name"); return false; } - QString tmp = filePath(name); - return QFile::exists(tmp); + return QFile::exists(filePath(name)); } /*! @@ -1805,7 +1751,6 @@ bool QDir::exists(const QString &name) const \sa root(), rootPath() */ - QFileInfoList QDir::drives() { #ifdef QT_NO_FSFILEENGINE @@ -1825,7 +1770,6 @@ QFileInfoList QDir::drives() user using their operating system's separator use toNativeSeparators(). */ - QChar QDir::separator() { #if defined (Q_FS_FAT) || defined(Q_WS_WIN) || defined(Q_OS_SYMBIAN) @@ -1844,9 +1788,8 @@ QChar QDir::separator() Returns true if the directory was successfully changed; otherwise returns false. - \sa current() currentPath() home() root() temp() + \sa current(), currentPath(), home(), root(), temp() */ - bool QDir::setCurrent(const QString &path) { #ifdef QT_NO_FSFILEENGINE @@ -1865,13 +1808,13 @@ bool QDir::setCurrent(const QString &path) The directory is constructed using the absolute path of the current directory, ensuring that its path() will be the same as its absolutePath(). - \sa currentPath(), home(), root(), temp() + \sa currentPath(), setCurrent(), home(), root(), temp() */ /*! Returns the absolute path of the application's current directory. - \sa current(), homePath(), rootPath(), tempPath() + \sa current(), setCurrent(), homePath(), rootPath(), tempPath() */ QString QDir::currentPath() { @@ -1888,7 +1831,7 @@ QString QDir::currentPath() Use currentPath() instead. - \sa currentPath() + \sa currentPath(), setCurrent() */ /*! @@ -1945,14 +1888,14 @@ QString QDir::homePath() } /*! - \fn QString QDir::homeDirPath() + \fn QString QDir::homeDirPath() - Returns the absolute path of the user's home directory. + Returns the absolute path of the user's home directory. - Use homePath() instead. + Use homePath() instead. - \sa homePath() - */ + \sa homePath() +*/ /*! \fn QDir QDir::temp() @@ -2018,13 +1961,13 @@ QString QDir::rootPath() } /*! - \fn QString QDir::rootDirPath() + \fn QString QDir::rootDirPath() - Returns the absolute path of the root directory. + Returns the absolute path of the root directory. - Use rootPath() instead. + Use rootPath() instead. - \sa rootPath() + \sa rootPath() */ #ifndef QT_NO_REGEXP @@ -2037,11 +1980,9 @@ QString QDir::rootPath() \sa {QRegExp wildcard matching}, QRegExp::exactMatch() entryList() entryInfoList() */ - - bool QDir::match(const QStringList &filters, const QString &fileName) { - for(QStringList::ConstIterator sit = filters.begin(); sit != filters.end(); ++sit) { + for (QStringList::ConstIterator sit = filters.constBegin(); sit != filters.constEnd(); ++sit) { QRegExp rx(*sit, Qt::CaseInsensitive, QRegExp::Wildcard); if (rx.exactMatch(fileName)) return true; @@ -2057,12 +1998,11 @@ bool QDir::match(const QStringList &filters, const QString &fileName) \sa {QRegExp wildcard matching}, QRegExp::exactMatch() entryList() entryInfoList() */ - bool QDir::match(const QString &filter, const QString &fileName) { return match(nameFiltersFromString(filter), fileName); } -#endif +#endif // QT_NO_REGEXP /*! Removes all multiple directory separators "/" and resolves any @@ -2075,15 +2015,14 @@ bool QDir::match(const QString &filter, const QString &fileName) \sa absolutePath() canonicalPath() */ - QString QDir::cleanPath(const QString &path) { if (path.isEmpty()) return path; QString name = path; QChar dir_separator = separator(); - if(dir_separator != QLatin1Char('/')) - name.replace(dir_separator, QLatin1Char('/')); + if (dir_separator != QLatin1Char('/')) + name.replace(dir_separator, QLatin1Char('/')); int used = 0, levels = 0; const int len = name.length(); @@ -2091,27 +2030,27 @@ QString QDir::cleanPath(const QString &path) QChar *out = outVector.data(); const QChar *p = name.unicode(); - for(int i = 0, last = -1, iwrite = 0; i < len; i++) { - if(p[i] == QLatin1Char('/')) { - while(i < len-1 && p[i+1] == QLatin1Char('/')) { + for (int i = 0, last = -1, iwrite = 0; i < len; ++i) { + if (p[i] == QLatin1Char('/')) { + while (i < len-1 && p[i+1] == QLatin1Char('/')) { #if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) //allow unc paths - if(!i) + if (!i) break; #endif i++; } bool eaten = false; - if(i < len - 1 && p[i+1] == QLatin1Char('.')) { + if (i < len - 1 && p[i+1] == QLatin1Char('.')) { int dotcount = 1; - if(i < len - 2 && p[i+2] == QLatin1Char('.')) + if (i < len - 2 && p[i+2] == QLatin1Char('.')) dotcount++; - if(i == len - dotcount - 1) { - if(dotcount == 1) { + if (i == len - dotcount - 1) { + if (dotcount == 1) { break; - } else if(levels) { - if(last == -1) { - for(int i2 = iwrite-1; i2 >= 0; i2--) { - if(out[i2] == QLatin1Char('/')) { + } else if (levels) { + if (last == -1) { + for (int i2 = iwrite-1; i2 >= 0; i2--) { + if (out[i2] == QLatin1Char('/')) { last = i2; break; } @@ -2120,11 +2059,11 @@ QString QDir::cleanPath(const QString &path) used -= iwrite - last - 1; break; } - } else if(p[i+dotcount+1] == QLatin1Char('/')) { - if(dotcount == 2 && levels) { - if(last == -1 || iwrite - last == 1) { - for(int i2 = (last == -1) ? (iwrite-1) : (last-1); i2 >= 0; i2--) { - if(out[i2] == QLatin1Char('/')) { + } else if (p[i+dotcount+1] == QLatin1Char('/')) { + if (dotcount == 2 && levels) { + if (last == -1 || iwrite - last == 1) { + for (int i2 = (last == -1) ? (iwrite-1) : (last-1); i2 >= 0; i2--) { + if (out[i2] == QLatin1Char('/')) { eaten = true; last = i2; break; @@ -2133,7 +2072,7 @@ QString QDir::cleanPath(const QString &path) } else { eaten = true; } - if(eaten) { + if (eaten) { levels--; used -= iwrite - last; iwrite = last; @@ -2145,38 +2084,38 @@ QString QDir::cleanPath(const QString &path) iwrite = qMax(0, last); last = -1; ++i; - } else if(dotcount == 1) { + } else if (dotcount == 1) { eaten = true; } - if(eaten) + if (eaten) i += dotcount; } else { levels++; } - } else if(last != -1 && iwrite - last == 1) { + } else if (last != -1 && iwrite - last == 1) { #if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN) eaten = (iwrite > 2); #else eaten = true; #endif last = -1; - } else if(last != -1 && i == len-1) { + } else if (last != -1 && i == len-1) { eaten = true; } else { levels++; } - if(!eaten) + if (!eaten) last = i - (i - iwrite); else continue; - } else if(!i && p[i] == QLatin1Char('.')) { + } else if (!i && p[i] == QLatin1Char('.')) { int dotcount = 1; - if(len >= 1 && p[1] == QLatin1Char('.')) + if (len >= 1 && p[1] == QLatin1Char('.')) dotcount++; - if(len >= dotcount && p[dotcount] == QLatin1Char('/')) { - if(dotcount == 1) { + if (len >= dotcount && p[dotcount] == QLatin1Char('/')) { + if (dotcount == 1) { i++; - while(i+1 < len-1 && p[i+1] == QLatin1Char('/')) + while (i+1 < len-1 && p[i+1] == QLatin1Char('/')) i++; continue; } @@ -2185,16 +2124,15 @@ QString QDir::cleanPath(const QString &path) out[iwrite++] = p[i]; used++; } - QString ret; - if(used == len) - ret = name; - else - ret = QString(out, used); + QString ret = (used == len ? name : QString(out, used)); // Strip away last slash except for root directories - if (ret.endsWith(QLatin1Char('/')) - && !(ret.size() == 1 || (ret.size() == 3 && ret.at(1) == QLatin1Char(':')))) - ret = ret.left(ret.length() - 1); + if (ret.length() > 1 && ret.endsWith(QLatin1Char('/'))) { +#ifdef Q_OS_WIN + if (!(ret.length() == 3 && ret.at(1) == QLatin1Char(':'))) +#endif + ret.chop(1); + } return ret; } @@ -2205,7 +2143,6 @@ QString QDir::cleanPath(const QString &path) \sa isRelative() isAbsolutePath() makeAbsolute() */ - bool QDir::isRelativePath(const QString &path) { return QFileInfo(path).isRelative(); @@ -2214,7 +2151,6 @@ bool QDir::isRelativePath(const QString &path) /*! Refreshes the directory information. */ - void QDir::refresh() const { Q_D(const QDir); @@ -2229,7 +2165,6 @@ void QDir::refresh() const there is more than one filter, each pair of filters is separated by a space or by a semicolon.) */ - QStringList QDir::nameFiltersFromString(const QString &nameFilter) { return QDirPrivate::splitFilters(nameFilter); @@ -2421,7 +2356,8 @@ void QDir::setNameFilter(const QString &nameFilter) Use QDir::SortFlags instead. */ -#endif +#endif // QT3_SUPPORT + #ifndef QT_NO_DEBUG_STREAM QDebug operator<<(QDebug debug, QDir::Filters filters) { @@ -2484,9 +2420,6 @@ QDebug operator<<(QDebug debug, const QDir &dir) << ')'; return debug.space(); } - - - -#endif +#endif // QT_NO_DEBUG_STREAM QT_END_NAMESPACE diff --git a/src/corelib/io/qdir.h b/src/corelib/io/qdir.h index 6be4922..186dd2f 100644 --- a/src/corelib/io/qdir.h +++ b/src/corelib/io/qdir.h @@ -83,7 +83,7 @@ public: Modified = 0x080, Hidden = 0x100, System = 0x200, - + AccessMask = 0x3F0, AllDirs = 0x400, @@ -215,6 +215,7 @@ public: static bool match(const QStringList &filters, const QString &fileName); static bool match(const QString &filter, const QString &fileName); #endif + static QString cleanPath(const QString &path); void refresh() const; @@ -246,7 +247,7 @@ public: inline QT3_SUPPORT static QString homeDirPath() { return homePath(); } inline QT3_SUPPORT static QString rootDirPath() { return rootPath(); } inline QT3_SUPPORT static QString cleanDirPath(const QString &name) { return cleanPath(name); } -#endif +#endif // QT3_SUPPORT }; Q_DECLARE_OPERATORS_FOR_FLAGS(QDir::Filters) diff --git a/src/corelib/io/qfilesystemwatcher_dnotify.cpp b/src/corelib/io/qfilesystemwatcher_dnotify.cpp index 1a218c7..82470c8 100644 --- a/src/corelib/io/qfilesystemwatcher_dnotify.cpp +++ b/src/corelib/io/qfilesystemwatcher_dnotify.cpp @@ -39,6 +39,7 @@ ** ****************************************************************************/ +#include "qplatformdefs.h" #include "qfilesystemwatcher.h" #include "qfilesystemwatcher_dnotify_p.h" @@ -255,16 +256,16 @@ QStringList QDnotifyFileSystemWatcherEngine::addPaths(const QStringList &paths, if(fd == 0) { - DIR *d = ::opendir(path.toUtf8().constData()); + QT_DIR *d = QT_OPENDIR(path.toUtf8().constData()); if(!d) continue; // Could not open directory - DIR *parent = 0; + QT_DIR *parent = 0; QDir parentDir(path); if(!parentDir.isRoot()) { parentDir.cdUp(); - parent = ::opendir(parentDir.path().toUtf8().constData()); + parent = QT_OPENDIR(parentDir.path().toUtf8().constData()); if(!parent) { - ::closedir(d); + QT_CLOSEDIR(d); continue; } } @@ -272,8 +273,8 @@ QStringList QDnotifyFileSystemWatcherEngine::addPaths(const QStringList &paths, fd = qt_safe_dup(::dirfd(d)); int parentFd = parent ? qt_safe_dup(::dirfd(parent)) : 0; - ::closedir(d); - if(parent) ::closedir(parent); + QT_CLOSEDIR(d); + if(parent) QT_CLOSEDIR(parent); Q_ASSERT(fd); if(::fcntl(fd, F_SETSIG, SIGIO) || diff --git a/src/corelib/io/qfsfileengine_iterator_unix.cpp b/src/corelib/io/qfsfileengine_iterator_unix.cpp index b68b1a1..bfdb03e 100644 --- a/src/corelib/io/qfsfileengine_iterator_unix.cpp +++ b/src/corelib/io/qfsfileengine_iterator_unix.cpp @@ -58,13 +58,13 @@ public: #endif {} - DIR *dir; - dirent *dirEntry; + QT_DIR *dir; + QT_DIRENT *dirEntry; bool done; #if defined(_POSIX_THREAD_SAFE_FUNCTIONS) && !defined(Q_OS_CYGWIN) && !defined(Q_OS_SYMBIAN) // for readdir_r - dirent *mt_file; + QT_DIRENT *mt_file; #endif }; @@ -76,14 +76,14 @@ void QFSFileEngineIterator::advance() return; #if defined(_POSIX_THREAD_SAFE_FUNCTIONS) && !defined(Q_OS_CYGWIN) && !defined(Q_OS_SYMBIAN) - if (::readdir_r(platform->dir, platform->mt_file, &platform->dirEntry) != 0) + if (QT_READDIR_R(platform->dir, platform->mt_file, &platform->dirEntry) != 0) platform->done = true; #else // ### add local lock to prevent breaking reentrancy - platform->dirEntry = ::readdir(platform->dir); + platform->dirEntry = QT_READDIR(platform->dir); #endif // _POSIX_THREAD_SAFE_FUNCTIONS if (!platform->dirEntry) { - ::closedir(platform->dir); + QT_CLOSEDIR(platform->dir); platform->dir = 0; platform->done = true; #if defined(_POSIX_THREAD_SAFE_FUNCTIONS) && !defined(Q_OS_CYGWIN) && !defined(Q_OS_SYMBIAN) @@ -101,7 +101,7 @@ void QFSFileEngineIterator::newPlatformSpecifics() void QFSFileEngineIterator::deletePlatformSpecifics() { if (platform->dir) { - ::closedir(platform->dir); + QT_CLOSEDIR(platform->dir); #if defined(_POSIX_THREAD_SAFE_FUNCTIONS) && !defined(Q_OS_CYGWIN) && !defined(Q_OS_SYMBIAN) delete [] platform->mt_file; platform->mt_file = 0; @@ -115,18 +115,18 @@ bool QFSFileEngineIterator::hasNext() const { if (!platform->done && !platform->dir) { QFSFileEngineIterator *that = const_cast<QFSFileEngineIterator *>(this); - if ((that->platform->dir = ::opendir(QFile::encodeName(path()).data())) == 0) { + if ((that->platform->dir = QT_OPENDIR(QFile::encodeName(path()).data())) == 0) { that->platform->done = true; } else { // ### Race condition; we should use fpathconf and dirfd(). long maxPathName = ::pathconf(QFile::encodeName(path()).data(), _PC_NAME_MAX); if ((int) maxPathName == -1) maxPathName = FILENAME_MAX; - maxPathName += sizeof(dirent) + 1; + maxPathName += sizeof(QT_DIRENT) + 1; #if defined(_POSIX_THREAD_SAFE_FUNCTIONS) && !defined(Q_OS_CYGWIN) && !defined(Q_OS_SYMBIAN) if (that->platform->mt_file) delete [] that->platform->mt_file; - that->platform->mt_file = (dirent *)new char[maxPathName]; + that->platform->mt_file = (QT_DIRENT *)new char[maxPathName]; #endif that->advance(); diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp index 74e5f74..a131d6c 100644 --- a/src/corelib/io/qurl.cpp +++ b/src/corelib/io/qurl.cpp @@ -5932,7 +5932,7 @@ void QUrl::detach() */ bool QUrl::isDetached() const { - return d && d->ref == 1; + return !d || d->ref == 1; } diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp index 5dc931b..6c87a86 100644 --- a/src/corelib/tools/qbytearray.cpp +++ b/src/corelib/tools/qbytearray.cpp @@ -561,6 +561,7 @@ QByteArray qUncompress(const uchar* data, int nbytes) d->ref = 1; d->alloc = d->size = len; d->data = d->array; + d->array[len] = 0; return QByteArray(d.take(), 0, 0); diff --git a/src/gui/dialogs/qdialog.cpp b/src/gui/dialogs/qdialog.cpp index 3650051..9ff2ad8 100644 --- a/src/gui/dialogs/qdialog.cpp +++ b/src/gui/dialogs/qdialog.cpp @@ -265,6 +265,14 @@ QDialog::QDialog(QWidget *parent, Qt::WindowFlags f) if (!qt_wince_is_smartphone()) setWindowFlags(windowFlags() | Qt::WindowOkButtonHint | QFlag(qt_wince_is_mobile() ? 0 : Qt::WindowCancelButtonHint)); #endif + +#ifdef Q_WS_S60 + if (S60->avkonComponentsSupportTransparency) { + bool noSystemBackground = testAttribute(Qt::WA_NoSystemBackground); + setAttribute(Qt::WA_TranslucentBackground); // also sets WA_NoSystemBackground + setAttribute(Qt::WA_NoSystemBackground, noSystemBackground); // restore system background attribute + } +#endif } #ifdef QT3_SUPPORT @@ -294,6 +302,14 @@ QDialog::QDialog(QDialogPrivate &dd, QWidget *parent, Qt::WindowFlags f) if (!qt_wince_is_smartphone()) setWindowFlags(windowFlags() | Qt::WindowOkButtonHint | QFlag(qt_wince_is_mobile() ? 0 : Qt::WindowCancelButtonHint)); #endif + +#ifdef Q_WS_S60 + if (S60->avkonComponentsSupportTransparency) { + bool noSystemBackground = testAttribute(Qt::WA_NoSystemBackground); + setAttribute(Qt::WA_TranslucentBackground); // also sets WA_NoSystemBackground + setAttribute(Qt::WA_NoSystemBackground, noSystemBackground); // restore system background attribute + } +#endif } /*! diff --git a/src/gui/embedded/qscreen_qws.cpp b/src/gui/embedded/qscreen_qws.cpp index 8eb8123..65a3fb5 100644 --- a/src/gui/embedded/qscreen_qws.cpp +++ b/src/gui/embedded/qscreen_qws.cpp @@ -39,6 +39,7 @@ ** ****************************************************************************/ +#include "qplatformdefs.h" #include "qscreen_qws.h" #include "qcolormap.h" @@ -3223,13 +3224,13 @@ QScreen * qt_probe_bus() return qt_dodriver("unaccel.so",0,0); } - DIR * dirptr=opendir("/proc/bus/pci"); + QT_DIR *dirptr = QT_OPENDIR("/proc/bus/pci"); if(!dirptr) return qt_dodriver("unaccel.so",0,0); - DIR * dirptr2; - dirent * cards; + QT_DIR * dirptr2; + QT_DIRENT *cards; - dirent * busses=readdir(dirptr); + QT_DIRENT *busses = QT_READDIR(dirptr); while(busses) { if(busses->d_name[0]!='.') { @@ -3237,9 +3238,9 @@ QScreen * qt_probe_bus() strcpy(buf,"/proc/bus/pci/"); qstrcpy(buf+14,busses->d_name); int p=strlen(buf); - dirptr2=opendir(buf); + dirptr2 = QT_OPENDIR(buf); if(dirptr2) { - cards=readdir(dirptr2); + cards = QT_READDIR(dirptr2); while(cards) { if(cards->d_name[0]!='.') { buf[p]='/'; @@ -3248,14 +3249,14 @@ QScreen * qt_probe_bus() if(ret) return ret; } - cards=readdir(dirptr2); + cards = QT_READDIR(dirptr2); } - closedir(dirptr2); + QT_CLOSEDIR(dirptr2); } } - busses=readdir(dirptr); + busses = QT_READDIR(dirptr); } - closedir(dirptr); + QT_CLOSEDIR(dirptr); return qt_dodriver("unaccel.so",0,0); } diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index a51f5b8..20b8030 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -71,6 +71,7 @@ # include <private/qcoefepinputcontext_p.h> # endif # include <private/qs60mainapplication_p.h> +# include <centralrepository.h> #endif #include "private/qstylesheetstyle_p.h" @@ -1204,6 +1205,24 @@ void qt_init(QApplicationPrivate * /* priv */, int) S60->virtualMouseRequired = false; } + S60->avkonComponentsSupportTransparency = false; + +#ifdef Q_WS_S60 + TUid KCRUidAvkon = { 0x101F876E }; + TUint32 KAknAvkonTransparencyEnabled = 0x0000000D; + + CRepository* repository = 0; + TRAP(err, repository = CRepository::NewL(KCRUidAvkon)); + + if(err == KErrNone) { + TInt value = 0; + err = repository->Get(KAknAvkonTransparencyEnabled, value); + if(err == KErrNone) { + S60->avkonComponentsSupportTransparency = (value==1) ? true : false; + } + } +#endif + if (touch) { QApplicationPrivate::navigationMode = Qt::NavigationModeNone; } else { diff --git a/src/gui/kernel/qt_s60_p.h b/src/gui/kernel/qt_s60_p.h index b417065..1163055 100644 --- a/src/gui/kernel/qt_s60_p.h +++ b/src/gui/kernel/qt_s60_p.h @@ -121,6 +121,7 @@ public: int virtualMouseRequired : 1; int qtOwnsS60Environment : 1; int supportsPremultipliedAlpha : 1; + int avkonComponentsSupportTransparency : 1; QApplication::QS60MainApplicationFactory s60ApplicationFactory; // typedef'ed pointer type static inline void updateScreenSize(); static inline RWsSession& wsSession(); diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index 8804742..eed76e5 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -2026,6 +2026,14 @@ void QWidgetPrivate::updateIsOpaque() } #endif +#ifdef Q_WS_S60 + if (q->windowType() == Qt::Dialog && q->testAttribute(Qt::WA_TranslucentBackground) + && S60->avkonComponentsSupportTransparency) { + setOpaque(false); + return; + } +#endif + if (q->testAttribute(Qt::WA_OpaquePaintEvent) || q->testAttribute(Qt::WA_PaintOnScreen)) { setOpaque(true); return; diff --git a/src/gui/styles/qgtkstyle.cpp b/src/gui/styles/qgtkstyle.cpp index 211f4ce..b5f052b 100644 --- a/src/gui/styles/qgtkstyle.cpp +++ b/src/gui/styles/qgtkstyle.cpp @@ -1106,8 +1106,14 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element, // ### Note: Ubuntulooks breaks when the proper widget is passed // Murrine engine requires a widget not to get RGBA check - warnings GtkWidget *gtkCheckButton = d->gtkWidget(QLS("GtkCheckButton")); - gtkPainter.paintOption(gtkCheckButton , buttonRect, state, shadow, gtkRadioButton->style, QLS("radiobutton")); - + QString key(QLS("radiobutton")); + if (option->state & State_HasFocus) { // Themes such as Nodoka check this flag + key += QLatin1Char('f'); + GTK_WIDGET_SET_FLAGS(gtkCheckButton, GTK_HAS_FOCUS); + } + gtkPainter.paintOption(gtkCheckButton , buttonRect, state, shadow, gtkRadioButton->style, key); + if (option->state & State_HasFocus) + GTK_WIDGET_UNSET_FLAGS(gtkCheckButton, GTK_HAS_FOCUS); } break; @@ -1128,6 +1134,11 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element, int spacing; GtkWidget *gtkCheckButton = d->gtkWidget(QLS("GtkCheckButton")); + QString key(QLS("checkbutton")); + if (option->state & State_HasFocus) { // Themes such as Nodoka checks this flag + key += QLatin1Char('f'); + GTK_WIDGET_SET_FLAGS(gtkCheckButton, GTK_HAS_FOCUS); + } // Some styles such as aero-clone assume they can paint in the spacing area gtkPainter.setClipRect(option->rect); @@ -1137,7 +1148,10 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element, QRect checkRect = option->rect.adjusted(spacing, spacing, -spacing, -spacing); gtkPainter.paintCheckbox(gtkCheckButton, checkRect, state, shadow, gtkCheckButton->style, - QLS("checkbutton")); + key); + if (option->state & State_HasFocus) + GTK_WIDGET_UNSET_FLAGS(gtkCheckButton, GTK_HAS_FOCUS); + } break; diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index ca0b8c7..100303e 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -3056,11 +3056,13 @@ bool qt_s60_fill_background(QPainter *painter, const QRegion &rgn, const QBrush const QPaintDevice *target = painter->device(); if (target->devType() == QInternal::Widget) { const QWidget *widget = static_cast<const QWidget *>(target); - const QVector<QRect> &rects = rgn.rects(); - for (int i = 0; i < rects.size(); ++i) { - const QRect rect(rects.at(i)); - painter->drawPixmap(rect.topLeft(), backgroundTexture, - rect.translated(qt_s60_fill_background_offset(widget))); + if (!widget->testAttribute(Qt::WA_TranslucentBackground)) { + const QVector<QRect> &rects = rgn.rects(); + for (int i = 0; i < rects.size(); ++i) { + const QRect rect(rects.at(i)); + painter->drawPixmap(rect.topLeft(), backgroundTexture, + rect.translated(qt_s60_fill_background_offset(widget))); + } } } return true; diff --git a/src/gui/styles/qs60style_s60.cpp b/src/gui/styles/qs60style_s60.cpp index 12a1544..9d2dc66 100644 --- a/src/gui/styles/qs60style_s60.cpp +++ b/src/gui/styles/qs60style_s60.cpp @@ -731,7 +731,6 @@ QPixmap QS60StyleModeSpecifics::createSkinnedGraphicsLX(QS60StylePrivate::SkinFr MAknsSkinInstance* skinInstance = AknsUtils::SkinInstance(); QPixmap result; -// QS60WindowSurface::unlockBitmapHeap(); static const TDisplayMode displayMode = S60->supportsPremultipliedAlpha ? Q_SYMBIAN_ECOLOR16MAP : EColor16MA; static const TInt drawParam = S60->supportsPremultipliedAlpha ? KAknsDrawParamDefault : KAknsDrawParamNoClearUnderImage|KAknsDrawParamRGBOnly; diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp index 20baac8..fff7097 100644 --- a/src/network/access/qhttpnetworkconnection.cpp +++ b/src/network/access/qhttpnetworkconnection.cpp @@ -564,7 +564,8 @@ bool QHttpNetworkConnectionPrivate::fillPipeline(QList<HttpMessagePair> &queue, } -QString QHttpNetworkConnectionPrivate::errorDetail(QNetworkReply::NetworkError errorCode, QAbstractSocket* socket) +QString QHttpNetworkConnectionPrivate::errorDetail(QNetworkReply::NetworkError errorCode, QAbstractSocket* socket, + const QString &extraDetail) { Q_ASSERT(socket); @@ -581,7 +582,7 @@ QString QHttpNetworkConnectionPrivate::errorDetail(QNetworkReply::NetworkError e errorString = QLatin1String(QT_TRANSLATE_NOOP("QHttp", "Connection closed")); break; case QNetworkReply::TimeoutError: - errorString = QLatin1String(QT_TRANSLATE_NOOP("QHttp", "HTTP request failed")); + errorString = QLatin1String(QT_TRANSLATE_NOOP("QAbstractSocket", "Socket operation timed out")); break; case QNetworkReply::ProxyAuthenticationRequiredError: errorString = QLatin1String(QT_TRANSLATE_NOOP("QHttp", "Proxy requires authentication")); @@ -600,7 +601,7 @@ QString QHttpNetworkConnectionPrivate::errorDetail(QNetworkReply::NetworkError e break; default: // all other errors are treated as QNetworkReply::UnknownNetworkError - errorString = QLatin1String(QT_TRANSLATE_NOOP("QHttp", "HTTP request failed")); + errorString = extraDetail; break; } return errorString; diff --git a/src/network/access/qhttpnetworkconnection_p.h b/src/network/access/qhttpnetworkconnection_p.h index 76da883..03cf09c 100644 --- a/src/network/access/qhttpnetworkconnection_p.h +++ b/src/network/access/qhttpnetworkconnection_p.h @@ -185,7 +185,8 @@ public: void createAuthorization(QAbstractSocket *socket, QHttpNetworkRequest &request); - QString errorDetail(QNetworkReply::NetworkError errorCode, QAbstractSocket *socket); + QString errorDetail(QNetworkReply::NetworkError errorCode, QAbstractSocket *socket, + const QString &extraDetail = QString()); #ifndef QT_NO_COMPRESS bool expand(QAbstractSocket *socket, QHttpNetworkReply *reply, bool dataComplete); diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp index 1955dba..b80ae9a 100644 --- a/src/network/access/qhttpnetworkconnectionchannel.cpp +++ b/src/network/access/qhttpnetworkconnectionchannel.cpp @@ -872,7 +872,7 @@ void QHttpNetworkConnectionChannel::_q_error(QAbstractSocket::SocketError socket break; } QPointer<QObject> that = connection; - QString errorString = connection->d_func()->errorDetail(errorCode, socket); + QString errorString = connection->d_func()->errorDetail(errorCode, socket, socket->errorString()); if (send2Reply) { if (reply) { reply->d_func()->errorString = errorString; diff --git a/src/network/ssl/qsslcertificate.cpp b/src/network/ssl/qsslcertificate.cpp index 8993e72..9a9b1b5 100644 --- a/src/network/ssl/qsslcertificate.cpp +++ b/src/network/ssl/qsslcertificate.cpp @@ -696,11 +696,11 @@ QSslCertificate QSslCertificatePrivate::QSslCertificate_from_X509(X509 *x509) static bool matchLineFeed(const QByteArray &pem, int *offset) { - char ch = pem.at(*offset); + char ch; // ignore extra whitespace at the end of the line - while (ch == ' ' && *offset < pem.size()) - ch = pem.at(++*offset); + while (*offset < pem.size() && (ch = pem.at(*offset)) == ' ') + ++*offset; if (ch == '\n') { *offset += 1; @@ -732,7 +732,7 @@ QList<QSslCertificate> QSslCertificatePrivate::certificatesFromPem(const QByteAr break; offset = endPos + sizeof(ENDCERTSTRING) - 1; - if (!matchLineFeed(pem, &offset)) + if (offset < pem.size() && !matchLineFeed(pem, &offset)) break; QByteArray decoded = QByteArray::fromBase64( diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp index de1583e..892d330 100644 --- a/src/network/ssl/qsslsocket_openssl.cpp +++ b/src/network/ssl/qsslsocket_openssl.cpp @@ -553,6 +553,12 @@ void QSslSocketBackendPrivate::transmit() #endif writeBuffer.free(writtenBytes); totalBytesWritten += writtenBytes; + + if (writtenBytes < nextDataBlockSize) { + // break out of the writing loop and try again after we had read + transmitting = true; + break; + } } if (totalBytesWritten > 0) { @@ -586,12 +592,26 @@ void QSslSocketBackendPrivate::transmit() while ((pendingBytes = plainSocket->bytesAvailable()) > 0) { // Read encrypted data from the socket into a buffer. data.resize(pendingBytes); - int decryptedBytesRead = plainSocket->read(data.data(), pendingBytes); + // just peek() here because q_BIO_write could write less data than expected + int encryptedBytesRead = plainSocket->peek(data.data(), pendingBytes); #ifdef QSSLSOCKET_DEBUG - qDebug() << "QSslSocketBackendPrivate::transmit: read" << decryptedBytesRead << "encrypted bytes from the socket"; + qDebug() << "QSslSocketBackendPrivate::transmit: read" << encryptedBytesRead << "encrypted bytes from the socket"; #endif // Write encrypted data from the buffer into the read BIO. - q_BIO_write(readBio, data.constData(), decryptedBytesRead); + int writtenToBio = q_BIO_write(readBio, data.constData(), encryptedBytesRead); + + // do the actual read() here and throw away the results. + if (writtenToBio > 0) { + // ### TODO: make this cheaper by not making it memcpy. E.g. make it work with data=0x0 or make it work with seek + plainSocket->read(data.data(), writtenToBio); + } else { + // ### Better error handling. + q->setErrorString(QSslSocket::tr("Unable to decrypt data: %1").arg(SSL_ERRORSTR())); + q->setSocketError(QAbstractSocket::UnknownSocketError); + emit q->error(QAbstractSocket::UnknownSocketError); + return; + } + transmitting = true; } diff --git a/src/s60installs/bwins/QtCoreu.def b/src/s60installs/bwins/QtCoreu.def index fe752c8..e7e890c 100644 --- a/src/s60installs/bwins/QtCoreu.def +++ b/src/s60installs/bwins/QtCoreu.def @@ -4398,4 +4398,5 @@ EXPORTS ?object@WrappedEvent@QStateMachine@@QBEPAVQObject@@XZ @ 4397 NONAME ; class QObject * QStateMachine::WrappedEvent::object(void) const ?sender@SignalEvent@QStateMachine@@QBEPAVQObject@@XZ @ 4398 NONAME ; class QObject * QStateMachine::SignalEvent::sender(void) const ?signalIndex@SignalEvent@QStateMachine@@QBEHXZ @ 4399 NONAME ; int QStateMachine::SignalEvent::signalIndex(void) const + ?disconnectOne@QMetaObject@@SA_NPBVQObject@@H0H@Z @ 4400 NONAME ; bool QMetaObject::disconnectOne(class QObject const *, int, class QObject const *, int) diff --git a/src/s60installs/bwins/QtGuiu.def b/src/s60installs/bwins/QtGuiu.def index 7a629d7..da65230 100644 --- a/src/s60installs/bwins/QtGuiu.def +++ b/src/s60installs/bwins/QtGuiu.def @@ -10694,10 +10694,10 @@ EXPORTS ?swipeAngle@QSwipeGesture@@QBEMXZ @ 10693 NONAME ; float QSwipeGesture::swipeAngle(void) const ?symbianEventFilter@QApplication@@UAE_NPBVQSymbianEvent@@@Z @ 10694 NONAME ; bool QApplication::symbianEventFilter(class QSymbianEvent const *) ?symbianFilterEvent@QInputContext@@UAE_NPAVQWidget@@PBVQSymbianEvent@@@Z @ 10695 NONAME ; bool QInputContext::symbianFilterEvent(class QWidget *, class QSymbianEvent const *) - ?symbianHandleCommand@QApplicationPrivate@@QAEHH@Z @ 10696 NONAME ; int QApplicationPrivate::symbianHandleCommand(int) + ?symbianHandleCommand@QApplicationPrivate@@QAEHH@Z @ 10696 NONAME ABSENT ; int QApplicationPrivate::symbianHandleCommand(int) ?symbianProcessEvent@QApplication@@QAEHPBVQSymbianEvent@@@Z @ 10697 NONAME ; int QApplication::symbianProcessEvent(class QSymbianEvent const *) - ?symbianProcessWsEvent@QApplicationPrivate@@QAEHPBVTWsEvent@@@Z @ 10698 NONAME ; int QApplicationPrivate::symbianProcessWsEvent(class TWsEvent const *) - ?symbianResourceChange@QApplicationPrivate@@QAEHH@Z @ 10699 NONAME ; int QApplicationPrivate::symbianResourceChange(int) + ?symbianProcessWsEvent@QApplicationPrivate@@QAEHPBVTWsEvent@@@Z @ 10698 NONAME ABSENT ; int QApplicationPrivate::symbianProcessWsEvent(class TWsEvent const *) + ?symbianResourceChange@QApplicationPrivate@@QAEHH@Z @ 10699 NONAME ABSENT ; int QApplicationPrivate::symbianResourceChange(int) ?symbol@Parser@QCss@@QBEABUSymbol@2@XZ @ 10700 NONAME ; struct QCss::Symbol const & QCss::Parser::symbol(void) const ?sync@QPaintEngineEx@@UAEXXZ @ 10701 NONAME ; void QPaintEngineEx::sync(void) ?syncBackingStore@QWidgetPrivate@@QAEXABVQRegion@@@Z @ 10702 NONAME ; void QWidgetPrivate::syncBackingStore(class QRegion const &) @@ -12525,4 +12525,12 @@ EXPORTS ??0Tab@QTextOption@@QAE@ABU01@@Z @ 12524 NONAME ; QTextOption::Tab::Tab(struct QTextOption::Tab const &) ?effectiveBoundingRect@QGraphicsItemPrivate@@QBE?AVQRectF@@ABV2@@Z @ 12525 NONAME ; class QRectF QGraphicsItemPrivate::effectiveBoundingRect(class QRectF const &) const ?glyphCache@QFontEngine@@QBEPAVQFontEngineGlyphCache@@PAXW4Type@2@ABVQTransform@@@Z @ 12526 NONAME ; class QFontEngineGlyphCache * QFontEngine::glyphCache(void *, enum QFontEngineGlyphCache::Type, class QTransform const &) const + ?qt_blurImage@@YAXAAVQImage@@M_NH@Z @ 12527 NONAME ; void qt_blurImage(class QImage &, float, bool, int) + ?qt_blurImage@@YAXPAVQPainter@@AAVQImage@@M_N2H@Z @ 12528 NONAME ; void qt_blurImage(class QPainter *, class QImage &, float, bool, bool, int) + ?qt_halfScaled@@YA?AVQImage@@ABV1@@Z @ 12529 NONAME ; class QImage qt_halfScaled(class QImage const &) + ?qt_memrotate90@@YAXPBIHHHPAIH@Z @ 12530 NONAME ; void qt_memrotate90(unsigned int const *, int, int, int, unsigned int *, int) + ?qt_memrotate90_gl@@YAXPBIHHHPAIH@Z @ 12531 NONAME ; void qt_memrotate90_gl(unsigned int const *, int, int, int, unsigned int *, int) + ?symbianHandleCommand@QApplicationPrivate@@QAEHPBVQSymbianEvent@@@Z @ 12532 NONAME ; int QApplicationPrivate::symbianHandleCommand(class QSymbianEvent const *) + ?symbianProcessWsEvent@QApplicationPrivate@@QAEHPBVQSymbianEvent@@@Z @ 12533 NONAME ; int QApplicationPrivate::symbianProcessWsEvent(class QSymbianEvent const *) + ?symbianResourceChange@QApplicationPrivate@@QAEHPBVQSymbianEvent@@@Z @ 12534 NONAME ; int QApplicationPrivate::symbianResourceChange(class QSymbianEvent const *) diff --git a/src/s60installs/bwins/QtScriptu.def b/src/s60installs/bwins/QtScriptu.def index 8b53524..19f7037 100644 --- a/src/s60installs/bwins/QtScriptu.def +++ b/src/s60installs/bwins/QtScriptu.def @@ -369,4 +369,5 @@ EXPORTS ?willExecuteProgram@QScriptEngineAgentPrivate@@UAEXABVDebuggerCallFrame@QTJSC@@HH@Z @ 368 NONAME ; void QScriptEngineAgentPrivate::willExecuteProgram(class QTJSC::DebuggerCallFrame const &, int, int) ?staticMetaObject@QScriptExtensionPlugin@@2UQMetaObject@@B @ 369 NONAME ; struct QMetaObject const QScriptExtensionPlugin::staticMetaObject ?staticMetaObject@QScriptEngine@@2UQMetaObject@@B @ 370 NONAME ; struct QMetaObject const QScriptEngine::staticMetaObject + ?isQObject@QScriptDeclarativeClass@@UBE_NXZ @ 371 NONAME ; bool QScriptDeclarativeClass::isQObject(void) const diff --git a/src/s60installs/eabi/QtCoreu.def b/src/s60installs/eabi/QtCoreu.def index 89fa76f..a427ff9 100644 --- a/src/s60installs/eabi/QtCoreu.def +++ b/src/s60installs/eabi/QtCoreu.def @@ -3633,4 +3633,5 @@ EXPORTS _ZTIN13QStateMachine12WrappedEventE @ 3632 NONAME _ZTVN13QStateMachine11SignalEventE @ 3633 NONAME _ZTVN13QStateMachine12WrappedEventE @ 3634 NONAME + _ZN11QMetaObject13disconnectOneEPK7QObjectiS2_i @ 3635 NONAME diff --git a/src/s60installs/eabi/QtGuiu.def b/src/s60installs/eabi/QtGuiu.def index b6862e5..05f620c 100644 --- a/src/s60installs/eabi/QtGuiu.def +++ b/src/s60installs/eabi/QtGuiu.def @@ -11629,9 +11629,9 @@ EXPORTS _ZN18QTapAndHoldGestureC1EP7QObject @ 11628 NONAME _ZN18QTapAndHoldGestureC2EP7QObject @ 11629 NONAME _ZN19QAbstractScrollArea18setViewportMarginsERK8QMargins @ 11630 NONAME - _ZN19QApplicationPrivate20symbianHandleCommandEi @ 11631 NONAME - _ZN19QApplicationPrivate21symbianProcessWsEventEPK8TWsEvent @ 11632 NONAME - _ZN19QApplicationPrivate21symbianResourceChangeEi @ 11633 NONAME + _ZN19QApplicationPrivate20symbianHandleCommandEi @ 11631 NONAME ABSENT + _ZN19QApplicationPrivate21symbianProcessWsEventEPK8TWsEvent @ 11632 NONAME ABSENT + _ZN19QApplicationPrivate21symbianResourceChangeEi @ 11633 NONAME ABSENT _ZN19QGraphicsBlurEffect12setBlurHintsE6QFlagsINS_8BlurHintEE @ 11634 NONAME _ZN19QGraphicsBlurEffect13setBlurRadiusEf @ 11635 NONAME _ZN19QGraphicsBlurEffect16blurHintsChangedE6QFlagsINS_8BlurHintEE @ 11636 NONAME @@ -11784,4 +11784,12 @@ EXPORTS _ZNK14QEglProperties8toStringEv @ 11783 NONAME ABSENT _ZNK11QFontEngine10glyphCacheEPvN21QFontEngineGlyphCache4TypeERK10QTransform @ 11784 NONAME _ZNK20QGraphicsItemPrivate21effectiveBoundingRectERK6QRectF @ 11785 NONAME + _Z12qt_blurImageP8QPainterR6QImagefbbi @ 11786 NONAME + _Z12qt_blurImageR6QImagefbi @ 11787 NONAME + _Z13qt_halfScaledRK6QImage @ 11788 NONAME + _Z14qt_memrotate90PKjiiiPji @ 11789 NONAME + _Z17qt_memrotate90_glPKjiiiPji @ 11790 NONAME + _ZN19QApplicationPrivate20symbianHandleCommandEPK13QSymbianEvent @ 11791 NONAME + _ZN19QApplicationPrivate21symbianProcessWsEventEPK13QSymbianEvent @ 11792 NONAME + _ZN19QApplicationPrivate21symbianResourceChangeEPK13QSymbianEvent @ 11793 NONAME diff --git a/src/s60installs/eabi/QtScriptu.def b/src/s60installs/eabi/QtScriptu.def index 8df03c2..8a4be2c 100644 --- a/src/s60installs/eabi/QtScriptu.def +++ b/src/s60installs/eabi/QtScriptu.def @@ -393,4 +393,5 @@ EXPORTS _ZNK23QScriptDeclarativeClass7contextEv @ 392 NONAME _ZTI23QScriptDeclarativeClass @ 393 NONAME _ZTV23QScriptDeclarativeClass @ 394 NONAME + _ZNK23QScriptDeclarativeClass9isQObjectEv @ 395 NONAME diff --git a/src/xml/dom/qdom.cpp b/src/xml/dom/qdom.cpp index 657c79a..cae959b 100644 --- a/src/xml/dom/qdom.cpp +++ b/src/xml/dom/qdom.cpp @@ -2596,11 +2596,15 @@ QDomNode QDomNode::removeChild(const QDomNode& oldChild) already has an element node as a child, \a newChild is not added as a child and a null node is returned. - Calling this function on a null node(created, for example, with the - default constructor) does nothing. + Returns a new reference to \a newChild on success or a \link + isNull() null node\endlink on failure. - The DOM specification disallow inserting attribute nodes, but due - to historical reasons QDom accept them nevertheless. + Calling this function on a null node(created, for example, with + the default constructor) does nothing and returns a \link isNull() + null node\endlink. + + The DOM specification disallow inserting attribute nodes, but for + historical reasons, QDom accepts them anyway. \sa insertBefore() insertAfter() replaceChild() removeChild() */ |