diff options
Diffstat (limited to 'src')
55 files changed, 453 insertions, 250 deletions
diff --git a/src/3rdparty/phonon/mmf/abstractaudioeffect.h b/src/3rdparty/phonon/mmf/abstractaudioeffect.h index 9878472..436e8e4 100644 --- a/src/3rdparty/phonon/mmf/abstractaudioeffect.h +++ b/src/3rdparty/phonon/mmf/abstractaudioeffect.h @@ -23,7 +23,7 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. #include <AudioEffectBase.h> -#include <Phonon/EffectInterface> +#include <phonon/effectinterface.h> #include "audioplayer.h" #include "effectparameter.h" diff --git a/src/3rdparty/phonon/mmf/abstractplayer.h b/src/3rdparty/phonon/mmf/abstractplayer.h index dbcbe63..cec5568 100644 --- a/src/3rdparty/phonon/mmf/abstractplayer.h +++ b/src/3rdparty/phonon/mmf/abstractplayer.h @@ -19,8 +19,8 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. #ifndef PHONON_MMF_ABSTRACTPLAYER_H #define PHONON_MMF_ABSTRACTPLAYER_H -#include <Phonon/phononnamespace.h> -#include <Phonon/MediaSource.h> +#include <phonon/phononnamespace.h> +#include <phonon/mediasource.h> #include <QObject> diff --git a/src/3rdparty/phonon/mmf/backend.h b/src/3rdparty/phonon/mmf/backend.h index 6b85625..9361544 100644 --- a/src/3rdparty/phonon/mmf/backend.h +++ b/src/3rdparty/phonon/mmf/backend.h @@ -22,8 +22,8 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. #include "ancestormovemonitor.h" #include "effectfactory.h" -#include <Phonon/MediaSource> -#include <Phonon/BackendInterface> +#include <phonon/mediasource.h> +#include <phonon/backendinterface.h> #include <QScopedPointer> QT_BEGIN_NAMESPACE diff --git a/src/3rdparty/phonon/mmf/effectparameter.h b/src/3rdparty/phonon/mmf/effectparameter.h index 27cc018..892ed4d 100644 --- a/src/3rdparty/phonon/mmf/effectparameter.h +++ b/src/3rdparty/phonon/mmf/effectparameter.h @@ -19,7 +19,7 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. #ifndef PHONON_MMF_EFFECTPARAMETER_H #define PHONON_MMF_EFFECTPARAMETER_H -#include <Phonon/EffectParameter> +#include <phonon/effectparameter.h> QT_BEGIN_NAMESPACE diff --git a/src/3rdparty/phonon/mmf/mediaobject.h b/src/3rdparty/phonon/mmf/mediaobject.h index c87d755..d6248e2 100644 --- a/src/3rdparty/phonon/mmf/mediaobject.h +++ b/src/3rdparty/phonon/mmf/mediaobject.h @@ -19,8 +19,8 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. #ifndef PHONON_MMF_MEDIAOBJECT_H #define PHONON_MMF_MEDIAOBJECT_H -#include <Phonon/MediaSource> -#include <Phonon/MediaObjectInterface> +#include <phonon/mediasource.h> +#include <phonon/mediaobjectinterface.h> #include <QScopedPointer> #include <QTimer> diff --git a/src/3rdparty/phonon/mmf/mmf_medianode.h b/src/3rdparty/phonon/mmf/mmf_medianode.h index 0ed21c4..f2f64e0 100644 --- a/src/3rdparty/phonon/mmf/mmf_medianode.h +++ b/src/3rdparty/phonon/mmf/mmf_medianode.h @@ -20,7 +20,7 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. #define PHONON_MMF_MEDIANODE_H #include <QObject> -#include <Phonon/EffectInterface> +#include <phonon/effectinterface.h> #include "audioplayer.h" QT_BEGIN_NAMESPACE diff --git a/src/3rdparty/phonon/mmf/videooutput.h b/src/3rdparty/phonon/mmf/videooutput.h index 2788401..3e9c036 100644 --- a/src/3rdparty/phonon/mmf/videooutput.h +++ b/src/3rdparty/phonon/mmf/videooutput.h @@ -24,7 +24,7 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. #include <QRect> #include "defs.h" -#include <Phonon/VideoWidget> +#include <phonon/videowidget.h> #include <e32std.h> class RWindowBase; diff --git a/src/3rdparty/phonon/mmf/videowidget.h b/src/3rdparty/phonon/mmf/videowidget.h index a876748..899dca6 100644 --- a/src/3rdparty/phonon/mmf/videowidget.h +++ b/src/3rdparty/phonon/mmf/videowidget.h @@ -23,8 +23,8 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. #include "videooutput.h" #include <QtGui/QWidget> -#include <Phonon/VideoWidget> -#include <Phonon/VideoWidgetInterface> +#include <phonon/videowidget.h> +#include <phonon/videowidgetinterface.h> QT_BEGIN_NAMESPACE diff --git a/src/3rdparty/webkit/JavaScriptCore/ChangeLog b/src/3rdparty/webkit/JavaScriptCore/ChangeLog index e292418..b943840 100644 --- a/src/3rdparty/webkit/JavaScriptCore/ChangeLog +++ b/src/3rdparty/webkit/JavaScriptCore/ChangeLog @@ -10,17 +10,6 @@ (OpaqueJSClass::OpaqueJSClass): (OpaqueJSClassContextData::OpaqueJSClassContextData): -2010-01-07 Norbert Leser <norbert.leser@nokia.com> - - Reviewed by NOBODY (OOPS!). - - Added time-based optimization and increased optimization level to O3, - conditionally for COMPILER(RVCT), - for increasing performance of JavaScript execution. - (Default settings are Ospace and O2) - - * runtime/Structure.h: - 2009-11-19 Thiago Macieira <thiago.macieira@nokia.com> Reviewed by Simon Hausmann. diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/Structure.h b/src/3rdparty/webkit/JavaScriptCore/runtime/Structure.h index ecdd997..f355c53 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/Structure.h +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/Structure.h @@ -45,12 +45,6 @@ #define DUMP_PROPERTYMAP_STATS 0 #endif -#if COMPILER(RVCT) -#pragma arm -#pragma Otime -#pragma O3 -#endif - namespace JSC { class MarkStack; diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION index 4f33e22..9dd9377 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 - 8f6992f4e8f027818429d428393b08068eca9ffa + e15bd5454732bab9ffff4e1e5a755f41fd4e2eff diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog index 02daf86..8e1c965 100644 --- a/src/3rdparty/webkit/WebCore/ChangeLog +++ b/src/3rdparty/webkit/WebCore/ChangeLog @@ -1,3 +1,48 @@ +2010-01-17 Srinidhi Shreedhara <srinidhi.shreedhara@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] [Symbian] SetWindow call in npapi plugin does not happen when the cooridnates are negative + https://bugs.webkit.org/show_bug.cgi?id=33573 + + * plugins/symbian/PluginViewSymbian.cpp: + (WebCore::PluginView::setNPWindowIfNeeded): Remove tests for negative + coordinates for early return. + +2010-01-14 Norbert Leser <norbert.leser@nokia.com> + + Reviewed by Laszlo Gombos. + + Platform Symbian specific: + Added time-based optimization (-Otime) and increased optimization level to -O3, + conditionally for RVCT compiler (for ARM), for increasing performance + (primarily affecting JavaScript execution). + Default settings are -Ospace and -O2. + + No new tests needed because no new funtionality is introduced, + only potential regression on existing tests needs to be evaluated. + + * WebCore.pro: + +2010-01-13 Girish Ramakrishnan <girish@forwardbias.in> + + Reviewed by Simon Hausmann. + + [Qt/Win] Flash in QGraphicsWebView does not process hover correctly. + + https://bugs.webkit.org/show_bug.cgi?id=33591 + + Mouse hover does not work as expected with the flash in some sites. + - http://www.bbc.co.uk/ Hover over the map + - http://www.barbie.com/ Hover over the menu items (Games, Videos) + The problem appears to be that Flash queries NPNVnetscapeWindow on every + mouse hover. I do not how flash uses this value but returning 0 when flash + is in windowless mode solves the problem (When using QGraphicsWebView we + inject wmode opaque, thereby putting the plugin in windowless mode). + + * plugins/win/PluginViewWin.cpp: + (windowHandleForPageClient): + 2010-01-13 Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed by Simon Hausmann. diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro index 9432217..04aba62 100644 --- a/src/3rdparty/webkit/WebCore/WebCore.pro +++ b/src/3rdparty/webkit/WebCore/WebCore.pro @@ -24,6 +24,8 @@ symbian: { # RO text (code) section in qtwebkit.dll exceeds allocated space for gcce udeb target. # Move RW-section base address to start from 0xE00000 instead of the toolchain default 0x400000. MMP_RULES += "LINKEROPTION armcc --rw-base 0xE00000" + MMP_RULES += ALWAYS_BUILD_AS_ARM + QMAKE_CXXFLAGS.ARMCC += -OTime -O3 } include($$PWD/../WebKit.pri) diff --git a/src/3rdparty/webkit/WebCore/plugins/symbian/PluginViewSymbian.cpp b/src/3rdparty/webkit/WebCore/plugins/symbian/PluginViewSymbian.cpp index 14e25b1..cf69723 100644 --- a/src/3rdparty/webkit/WebCore/plugins/symbian/PluginViewSymbian.cpp +++ b/src/3rdparty/webkit/WebCore/plugins/symbian/PluginViewSymbian.cpp @@ -280,8 +280,6 @@ void PluginView::setNPWindowIfNeeded() m_npWindow.width = m_windowRect.width(); m_npWindow.height = m_windowRect.height(); - if (m_npWindow.x < 0 || m_npWindow.y < 0 || m_npWindow.width <= 0 || m_npWindow.height <= 0) - return; PluginView::setCurrentPluginView(this); JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly); diff --git a/src/3rdparty/webkit/WebCore/plugins/win/PluginViewWin.cpp b/src/3rdparty/webkit/WebCore/plugins/win/PluginViewWin.cpp index b313afb..ab71273 100644 --- a/src/3rdparty/webkit/WebCore/plugins/win/PluginViewWin.cpp +++ b/src/3rdparty/webkit/WebCore/plugins/win/PluginViewWin.cpp @@ -86,7 +86,9 @@ static inline HWND windowHandleForPageClient(PlatformPageClient client) #if PLATFORM(QT) if (!client) return 0; - return client->ownerWidget()->winId(); + if (QWidget* pluginParent = qobject_cast<QWidget*>(client->pluginParent())) + return pluginParent->winId(); + return 0; #else return client; #endif diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp index 6d08c32..a289ec0 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp @@ -1708,8 +1708,14 @@ QWebPage::~QWebPage() FrameLoader *loader = d->mainFrame->d->frame->loader(); if (loader) loader->detachFromParent(); - if (d->inspector) - d->inspector->setPage(0); + if (d->inspector) { + // Since we have to delete an internal inspector, + // call setInspector(0) directly to prevent potential crashes + if (d->inspectorIsInternalOnly) + d->setInspector(0); + else + d->inspector->setPage(0); + } delete d; } diff --git a/src/3rdparty/webkit/WebKit/qt/ChangeLog b/src/3rdparty/webkit/WebKit/qt/ChangeLog index cd47982..ee555f3 100644 --- a/src/3rdparty/webkit/WebKit/qt/ChangeLog +++ b/src/3rdparty/webkit/WebKit/qt/ChangeLog @@ -1,3 +1,13 @@ +2009-11-19 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Fix QWebInspector destruction problem. + https://bugs.webkit.org/show_bug.cgi?id=31664 + + * Api/qwebpage.cpp: + (QWebPage::~QWebPage): + 2010-01-14 Simon Hausmann <simon.hausmann@nokia.com> Reviewed by Kenneth Rohde Christiansen. diff --git a/src/corelib/animation/qpropertyanimation.cpp b/src/corelib/animation/qpropertyanimation.cpp index eec5b30..cfd7cc2 100644 --- a/src/corelib/animation/qpropertyanimation.cpp +++ b/src/corelib/animation/qpropertyanimation.cpp @@ -256,7 +256,8 @@ void QPropertyAnimation::updateState(QAbstractAnimation::State newState, Q_D(QPropertyAnimation); if (!d->target && oldState == Stopped) { - qWarning("QPropertyAnimation::updateState: Changing state of an animation without target"); + qWarning("QPropertyAnimation::updateState (%s): Changing state of an animation without target", + d->propertyName.constData()); return; } @@ -279,10 +280,16 @@ void QPropertyAnimation::updateState(QAbstractAnimation::State newState, if (oldState == Stopped) { d->setDefaultStartEndValue(d->targetValue->property(d->propertyName.constData())); //let's check if we have a start value and an end value - if (!startValue().isValid() && (d->direction == Backward || !d->defaultStartEndValue.isValid())) - qWarning("QPropertyAnimation::updateState: starting an animation without start value"); - if (!endValue().isValid() && (d->direction == Forward || !d->defaultStartEndValue.isValid())) - qWarning("QPropertyAnimation::updateState: starting an animation without end value"); + if (!startValue().isValid() && (d->direction == Backward || !d->defaultStartEndValue.isValid())) { + qWarning("QPropertyAnimation::updateState (%s, %s, %s): starting an animation without start value", + d->propertyName.constData(), d->target.data()->metaObject()->className(), + qPrintable(d->target.data()->objectName())); + } + if (!endValue().isValid() && (d->direction == Forward || !d->defaultStartEndValue.isValid())) { + qWarning("QPropertyAnimation::updateState (%s, %s, %s): starting an animation without end value", + d->propertyName.constData(), d->target.data()->metaObject()->className(), + qPrintable(d->target.data()->objectName())); + } } } else if (hash.value(key) == this) { hash.remove(key); diff --git a/src/corelib/arch/qatomic_ia64.h b/src/corelib/arch/qatomic_ia64.h index e015863..8c824f3 100644 --- a/src/corelib/arch/qatomic_ia64.h +++ b/src/corelib/arch/qatomic_ia64.h @@ -205,7 +205,7 @@ inline bool QBasicAtomicInt::deref() template <typename T> Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreAcquire(T *newValue) { - return (T *)_InterlockedExchangePointer(&_q_value, newValue); + return (T *)_InterlockedExchangePointer(reinterpret_cast<void * volatile*>(&_q_value), newValue); } template <typename T> diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 52e9845..abdafc3 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -44,11 +44,11 @@ #include <stddef.h> -#define QT_VERSION_STR "4.6.1" +#define QT_VERSION_STR "4.6.2" /* QT_VERSION is (major << 16) + (minor << 8) + patch. */ -#define QT_VERSION 0x040601 +#define QT_VERSION 0x040602 /* can be used like #if (QT_VERSION >= QT_VERSION_CHECK(4, 4, 0)) */ @@ -2419,6 +2419,10 @@ QT3_SUPPORT Q_CORE_EXPORT const char *qInstallPathSysconf(); //enabling new graphics resources #define QT_SYMBIAN_SUPPORTS_SGIMAGE #define QT_SYMBIAN_SUPPORTS_ADVANCED_POINTER + +#ifdef SYMBIAN_GRAPHICS_WSERV_QT_EFFECTS +#define Q_SYMBIAN_SEMITRANSPARENT_BG_SURFACE +#endif #endif diff --git a/src/corelib/io/qfile.cpp b/src/corelib/io/qfile.cpp index 4c7f3f0..728c316 100644 --- a/src/corelib/io/qfile.cpp +++ b/src/corelib/io/qfile.cpp @@ -650,7 +650,7 @@ QFile::remove() unsetError(); return true; } - d->setError(QFile::RemoveError, fileEngine()->errorString()); + d->setError(QFile::RemoveError, d->fileEngine->errorString()); } return false; } @@ -704,7 +704,7 @@ QFile::rename(const QString &newName) if (fileEngine()->rename(newName)) { unsetError(); // engine was able to handle the new name so we just reset it - fileEngine()->setFileName(newName); + d->fileEngine->setFileName(newName); d->fileName = newName; return true; } @@ -740,7 +740,7 @@ QFile::rename(const QString &newName) if (error) { out.remove(); } else { - fileEngine()->setFileName(newName); + d->fileEngine->setFileName(newName); setPermissions(permissions()); unsetError(); setFileName(newName); @@ -805,7 +805,7 @@ QFile::link(const QString &linkName) unsetError(); return true; } - d->setError(QFile::RenameError, fileEngine()->errorString()); + d->setError(QFile::RenameError, d->fileEngine->errorString()); return false; } @@ -994,10 +994,10 @@ bool QFile::open(OpenMode mode) seek(size()); return true; } - QFile::FileError err = fileEngine()->error(); + QFile::FileError err = d->fileEngine->error(); if(err == QFile::UnspecifiedError) err = QFile::OpenError; - d->setError(err, fileEngine()->errorString()); + d->setError(err, d->fileEngine->errorString()); return false; } @@ -1152,12 +1152,11 @@ bool QFile::open(int fd, OpenMode mode) int QFile::handle() const { - if (!isOpen()) + Q_D(const QFile); + if (!isOpen() || !d->fileEngine) return -1; - if (QAbstractFileEngine *engine = fileEngine()) - return engine->handle(); - return -1; + return d->fileEngine->handle(); } /*! @@ -1189,13 +1188,12 @@ QFile::handle() const uchar *QFile::map(qint64 offset, qint64 size, MemoryMapFlags flags) { Q_D(QFile); - QAbstractFileEngine *engine = fileEngine(); - if (engine - && engine->supportsExtension(QAbstractFileEngine::MapExtension)) { + if (fileEngine() + && d->fileEngine->supportsExtension(QAbstractFileEngine::MapExtension)) { unsetError(); - uchar *address = engine->map(offset, size, flags); + uchar *address = d->fileEngine->map(offset, size, flags); if (address == 0) - d->setError(engine->error(), engine->errorString()); + d->setError(d->fileEngine->error(), d->fileEngine->errorString()); return address; } return 0; @@ -1212,13 +1210,12 @@ uchar *QFile::map(qint64 offset, qint64 size, MemoryMapFlags flags) bool QFile::unmap(uchar *address) { Q_D(QFile); - QAbstractFileEngine *engine = fileEngine(); - if (engine - && engine->supportsExtension(QAbstractFileEngine::UnMapExtension)) { + if (fileEngine() + && d->fileEngine->supportsExtension(QAbstractFileEngine::UnMapExtension)) { unsetError(); - bool success = engine->unmap(address); + bool success = d->fileEngine->unmap(address); if (!success) - d->setError(engine->error(), engine->errorString()); + d->setError(d->fileEngine->error(), d->fileEngine->errorString()); return success; } return false; @@ -1251,13 +1248,14 @@ QFile::resize(qint64 sz) Q_D(QFile); if (!d->ensureFlushed()) return false; - if (isOpen() && fileEngine()->pos() > sz) + fileEngine(); + if (isOpen() && d->fileEngine->pos() > sz) seek(sz); - if(fileEngine()->setSize(sz)) { + if(d->fileEngine->setSize(sz)) { unsetError(); return true; } - d->setError(QFile::ResizeError, fileEngine()->errorString()); + d->setError(QFile::ResizeError, d->fileEngine->errorString()); return false; } @@ -1321,7 +1319,7 @@ QFile::setPermissions(Permissions permissions) unsetError(); return true; } - d->setError(QFile::PermissionsError, fileEngine()->errorString()); + d->setError(QFile::PermissionsError, d->fileEngine->errorString()); return false; } @@ -1354,23 +1352,27 @@ bool QFile::flush() { Q_D(QFile); + if (!d->fileEngine) { + qWarning("QFile::flush: No file engine. Is IODevice open?"); + return false; + } + if (!d->writeBuffer.isEmpty()) { qint64 size = d->writeBuffer.size(); - if (_qfile_writeData(d->fileEngine ? d->fileEngine : fileEngine(), - &d->writeBuffer) != size) { - QFile::FileError err = fileEngine()->error(); + if (_qfile_writeData(d->fileEngine, &d->writeBuffer) != size) { + QFile::FileError err = d->fileEngine->error(); if(err == QFile::UnspecifiedError) err = QFile::WriteError; - d->setError(err, fileEngine()->errorString()); + d->setError(err, d->fileEngine->errorString()); return false; } } - if (!fileEngine()->flush()) { - QFile::FileError err = fileEngine()->error(); + if (!d->fileEngine->flush()) { + QFile::FileError err = d->fileEngine->error(); if(err == QFile::UnspecifiedError) err = QFile::WriteError; - d->setError(err, fileEngine()->errorString()); + d->setError(err, d->fileEngine->errorString()); return false; } return true; @@ -1395,10 +1397,10 @@ QFile::close() d->writeBuffer.clear(); // keep earlier error from flush - if (fileEngine()->close() && flushed) + if (d->fileEngine->close() && flushed) unsetError(); else if (flushed) - d->setError(fileEngine()->error(), fileEngine()->errorString()); + d->setError(d->fileEngine->error(), d->fileEngine->errorString()); } /*! @@ -1451,10 +1453,10 @@ bool QFile::atEnd() const return false; // If the file engine knows best, say what it says. - if (fileEngine()->supportsExtension(QAbstractFileEngine::AtEndExtension)) { + if (d->fileEngine->supportsExtension(QAbstractFileEngine::AtEndExtension)) { // Check if the file engine supports AtEndExtension, and if it does, // check if the file engine claims to be at the end. - return fileEngine()->atEnd(); + return d->fileEngine->atEnd(); } // Fall back to checking how much is available (will stat files). @@ -1476,11 +1478,11 @@ bool QFile::seek(qint64 off) if (!d->ensureFlushed()) return false; - if (!fileEngine()->seek(off) || !QIODevice::seek(off)) { - QFile::FileError err = fileEngine()->error(); + if (!d->fileEngine->seek(off) || !QIODevice::seek(off)) { + QFile::FileError err = d->fileEngine->error(); if(err == QFile::UnspecifiedError) err = QFile::PositionError; - d->setError(err, fileEngine()->errorString()); + d->setError(err, d->fileEngine->errorString()); return false; } unsetError(); @@ -1496,8 +1498,8 @@ qint64 QFile::readLineData(char *data, qint64 maxlen) if (!d->ensureFlushed()) return -1; - if (fileEngine()->supportsExtension(QAbstractFileEngine::FastReadLineExtension)) - return fileEngine()->readLine(data, maxlen); + if (d->fileEngine->supportsExtension(QAbstractFileEngine::FastReadLineExtension)) + return d->fileEngine->readLine(data, maxlen); // Fall back to QIODevice's readLine implementation if the engine // cannot do it faster. @@ -1515,18 +1517,14 @@ qint64 QFile::readData(char *data, qint64 len) if (!d->ensureFlushed()) return -1; - qint64 ret = -1; - qint64 read = fileEngine()->read(data, len); - if (read != -1) - ret = read; - - if(ret < 0) { - QFile::FileError err = fileEngine()->error(); + qint64 read = d->fileEngine->read(data, len); + if(read < 0) { + QFile::FileError err = d->fileEngine->error(); if(err == QFile::UnspecifiedError) err = QFile::ReadError; - d->setError(err, fileEngine()->errorString()); + d->setError(err, d->fileEngine->errorString()); } - return ret; + return read; } /*! @@ -1606,13 +1604,12 @@ QFile::writeData(const char *data, qint64 len) // Write directly to the engine if the block size is larger than // the write buffer size. if (!buffered || len > QFILE_WRITEBUFFER_SIZE) { - QAbstractFileEngine *fe = d->fileEngine ? d->fileEngine : fileEngine(); - qint64 ret = fe->write(data, len); + qint64 ret = d->fileEngine->write(data, len); if(ret < 0) { - QFile::FileError err = fileEngine()->error(); + QFile::FileError err = d->fileEngine->error(); if(err == QFile::UnspecifiedError) err = QFile::WriteError; - d->setError(err, fileEngine()->errorString()); + d->setError(err, d->fileEngine->errorString()); } return ret; } diff --git a/src/corelib/kernel/qmetaobject_p.h b/src/corelib/kernel/qmetaobject_p.h index 79a7304..3bbb050 100644 --- a/src/corelib/kernel/qmetaobject_p.h +++ b/src/corelib/kernel/qmetaobject_p.h @@ -124,14 +124,16 @@ struct QMetaObjectPrivate #ifndef QT_NO_QOBJECT //defined in qobject.cpp + enum DisconnectType { DisconnectAll, DisconnectOne }; static bool connect(const QObject *sender, int signal_index, const QObject *receiver, int method_index, int type = 0, int *types = 0); static bool disconnect(const QObject *sender, int signal_index, - const QObject *receiver, int method_index); + const QObject *receiver, int method_index, + DisconnectType = DisconnectAll); static inline bool disconnectHelper(QObjectPrivate::Connection *c, const QObject *receiver, int method_index, - QMutex *senderMutex); + QMutex *senderMutex, DisconnectType); #endif }; diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index 8346fe4..5298fff 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -2945,7 +2945,6 @@ bool QMetaObjectPrivate::connect(const QObject *sender, int signal_index, return true; } - /*!\internal */ bool QMetaObject::disconnect(const QObject *sender, int signal_index, @@ -2956,12 +2955,27 @@ bool QMetaObject::disconnect(const QObject *sender, int signal_index, receiver, method_index); } +/*!\internal + +Disconnect a single signal connection. If QMetaObject::connect() has been called +multiple times for the same sender, signal_index, receiver and method_index only +one of these connections will be removed. + */ +bool QMetaObject::disconnectOne(const QObject *sender, int signal_index, + const QObject *receiver, int method_index) +{ + signal_index = methodIndexToSignalIndex(sender->metaObject(), signal_index); + return QMetaObjectPrivate::disconnect(sender, signal_index, + receiver, method_index, + QMetaObjectPrivate::DisconnectOne); +} + /*! \internal Helper function to remove the connection from the senders list and setting the receivers to 0 */ bool QMetaObjectPrivate::disconnectHelper(QObjectPrivate::Connection *c, const QObject *receiver, int method_index, - QMutex *senderMutex) + QMutex *senderMutex, DisconnectType disconnectType) { bool success = false; while (c) { @@ -2987,6 +3001,9 @@ bool QMetaObjectPrivate::disconnectHelper(QObjectPrivate::Connection *c, c->receiver = 0; success = true; + + if (disconnectType == DisconnectOne) + return success; } c = c->nextConnectionList; } @@ -2997,7 +3014,8 @@ bool QMetaObjectPrivate::disconnectHelper(QObjectPrivate::Connection *c, Same as the QMetaObject::disconnect, but \a signal_index must be the result of QObjectPrivate::signalIndex */ bool QMetaObjectPrivate::disconnect(const QObject *sender, int signal_index, - const QObject *receiver, int method_index) + const QObject *receiver, int method_index, + DisconnectType disconnectType) { if (!sender) return false; @@ -3021,7 +3039,7 @@ bool QMetaObjectPrivate::disconnect(const QObject *sender, int signal_index, for (signal_index = -1; signal_index < connectionLists->count(); ++signal_index) { QObjectPrivate::Connection *c = (*connectionLists)[signal_index].first; - if (disconnectHelper(c, receiver, method_index, senderMutex)) { + if (disconnectHelper(c, receiver, method_index, senderMutex, disconnectType)) { success = true; connectionLists->dirty = true; } @@ -3029,7 +3047,7 @@ bool QMetaObjectPrivate::disconnect(const QObject *sender, int signal_index, } else if (signal_index < connectionLists->count()) { QObjectPrivate::Connection *c = (*connectionLists)[signal_index].first; - if (disconnectHelper(c, receiver, method_index, senderMutex)) { + if (disconnectHelper(c, receiver, method_index, senderMutex, disconnectType)) { success = true; connectionLists->dirty = true; } diff --git a/src/corelib/kernel/qobjectdefs.h b/src/corelib/kernel/qobjectdefs.h index a0d9cf3..8ed7f3f 100644 --- a/src/corelib/kernel/qobjectdefs.h +++ b/src/corelib/kernel/qobjectdefs.h @@ -334,6 +334,8 @@ struct Q_CORE_EXPORT QMetaObject // internal index-based disconnect static bool disconnect(const QObject *sender, int signal_index, const QObject *receiver, int method_index); + static bool disconnectOne(const QObject *sender, int signal_index, + const QObject *receiver, int method_index); // internal slot-name based connect static void connectSlotsByName(QObject *o); diff --git a/src/gui/dialogs/qcolordialog.cpp b/src/gui/dialogs/qcolordialog.cpp index e9031ac..83ecc30 100644 --- a/src/gui/dialogs/qcolordialog.cpp +++ b/src/gui/dialogs/qcolordialog.cpp @@ -68,6 +68,10 @@ #include "private/qt_s60_p.h" #endif +#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5) +# define QT_SMALL_COLORDIALOG +#endif + QT_BEGIN_NAMESPACE //////////// QWellArray BEGIN @@ -1072,14 +1076,17 @@ QColorShower::QColorShower(QColorDialog *parent) gl->setMargin(gl->spacing()); lab = new QColorShowLabel(this); -#ifdef Q_WS_S60 +#ifdef QT_SMALL_COLORDIALOG +# ifdef Q_WS_S60 QS60Data s60Data = QS60Data(); const bool nonTouchUI = !s60Data.hasTouchscreen; +# elif defined Q_WS_MAEMO_5 + const bool nonTouchUI = false; +# endif #endif - #ifndef Q_WS_WINCE -#ifdef Q_WS_S60 +#ifdef QT_SMALL_COLORDIALOG lab->setMinimumHeight(60); #endif lab->setMinimumWidth(60); @@ -1090,7 +1097,7 @@ QColorShower::QColorShower(QColorDialog *parent) // In S60, due to small screen and different screen layouts need to re-arrange the widgets. // For QVGA screens only the comboboxes and color label are visible. // For nHD screens only color and luminence pickers and color label are visible. -#ifndef Q_WS_S60 +#if !defined(QT_SMALL_COLORDIALOG) gl->addWidget(lab, 0, 0, -1, 1); #else if (nonTouchUI) @@ -1108,7 +1115,7 @@ QColorShower::QColorShower(QColorDialog *parent) lblHue->setBuddy(hEd); #endif lblHue->setAlignment(Qt::AlignRight|Qt::AlignVCenter); -#ifndef Q_WS_S60 +#if !defined(QT_SMALL_COLORDIALOG) gl->addWidget(lblHue, 0, 1); gl->addWidget(hEd, 0, 2); #else @@ -1127,7 +1134,7 @@ QColorShower::QColorShower(QColorDialog *parent) lblSat->setBuddy(sEd); #endif lblSat->setAlignment(Qt::AlignRight|Qt::AlignVCenter); -#ifndef Q_WS_S60 +#if !defined(QT_SMALL_COLORDIALOG) gl->addWidget(lblSat, 1, 1); gl->addWidget(sEd, 1, 2); #else @@ -1146,7 +1153,7 @@ QColorShower::QColorShower(QColorDialog *parent) lblVal->setBuddy(vEd); #endif lblVal->setAlignment(Qt::AlignRight|Qt::AlignVCenter); -#ifndef Q_WS_S60 +#if !defined(QT_SMALL_COLORDIALOG) gl->addWidget(lblVal, 2, 1); gl->addWidget(vEd, 2, 2); #else @@ -1165,7 +1172,7 @@ QColorShower::QColorShower(QColorDialog *parent) lblRed->setBuddy(rEd); #endif lblRed->setAlignment(Qt::AlignRight|Qt::AlignVCenter); -#ifndef Q_WS_S60 +#if !defined(QT_SMALL_COLORDIALOG) gl->addWidget(lblRed, 0, 3); gl->addWidget(rEd, 0, 4); #else @@ -1184,7 +1191,7 @@ QColorShower::QColorShower(QColorDialog *parent) lblGreen->setBuddy(gEd); #endif lblGreen->setAlignment(Qt::AlignRight|Qt::AlignVCenter); -#ifndef Q_WS_S60 +#if !defined(QT_SMALL_COLORDIALOG) gl->addWidget(lblGreen, 1, 3); gl->addWidget(gEd, 1, 4); #else @@ -1203,7 +1210,7 @@ QColorShower::QColorShower(QColorDialog *parent) lblBlue->setBuddy(bEd); #endif lblBlue->setAlignment(Qt::AlignRight|Qt::AlignVCenter); -#ifndef Q_WS_S60 +#if !defined(QT_SMALL_COLORDIALOG) gl->addWidget(lblBlue, 2, 3); gl->addWidget(bEd, 2, 4); #else @@ -1222,7 +1229,7 @@ QColorShower::QColorShower(QColorDialog *parent) alphaLab->setBuddy(alphaEd); #endif alphaLab->setAlignment(Qt::AlignRight|Qt::AlignVCenter); -#ifndef Q_WS_S60 +#if !defined(QT_SMALL_COLORDIALOG) gl->addWidget(alphaLab, 3, 1, 1, 3); gl->addWidget(alphaEd, 3, 4); #else @@ -1467,7 +1474,7 @@ void QColorDialogPrivate::init(const QColor &initial) leftLay = 0; -#if (defined(Q_WS_WINCE) || defined(Q_WS_S60)) +#if defined(Q_WS_WINCE) || defined(QT_SMALL_COLORDIALOG) smallDisplay = true; const int lumSpace = 20; #else @@ -1497,9 +1504,13 @@ void QColorDialogPrivate::init(const QColor &initial) } #endif -#if defined(Q_WS_S60) +#if defined(QT_SMALL_COLORDIALOG) +# if defined(Q_WS_S60) QS60Data s60Data = QS60Data(); const bool nonTouchUI = !s60Data.hasTouchscreen; +# elif defined(Q_WS_MAEMO_5) + const bool nonTouchUI = false; +# endif #endif if (!smallDisplay) { @@ -1532,7 +1543,7 @@ void QColorDialogPrivate::init(const QColor &initial) leftLay->addWidget(addCusBt); } else { // better color picker size for small displays -#ifdef Q_WS_S60 +#if defined(QT_SMALL_COLORDIALOG) QSize screenSize = QApplication::desktop()->availableGeometry(QCursor::pos()).size(); pWidth = pHeight = qMin(screenSize.width(), screenSize.height()); pHeight -= 20; @@ -1558,7 +1569,7 @@ void QColorDialogPrivate::init(const QColor &initial) cp->setFrameStyle(QFrame::Panel + QFrame::Sunken); -#if defined(Q_WS_S60) +#if defined(QT_SMALL_COLORDIALOG) if (!nonTouchUI) { pickLay->addWidget(cp); cLay->addSpacing(lumSpace); @@ -1572,7 +1583,7 @@ void QColorDialogPrivate::init(const QColor &initial) cLay->addSpacing(lumSpace); lp = new QColorLuminancePicker(q); -#if defined(Q_WS_S60) +#if defined(QT_SMALL_COLORDIALOG) QSize screenSize = QApplication::desktop()->availableGeometry(QCursor::pos()).size(); const int minDimension = qMin(screenSize.height(), screenSize.width()); //set picker to be finger-usable @@ -1596,7 +1607,7 @@ void QColorDialogPrivate::init(const QColor &initial) QObject::connect(cs, SIGNAL(newCol(QRgb)), q, SLOT(_q_newColorTypedIn(QRgb))); QObject::connect(cs, SIGNAL(currentColorChanged(QColor)), q, SIGNAL(currentColorChanged(QColor))); -#if defined(Q_WS_S60) +#if defined(QT_SMALL_COLORDIALOG) if (!nonTouchUI) pWidth -= cp->size().width(); topLay->addWidget(cs); diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp index 4e10b5b..4f5efa1 100644 --- a/src/gui/image/qimage.cpp +++ b/src/gui/image/qimage.cpp @@ -3992,7 +3992,7 @@ QImage QImage::scaled(const QSize& s, Qt::AspectRatioMode aspectMode, Qt::Transf QSize newSize = size(); newSize.scale(s, aspectMode); if (newSize == size()) - return copy(); + return *this; QTransform wm = QTransform::fromScale((qreal)newSize.width() / width(), (qreal)newSize.height() / height()); QImage img = transformed(wm, mode); diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 3ee0a71..8c77728 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -807,6 +807,15 @@ TCoeInputCapabilities QSymbianControl::InputCapabilities() const void QSymbianControl::Draw(const TRect& controlRect) const { + // Set flag to avoid calling DrawNow in window surface + QWExtra *extra = qwidget->d_func()->extraData(); + if (extra && !extra->inExpose) { + extra->inExpose = true; + QRect exposeRect = qt_TRect2QRect(controlRect); + qwidget->d_func()->syncBackingStore(exposeRect); + extra->inExpose = false; + } + QWindowSurface *surface = qwidget->windowSurface(); QPaintEngine *engine = surface ? surface->paintDevice()->paintEngine() : NULL; @@ -855,8 +864,6 @@ void QSymbianControl::Draw(const TRect& controlRect) const default: Q_ASSERT(false); } - } else { - surface->flush(qwidget, QRegion(qt_TRect2QRect(backingStoreRect)), QPoint()); } if (sendNativePaintEvents) { diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm index c14798a..f61d2fe 100644 --- a/src/gui/kernel/qcocoaview_mac.mm +++ b/src/gui/kernel/qcocoaview_mac.mm @@ -510,7 +510,7 @@ extern "C" { } // Make sure the opengl context is updated on resize. - if (0 && qwidgetprivate->isGLWidget) { + if (qwidgetprivate->isGLWidget) { qwidgetprivate->needWindowChange = true; QEvent event(QEvent::MacGLWindowChange); qApp->sendEvent(qwidget, &event); diff --git a/src/gui/kernel/qdesktopwidget.cpp b/src/gui/kernel/qdesktopwidget.cpp index c8a4373..24b4e57 100644 --- a/src/gui/kernel/qdesktopwidget.cpp +++ b/src/gui/kernel/qdesktopwidget.cpp @@ -47,6 +47,11 @@ QT_BEGIN_NAMESPACE const QRect QDesktopWidget::screenGeometry(const QWidget *widget) const { + if (!widget) { + qWarning("QDesktopWidget::screenGeometry(): Attempt " + "to get the screen geometry of a null widget"); + return QRect(); + } QRect rect = QWidgetPrivate::screenGeometry(widget); if (rect.isNull()) return screenGeometry(screenNumber(widget)); @@ -55,6 +60,11 @@ const QRect QDesktopWidget::screenGeometry(const QWidget *widget) const const QRect QDesktopWidget::availableGeometry(const QWidget *widget) const { + if (!widget) { + qWarning("QDesktopWidget::availableGeometry(): Attempt " + "to get the available geometry of a null widget"); + return QRect(); + } QRect rect = QWidgetPrivate::screenGeometry(widget); if (rect.isNull()) return availableGeometry(screenNumber(widget)); diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm index 354a666..b18830f 100644 --- a/src/gui/kernel/qwidget_mac.mm +++ b/src/gui/kernel/qwidget_mac.mm @@ -110,6 +110,7 @@ #include "qevent_p.h" #include "qdnd_p.h" #include <QtGui/qgraphicsproxywidget.h> +#include "qmainwindow.h" QT_BEGIN_NAMESPACE @@ -1721,6 +1722,15 @@ bool QWidgetPrivate::qt_widget_rgn(QWidget *widget, short wcode, RgnHandle rgn, void QWidgetPrivate::determineWindowClass() { Q_Q(QWidget); +#if !defined(QT_NO_MAINWINDOW) && !defined(QT_NO_TOOLBAR) + // Make sure that QMainWindow has the MacWindowToolBarButtonHint when the + // unifiedTitleAndToolBarOnMac property is ON. This is to avoid reentry of + // setParent() triggered by the QToolBar::event(QEvent::ParentChange). + QMainWindow *mainWindow = qobject_cast<QMainWindow *>(q); + if (mainWindow && mainWindow->unifiedTitleAndToolBarOnMac()) { + data.window_flags |= Qt::MacWindowToolBarButtonHint; + } +#endif #ifndef QT_MAC_USE_COCOA // ### COCOA:Interleave these better! @@ -2743,7 +2753,9 @@ void QWidgetPrivate::setParent_sys(QWidget *parent, Qt::WindowFlags f) } if (wasWindow) { oldToolbar = [oldWindow toolbar]; + [oldToolbar retain]; oldToolbarVisible = [oldToolbar isVisible]; + [oldWindow setToolbar:nil]; } #endif } @@ -2787,6 +2799,7 @@ void QWidgetPrivate::setParent_sys(QWidget *parent, Qt::WindowFlags f) if (oldToolbar && !(f & Qt::FramelessWindowHint)) { OSWindowRef newWindow = qt_mac_window_for(q); [newWindow setToolbar:oldToolbar]; + [oldToolbar release]; [oldToolbar setVisible:oldToolbarVisible]; } #endif diff --git a/src/gui/kernel/qwidget_p.h b/src/gui/kernel/qwidget_p.h index ec8d20f..b1eb3c3 100644 --- a/src/gui/kernel/qwidget_p.h +++ b/src/gui/kernel/qwidget_p.h @@ -229,6 +229,7 @@ struct QWExtra { #endif #elif defined(Q_OS_SYMBIAN) // <----------------------------------------------------- Symbian uint activated : 1; // RWindowBase::Activated has been called + uint inExpose : 1; // Prevents drawing recursion /** * Defines the behaviour of QSymbianControl::Draw. diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp index c65a162..00f2213 100644 --- a/src/gui/kernel/qwidget_s60.cpp +++ b/src/gui/kernel/qwidget_s60.cpp @@ -389,9 +389,13 @@ void QWidgetPrivate::create_sys(WId window, bool /* initializeWindow */, bool de if (!isOpaque) { RWindow *const window = static_cast<RWindow *>(drawableWindow); +#ifdef Q_SYMBIAN_SEMITRANSPARENT_BG_SURFACE + window->SetSurfaceTransparency(true); +#else const TDisplayMode displayMode = static_cast<TDisplayMode>(window->SetRequiredDisplayMode(EColor16MA)); if (window->SetTransparencyAlphaChannel() == KErrNone) window->SetBackgroundColor(TRgb(255, 255, 255, 0)); +#endif } } @@ -707,12 +711,16 @@ void QWidgetPrivate::s60UpdateIsOpaque() RWindow *const window = static_cast<RWindow *>(q->effectiveWinId()->DrawableWindow()); +#ifdef Q_SYMBIAN_SEMITRANSPARENT_BG_SURFACE + window->SetSurfaceTransparency(!isOpaque); +#else if (!isOpaque) { const TDisplayMode displayMode = static_cast<TDisplayMode>(window->SetRequiredDisplayMode(EColor16MA)); if (window->SetTransparencyAlphaChannel() == KErrNone) window->SetBackgroundColor(TRgb(255, 255, 255, 0)); } else window->SetTransparentRegion(TRegionFix<1>()); +#endif } void QWidgetPrivate::setWindowIcon_sys(bool forceReset) @@ -883,6 +891,7 @@ void QWidgetPrivate::createSysExtra() extra->activated = 0; extra->nativePaintMode = QWExtra::Default; extra->receiveNativePaintEvents = 0; + extra->inExpose = 0; } void QWidgetPrivate::deleteSysExtra() diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index a98ac10..a9dcea0 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -1984,9 +1984,14 @@ QPaintEngine *QPainter::paintEngine() const /*! \since 4.6 - Flushes the painting pipeline and prepares for the user issuing - commands directly to the underlying graphics context. Must be - followed by a call to endNativePainting(). + Flushes the painting pipeline and prepares for the user issuing commands + directly to the underlying graphics context. Must be followed by a call to + endNativePainting(). + + Note that only the states the underlying paint engine changes will be reset + to their respective default states. If, for example, the OpenGL polygon + mode is changed by the user inside a beginNativePaint()/endNativePainting() + block, it will not be reset to the default state by endNativePainting(). Here is an example that shows intermixing of painter commands and raw OpenGL commands: @@ -2010,9 +2015,9 @@ void QPainter::beginNativePainting() /*! \since 4.6 - Restores the painter after manually issuing native painting commands. - Lets the painter restore any native state that it relies on before - calling any other painter commands. + Restores the painter after manually issuing native painting commands. Lets + the painter restore any native state that it relies on before calling any + other painter commands. \sa beginNativePainting() */ diff --git a/src/gui/painting/qprintengine_pdf.cpp b/src/gui/painting/qprintengine_pdf.cpp index e3a2461..b8bf15e 100644 --- a/src/gui/painting/qprintengine_pdf.cpp +++ b/src/gui/painting/qprintengine_pdf.cpp @@ -931,14 +931,24 @@ void QPdfEnginePrivate::writeHeader() void QPdfEnginePrivate::writeInfo() { info = addXrefEntry(-1); - xprintf("<<\n" - "/Title (%s)\n" -// "/Author (%s)\n" - "/Creator (%s)\n" - "/Producer (Qt " QT_VERSION_STR " (C) 2009 Nokia Corporation and/or its subsidiary(-ies))\n", - title.toUtf8().constData(), -// author.toUtf8().constData(), - creator.toUtf8().constData()); + + // The 'text string' type in PDF is encoded either as PDFDocEncoding, or + // Unicode UTF-16 with a Unicode byte order mark as the first character + // (0xfeff), with the high-order byte first. + QByteArray array("<<\n/Title (\xfe\xff"); + const ushort *utf16Title = title.utf16(); + for (int i=0; i < title.size(); ++i) { + array.append((*(utf16Title + i)) >> 8); + array.append((*(utf16Title + i)) & 0xff); + } + array.append(")\n/Creator (\xfe\xff"); + const ushort *utf16Creator = creator.utf16(); + for (int i=0; i < creator.size(); ++i) { + array.append((*(utf16Creator + i)) >> 8); + array.append((*(utf16Creator + i)) & 0xff); + } + array.append(")\n/Producer (Qt " QT_VERSION_STR " (C) 2010 Nokia Corporation and/or its subsidiary(-ies))\n"); + write(array); QDateTime now = QDateTime::currentDateTime().toUTC(); QTime t = now.time(); diff --git a/src/gui/painting/qwindowsurface_s60.cpp b/src/gui/painting/qwindowsurface_s60.cpp index b8eaead..b41dc2c 100644 --- a/src/gui/painting/qwindowsurface_s60.cpp +++ b/src/gui/painting/qwindowsurface_s60.cpp @@ -145,10 +145,12 @@ QImage* QS60WindowSurface::buffer(const QWidget *widget) void QS60WindowSurface::flush(QWidget *widget, const QRegion ®ion, const QPoint &) { - const QVector<QRect> subRects = region.rects(); - for (int i = 0; i < subRects.count(); ++i) { - TRect tr = qt_QRect2TRect(subRects[i]); + QWExtra *extra = widget->d_func()->extraData(); + if (extra && !extra->inExpose) { + extra->inExpose = true; // Prevent DrawNow() from calling syncBackingStore() again + TRect tr = qt_QRect2TRect(region.boundingRect()); widget->winId()->DrawNow(tr); + extra->inExpose = false; } } diff --git a/src/gui/widgets/qmainwindowlayout_mac.mm b/src/gui/widgets/qmainwindowlayout_mac.mm index e41c2be..ee79f5a 100644 --- a/src/gui/widgets/qmainwindowlayout_mac.mm +++ b/src/gui/widgets/qmainwindowlayout_mac.mm @@ -476,6 +476,17 @@ void QMainWindowLayout::cleanUpMacToolbarItems() CFRelease(toolbarItemsCopy.at(i)); toolbarItemsCopy.clear(); unifiedToolbarHash.clear(); + +#ifdef QT_MAC_USE_COCOA + QMacCocoaAutoReleasePool pool; + + OSWindowRef window = qt_mac_window_for(layoutState.mainWindow); + NSToolbar *macToolbar = [window toolbar]; + if (macToolbar) { + [[macToolbar delegate] release]; + [macToolbar setDelegate:nil]; + } +#endif } void QMainWindowLayout::fixSizeInUnifiedToolbar(QToolBar *tb) const diff --git a/src/network/access/qfilenetworkreply.cpp b/src/network/access/qfilenetworkreply.cpp index 44dd9e7..8c5065c 100644 --- a/src/network/access/qfilenetworkreply.cpp +++ b/src/network/access/qfilenetworkreply.cpp @@ -44,35 +44,32 @@ #include "QtCore/qdatetime.h" #include <QtCore/QCoreApplication> #include <QtCore/QFileInfo> +#include <QDebug> QT_BEGIN_NAMESPACE QFileNetworkReplyPrivate::QFileNetworkReplyPrivate() - : QNetworkReplyPrivate(), realFileSize(0), finished(false) + : QNetworkReplyPrivate(), realFileSize(0) { } -QFileNetworkReply::QFileNetworkReply(QObject *parent, const QNetworkRequest &req) +QFileNetworkReply::~QFileNetworkReply() +{ +} + +QFileNetworkReply::QFileNetworkReply(QObject *parent, const QNetworkRequest &req, const QNetworkAccessManager::Operation op) : QNetworkReply(*new QFileNetworkReplyPrivate(), parent) { setRequest(req); setUrl(req.url()); - setOperation(QNetworkAccessManager::GetOperation); - QMetaObject::invokeMethod(this, "_q_startOperation", Qt::QueuedConnection); + setOperation(op); QNetworkReply::open(QIODevice::ReadOnly); -} -QFileNetworkReply::~QFileNetworkReply() -{ -} + qRegisterMetaType<QNetworkReply::NetworkError>("QNetworkReply::NetworkError"); -// This code is mostly inspired by QNetworkAccessFileBackend -// We also use its translation context for error messages -void QFileNetworkReplyPrivate::_q_startOperation() -{ - Q_Q(QFileNetworkReply); + QFileNetworkReplyPrivate *d = (QFileNetworkReplyPrivate*) d_func(); - QUrl url = q->url(); + QUrl url = req.url(); if (url.host() == QLatin1String("localhost")) url.setHost(QString()); @@ -81,81 +78,75 @@ void QFileNetworkReplyPrivate::_q_startOperation() if (!url.host().isEmpty()) { // we handle only local files QString msg = QCoreApplication::translate("QNetworkAccessFileBackend", "Request for opening non-local file %1").arg(url.toString()); - q->setError(QNetworkReply::ProtocolInvalidOperationError, msg); - emit q->error(QNetworkReply::ProtocolInvalidOperationError); - doFinished(); + setError(QNetworkReply::ProtocolInvalidOperationError, msg); + QMetaObject::invokeMethod(this, "error", Qt::QueuedConnection, + Q_ARG(QNetworkReply::NetworkError, QNetworkReply::ProtocolInvalidOperationError)); + QMetaObject::invokeMethod(this, "finished", Qt::QueuedConnection); return; } #endif if (url.path().isEmpty()) url.setPath(QLatin1String("/")); - q->setUrl(url); + setUrl(url); QString fileName = url.toLocalFile(); if (fileName.isEmpty()) { fileName = url.toString(QUrl::RemoveAuthority | QUrl::RemoveFragment | QUrl::RemoveQuery); } - realFile.setFileName(fileName); + d->realFile.setFileName(fileName); - QFileInfo fi(realFile); + QFileInfo fi(d->realFile); if (fi.isDir()) { QString msg = QCoreApplication::translate("QNetworkAccessFileBackend", "Cannot open %1: Path is a directory").arg(url.toString()); - q->setError(QNetworkReply::ContentOperationNotPermittedError, msg); - emit q->error(QNetworkReply::ContentOperationNotPermittedError); - doFinished(); + setError(QNetworkReply::ContentOperationNotPermittedError, msg); + QMetaObject::invokeMethod(this, "error", Qt::QueuedConnection, + Q_ARG(QNetworkReply::NetworkError, QNetworkReply::ContentOperationNotPermittedError)); + QMetaObject::invokeMethod(this, "finished", Qt::QueuedConnection); return; } - bool opened = realFile.open(QIODevice::ReadOnly | QIODevice::Unbuffered); + bool opened = d->realFile.open(QIODevice::ReadOnly | QIODevice::Unbuffered); // could we open the file? if (!opened) { QString msg = QCoreApplication::translate("QNetworkAccessFileBackend", "Error opening %1: %2") - .arg(realFile.fileName(), realFile.errorString()); + .arg(d->realFile.fileName(), d->realFile.errorString()); - if (realFile.exists()) { - q->setError(QNetworkReply::ContentAccessDenied, msg); - emit q->error(QNetworkReply::ContentAccessDenied); + if (d->realFile.exists()) { + setError(QNetworkReply::ContentAccessDenied, msg); + QMetaObject::invokeMethod(this, "error", Qt::QueuedConnection, + Q_ARG(QNetworkReply::NetworkError, QNetworkReply::ContentAccessDenied)); } else { - q->setError(QNetworkReply::ContentNotFoundError, msg); - emit q->error(QNetworkReply::ContentNotFoundError); + setError(QNetworkReply::ContentNotFoundError, msg); + QMetaObject::invokeMethod(this, "error", Qt::QueuedConnection, + Q_ARG(QNetworkReply::NetworkError, QNetworkReply::ContentNotFoundError)); } - doFinished(); + QMetaObject::invokeMethod(this, "finished", Qt::QueuedConnection); return; } - realFileSize = fi.size(); - q->setHeader(QNetworkRequest::LastModifiedHeader, fi.lastModified()); - q->setHeader(QNetworkRequest::ContentLengthHeader, realFileSize); + d->realFileSize = fi.size(); + setHeader(QNetworkRequest::LastModifiedHeader, fi.lastModified()); + setHeader(QNetworkRequest::ContentLengthHeader, d->realFileSize); - emit q->metaDataChanged(); - emit q->downloadProgress(realFileSize, realFileSize); - emit q->readyRead(); - doFinished(); + QMetaObject::invokeMethod(this, "metaDataChanged", Qt::QueuedConnection); + QMetaObject::invokeMethod(this, "downloadProgress", Qt::QueuedConnection, + Q_ARG(qint64, d->realFileSize), Q_ARG(qint64, d->realFileSize)); + QMetaObject::invokeMethod(this, "readyRead", Qt::QueuedConnection); + QMetaObject::invokeMethod(this, "finished", Qt::QueuedConnection); } bool QFileNetworkReplyPrivate::isFinished() const { - return finished; -} - -void QFileNetworkReplyPrivate::doFinished() -{ - Q_Q(QFileNetworkReply); - finished = true; - emit q->finished(); + return true; } - void QFileNetworkReply::close() { Q_D(QFileNetworkReply); QNetworkReply::close(); d->realFile.close(); - - if (!d->finished) - d->doFinished(); } void QFileNetworkReply::abort() @@ -163,9 +154,6 @@ void QFileNetworkReply::abort() Q_D(QFileNetworkReply); QNetworkReply::close(); d->realFile.close(); - - if (!d->finished) - d->doFinished(); } qint64 QFileNetworkReply::bytesAvailable() const diff --git a/src/network/access/qfilenetworkreply_p.h b/src/network/access/qfilenetworkreply_p.h index 6f10672..125fa2e 100644 --- a/src/network/access/qfilenetworkreply_p.h +++ b/src/network/access/qfilenetworkreply_p.h @@ -66,7 +66,7 @@ class QFileNetworkReply: public QNetworkReply { Q_OBJECT public: - QFileNetworkReply(QObject *parent, const QNetworkRequest &req); + QFileNetworkReply(QObject *parent, const QNetworkRequest &req, const QNetworkAccessManager::Operation op); ~QFileNetworkReply(); virtual void abort(); @@ -76,12 +76,9 @@ public: virtual bool isSequential () const; qint64 size() const; - virtual qint64 readData(char *data, qint64 maxlen); Q_DECLARE_PRIVATE(QFileNetworkReply) - Q_PRIVATE_SLOT(d_func(), void _q_startOperation()) - }; class QFileNetworkReplyPrivate: public QNetworkReplyPrivate @@ -92,12 +89,7 @@ public: QFile realFile; qint64 realFileSize; - void _q_startOperation(); - virtual bool isFinished() const; - void doFinished(); - bool finished; - Q_DECLARE_PUBLIC(QFileNetworkReply) }; diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp index d27fbe7..e16aedc 100644 --- a/src/network/access/qnetworkaccessmanager.cpp +++ b/src/network/access/qnetworkaccessmanager.cpp @@ -687,10 +687,10 @@ QNetworkReply *QNetworkAccessManager::createRequest(QNetworkAccessManager::Opera // Also if the scheme is empty we consider it a file. // The QNetworkAccessFileBackend will right now only be used // for PUT or qrc:// - if (op == QNetworkAccessManager::GetOperation + if ((op == QNetworkAccessManager::GetOperation || op == QNetworkAccessManager::HeadOperation) && (req.url().scheme() == QLatin1String("file") || req.url().scheme().isEmpty())) { - return new QFileNetworkReply(this, req); + return new QFileNetworkReply(this, req, op); } QNetworkRequest request = req; diff --git a/src/network/access/qnetworkreply.cpp b/src/network/access/qnetworkreply.cpp index 49a287f..0a8ea5d 100644 --- a/src/network/access/qnetworkreply.cpp +++ b/src/network/access/qnetworkreply.cpp @@ -239,7 +239,10 @@ QNetworkReplyPrivate::QNetworkReplyPrivate() \note Do not delete the object in the slot connected to this signal. Use deleteLater(). - \sa QNetworkAccessManager::finished() + You can also use isFinished() to check if a QNetworkReply + has finished even before you receive the finished() signal. + + \sa QNetworkAccessManager::finished(), isFinished() */ /*! diff --git a/src/network/socket/qnativesocketengine_win.cpp b/src/network/socket/qnativesocketengine_win.cpp index 81bffd9..7088a57 100644 --- a/src/network/socket/qnativesocketengine_win.cpp +++ b/src/network/socket/qnativesocketengine_win.cpp @@ -994,9 +994,9 @@ qint64 QNativeSocketEnginePrivate::nativeWrite(const char *data, qint64 len) { Q_Q(QNativeSocketEngine); qint64 ret = 0; - // don't send more than 49152 per call to WSASendTo to avoid getting a WSAENOBUFS + qint64 bytesToSend = len; + for (;;) { - qint64 bytesToSend = qMin<qint64>(49152, len - ret); WSABUF buf; buf.buf = (char*)data + ret; buf.len = bytesToSend; @@ -1007,15 +1007,21 @@ qint64 QNativeSocketEnginePrivate::nativeWrite(const char *data, qint64 len) ret += qint64(bytesWritten); + int err; if (socketRet != SOCKET_ERROR) { if (ret == len) break; else continue; - } else if (WSAGetLastError() == WSAEWOULDBLOCK) { + } else if ((err = WSAGetLastError()) == WSAEWOULDBLOCK) { break; + } else if (err == WSAENOBUFS) { + // this function used to not send more than 49152 per call to WSASendTo + // to avoid getting a WSAENOBUFS. However this is a performance regression + // and we think it only appears with old windows versions. We now handle the + // WSAENOBUFS and hope it never appears anyway. + // just go on, the next loop run we will try a smaller number } else { - int err = WSAGetLastError(); WS_ERROR_DEBUG(err); switch (err) { case WSAECONNRESET: @@ -1029,6 +1035,9 @@ qint64 QNativeSocketEnginePrivate::nativeWrite(const char *data, qint64 len) } break; } + + // for next send: + bytesToSend = qMin<qint64>(49152, len - ret); } #if defined (QNATIVESOCKETENGINE_DEBUG) diff --git a/src/network/ssl/qsslcertificate.cpp b/src/network/ssl/qsslcertificate.cpp index dd50c38..8993e72 100644 --- a/src/network/ssl/qsslcertificate.cpp +++ b/src/network/ssl/qsslcertificate.cpp @@ -304,6 +304,7 @@ static QString _q_SubjectInfoToString(QSslCertificate::SubjectInfo info) */ QString QSslCertificate::issuerInfo(SubjectInfo info) const { + // lazy init if (d->issuerInfo.isEmpty() && d->x509) d->issuerInfo = _q_mapFromOnelineName(q_X509_NAME_oneline(q_X509_get_issuer_name(d->x509), 0, 0)); @@ -320,7 +321,11 @@ QString QSslCertificate::issuerInfo(SubjectInfo info) const */ QString QSslCertificate::issuerInfo(const QByteArray &tag) const { - // ### Use a QByteArray for the keys in the map + // lazy init + if (d->issuerInfo.isEmpty() && d->x509) + d->issuerInfo = + _q_mapFromOnelineName(q_X509_NAME_oneline(q_X509_get_issuer_name(d->x509), 0, 0)); + return d->issuerInfo.value(QString::fromLatin1(tag)); } @@ -335,6 +340,7 @@ QString QSslCertificate::issuerInfo(const QByteArray &tag) const */ QString QSslCertificate::subjectInfo(SubjectInfo info) const { + // lazy init if (d->subjectInfo.isEmpty() && d->x509) d->subjectInfo = _q_mapFromOnelineName(q_X509_NAME_oneline(q_X509_get_subject_name(d->x509), 0, 0)); @@ -350,7 +356,11 @@ QString QSslCertificate::subjectInfo(SubjectInfo info) const */ QString QSslCertificate::subjectInfo(const QByteArray &tag) const { - // ### Use a QByteArray for the keys in the map + // lazy init + if (d->subjectInfo.isEmpty() && d->x509) + d->subjectInfo = + _q_mapFromOnelineName(q_X509_NAME_oneline(q_X509_get_subject_name(d->x509), 0, 0)); + return d->subjectInfo.value(QString::fromLatin1(tag)); } diff --git a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp index 0720170..fed1658 100644 --- a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp +++ b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h b/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h index 393893c..2a8a782 100644 --- a/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h +++ b/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/opengl/qpixmapdata_gl.cpp b/src/opengl/qpixmapdata_gl.cpp index 1bfb6e3..6d47687 100644 --- a/src/opengl/qpixmapdata_gl.cpp +++ b/src/opengl/qpixmapdata_gl.cpp @@ -252,6 +252,10 @@ QGLPixmapData::QGLPixmapData(PixelType type) { setSerialNumber(++qt_gl_pixmap_serial); m_glDevice.setPixmapData(this); + + // Set InteralBindOptions minus the memory managed, since this + // QGLTexture is not managed as part of the internal texture cache + m_texture.options = QGLContext::PremultipliedAlphaBindOption; } QGLPixmapData::~QGLPixmapData() @@ -340,18 +344,18 @@ void QGLPixmapData::ensureCreated() const } if (!m_source.isNull()) { + glBindTexture(target, m_texture.id); if (external_format == GL_RGB) { const QImage tx = m_source.convertToFormat(QImage::Format_RGB888); - - glBindTexture(target, m_texture.id); glTexSubImage2D(target, 0, 0, 0, w, h, external_format, GL_UNSIGNED_BYTE, tx.bits()); } else { const QImage tx = ctx->d_func()->convertToGLFormat(m_source, true, external_format); - - glBindTexture(target, m_texture.id); glTexSubImage2D(target, 0, 0, 0, w, h, external_format, GL_UNSIGNED_BYTE, tx.bits()); + // convertToGLFormat will flip the Y axis, so it needs to + // be drawn upside down + m_texture.options |= QGLContext::InvertedYBindOption; } if (useFramebufferObjects()) diff --git a/src/opengl/qpixmapdata_x11gl_egl.cpp b/src/opengl/qpixmapdata_x11gl_egl.cpp index a5e0239..55aa1d0 100644 --- a/src/opengl/qpixmapdata_x11gl_egl.cpp +++ b/src/opengl/qpixmapdata_x11gl_egl.cpp @@ -39,10 +39,19 @@ ** ****************************************************************************/ +#include <QDebug> + #include <private/qgl_p.h> #include <private/qegl_p.h> #include <private/qeglproperties_p.h> + +#if !defined(QT_OPENGL_ES_1) && !defined(QT_OPENGL_ES_1_CL) #include <private/qpaintengineex_opengl2_p.h> +#endif + +#ifndef QT_OPENGL_ES_2 +#include <private/qpaintengine_opengl_p.h> +#endif #include "qpixmapdata_x11gl_p.h" @@ -187,7 +196,14 @@ QX11GLPixmapData::~QX11GLPixmapData() { } -static QGL2PaintEngineEx* qt_gl2_engine_for_pixmaps = 0; +#if !defined(QT_OPENGL_ES_1) && !defined(QT_OPENGL_ES_1_CL) +Q_GLOBAL_STATIC(QGL2PaintEngineEx, qt_gl_pixmap_2_engine) +#endif + +#ifndef QT_OPENGL_ES_2 +Q_GLOBAL_STATIC(QOpenGLPaintEngine, qt_gl_pixmap_engine) +#endif + QPaintEngine* QX11GLPixmapData::paintEngine() const { @@ -202,18 +218,41 @@ QPaintEngine* QX11GLPixmapData::paintEngine() const : qPixmapRGBSharedEglContext); } - if (!qt_gl2_engine_for_pixmaps) - qt_gl2_engine_for_pixmaps = new QGL2PaintEngineEx(); + QPaintEngine* engine; + +#if defined(QT_OPENGL_ES_1) || defined(QT_OPENGL_ES_1_CL) + engine = qt_gl_pixmap_engine(); +#elif defined(QT_OPENGL_ES_2) + engine = qt_gl_pixmap_2_engine(); +#else + if (qt_gl_preferGL2Engine()) + engine = qt_gl_pixmap_2_engine(); + else + engine = qt_gl_pixmap_engine(); +#endif + + // Support multiple painters on multiple pixmaps simultaniously - if (qt_gl2_engine_for_pixmaps->isActive()) { + if (engine->isActive()) { qWarning("Pixmap paint engine already active"); - QPaintEngine* engine = new QGL2PaintEngineEx(); + +#if defined(QT_OPENGL_ES_1) || defined(QT_OPENGL_ES_1_CL) + engine = new QOpenGLPaintEngine; +#elif defined(QT_OPENGL_ES_2) + engine = new QGL2PaintEngineEx; +#else + if (qt_gl_preferGL2Engine()) + engine = new QGL2PaintEngineEx; + else + engine = new QOpenGLPaintEngine; +#endif + engine->setAutoDestruct(true); return engine; } - return qt_gl2_engine_for_pixmaps; + return engine; } void QX11GLPixmapData::beginPaint() diff --git a/src/plugins/qpluginbase.pri b/src/plugins/qpluginbase.pri index b66f8f9..3af8b40 100644 --- a/src/plugins/qpluginbase.pri +++ b/src/plugins/qpluginbase.pri @@ -1,6 +1,6 @@ TEMPLATE = lib isEmpty(QT_MAJOR_VERSION) { - VERSION=4.6.1 + VERSION=4.6.2 } else { VERSION=$${QT_MAJOR_VERSION}.$${QT_MINOR_VERSION}.$${QT_PATCH_VERSION} } diff --git a/src/qbase.pri b/src/qbase.pri index d1a2a75..d9832a1 100644 --- a/src/qbase.pri +++ b/src/qbase.pri @@ -4,7 +4,7 @@ INCLUDEPATH *= $$QMAKE_INCDIR_QT/$$TARGET #just for today to have some compat isEmpty(QT_ARCH):!isEmpty(ARCH):QT_ARCH=$$ARCH #another compat that will rot for change #215700 TEMPLATE = lib isEmpty(QT_MAJOR_VERSION) { - VERSION=4.6.1 + VERSION=4.6.2 } else { VERSION=$${QT_MAJOR_VERSION}.$${QT_MINOR_VERSION}.$${QT_PATCH_VERSION} } diff --git a/src/s60installs/qt.iby b/src/s60installs/qt.iby index f24ac4b..bdd668c 100644 --- a/src/s60installs/qt.iby +++ b/src/s60installs/qt.iby @@ -90,27 +90,27 @@ file=ABI_DIR\BUILD_DIR\qts60plugin_5_0.dll SHARED_LIB_DIR\qts60plugin_5_0.dll S60_APP_RESOURCE(s60main) // imageformats stubs -data=\epoc32\data\qt\qtlibspluginstubs\qgif.qtplugin resource\qt\plugins\imageformats\qgif.qtplugin -data=\epoc32\data\qt\qtlibspluginstubs\qico.qtplugin resource\qt\plugins\imageformats\qico.qtplugin -data=\epoc32\data\qt\qtlibspluginstubs\qjpeg.qtplugin resource\qt\plugins\imageformats\qjpeg.qtplugin -data=\epoc32\data\qt\qtlibspluginstubs\qmng.qtplugin resource\qt\plugins\imageformats\qmng.qtplugin -data=\epoc32\data\qt\qtlibspluginstubs\qsvg.qtplugin resource\qt\plugins\imageformats\qsvg.qtplugin -data=\epoc32\data\qt\qtlibspluginstubs\qtiff.qtplugin resource\qt\plugins\imageformats\qtiff.qtplugin +data=\epoc32\data\z\resource\qt\plugins\imageformats\qgif.qtplugin resource\qt\plugins\imageformats\qgif.qtplugin +data=\epoc32\data\z\resource\qt\plugins\imageformats\qico.qtplugin resource\qt\plugins\imageformats\qico.qtplugin +data=\epoc32\data\z\resource\qt\plugins\imageformats\qjpeg.qtplugin resource\qt\plugins\imageformats\qjpeg.qtplugin +data=\epoc32\data\z\resource\qt\plugins\imageformats\qmng.qtplugin resource\qt\plugins\imageformats\qmng.qtplugin +data=\epoc32\data\z\resource\qt\plugins\imageformats\qsvg.qtplugin resource\qt\plugins\imageformats\qsvg.qtplugin +data=\epoc32\data\z\resource\qt\plugins\imageformats\qtiff.qtplugin resource\qt\plugins\imageformats\qtiff.qtplugin // codecs stubs -data=\epoc32\data\qt\qtlibspluginstubs\qcncodecs.qtplugin resource\qt\plugins\codecs\qcncodecs.qtplugin -data=\epoc32\data\qt\qtlibspluginstubs\qjpcodecs.qtplugin resource\qt\plugins\codecs\qjpcodecs.qtplugin -data=\epoc32\data\qt\qtlibspluginstubs\qkrcodecs.qtplugin resource\qt\plugins\codecs\qkrcodecs.qtplugin -data=\epoc32\data\qt\qtlibspluginstubs\qtwcodecs.qtplugin resource\qt\plugins\codecs\qtwcodecs.qtplugin +data=\epoc32\data\z\resource\qt\plugins\codecs\qcncodecs.qtplugin resource\qt\plugins\codecs\qcncodecs.qtplugin +data=\epoc32\data\z\resource\qt\plugins\codecs\qjpcodecs.qtplugin resource\qt\plugins\codecs\qjpcodecs.qtplugin +data=\epoc32\data\z\resource\qt\plugins\codecs\qkrcodecs.qtplugin resource\qt\plugins\codecs\qkrcodecs.qtplugin +data=\epoc32\data\z\resource\qt\plugins\codecs\qtwcodecs.qtplugin resource\qt\plugins\codecs\qtwcodecs.qtplugin // iconengines stubs -data=\epoc32\data\qt\qtlibspluginstubs\qsvgicon.qtplugin resource\qt\plugins\iconengines\qsvgicon.qtplugin +data=\epoc32\data\z\resource\qt\plugins\iconengines\qsvgicon.qtplugin resource\qt\plugins\iconengines\qsvgicon.qtplugin // Phonon MMF backend -data=\epoc32\data\qt\qtlibspluginstubs\phonon_mmf.qtplugin resource\qt\plugins\phonon_backend\phonon_mmf.qtplugin +data=\epoc32\data\z\resource\qt\plugins\phonon_backend\phonon_mmf.qtplugin resource\qt\plugins\phonon_backend\phonon_mmf.qtplugin // graphicssystems -data=\epoc32\data\qt\qtlibspluginstubs\qvggraphicssystem.qtplugin resource\qt\plugins\graphicssystems\qvggraphicssystem.qtplugin +data=\epoc32\data\z\resource\qt\plugins\graphicssystems\qvggraphicssystem.qtplugin resource\qt\plugins\graphicssystems\qvggraphicssystem.qtplugin // Stub sis file data=ZSYSTEM\install\qt.sis System\Install\qt.sis diff --git a/src/s60installs/s60installs.pro b/src/s60installs/s60installs.pro index bbc758b..55eaee1 100644 --- a/src/s60installs/s60installs.pro +++ b/src/s60installs/s60installs.pro @@ -112,9 +112,4 @@ symbian: { BLD_INF_RULES.prj_exports += "qt.iby $$CORE_MW_LAYER_IBY_EXPORT_PATH(qt.iby)" BLD_INF_RULES.prj_exports += "qtdemoapps.iby $$CORE_APP_LAYER_IBY_EXPORT_PATH(qtdemoapps.iby)" - PLUGIN_STUBS = $$files(qmakepluginstubs/*) - for(STUB, PLUGIN_STUBS) { - STUB_FILENAME = $$basename(STUB) - BLD_INF_RULES.prj_exports += "qmakepluginstubs/$${STUB_FILENAME} /epoc32/data/qt/qtlibspluginstubs/$${STUB_FILENAME}" - } } diff --git a/src/script/bridge/qscriptqobject.cpp b/src/script/bridge/qscriptqobject.cpp index fb0dddb..db312bc 100644 --- a/src/script/bridge/qscriptqobject.cpp +++ b/src/script/bridge/qscriptqobject.cpp @@ -978,7 +978,8 @@ JSC::JSValue QtFunction::execute(JSC::ExecState *exec, JSC::JSValue thisValue, QScriptObjectDelegate *delegate = scriptObject->delegate(); Q_ASSERT(delegate && (delegate->type() == QScriptObjectDelegate::QtObject)); QObject *qobj = static_cast<QScript::QObjectDelegate*>(delegate)->value(); - Q_ASSERT_X(qobj != 0, "QtFunction::call", "handle the case when QObject has been deleted"); + if (!qobj) + return JSC::throwError(exec, JSC::GeneralError, QString::fromLatin1("cannot call function of deleted QObject")); QScriptEnginePrivate *engine = scriptEngineFromExec(exec); const QMetaObject *meta = qobj->metaObject(); @@ -2219,7 +2220,14 @@ void QObjectConnectionManager::execute(int slotIndex, void **argv) JSC::call(exec, slot, callType, callData, thisObject, jscArgs); if (exec->hadException()) { - engine->emitSignalHandlerException(); + if (slot.inherits(&QtFunction::info) && !static_cast<QtFunction*>(JSC::asObject(slot))->qobject()) { + // The function threw an error because the target QObject has been deleted. + // The connections list is stale; remove the signal handler and ignore the exception. + removeSignalHandler(sender(), signalIndex, receiver, slot); + exec->clearException(); + } else { + engine->emitSignalHandlerException(); + } } } diff --git a/src/xmlpatterns/parser/qquerytransformparser.cpp b/src/xmlpatterns/parser/qquerytransformparser.cpp index c250d0c..6daa470 100644 --- a/src/xmlpatterns/parser/qquerytransformparser.cpp +++ b/src/xmlpatterns/parser/qquerytransformparser.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/xmlpatterns/parser/qquerytransformparser_p.h b/src/xmlpatterns/parser/qquerytransformparser_p.h index 204b6f8..0b316ec 100644 --- a/src/xmlpatterns/parser/qquerytransformparser_p.h +++ b/src/xmlpatterns/parser/qquerytransformparser_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/xmlpatterns/parser/qxslttokenlookup.cpp b/src/xmlpatterns/parser/qxslttokenlookup.cpp index a46ec8a..781ba0d 100644 --- a/src/xmlpatterns/parser/qxslttokenlookup.cpp +++ b/src/xmlpatterns/parser/qxslttokenlookup.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/xmlpatterns/parser/qxslttokenlookup_p.h b/src/xmlpatterns/parser/qxslttokenlookup_p.h index b45407d..6d004b0 100644 --- a/src/xmlpatterns/parser/qxslttokenlookup_p.h +++ b/src/xmlpatterns/parser/qxslttokenlookup_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** |