summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/3rdparty/webkit/.tag2
-rw-r--r--src/3rdparty/webkit/ChangeLog8
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/ChangeLog36
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro1
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.cpp2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.h33
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/symbian/RegisterFileAllocatorSymbian.cpp111
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/symbian/RegisterFileAllocatorSymbian.h69
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/symbian/SymbianDefines.h42
-rw-r--r--src/3rdparty/webkit/VERSION2
-rw-r--r--src/3rdparty/webkit/WebCore/ChangeLog31
-rw-r--r--src/corelib/global/global.pri3
-rw-r--r--src/corelib/global/qglobal.cpp81
-rw-r--r--src/corelib/global/qglobal.h4
-rw-r--r--src/corelib/kernel/qeventdispatcher_symbian.cpp38
-rw-r--r--src/corelib/kernel/qeventdispatcher_symbian_p.h8
-rw-r--r--src/corelib/thread/qthread_unix.cpp2
-rw-r--r--src/corelib/thread/qthread_win.cpp2
-rw-r--r--src/declarative/debugger/debugger.pri6
-rw-r--r--src/declarative/debugger/qdeclarativedebug_p.h1
-rw-r--r--src/declarative/debugger/qdeclarativedebughelper.cpp (renamed from src/declarative/qml/qdeclarativeclassfactory_p.h)40
-rw-r--r--src/declarative/debugger/qdeclarativedebughelper_p.h (renamed from src/declarative/qml/qdeclarativeclassfactory.cpp)23
-rw-r--r--src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp10
-rw-r--r--src/declarative/qml/qdeclarativeengine.cpp4
-rw-r--r--src/declarative/qml/qdeclarativeengine_p.h1
-rw-r--r--src/declarative/qml/qml.pri2
-rw-r--r--src/declarative/util/qdeclarativeanimation_p.h2
-rw-r--r--src/declarative/util/qdeclarativelistmodel.cpp42
-rw-r--r--src/declarative/util/qdeclarativelistmodel_p.h1
-rw-r--r--src/declarative/util/qdeclarativelistmodel_p_p.h3
-rw-r--r--src/declarative/util/qdeclarativetimer_p.h2
-rw-r--r--src/declarative/util/qdeclarativeview.cpp2
-rw-r--r--src/declarative/util/qlistmodelinterface_p.h3
-rw-r--r--src/gui/graphicsview/qgraphicsscene.cpp126
-rw-r--r--src/gui/graphicsview/qgraphicsview.cpp3
-rw-r--r--src/gui/image/qpixmap.cpp43
-rw-r--r--src/gui/image/qpixmap_x11.cpp3
-rw-r--r--src/gui/itemviews/qtreeview.cpp4
-rw-r--r--src/gui/kernel/qapplication.cpp9
-rw-r--r--src/gui/kernel/qdnd_win.cpp12
-rw-r--r--src/gui/painting/qrasterizer.cpp180
-rw-r--r--src/gui/styles/qstylehelper_p.h2
-rw-r--r--src/gui/text/qtextcontrol.cpp6
-rw-r--r--src/gui/widgets/qlabel.cpp27
-rw-r--r--src/gui/widgets/qlabel_p.h1
-rw-r--r--src/imports/folderlistmodel/folderlistmodel.pro6
-rw-r--r--src/imports/gestures/gestures.pro4
-rw-r--r--src/imports/gestures/qdeclarativegesturearea.cpp2
-rw-r--r--src/imports/particles/particles.pro4
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp30
-rw-r--r--src/opengl/qgl.cpp33
-rw-r--r--src/opengl/qgl_p.h3
-rw-r--r--src/opengl/qgl_x11.cpp4
-rw-r--r--src/opengl/qglframebufferobject.cpp105
-rw-r--r--src/opengl/qglframebufferobject_p.h5
-rw-r--r--src/openvg/qpaintengine_vg.cpp7
-rw-r--r--src/s60installs/bwins/QtDeclarativeu.def89
-rw-r--r--src/s60installs/eabi/QtDeclarativeu.def88
-rw-r--r--src/src.pro3
59 files changed, 1006 insertions, 410 deletions
diff --git a/src/3rdparty/webkit/.tag b/src/3rdparty/webkit/.tag
index ae33228..fff71f4 100644
--- a/src/3rdparty/webkit/.tag
+++ b/src/3rdparty/webkit/.tag
@@ -1 +1 @@
-715b53069911a31a559aa0b3d94ffc6a5ac20988
+6e15c3404d15a8ab72242152ec966e5e388161a2
diff --git a/src/3rdparty/webkit/ChangeLog b/src/3rdparty/webkit/ChangeLog
index 14d6da3..f438655 100644
--- a/src/3rdparty/webkit/ChangeLog
+++ b/src/3rdparty/webkit/ChangeLog
@@ -1,3 +1,11 @@
+2010-09-24 Romain Pokrzywka <romain@kdab.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Fix the Wince build.
+
+ * WebKit.pri: Apply msvc flags to wince, too.
+
2010-07-01 Simon Hausmann <simon.hausmann@nokia.com>
Rubber-stamped by Laszlo Gombos.
diff --git a/src/3rdparty/webkit/JavaScriptCore/ChangeLog b/src/3rdparty/webkit/JavaScriptCore/ChangeLog
index 9922da6..c7e0fc2 100644
--- a/src/3rdparty/webkit/JavaScriptCore/ChangeLog
+++ b/src/3rdparty/webkit/JavaScriptCore/ChangeLog
@@ -1,3 +1,39 @@
+2010-06-18 Tucker Jay <jay.tucker@nokia.com>
+
+ Reviewed by NOBODY (OOPS!).
+
+ [Symbian] Lazy commit of memory required in JSC register file
+ https://bugs.webkit.org/show_bug.cgi?id=34349
+
+ * JavaScriptCore.pro: Added 1 new Symbian source file
+ * interpreter/RegisterFile.cpp:
+ (JSC::RegisterFile::~RegisterFile):
+ * interpreter/RegisterFile.h:
+ (JSC::RegisterFile::):
+ (JSC::RegisterFile::start):
+ (JSC::RegisterFile::end):
+ (JSC::RegisterFile::size):
+ (JSC::RegisterFile::setNumGlobals):
+ (JSC::RegisterFile::numGlobals):
+ (JSC::RegisterFile::maxGlobals):
+ (JSC::RegisterFile::lastGlobal):
+ (JSC::RegisterFile::markGlobals):
+ (JSC::RegisterFile::markCallFrames):
+ (JSC::isPageAligned):
+ (JSC::RegisterFile::RegisterFile):
+ (JSC::RegisterFile::shrink):
+ (JSC::RegisterFile::grow):
+ * wtf/symbian/RegisterFileAllocatorSymbian.cpp: Added.
+ (WTF::RegisterFileAllocator::RegisterFileAllocator):
+ Helper class to allocate memory required by RegisterFile
+ more efficiently.
+ (WTF::RegisterFileAllocator::~RegisterFileAllocator):
+ (WTF::RegisterFileAllocator::buffer):
+ (WTF::RegisterFileAllocator::grow):
+ (WTF::RegisterFileAllocator::shrink):
+ * wtf/symbian/RegisterFileAllocatorSymbian.h: Added.
+ * wtf/symbian/SymbianDefines.h: Added.
+
2010-06-16 Thiago Macieira <thiago.macieira@nokia.com>
Reviewed by NOBODY (OOPS!).
diff --git a/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro
index 3f1ac86..a805170 100644
--- a/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro
+++ b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro
@@ -208,6 +208,7 @@ SOURCES += \
wtf/qt/ThreadingQt.cpp \
wtf/RandomNumber.cpp \
wtf/RefCountedLeakCounter.cpp \
+ wtf/symbian/RegisterFileAllocatorSymbian.cpp \
wtf/symbian/BlockAllocatorSymbian.cpp \
wtf/ThreadingNone.cpp \
wtf/Threading.cpp \
diff --git a/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.cpp b/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.cpp
index 510effe..4a33c62 100644
--- a/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.cpp
@@ -40,6 +40,8 @@ RegisterFile::~RegisterFile()
VirtualFree(m_buffer, DWORD(m_commitEnd) - DWORD(m_buffer), MEM_DECOMMIT);
#endif
VirtualFree(m_buffer, 0, MEM_RELEASE);
+#elif OS(SYMBIAN)
+ delete m_registerFileAllocator;
#else
fastFree(m_buffer);
#endif
diff --git a/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.h b/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.h
index 1fc4f82..80cf991 100644
--- a/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.h
+++ b/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.h
@@ -41,6 +41,10 @@
#include <sys/mman.h>
#endif
+#if OS(SYMBIAN)
+#include <wtf/symbian/RegisterFileAllocatorSymbian.h>
+#endif
+
namespace JSC {
/*
@@ -152,12 +156,21 @@ namespace JSC {
#if HAVE(VIRTUALALLOC)
Register* m_commitEnd;
#endif
+#if OS(SYMBIAN)
+ // Commits and frees a continguous chunk of memory as required
+ WTF::RegisterFileAllocator* m_registerFileAllocator;
+#endif
JSGlobalObject* m_globalObject; // The global object whose vars are currently stored in the register file.
};
// FIXME: Add a generic getpagesize() to WTF, then move this function to WTF as well.
- inline bool isPageAligned(size_t size) { return size != 0 && size % (8 * 1024) == 0; }
+ // This is still a hack that should be fixed later. We know that a Symbian page size is 4K.
+ #if OS(SYMBIAN)
+ inline bool isPageAligned(size_t size) { return size && !(size % (4 * 1024)); }
+ #else
+ inline bool isPageAligned(size_t size) { return size && !(size % (8 * 1024)); }
+ #endif
inline RegisterFile::RegisterFile(size_t capacity, size_t maxGlobals)
: m_numGlobals(0)
@@ -204,7 +217,13 @@ namespace JSC {
CRASH();
}
m_commitEnd = reinterpret_cast<Register*>(reinterpret_cast<char*>(m_buffer) + committedSize);
- #else
+ #elif OS(SYMBIAN)
+ m_registerFileAllocator = new WTF::RegisterFileAllocator(bufferLength);
+ m_buffer = (Register*)(m_registerFileAllocator->buffer());
+ // start by committing enough space to hold maxGlobals
+ void* newEnd = (void*)((int)m_buffer + (maxGlobals * sizeof(Register)));
+ m_registerFileAllocator->grow(newEnd);
+ #else
/*
* If neither MMAP nor VIRTUALALLOC are available - use fastMalloc instead.
*
@@ -226,8 +245,13 @@ namespace JSC {
if (newEnd >= m_end)
return;
m_end = newEnd;
- if (m_end == m_start && (m_maxUsed - m_start) > maxExcessCapacity)
+ if (m_end == m_start && (m_maxUsed - m_start) > maxExcessCapacity) {
+#if OS(SYMBIAN)
+ m_registerFileAllocator->shrink(newEnd);
+#endif
+
releaseExcessCapacity();
+ }
}
inline bool RegisterFile::grow(Register* newEnd)
@@ -252,6 +276,9 @@ namespace JSC {
m_commitEnd = reinterpret_cast<Register*>(reinterpret_cast<char*>(m_commitEnd) + size);
}
#endif
+#if OS(SYMBIAN)
+ m_registerFileAllocator->grow((void*)newEnd);
+#endif
if (newEnd > m_maxUsed)
m_maxUsed = newEnd;
diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/symbian/RegisterFileAllocatorSymbian.cpp b/src/3rdparty/webkit/JavaScriptCore/wtf/symbian/RegisterFileAllocatorSymbian.cpp
new file mode 100644
index 0000000..baa7841
--- /dev/null
+++ b/src/3rdparty/webkit/JavaScriptCore/wtf/symbian/RegisterFileAllocatorSymbian.cpp
@@ -0,0 +1,111 @@
+/*
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#if OS(SYMBIAN)
+
+#include "RegisterFileAllocatorSymbian.h"
+
+namespace WTF {
+
+/** Efficiently allocates memory pools of size poolSize.
+ * Primarily designed for JSC RegisterFile's needs.
+ * Not thread-safe.
+ */
+RegisterFileAllocator::RegisterFileAllocator(TUint32 reservationSize, TUint32 poolSize) :
+ m_reserved(reservationSize), m_poolSize(poolSize)
+{
+ // Get system's page size value.
+ SYMBIAN_PAGESIZE(m_pageSize);
+
+ // We only accept multiples of system page size for both initial reservation
+ // and the alignment/pool size
+ m_reserved = SYMBIAN_ROUNDUPTOMULTIPLE(m_reserved, m_pageSize);
+ __ASSERT_ALWAYS(SYMBIAN_ROUNDUPTOMULTIPLE(m_poolSize, m_pageSize),
+ User::Panic(_L("RegisterFileAllocator1"), KErrArgument));
+
+ // Open a Symbian RChunk, and reserve requested virtual address range
+ // Any thread in this process can operate this RChunk due to EOwnerProcess access rights.
+ TInt ret = m_chunk.CreateDisconnectedLocal(0 , 0, (TInt)m_reserved , EOwnerProcess);
+ if (ret != KErrNone)
+ User::Panic(_L("RegisterFileAllocator2"), ret);
+
+ m_buffer = (void*)m_chunk.Base();
+ m_resEnd = (void*)(m_chunk.Base() + m_chunk.MaxSize());
+ m_comEnd = m_buffer;
+}
+
+RegisterFileAllocator::~RegisterFileAllocator()
+{
+ // release everything!
+ m_chunk.Decommit(0, m_chunk.MaxSize());
+ m_chunk.Close();
+}
+
+void* RegisterFileAllocator::buffer() const
+{
+ return m_buffer;
+}
+
+void RegisterFileAllocator::grow(void* newEnd)
+{
+ // trying to commit more memory than reserved!
+ if (newEnd > m_resEnd)
+ return;
+
+ if (newEnd > m_comEnd) {
+ TInt nBytes = (TInt)(newEnd) - (TInt)(m_comEnd);
+ nBytes = SYMBIAN_ROUNDUPTOMULTIPLE(nBytes, m_poolSize);
+ TInt offset = (TInt)m_comEnd - (TInt)m_buffer;
+
+ TInt ret = m_chunk.Commit(offset, nBytes);
+ if (ret == KErrNone)
+ m_comEnd = (void*)(m_chunk.Base() + m_chunk.Size());
+ }
+}
+
+void RegisterFileAllocator::shrink(void* newEnd)
+{
+ if (newEnd < m_comEnd) {
+ TInt nBytes = (TInt)newEnd - (TInt)m_comEnd;
+ if (nBytes >= m_poolSize) {
+ TInt offset = SYMBIAN_ROUNDUPTOMULTIPLE((TUint)newEnd, m_poolSize) - (TInt)m_buffer;
+ nBytes = (TInt)m_comEnd - offset - (TInt)m_buffer;
+ if (nBytes > 0) {
+ TInt ret = m_chunk.Decommit(offset, nBytes);
+ if (ret == KErrNone)
+ m_comEnd = (void*)(m_chunk.Base() + m_chunk.Size());
+ }
+ }
+ }
+}
+
+} // end of namespace
+
+#endif // SYMBIAN
diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/symbian/RegisterFileAllocatorSymbian.h b/src/3rdparty/webkit/JavaScriptCore/wtf/symbian/RegisterFileAllocatorSymbian.h
new file mode 100644
index 0000000..4cfc8c5
--- /dev/null
+++ b/src/3rdparty/webkit/JavaScriptCore/wtf/symbian/RegisterFileAllocatorSymbian.h
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef RegisterFileAllocatorSymbian_h
+#define RegisterFileAllocatorSymbian_h
+
+#include "SymbianDefines.h"
+
+namespace WTF {
+
+/**
+ * Allocates contiguous regions of size poolSize.
+ * poolSize must be a multiple of system page size (typically 4K on Symbian/ARM)
+ *
+ * @param reservationSize Virtual address range to be reserved upon creation of chunk (bytes).
+ * @param poolSize Size of a single allocation.
+ */
+class RegisterFileAllocator {
+
+public:
+ RegisterFileAllocator(
+ TUint32 reservationSize, TUint32 poolSize = SYMBIAN_REGFILEALLOC_DEFAULTPOOLSIZE);
+ ~RegisterFileAllocator();
+ void* buffer() const;
+ void grow(void* newEnd);
+ void shrink(void* newEnd);
+
+private:
+ RChunk m_chunk; // Symbian chunk that lets us reserve/commit/decommit
+
+ // all following values are in numbers of bytes
+ TInt m_pageSize; // cached value of system page size, typically 4K on Symbian
+ TUint32 m_reserved; // total number of reserved bytes in virtual memory
+ TUint32 m_poolSize; // size of one memory pool, set by default to 64K in wtf/symbian/SymbianDefines.h
+
+ void* m_buffer; // pointer to base of the chunk
+ void* m_comEnd; // pointer to end of currently committed memory
+ void* m_resEnd; // pointer to end of reserved memory
+
+};
+
+} // end of namespace
+
+#endif // RegisterFileAllocatorSymbian_h
diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/symbian/SymbianDefines.h b/src/3rdparty/webkit/JavaScriptCore/wtf/symbian/SymbianDefines.h
new file mode 100644
index 0000000..43e22b3
--- /dev/null
+++ b/src/3rdparty/webkit/JavaScriptCore/wtf/symbian/SymbianDefines.h
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef SymbianDefines_h
+#define SymbianDefines_h
+
+#include <e32cmn.h>
+#include <e32std.h>
+#include <hal.h>
+
+#define SYMBIAN_PAGESIZE(x) (HAL::Get(HALData::EMemoryPageSize, x));
+#define SYMBIAN_FREERAM(x) (HAL::Get(HALData::EMemoryRAMFree, x));
+#define SYMBIAN_ROUNDUPTOMULTIPLE(x, multipleof) ( (x + multipleof - 1) & ~(multipleof - 1) )
+
+#define SYMBIAN_REGFILEALLOC_DEFAULTPOOLSIZE 65536 // 64K
+
+#endif // SymbianDefines_h
diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION
index f919bdf..a270d56 100644
--- a/src/3rdparty/webkit/VERSION
+++ b/src/3rdparty/webkit/VERSION
@@ -4,4 +4,4 @@ This is a snapshot of the Qt port of WebKit from
and has the sha1 checksum
- 715b53069911a31a559aa0b3d94ffc6a5ac20988
+ 6e15c3404d15a8ab72242152ec966e5e388161a2
diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog
index 2d20cbd..ac698e3 100644
--- a/src/3rdparty/webkit/WebCore/ChangeLog
+++ b/src/3rdparty/webkit/WebCore/ChangeLog
@@ -1,3 +1,34 @@
+2010-09-24 Romain Pokrzywka <romain@kdab.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Fix the Wince build.
+
+ * WebCore.pro: Apply msvc flags to wince, too.
+
+2010-09-24 Anders Bakken <agbakken@gmail.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Enable building Qt/Webkit with debug symbols
+
+ With this patch one can configure with -webkit-debug to build Webkit
+ with debug symbols without having to manually edit WebCore.pro.
+
+ * WebCore.pro:
+
+2010-09-16 Thomas Zander <t.zander@nokia.com>
+
+ Reviewed by Andreas Kling.
+
+ https://bugs.webkit.org/show_bug.cgi?id=45878
+
+ [Qt] Fixed incorrect Symbian scoping.
+
+ The missing install functionality is only true for mmp based systems.
+
+ * WebCore.pro: limit functionality to mmp systems.
+
2010-09-09 Kristian Amlie <kristian.amlie@nokia.com>
Reviewed by Andreas Kling.
diff --git a/src/corelib/global/global.pri b/src/corelib/global/global.pri
index 260ed59..4800716 100644
--- a/src/corelib/global/global.pri
+++ b/src/corelib/global/global.pri
@@ -24,3 +24,6 @@ linux*:!static:!linux-armcc:!linux-gcce {
prog=$$quote(if (/program interpreter: (.*)]/) { print $1; })
DEFINES += ELF_INTERPRETER=\\\"$$system(readelf -l /bin/ls | perl -n -e \'$$prog\')\\\"
}
+
+# Compensate for lack of platform defines in Symbian3 and Symbian4
+symbian: DEFINES += SYMBIAN_VERSION_$$upper($$replace(SYMBIAN_VERSION,\\.,_))
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index 401af85..3291fe7 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -86,7 +86,8 @@
# include "private/qcore_symbian_p.h"
_LIT(qt_S60Filter, "Series60v?.*.sis");
-_LIT(qt_S60SystemInstallDir, "z:\\system\\install\\");
+_LIT(qt_symbianFilter, "Symbianv*.sis");
+_LIT(qt_symbianSystemInstallDir, "z:\\system\\install\\");
#endif
QT_BEGIN_NAMESPACE
@@ -1813,12 +1814,12 @@ const QSysInfo::WinVersion QSysInfo::WindowsVersion = QSysInfo::windowsVersion()
#endif
#ifdef Q_OS_SYMBIAN
-static QSysInfo::S60Version cachedS60Version = QSysInfo::S60Version(-1);
+static QSysInfo::SymbianVersion cachedSymbianVersion = QSysInfo::SymbianVersion(-1);
-QSysInfo::S60Version QSysInfo::s60Version()
+QSysInfo::SymbianVersion QSysInfo::symbianVersion()
{
- if (cachedS60Version != -1)
- return cachedS60Version;
+ if (cachedSymbianVersion != -1)
+ return cachedSymbianVersion;
// Use pure Symbian code, because if done using QDir, there will be a call back
// to this method, resulting doing this expensive operation twice before the cache kicks in.
@@ -1826,7 +1827,22 @@ QSysInfo::S60Version QSysInfo::s60Version()
RFs rfs = qt_s60GetRFs();
TFindFile fileFinder(rfs);
CDir* contents;
- TInt err = fileFinder.FindWildByDir(qt_S60Filter, qt_S60SystemInstallDir, contents);
+
+ // Check for Symbian4
+ TInt err = fileFinder.FindWildByDir(qt_symbianFilter, qt_symbianSystemInstallDir, contents);
+ if (err == KErrNone) {
+ QScopedPointer<CDir> contentsDeleter(contents);
+ err = contents->Sort(EDescending|ESortByName);
+ if (err == KErrNone && contents->Count() > 0 && (*contents)[0].iName.Length() >= 9) {
+ TInt major = (*contents)[0].iName[8] - '0';
+ if (major == 4) {
+ return cachedSymbianVersion = SV_SF_4;
+ }
+ }
+ }
+
+ // Check for S60 and Symbian3 platforms, which use older .sis naming scheme
+ err = fileFinder.FindWildByDir(qt_S60Filter, qt_symbianSystemInstallDir, contents);
if (err == KErrNone) {
QScopedPointer<CDir> contentsDeleter(contents);
err = contents->Sort(EDescending|ESortByName);
@@ -1835,19 +1851,19 @@ QSysInfo::S60Version QSysInfo::s60Version()
TInt minor = (*contents)[0].iName[11] - '0';
if (major == 3) {
if (minor == 1) {
- return cachedS60Version = SV_S60_3_1;
+ return cachedSymbianVersion = SV_9_2;
} else if (minor == 2) {
- return cachedS60Version = SV_S60_3_2;
+ return cachedSymbianVersion = SV_9_3;
}
} else if (major == 5) {
if (minor == 0) {
- return cachedS60Version = SV_S60_5_0;
+ return cachedSymbianVersion = SV_9_4;
}
else if (minor == 1) {
- return cachedS60Version = SV_S60_5_1;
+ return cachedSymbianVersion = SV_SF_2;
}
else if (minor == 2) {
- return cachedS60Version = SV_S60_5_2;
+ return cachedSymbianVersion = SV_SF_3;
}
}
}
@@ -1855,33 +1871,40 @@ QSysInfo::S60Version QSysInfo::s60Version()
# ifdef Q_CC_NOKIAX86
// Some emulator environments may not contain the version specific .sis files, so
- // simply hardcode the version on those environments.
+ // simply hardcode the version on those environments. Note that can't use
+ // SYMBIAN_VERSION_* defines for S60 3.x/5.0 platforms, as they do not define them
+ // right anyway in case .sis files are not found.
# if defined(__SERIES60_31__)
- return cachedS60Version = SV_S60_3_1;
+ return cachedSymbianVersion = SV_9_2;
# elif defined(__S60_32__)
- return cachedS60Version = SV_S60_3_2;
+ return cachedSymbianVersion = SV_9_3;
# elif defined(__S60_50__)
- return cachedS60Version = SV_S60_5_0;
+ return cachedSymbianVersion = SV_9_4;
+# elif defined(SYMBIAN_VERSION_SYMBIAN3)
+ return cachedSymbianVersion = SV_SF_3;
+# elif defined(SYMBIAN_VERSION_SYMBIAN4)
+ return cachedSymbianVersion = SV_SF_4;
# endif
# endif
//If reaching here, it was not possible to determine the version
- return cachedS60Version = SV_S60_Unknown;
+ return cachedSymbianVersion = SV_Unknown;
}
-QSysInfo::SymbianVersion QSysInfo::symbianVersion()
+
+QSysInfo::S60Version QSysInfo::s60Version()
{
- switch (s60Version()) {
- case SV_S60_3_1:
- return SV_9_2;
- case SV_S60_3_2:
- return SV_9_3;
- case SV_S60_5_0:
- return SV_9_4;
- case SV_S60_5_1:
- return SV_SF_2;
- case SV_S60_5_2:
- return SV_SF_3;
+ switch (symbianVersion()) {
+ case SV_9_2:
+ return SV_S60_3_1;
+ case SV_9_3:
+ return SV_S60_3_2;
+ case SV_9_4:
+ return SV_S60_5_0;
+ case SV_SF_2:
+ return SV_S60_5_1;
+ case SV_SF_3:
+ return SV_S60_5_2;
default:
- return SV_Unknown;
+ return SV_S60_Unknown;
}
}
#endif // ifdef Q_OS_SYMBIAN
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index d04133b..6ef15d4 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -1515,7 +1515,7 @@ public:
#endif
#ifdef Q_OS_SYMBIAN
enum SymbianVersion {
- SV_Unknown = 0x0000,
+ SV_Unknown = 1000000, // Assume unknown is something newer than what is supported
//These are the Symbian Ltd versions 9.2-9.4
SV_9_2 = 10,
SV_9_3 = 20,
@@ -1529,7 +1529,7 @@ public:
static SymbianVersion symbianVersion();
enum S60Version {
SV_S60_None = 0,
- SV_S60_Unknown = 1,
+ SV_S60_Unknown = SV_Unknown,
SV_S60_3_1 = SV_9_2,
SV_S60_3_2 = SV_9_3,
SV_S60_5_0 = SV_9_4,
diff --git a/src/corelib/kernel/qeventdispatcher_symbian.cpp b/src/corelib/kernel/qeventdispatcher_symbian.cpp
index 5cc6ae3..d8cc344 100644
--- a/src/corelib/kernel/qeventdispatcher_symbian.cpp
+++ b/src/corelib/kernel/qeventdispatcher_symbian.cpp
@@ -127,9 +127,9 @@ private:
* cannot change active objects that we do not own, but the active objects that Qt owns will use
* this as a base class with convenience functions.
*
- * Here is how it works: On every RunL, the deriving class should call okToRun(). This will allow
- * exactly one run of the active object, and mark it as such. If it is called again, it will return
- * false, and add the object to a queue so it can be run later.
+ * Here is how it works: On every RunL, the deriving class should call maybeQueueForLater().
+ * This will return whether the active object has been queued, or whether it should run immediately.
+ * Queued objects will run again after other events have been processed.
*
* The QCompleteDeferredAOs class is a special object that runs after all others, which will
* reactivate the objects that were previously not run.
@@ -149,7 +149,7 @@ QActiveObject::~QActiveObject()
m_dispatcher->removeDeferredActiveObject(this);
}
-bool QActiveObject::okToRun()
+bool QActiveObject::maybeQueueForLater()
{
Q_ASSERT(!m_hasRunAgain);
@@ -157,12 +157,12 @@ bool QActiveObject::okToRun()
// First occurrence of this event in this iteration.
m_hasAlreadyRun = true;
m_iterationCount = m_dispatcher->iterationCount();
- return true;
+ return false;
} else {
// The event has already occurred.
m_dispatcher->addDeferredActiveObject(this);
m_hasRunAgain = true;
- return false;
+ return true;
}
}
@@ -178,8 +178,7 @@ void QActiveObject::reactivateAndComplete()
}
QWakeUpActiveObject::QWakeUpActiveObject(QEventDispatcherSymbian *dispatcher)
- : CActive(WAKE_UP_PRIORITY),
- m_dispatcher(dispatcher)
+ : QActiveObject(WAKE_UP_PRIORITY, dispatcher)
{
CActiveScheduler::Add(this);
iStatus = KRequestPending;
@@ -201,6 +200,9 @@ void QWakeUpActiveObject::DoCancel()
void QWakeUpActiveObject::RunL()
{
+ if (maybeQueueForLater())
+ return;
+
iStatus = KRequestPending;
SetActive();
QT_TRYCATCH_LEAVING(m_dispatcher->wakeUpWasCalled());
@@ -270,7 +272,7 @@ void QTimerActiveObject::Run()
return;
}
- if (!okToRun())
+ if (maybeQueueForLater())
return;
if (m_timerInfo->interval > 0) {
@@ -630,7 +632,7 @@ void QSocketActiveObject::DoCancel()
void QSocketActiveObject::RunL()
{
- if (!okToRun())
+ if (maybeQueueForLater())
return;
QT_TRYCATCH_LEAVING(m_dispatcher->socketFired(this));
@@ -722,6 +724,7 @@ QEventDispatcherSymbian::QEventDispatcherSymbian(QObject *parent)
m_interrupt(false),
m_wakeUpDone(0),
m_iterationCount(0),
+ m_insideTimerEvent(false),
m_noSocketEvents(false)
{
#ifdef QT_SYMBIAN_PRIORITY_DROP
@@ -772,6 +775,9 @@ bool QEventDispatcherSymbian::processEvents ( QEventLoop::ProcessEventsFlags fla
{
bool handledAnyEvent = false;
bool oldNoSocketEventsValue = m_noSocketEvents;
+ bool oldInsideTimerEventValue = m_insideTimerEvent;
+
+ m_insideTimerEvent = false;
QT_TRY {
Q_D(QAbstractEventDispatcher);
@@ -862,6 +868,7 @@ bool QEventDispatcherSymbian::processEvents ( QEventLoop::ProcessEventsFlags fla
}
m_noSocketEvents = oldNoSocketEventsValue;
+ m_insideTimerEvent = oldInsideTimerEventValue;
return handledAnyEvent;
}
@@ -882,10 +889,13 @@ void QEventDispatcherSymbian::timerFired(int timerId)
}
timerInfo->inTimerEvent = true;
+ bool oldInsideTimerEventValue = m_insideTimerEvent;
+ m_insideTimerEvent = true;
QTimerEvent event(timerInfo->timerId);
QCoreApplication::sendEvent(timerInfo->receiver, &event);
+ m_insideTimerEvent = oldInsideTimerEventValue;
timerInfo->inTimerEvent = false;
return;
@@ -1052,6 +1062,14 @@ void QEventDispatcherSymbian::registerTimer ( int timerId, int interval, QObject
m_timerList.insert(timerId, timer);
timer->timerAO->Start();
+
+ if (m_insideTimerEvent)
+ // If we are inside a timer event, we need to prevent event starvation
+ // by preventing newly created timers from running in the same event processing
+ // iteration. Do this by calling the maybeQueueForLater() function to "fake" that we have
+ // already run once. This will cause the next run to be added to the deferred
+ // queue instead.
+ timer->timerAO->maybeQueueForLater();
}
bool QEventDispatcherSymbian::unregisterTimer ( int timerId )
diff --git a/src/corelib/kernel/qeventdispatcher_symbian_p.h b/src/corelib/kernel/qeventdispatcher_symbian_p.h
index bc42753..1486db5 100644
--- a/src/corelib/kernel/qeventdispatcher_symbian_p.h
+++ b/src/corelib/kernel/qeventdispatcher_symbian_p.h
@@ -82,7 +82,7 @@ public:
QActiveObject(TInt priority, QEventDispatcherSymbian *dispatcher);
~QActiveObject();
- bool okToRun();
+ bool maybeQueueForLater();
void reactivateAndComplete();
@@ -95,7 +95,7 @@ private:
int m_iterationCount;
};
-class QWakeUpActiveObject : public CActive
+class QWakeUpActiveObject : public QActiveObject
{
public:
QWakeUpActiveObject(QEventDispatcherSymbian *dispatcher);
@@ -106,9 +106,6 @@ public:
protected:
void DoCancel();
void RunL();
-
-private:
- QEventDispatcherSymbian *m_dispatcher;
};
struct SymbianTimerInfo : public QSharedData
@@ -277,6 +274,7 @@ private:
QAtomicInt m_wakeUpDone;
unsigned char m_iterationCount;
+ bool m_insideTimerEvent;
bool m_noSocketEvents;
QList<QSocketActiveObject *> m_deferredSocketEvents;
diff --git a/src/corelib/thread/qthread_unix.cpp b/src/corelib/thread/qthread_unix.cpp
index 2824e15..a7601b6 100644
--- a/src/corelib/thread/qthread_unix.cpp
+++ b/src/corelib/thread/qthread_unix.cpp
@@ -514,6 +514,8 @@ void QThread::start(Priority priority)
d->running = true;
d->finished = false;
d->terminated = false;
+ d->returnCode = 0;
+ d->exited = false;
pthread_attr_t attr;
pthread_attr_init(&attr);
diff --git a/src/corelib/thread/qthread_win.cpp b/src/corelib/thread/qthread_win.cpp
index 37d5b87..f0cbe8d 100644
--- a/src/corelib/thread/qthread_win.cpp
+++ b/src/corelib/thread/qthread_win.cpp
@@ -405,6 +405,8 @@ void QThread::start(Priority priority)
d->running = true;
d->finished = false;
d->terminated = false;
+ d->exited = false;
+ d->returnCode = 0;
/*
NOTE: we create the thread in the suspended state, set the
diff --git a/src/declarative/debugger/debugger.pri b/src/declarative/debugger/debugger.pri
index 33d0843..25f7687 100644
--- a/src/declarative/debugger/debugger.pri
+++ b/src/declarative/debugger/debugger.pri
@@ -6,7 +6,8 @@ SOURCES += \
$$PWD/qdeclarativedebugservice.cpp \
$$PWD/qdeclarativedebugclient.cpp \
$$PWD/qdeclarativedebug.cpp \
- $$PWD/qdeclarativedebugtrace.cpp
+ $$PWD/qdeclarativedebugtrace.cpp \
+ $$PWD/qdeclarativedebughelper.cpp
HEADERS += \
$$PWD/qdeclarativedebuggerstatus_p.h \
@@ -14,4 +15,5 @@ HEADERS += \
$$PWD/qdeclarativedebugservice_p.h \
$$PWD/qdeclarativedebugclient_p.h \
$$PWD/qdeclarativedebug_p.h \
- $$PWD/qdeclarativedebugtrace_p.h
+ $$PWD/qdeclarativedebugtrace_p.h \
+ $$PWD/qdeclarativedebughelper_p.h
diff --git a/src/declarative/debugger/qdeclarativedebug_p.h b/src/declarative/debugger/qdeclarativedebug_p.h
index f0fc488..2b1a115 100644
--- a/src/declarative/debugger/qdeclarativedebug_p.h
+++ b/src/declarative/debugger/qdeclarativedebug_p.h
@@ -365,7 +365,6 @@ private:
int m_queryId;
QVariant m_expr;
QVariant m_result;
-
};
QT_END_NAMESPACE
diff --git a/src/declarative/qml/qdeclarativeclassfactory_p.h b/src/declarative/debugger/qdeclarativedebughelper.cpp
index 9f4a3de..207ad2b 100644
--- a/src/declarative/qml/qdeclarativeclassfactory_p.h
+++ b/src/declarative/debugger/qdeclarativedebughelper.cpp
@@ -39,36 +39,28 @@
**
****************************************************************************/
-#ifndef QDECLARATIVECLASSFACTORY_P_H
-#define QDECLARATIVECLASSFACTORY_P_H
+#include <QtScript/QScriptEngine>
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
+#include "private/qdeclarativedebughelper_p.h"
-#include <QtCore/qglobal.h>
+#include <QtCore/QAbstractAnimation>
+#include <QtScript/QScriptEngine>
+
+#include <private/qdeclarativeengine_p.h>
+#include <private/qabstractanimation_p.h>
QT_BEGIN_NAMESPACE
-class QDeclarativeEngine;
-class QByteArray;
-class QUrl;
-class QDeclarativeComponent;
+QScriptEngine *QDeclarativeDebugHelper::getScriptEngine(QDeclarativeEngine *engine)
+{
+ return QDeclarativeEnginePrivate::getScriptEngine(engine);
+}
-class QDeclarativeClassFactory
+void QDeclarativeDebugHelper::setAnimationSlowDownFactor(qreal factor)
{
-public:
- virtual ~QDeclarativeClassFactory();
- virtual QDeclarativeComponent *create(const QByteArray &, const QUrl& baseUrl, QDeclarativeEngine*) = 0;
-};
+ QUnifiedTimer *timer = QUnifiedTimer::instance();
+ timer->setSlowModeEnabled(factor != 1.0);
+ timer->setSlowdownFactor(factor);
+}
QT_END_NAMESPACE
-
-#endif // QDECLARATIVECLASSFACTORY_P_H
diff --git a/src/declarative/qml/qdeclarativeclassfactory.cpp b/src/declarative/debugger/qdeclarativedebughelper_p.h
index 798eacd..c9cb839 100644
--- a/src/declarative/qml/qdeclarativeclassfactory.cpp
+++ b/src/declarative/debugger/qdeclarativedebughelper_p.h
@@ -39,12 +39,29 @@
**
****************************************************************************/
-#include "private/qdeclarativeclassfactory_p.h"
+#ifndef QDECLARATIVEDEBUGHELPER_P_H
+#define QDECLARATIVEDEBUGHELPER_P_H
+
+#include <QtCore/qglobal.h>
+
+QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QDeclarativeClassFactory::~QDeclarativeClassFactory()
+class QScriptEngine;
+class QDeclarativeEngine;
+
+// Helper methods to access private API through a stable interface
+// This is used in the qmljsdebugger library of QtCreator.
+class Q_DECLARATIVE_EXPORT QDeclarativeDebugHelper
{
-}
+public:
+ static QScriptEngine *getScriptEngine(QDeclarativeEngine *engine);
+ static void setAnimationSlowDownFactor(qreal factor);
+};
QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QDECLARATIVEDEBUGHELPER_P_H
diff --git a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
index a70886e..21d1ea7 100644
--- a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
+++ b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
@@ -621,7 +621,7 @@ QDeclarativeVisualDataModelParts::QDeclarativeVisualDataModelParts(QDeclarativeV
QDeclarativeVisualDataModelPrivate::QDeclarativeVisualDataModelPrivate(QDeclarativeContext *ctxt)
: m_listModelInterface(0), m_abstractItemModel(0), m_visualItemModel(0), m_delegate(0)
-, m_context(ctxt), m_parts(0), m_delegateDataType(0), m_metaDataCreated(false)
+, m_context(ctxt), m_modelDataPropId(-1), m_parts(0), m_delegateDataType(0), m_metaDataCreated(false)
, m_metaDataCacheable(false), m_delegateValidated(false), m_completePending(false), m_listAccessor(0)
{
}
@@ -1187,7 +1187,7 @@ void QDeclarativeVisualDataModel::_q_itemsChanged(int index, int count,
if (propId != -1) {
if (data->hasValue(propId)) {
if (d->m_listModelInterface) {
- data->setValue(propId, d->m_listModelInterface->data(idx, QList<int>() << role).value(role));
+ data->setValue(propId, d->m_listModelInterface->data(idx, role));
} else if (d->m_abstractItemModel) {
QModelIndex index = d->m_abstractItemModel->index(idx, 0, d->m_root);
data->setValue(propId, d->m_abstractItemModel->data(index, role));
@@ -1202,13 +1202,13 @@ void QDeclarativeVisualDataModel::_q_itemsChanged(int index, int count,
qmlInfo(this) << "Changing role not present in item: " << roleName;
}
}
- if (roles.count() == 1) {
+ if (d->m_roles.count() == 1) {
// Handle the modelData role we add if there is just one role.
int propId = data->modelDataPropertyId();
if (data->hasValue(propId)) {
- int role = roles.at(0);
+ int role = d->m_roles.at(0);
if (d->m_listModelInterface) {
- data->setValue(propId, d->m_listModelInterface->data(idx, QList<int>() << role).value(role));
+ data->setValue(propId, d->m_listModelInterface->data(idx, role));
} else if (d->m_abstractItemModel) {
QModelIndex index = d->m_abstractItemModel->index(idx, 0, d->m_root);
data->setValue(propId, d->m_abstractItemModel->data(index, role));
diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp
index 80db230..26b3629 100644
--- a/src/declarative/qml/qdeclarativeengine.cpp
+++ b/src/declarative/qml/qdeclarativeengine.cpp
@@ -1783,7 +1783,9 @@ void QDeclarativeEnginePrivate::warning(QDeclarativeEnginePrivate *engine, const
/*!
\qmlmethod Qt::quit()
This function causes the QDeclarativeEngine::quit() signal to be emitted.
-Within the \l {QML Viewer}, this causes the launcher application to exit.
+Within the \l {QML Viewer}, this causes the launcher application to exit;
+to quit a C++ application when this method is called, connect the
+QDeclarativeEngine::quit() signal to the QCoreApplication::quit() slot.
*/
QScriptValue QDeclarativeEnginePrivate::quit(QScriptContext * /*ctxt*/, QScriptEngine *e)
diff --git a/src/declarative/qml/qdeclarativeengine_p.h b/src/declarative/qml/qdeclarativeengine_p.h
index dc7315d..8539fbf 100644
--- a/src/declarative/qml/qdeclarativeengine_p.h
+++ b/src/declarative/qml/qdeclarativeengine_p.h
@@ -55,7 +55,6 @@
#include "qdeclarativeengine.h"
-#include "private/qdeclarativeclassfactory_p.h"
#include "private/qdeclarativetypeloader_p.h"
#include "private/qdeclarativeimport_p.h"
#include "private/qpodvector_p.h"
diff --git a/src/declarative/qml/qml.pri b/src/declarative/qml/qml.pri
index 687ff52..66b69f9 100644
--- a/src/declarative/qml/qml.pri
+++ b/src/declarative/qml/qml.pri
@@ -22,7 +22,6 @@ SOURCES += \
$$PWD/qdeclarativerefcount.cpp \
$$PWD/qdeclarativemetatype.cpp \
$$PWD/qdeclarativestringconverters.cpp \
- $$PWD/qdeclarativeclassfactory.cpp \
$$PWD/qdeclarativeparserstatus.cpp \
$$PWD/qdeclarativetypeloader.cpp \
$$PWD/qdeclarativeinfo.cpp \
@@ -89,7 +88,6 @@ HEADERS += \
$$PWD/qdeclarativecontext.h \
$$PWD/qdeclarativeexpression.h \
$$PWD/qdeclarativestringconverters_p.h \
- $$PWD/qdeclarativeclassfactory_p.h \
$$PWD/qdeclarativeinfo.h \
$$PWD/qdeclarativeproperty_p.h \
$$PWD/qdeclarativecontext_p.h \
diff --git a/src/declarative/util/qdeclarativeanimation_p.h b/src/declarative/util/qdeclarativeanimation_p.h
index cdd5041..8cb17e4 100644
--- a/src/declarative/util/qdeclarativeanimation_p.h
+++ b/src/declarative/util/qdeclarativeanimation_p.h
@@ -63,7 +63,7 @@ QT_MODULE(Declarative)
class QDeclarativeAbstractAnimationPrivate;
class QDeclarativeAnimationGroup;
-class Q_AUTOTEST_EXPORT QDeclarativeAbstractAnimation : public QObject, public QDeclarativePropertyValueSource, public QDeclarativeParserStatus
+class Q_DECLARATIVE_EXPORT QDeclarativeAbstractAnimation : public QObject, public QDeclarativePropertyValueSource, public QDeclarativeParserStatus
{
Q_OBJECT
Q_DECLARE_PRIVATE(QDeclarativeAbstractAnimation)
diff --git a/src/declarative/util/qdeclarativelistmodel.cpp b/src/declarative/util/qdeclarativelistmodel.cpp
index 3263238..398480e 100644
--- a/src/declarative/util/qdeclarativelistmodel.cpp
+++ b/src/declarative/util/qdeclarativelistmodel.cpp
@@ -310,14 +310,6 @@ QString QDeclarativeListModel::toString(int role) const
return m_flat ? m_flat->toString(role) : m_nested->toString(role);
}
-QHash<int,QVariant> QDeclarativeListModel::data(int index, const QList<int> &roles) const
-{
- if (index >= count() || index < 0)
- return QHash<int, QVariant>();
-
- return m_flat ? m_flat->data(index, roles) : m_nested->data(index, roles);
-}
-
QVariant QDeclarativeListModel::data(int index, int role) const
{
if (index >= count() || index < 0)
@@ -560,7 +552,8 @@ QScriptValue QDeclarativeListModel::get(int index) const
fruitModel.set(3, {"cost": 5.95, "name":"Pizza"})
\endcode
- The \a index must be an element in the list.
+ If \a index is equal to count() then a new item is appended to the
+ list. Otherwise, \a index must be an element in the list.
\sa append()
*/
@@ -570,7 +563,7 @@ void QDeclarativeListModel::set(int index, const QScriptValue& valuemap)
qmlInfo(this) << tr("set: value is not an object");
return;
}
- if (count() == 0 || index > count() || index < 0) {
+ if (index > count() || index < 0) {
qmlInfo(this) << tr("set: index %1 out of range").arg(index);
return;
}
@@ -920,19 +913,6 @@ FlatListModel::~FlatListModel()
qDeleteAll(m_nodeData);
}
-QHash<int,QVariant> FlatListModel::data(int index, const QList<int> &roles) const
-{
- Q_ASSERT(index >= 0 && index < m_values.count());
-
- QHash<int, QVariant> row;
- for (int i=0; i<roles.count(); i++) {
- int role = roles[i];
- if (m_values[index].contains(role))
- row.insert(role, m_values[index][role]);
- }
- return row;
-}
-
QVariant FlatListModel::data(int index, int role) const
{
Q_ASSERT(index >= 0 && index < m_values.count());
@@ -972,11 +952,6 @@ void FlatListModel::remove(int index)
removedNode(index);
}
-bool FlatListModel::append(const QScriptValue &value)
-{
- return insert(m_values.count(), value);
-}
-
bool FlatListModel::insert(int index, const QScriptValue &value)
{
Q_ASSERT(index >= 0 && index <= m_values.count());
@@ -1350,17 +1325,6 @@ void NestedListModel::move(int from, int to, int n)
qdeclarativelistmodel_move<QVariantList>(from, to, n, &_root->values);
}
-bool NestedListModel::append(const QScriptValue& valuemap)
-{
- if (!_root) {
- _root = new ModelNode(this);
- m_ownsRoot = true;
- }
-
- insert(count(), valuemap);
- return true;
-}
-
QScriptValue NestedListModel::get(int index) const
{
QDeclarativeEngine *eng = qmlEngine(m_listModel);
diff --git a/src/declarative/util/qdeclarativelistmodel_p.h b/src/declarative/util/qdeclarativelistmodel_p.h
index fe42ef6..e9673c8 100644
--- a/src/declarative/util/qdeclarativelistmodel_p.h
+++ b/src/declarative/util/qdeclarativelistmodel_p.h
@@ -76,7 +76,6 @@ public:
virtual QList<int> roles() const;
virtual QString toString(int role) const;
virtual int count() const;
- virtual QHash<int,QVariant> data(int index, const QList<int> &roles = (QList<int>())) const;
virtual QVariant data(int index, int role) const;
Q_INVOKABLE void clear();
diff --git a/src/declarative/util/qdeclarativelistmodel_p_p.h b/src/declarative/util/qdeclarativelistmodel_p_p.h
index d2d40ee..43a0a9b 100644
--- a/src/declarative/util/qdeclarativelistmodel_p_p.h
+++ b/src/declarative/util/qdeclarativelistmodel_p_p.h
@@ -79,7 +79,6 @@ public:
FlatListModel(QDeclarativeListModel *base);
~FlatListModel();
- QHash<int,QVariant> data(int index, const QList<int> &roles) const;
QVariant data(int index, int role) const;
QList<int> roles() const;
@@ -88,7 +87,6 @@ public:
int count() const;
void clear();
void remove(int index);
- bool append(const QScriptValue&);
bool insert(int index, const QScriptValue&);
QScriptValue get(int index) const;
void set(int index, const QScriptValue&, QList<int> *roles);
@@ -189,7 +187,6 @@ public:
int count() const;
void clear();
void remove(int index);
- bool append(const QScriptValue&);
bool insert(int index, const QScriptValue&);
QScriptValue get(int index) const;
void set(int index, const QScriptValue&, QList<int> *roles);
diff --git a/src/declarative/util/qdeclarativetimer_p.h b/src/declarative/util/qdeclarativetimer_p.h
index 93b0965..08c3d4e 100644
--- a/src/declarative/util/qdeclarativetimer_p.h
+++ b/src/declarative/util/qdeclarativetimer_p.h
@@ -54,7 +54,7 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
class QDeclarativeTimerPrivate;
-class Q_AUTOTEST_EXPORT QDeclarativeTimer : public QObject, public QDeclarativeParserStatus
+class Q_DECLARATIVE_EXPORT QDeclarativeTimer : public QObject, public QDeclarativeParserStatus
{
Q_OBJECT
Q_DECLARE_PRIVATE(QDeclarativeTimer)
diff --git a/src/declarative/util/qdeclarativeview.cpp b/src/declarative/util/qdeclarativeview.cpp
index 8f06858..2381172 100644
--- a/src/declarative/util/qdeclarativeview.cpp
+++ b/src/declarative/util/qdeclarativeview.cpp
@@ -392,7 +392,7 @@ QDeclarativeView::Status QDeclarativeView::status() const
/*!
Return the list of errors that occurred during the last compile or create
- operation. An empty list is returned if isError() is not set.
+ operation. When the status is not Error, an empty list is returned.
*/
QList<QDeclarativeError> QDeclarativeView::errors() const
{
diff --git a/src/declarative/util/qlistmodelinterface_p.h b/src/declarative/util/qlistmodelinterface_p.h
index 07592ad..8c8ebb3 100644
--- a/src/declarative/util/qlistmodelinterface_p.h
+++ b/src/declarative/util/qlistmodelinterface_p.h
@@ -59,10 +59,7 @@ class Q_DECLARATIVE_EXPORT QListModelInterface : public QObject
virtual ~QListModelInterface() {}
virtual int count() const = 0;
- virtual QHash<int,QVariant> data(int index, const QList<int>& roles = QList<int>()) const = 0;
virtual QVariant data(int index, int role) const = 0;
- virtual bool setData(int index, const QHash<int,QVariant>& values)
- { Q_UNUSED(index); Q_UNUSED(values); return false; }
virtual QList<int> roles() const = 0;
virtual QString toString(int role) const = 0;
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp
index 54fdf3f..8dc15bf 100644
--- a/src/gui/graphicsview/qgraphicsscene.cpp
+++ b/src/gui/graphicsview/qgraphicsscene.cpp
@@ -4814,6 +4814,27 @@ void QGraphicsScenePrivate::drawSubtreeRecursive(QGraphicsItem *item, QPainter *
}
}
+static inline void setClip(QPainter *painter, QGraphicsItem *item)
+{
+ painter->save();
+ QRectF clipRect;
+ const QPainterPath clipPath(item->shape());
+ if (QPathClipper::pathToRect(clipPath, &clipRect))
+ painter->setClipRect(clipRect, Qt::IntersectClip);
+ else
+ painter->setClipPath(clipPath, Qt::IntersectClip);
+}
+
+static inline void setWorldTransform(QPainter *painter, const QTransform *const transformPtr,
+ const QTransform *effectTransform)
+{
+ Q_ASSERT(transformPtr);
+ if (effectTransform)
+ painter->setWorldTransform(*transformPtr * *effectTransform);
+ else
+ painter->setWorldTransform(*transformPtr);
+}
+
void QGraphicsScenePrivate::draw(QGraphicsItem *item, QPainter *painter, const QTransform *const viewTransform,
const QTransform *const transformPtr, QRegion *exposedRegion, QWidget *widget,
qreal opacity, const QTransform *effectTransform,
@@ -4822,36 +4843,37 @@ void QGraphicsScenePrivate::draw(QGraphicsItem *item, QPainter *painter, const Q
const bool itemIsFullyTransparent = QGraphicsItemPrivate::isOpacityNull(opacity);
const bool itemClipsChildrenToShape = (item->d_ptr->flags & QGraphicsItem::ItemClipsChildrenToShape);
const bool itemHasChildren = !item->d_ptr->children.isEmpty();
+ bool setChildClip = itemClipsChildrenToShape;
+ bool itemHasChildrenStackedBehind = false;
int i = 0;
if (itemHasChildren) {
+ if (itemClipsChildrenToShape)
+ setWorldTransform(painter, transformPtr, effectTransform);
+
item->d_ptr->ensureSortedChildren();
+ // Items with the 'ItemStacksBehindParent' flag are put in front of the list
+ // so all we have to do is to check the first item.
+ itemHasChildrenStackedBehind = (item->d_ptr->children.at(0)->d_ptr->flags
+ & QGraphicsItem::ItemStacksBehindParent);
- if (itemClipsChildrenToShape) {
- painter->save();
- Q_ASSERT(transformPtr);
- if (effectTransform)
- painter->setWorldTransform(*transformPtr * *effectTransform);
- else
- painter->setWorldTransform(*transformPtr);
- QRectF clipRect;
- const QPainterPath clipPath(item->shape());
- if (QPathClipper::pathToRect(clipPath, &clipRect))
- painter->setClipRect(clipRect, Qt::IntersectClip);
- else
- painter->setClipPath(clipPath, Qt::IntersectClip);
- }
+ if (itemHasChildrenStackedBehind) {
+ if (itemClipsChildrenToShape) {
+ setClip(painter, item);
+ setChildClip = false;
+ }
- // Draw children behind
- for (i = 0; i < item->d_ptr->children.size(); ++i) {
- QGraphicsItem *child = item->d_ptr->children.at(i);
- if (wasDirtyParentSceneTransform)
- child->d_ptr->dirtySceneTransform = 1;
- if (!(child->d_ptr->flags & QGraphicsItem::ItemStacksBehindParent))
- break;
- if (itemIsFullyTransparent && !(child->d_ptr->flags & QGraphicsItem::ItemIgnoresParentOpacity))
- continue;
- drawSubtreeRecursive(child, painter, viewTransform, exposedRegion, widget, opacity, effectTransform);
+ // Draw children behind
+ for (i = 0; i < item->d_ptr->children.size(); ++i) {
+ QGraphicsItem *child = item->d_ptr->children.at(i);
+ if (wasDirtyParentSceneTransform)
+ child->d_ptr->dirtySceneTransform = 1;
+ if (!(child->d_ptr->flags & QGraphicsItem::ItemStacksBehindParent))
+ break;
+ if (itemIsFullyTransparent && !(child->d_ptr->flags & QGraphicsItem::ItemIgnoresParentOpacity))
+ continue;
+ drawSubtreeRecursive(child, painter, viewTransform, exposedRegion, widget, opacity, effectTransform);
+ }
}
}
@@ -4864,38 +4886,50 @@ void QGraphicsScenePrivate::draw(QGraphicsItem *item, QPainter *painter, const Q
? *exposedRegion : QRegion(), exposedRegion == 0);
const bool itemClipsToShape = item->d_ptr->flags & QGraphicsItem::ItemClipsToShape;
- const bool savePainter = itemClipsToShape || painterStateProtection;
- if (savePainter)
- painter->save();
+ bool restorePainterClip = false;
if (!itemHasChildren || !itemClipsChildrenToShape) {
- if (effectTransform)
- painter->setWorldTransform(*transformPtr * *effectTransform);
- else
- painter->setWorldTransform(*transformPtr);
+ // Item does not have children or clip children to shape.
+ setWorldTransform(painter, transformPtr, effectTransform);
+ if ((restorePainterClip = itemClipsToShape))
+ setClip(painter, item);
+ } else if (itemHasChildrenStackedBehind){
+ // Item clips children to shape and has children stacked behind, which means
+ // the painter is already clipped to the item's shape.
+ if (itemClipsToShape) {
+ // The clip is already correct. Ensure correct world transform.
+ setWorldTransform(painter, transformPtr, effectTransform);
+ } else {
+ // Remove clip (this also ensures correct world transform).
+ painter->restore();
+ setChildClip = true;
+ }
+ } else if (itemClipsToShape) {
+ // Item clips children and itself to shape. It does not have hildren stacked
+ // behind, which means the clip has not yet been set. We set it now and re-use it
+ // for the children.
+ setClip(painter, item);
+ setChildClip = false;
}
- if (itemClipsToShape) {
- QRectF clipRect;
- const QPainterPath clipPath(item->shape());
- if (QPathClipper::pathToRect(clipPath, &clipRect))
- painter->setClipRect(clipRect, Qt::IntersectClip);
- else
- painter->setClipPath(clipPath, Qt::IntersectClip);
- }
- painter->setOpacity(opacity);
+ if (painterStateProtection && !restorePainterClip)
+ painter->save();
+ painter->setOpacity(opacity);
if (!item->d_ptr->cacheMode && !item->d_ptr->isWidget)
item->paint(painter, &styleOptionTmp, widget);
else
drawItemHelper(item, painter, &styleOptionTmp, widget, painterStateProtection);
- if (savePainter)
+ if (painterStateProtection || restorePainterClip)
painter->restore();
}
// Draw children in front
if (itemHasChildren) {
+ if (setChildClip)
+ setClip(painter, item);
+
for (; i < item->d_ptr->children.size(); ++i) {
QGraphicsItem *child = item->d_ptr->children.at(i);
if (wasDirtyParentSceneTransform)
@@ -4904,11 +4938,11 @@ void QGraphicsScenePrivate::draw(QGraphicsItem *item, QPainter *painter, const Q
continue;
drawSubtreeRecursive(child, painter, viewTransform, exposedRegion, widget, opacity, effectTransform);
}
- }
- // Restore child clip
- if (itemHasChildren && itemClipsChildrenToShape)
- painter->restore();
+ // Restore child clip
+ if (itemClipsChildrenToShape)
+ painter->restore();
+ }
}
void QGraphicsScenePrivate::markDirty(QGraphicsItem *item, const QRectF &rect, bool invalidateChildren,
@@ -5271,6 +5305,7 @@ void QGraphicsScene::drawItems(QPainter *painter,
if (!d->unpolishedItems.isEmpty())
d->_q_polishItems();
+ const qreal opacity = painter->opacity();
QTransform viewTransform = painter->worldTransform();
Q_UNUSED(options);
@@ -5304,6 +5339,7 @@ void QGraphicsScene::drawItems(QPainter *painter,
topLevelItems.at(i)->d_ptr->itemDiscovered = 0;
painter->setWorldTransform(viewTransform);
+ painter->setOpacity(opacity);
}
/*!
diff --git a/src/gui/graphicsview/qgraphicsview.cpp b/src/gui/graphicsview/qgraphicsview.cpp
index c8aca80..a566c8e 100644
--- a/src/gui/graphicsview/qgraphicsview.cpp
+++ b/src/gui/graphicsview/qgraphicsview.cpp
@@ -3475,7 +3475,8 @@ void QGraphicsView::paintEvent(QPaintEvent *event)
// IndirectPainting (the else branch), because in that case we always save()
// and restore() in QGraphicsScene::drawItems().
if (!d->scene->d_func()->painterStateProtection)
- painter.setWorldTransform(viewTransform);
+ painter.setOpacity(1.0);
+ painter.setWorldTransform(viewTransform);
} else {
// Make sure we don't have unpolished items before we draw
if (!d->scene->d_func()->unpolishedItems.isEmpty())
diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp
index 1e502bd..64d8ed2 100644
--- a/src/gui/image/qpixmap.cpp
+++ b/src/gui/image/qpixmap.cpp
@@ -664,14 +664,19 @@ void QPixmap::resize_helper(const QSize &s)
#if defined(Q_WS_X11)
if (x11Data && x11Data->x11_mask) {
- QX11PixmapData *pmData = static_cast<QX11PixmapData*>(pd);
- pmData->x11_mask = (Qt::HANDLE)XCreatePixmap(X11->display,
- RootWindow(x11Data->xinfo.display(),
- x11Data->xinfo.screen()),
- w, h, 1);
- GC gc = XCreateGC(X11->display, pmData->x11_mask, 0, 0);
- XCopyArea(X11->display, x11Data->x11_mask, pmData->x11_mask, gc, 0, 0, qMin(width(), w), qMin(height(), h), 0, 0);
- XFreeGC(X11->display, gc);
+ QPixmapData *newPd = pm.pixmapData();
+ QX11PixmapData *pmData = (newPd && newPd->classId() == QPixmapData::X11Class)
+ ? static_cast<QX11PixmapData*>(newPd) : 0;
+ if (pmData) {
+ pmData->x11_mask = (Qt::HANDLE)XCreatePixmap(X11->display,
+ RootWindow(x11Data->xinfo.display(),
+ x11Data->xinfo.screen()),
+ w, h, 1);
+ GC gc = XCreateGC(X11->display, pmData->x11_mask, 0, 0);
+ XCopyArea(X11->display, x11Data->x11_mask, pmData->x11_mask, gc, 0, 0,
+ qMin(width(), w), qMin(height(), h), 0, 0);
+ XFreeGC(X11->display, gc);
+ }
}
#endif
*this = pm;
@@ -836,7 +841,7 @@ bool QPixmap::load(const QString &fileName, const char *format, Qt::ImageConvers
% HexString<quint64>(info.size())
% HexString<uint>(data ? data->pixelType() : QPixmapData::PixmapType);
- // Note: If no extension is provided, we try to match the
+ // Note: If no extension is provided, we try to match the
// file against known plugin extensions
if (!info.completeSuffix().isEmpty() && !info.exists())
return false;
@@ -1793,13 +1798,27 @@ QPixmap QPixmap::transformed(const QMatrix &matrix, Qt::TransformationMode mode)
Returns true if this pixmap has an alpha channel, \e or has a
mask, otherwise returns false.
- \warning This is potentially an expensive operation.
-
\sa hasAlphaChannel(), mask()
*/
bool QPixmap::hasAlpha() const
{
- return data && (data->hasAlphaChannel() || !data->mask().isNull());
+#if defined(Q_WS_X11)
+ if (data && data->hasAlphaChannel())
+ return true;
+ QPixmapData *pd = pixmapData();
+ if (pd && pd->classId() == QPixmapData::X11Class) {
+ QX11PixmapData *x11Data = static_cast<QX11PixmapData*>(pd);
+#ifndef QT_NO_XRENDER
+ if (x11Data->picture && x11Data->d == 32)
+ return true;
+#endif
+ if (x11Data->d == 1 || x11Data->x11_mask)
+ return true;
+ }
+ return false;
+#else
+ return data && data->hasAlphaChannel();
+#endif
}
/*!
diff --git a/src/gui/image/qpixmap_x11.cpp b/src/gui/image/qpixmap_x11.cpp
index 3d9c363..01f2c11 100644
--- a/src/gui/image/qpixmap_x11.cpp
+++ b/src/gui/image/qpixmap_x11.cpp
@@ -1321,7 +1321,6 @@ QBitmap QX11PixmapData::mask() const
return mask;
}
-
/*!
Sets a mask bitmap.
@@ -1549,7 +1548,7 @@ QImage QX11PixmapData::toImage(const QRect &rect) const
if (!xiWrapper.xi)
return QImage();
- if (canTakeQImageFromXImage(xiWrapper))
+ if (!x11_mask && canTakeQImageFromXImage(xiWrapper))
return takeQImageFromXImage(xiWrapper);
QImage image = toImage(xiWrapper, rect);
diff --git a/src/gui/itemviews/qtreeview.cpp b/src/gui/itemviews/qtreeview.cpp
index b797776..40b51fe 100644
--- a/src/gui/itemviews/qtreeview.cpp
+++ b/src/gui/itemviews/qtreeview.cpp
@@ -3435,6 +3435,10 @@ void QTreeViewPrivate::updateScrollBars()
if (!viewportSize.isValid())
viewportSize = QSize(0, 0);
+ if (viewItems.isEmpty()) {
+ q->doItemsLayout();
+ }
+
int itemsInViewport = 0;
if (uniformRowHeights) {
if (defaultItemHeight <= 0)
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
index e6dc623..fdacefc 100644
--- a/src/gui/kernel/qapplication.cpp
+++ b/src/gui/kernel/qapplication.cpp
@@ -2403,8 +2403,13 @@ static const char *application_menu_strings[] = {
};
QString qt_mac_applicationmenu_string(int type)
{
- return qApp->translate("MAC_APPLICATION_MENU",
- application_menu_strings[type]);
+ QString menuString = QString::fromLatin1(application_menu_strings[type]);
+ QString translated = qApp->translate("QMenuBar", application_menu_strings[type]);
+ if (translated != menuString)
+ return translated;
+ else
+ return qApp->translate("MAC_APPLICATION_MENU",
+ application_menu_strings[type]);
}
#endif
#endif
diff --git a/src/gui/kernel/qdnd_win.cpp b/src/gui/kernel/qdnd_win.cpp
index a164c2a..7083886 100644
--- a/src/gui/kernel/qdnd_win.cpp
+++ b/src/gui/kernel/qdnd_win.cpp
@@ -515,7 +515,7 @@ static inline Qt::MouseButtons keystate_to_mousebutton(DWORD grfKeyState)
//---------------------------------------------------------------------
// IDropSource Methods
//---------------------------------------------------------------------
-STDMETHODIMP
+QT_ENSURE_STACK_ALIGNED_FOR_SSE STDMETHODIMP
QOleDropSource::QueryContinueDrag(BOOL fEscapePressed, DWORD grfKeyState)
{
#ifdef QDND_DEBUG
@@ -545,7 +545,7 @@ QOleDropSource::QueryContinueDrag(BOOL fEscapePressed, DWORD grfKeyState)
}
}
-STDMETHODIMP
+QT_ENSURE_STACK_ALIGNED_FOR_SSE STDMETHODIMP
QOleDropSource::GiveFeedback(DWORD dwEffect)
{
Qt::DropAction action = translateToQDragDropAction(dwEffect);
@@ -626,7 +626,7 @@ QOleDropTarget::Release(void)
// IDropTarget Methods
//---------------------------------------------------------------------
-STDMETHODIMP
+QT_ENSURE_STACK_ALIGNED_FOR_SSE STDMETHODIMP
QOleDropTarget::DragEnter(LPDATAOBJECT pDataObj, DWORD grfKeyState, POINTL pt, LPDWORD pdwEffect)
{
#ifdef QDND_DEBUG
@@ -688,7 +688,7 @@ void QOleDropTarget::sendDragEnterEvent(QWidget *dragEnterWidget, DWORD grfKeySt
}
-STDMETHODIMP
+QT_ENSURE_STACK_ALIGNED_FOR_SSE STDMETHODIMP
QOleDropTarget::DragOver(DWORD grfKeyState, POINTL pt, LPDWORD pdwEffect)
{
#ifdef QDND_DEBUG
@@ -758,7 +758,7 @@ QOleDropTarget::DragOver(DWORD grfKeyState, POINTL pt, LPDWORD pdwEffect)
return NOERROR;
}
-STDMETHODIMP
+QT_ENSURE_STACK_ALIGNED_FOR_SSE STDMETHODIMP
QOleDropTarget::DragLeave()
{
#ifdef QDND_DEBUG
@@ -785,7 +785,7 @@ QOleDropTarget::DragLeave()
#define KEY_STATE_BUTTON_MASK (MK_LBUTTON | MK_MBUTTON | MK_RBUTTON)
-STDMETHODIMP
+QT_ENSURE_STACK_ALIGNED_FOR_SSE STDMETHODIMP
QOleDropTarget::Drop(LPDATAOBJECT /*pDataObj*/, DWORD grfKeyState, POINTL pt, LPDWORD pdwEffect)
{
#ifdef QDND_DEBUG
diff --git a/src/gui/painting/qrasterizer.cpp b/src/gui/painting/qrasterizer.cpp
index f8f8afb..4fded1f 100644
--- a/src/gui/painting/qrasterizer.cpp
+++ b/src/gui/painting/qrasterizer.cpp
@@ -65,6 +65,12 @@ typedef int Q16Dot16;
#define COORD_ROUNDING 1 // 0: round up, 1: round down
#define COORD_OFFSET 32 // 26.6, 32 is half a pixel
+static inline QT_FT_Vector PointToVector(const QPointF &p)
+{
+ QT_FT_Vector result = { QT_FT_Pos(p.x() * 64), QT_FT_Pos(p.y() * 64) };
+ return result;
+}
+
class QSpanBuffer {
public:
QSpanBuffer(ProcessSpans blend, void *data, const QRect &clipRect)
@@ -693,9 +699,9 @@ static Q16Dot16 intersectPixelFP(int x, Q16Dot16 top, Q16Dot16 bottom, Q16Dot16
}
}
-static inline bool q16Dot16Compare(qreal p1, qreal p2)
+static inline bool q26Dot6Compare(qreal p1, qreal p2)
{
- return FloatToQ16Dot16(p2 - p1) == 0;
+ return int((p2 - p1) * 64.) == 0;
}
static inline qreal qFloorF(qreal v)
@@ -708,6 +714,12 @@ static inline qreal qFloorF(qreal v)
return floor(v);
}
+static inline QPointF snapTo26Dot6Grid(const QPointF &p)
+{
+ return QPointF(qFloorF(p.x() * 64) * (1 / qreal(64)),
+ qFloorF(p.y() * 64) * (1 / qreal(64)));
+}
+
void QRasterizer::rasterizeLine(const QPointF &a, const QPointF &b, qreal width, bool squareCap)
{
if (a == b || width == 0 || d->clipRect.isEmpty())
@@ -718,17 +730,21 @@ void QRasterizer::rasterizeLine(const QPointF &a, const QPointF &b, qreal width,
QPointF pa = a;
QPointF pb = b;
- QPointF offs = QPointF(qAbs(b.y() - a.y()), qAbs(b.x() - a.x())) * width * 0.5;
- if (squareCap)
- offs += QPointF(offs.y(), offs.x());
+ if (squareCap) {
+ QPointF delta = pb - pa;
+ pa -= (0.5f * width) * delta;
+ pb += (0.5f * width) * delta;
+ }
+
+ QPointF offs = QPointF(qAbs(b.y() - a.y()), qAbs(b.x() - a.x())) * width * 0.5;
const QRectF clip(d->clipRect.topLeft() - offs, d->clipRect.bottomRight() + QPoint(1, 1) + offs);
- if (!clip.contains(a) || !clip.contains(b)) {
+ if (!clip.contains(pa) || !clip.contains(pb)) {
qreal t1 = 0;
qreal t2 = 1;
- const qreal o[2] = { a.x(), a.y() };
- const qreal d[2] = { b.x() - a.x(), b.y() - a.y() };
+ const qreal o[2] = { pa.x(), pa.y() };
+ const qreal d[2] = { pb.x() - pa.x(), pb.y() - pa.y() };
const qreal low[2] = { clip.left(), clip.top() };
const qreal high[2] = { clip.right(), clip.bottom() };
@@ -751,8 +767,12 @@ void QRasterizer::rasterizeLine(const QPointF &a, const QPointF &b, qreal width,
if (t1 >= t2)
return;
}
- pa = a + (b - a) * t1;
- pb = a + (b - a) * t2;
+
+ QPointF npa = pa + (pb - pa) * t1;
+ QPointF npb = pa + (pb - pa) * t2;
+
+ pa = npa;
+ pb = npb;
}
if (!d->antialiased) {
@@ -763,15 +783,6 @@ void QRasterizer::rasterizeLine(const QPointF &a, const QPointF &b, qreal width,
}
{
- const qreal gridResolution = 64;
- const qreal reciprocal = 1 / gridResolution;
-
- // snap to grid to prevent large slopes
- pa.rx() = qFloorF(pa.rx() * gridResolution) * reciprocal;
- pa.ry() = qFloorF(pa.ry() * gridResolution) * reciprocal;
- pb.rx() = qFloorF(pb.rx() * gridResolution) * reciprocal;
- pb.ry() = qFloorF(pb.ry() * gridResolution) * reciprocal;
-
// old delta
const QPointF d0 = a - b;
const qreal w0 = d0.x() * d0.x() + d0.y() * d0.y();
@@ -789,7 +800,7 @@ void QRasterizer::rasterizeLine(const QPointF &a, const QPointF &b, qreal width,
QSpanBuffer buffer(d->blend, d->data, d->clipRect);
- if (q16Dot16Compare(pa.y(), pb.y())) {
+ if (q26Dot6Compare(pa.y(), pb.y())) {
const qreal x = (pa.x() + pb.x()) * 0.5f;
const qreal dx = qAbs(pb.x() - pa.x()) * 0.5f;
@@ -799,26 +810,16 @@ void QRasterizer::rasterizeLine(const QPointF &a, const QPointF &b, qreal width,
pa = QPointF(x, y - dy);
pb = QPointF(x, y + dy);
- if (squareCap)
- width = 1 / width + 1.0f;
- else
- width = 1 / width;
-
- squareCap = false;
+ width = 1 / width;
}
- if (q16Dot16Compare(pa.x(), pb.x())) {
+ if (q26Dot6Compare(pa.x(), pb.x())) {
if (pa.y() > pb.y())
qSwap(pa, pb);
const qreal dy = pb.y() - pa.y();
const qreal halfWidth = 0.5f * width * dy;
- if (squareCap) {
- pa.ry() -= halfWidth;
- pb.ry() += halfWidth;
- }
-
qreal left = pa.x() - halfWidth;
qreal right = pa.x() + halfWidth;
@@ -828,7 +829,7 @@ void QRasterizer::rasterizeLine(const QPointF &a, const QPointF &b, qreal width,
pa.ry() = qBound(qreal(d->clipRect.top()), pa.y(), qreal(d->clipRect.bottom() + 1));
pb.ry() = qBound(qreal(d->clipRect.top()), pb.y(), qreal(d->clipRect.bottom() + 1));
- if (q16Dot16Compare(left, right) || q16Dot16Compare(pa.y(), pb.y()))
+ if (q26Dot6Compare(left, right) || q26Dot6Compare(pa.y(), pb.y()))
return;
if (d->antialiased) {
@@ -899,11 +900,6 @@ void QRasterizer::rasterizeLine(const QPointF &a, const QPointF &b, qreal width,
delta *= 0.5f * width;
const QPointF perp(delta.y(), -delta.x());
- if (squareCap) {
- pa -= delta;
- pb += delta;
- }
-
QPointF top;
QPointF left;
QPointF right;
@@ -921,14 +917,36 @@ void QRasterizer::rasterizeLine(const QPointF &a, const QPointF &b, qreal width,
bottom = pb + perp;
}
+ top = snapTo26Dot6Grid(top);
+ bottom = snapTo26Dot6Grid(bottom);
+ left = snapTo26Dot6Grid(left);
+ right = snapTo26Dot6Grid(right);
+
const qreal topBound = qBound(qreal(d->clipRect.top()), top.y(), qreal(d->clipRect.bottom()));
const qreal bottomBound = qBound(qreal(d->clipRect.top()), bottom.y(), qreal(d->clipRect.bottom()));
- const qreal leftSlope = (left.x() - top.x()) / (left.y() - top.y());
- const qreal rightSlope = -1.0f / leftSlope;
+ const QPointF topLeftEdge = left - top;
+ const QPointF topRightEdge = right - top;
+ const QPointF bottomLeftEdge = bottom - left;
+ const QPointF bottomRightEdge = bottom - right;
+
+ const qreal topLeftSlope = topLeftEdge.x() / topLeftEdge.y();
+ const qreal bottomLeftSlope = bottomLeftEdge.x() / bottomLeftEdge.y();
+
+ const qreal topRightSlope = topRightEdge.x() / topRightEdge.y();
+ const qreal bottomRightSlope = bottomRightEdge.x() / bottomRightEdge.y();
+
+ const Q16Dot16 topLeftSlopeFP = FloatToQ16Dot16(topLeftSlope);
+ const Q16Dot16 topRightSlopeFP = FloatToQ16Dot16(topRightSlope);
- const Q16Dot16 leftSlopeFP = FloatToQ16Dot16(leftSlope);
- const Q16Dot16 rightSlopeFP = FloatToQ16Dot16(rightSlope);
+ const Q16Dot16 bottomLeftSlopeFP = FloatToQ16Dot16(bottomLeftSlope);
+ const Q16Dot16 bottomRightSlopeFP = FloatToQ16Dot16(bottomRightSlope);
+
+ const Q16Dot16 invTopLeftSlopeFP = FloatToQ16Dot16(1 / topLeftSlope);
+ const Q16Dot16 invTopRightSlopeFP = FloatToQ16Dot16(1 / topRightSlope);
+
+ const Q16Dot16 invBottomLeftSlopeFP = FloatToQ16Dot16(1 / bottomLeftSlope);
+ const Q16Dot16 invBottomRightSlopeFP = FloatToQ16Dot16(1 / bottomRightSlope);
if (d->antialiased) {
const Q16Dot16 iTopFP = IntToQ16Dot16(int(topBound));
@@ -936,16 +954,16 @@ void QRasterizer::rasterizeLine(const QPointF &a, const QPointF &b, qreal width,
const Q16Dot16 iRightFP = IntToQ16Dot16(int(right.y()));
const Q16Dot16 iBottomFP = IntToQ16Dot16(int(bottomBound));
- Q16Dot16 leftIntersectAf = FloatToQ16Dot16(top.x() + (int(topBound) - top.y()) * leftSlope);
- Q16Dot16 rightIntersectAf = FloatToQ16Dot16(top.x() + (int(topBound) - top.y()) * rightSlope);
+ Q16Dot16 leftIntersectAf = FloatToQ16Dot16(top.x() + (int(topBound) - top.y()) * topLeftSlope);
+ Q16Dot16 rightIntersectAf = FloatToQ16Dot16(top.x() + (int(topBound) - top.y()) * topRightSlope);
Q16Dot16 leftIntersectBf = 0;
Q16Dot16 rightIntersectBf = 0;
if (iLeftFP < iTopFP)
- leftIntersectBf = FloatToQ16Dot16(left.x() + (int(topBound) - left.y()) * rightSlope);
+ leftIntersectBf = FloatToQ16Dot16(left.x() + (int(topBound) - left.y()) * bottomLeftSlope);
if (iRightFP < iTopFP)
- rightIntersectBf = FloatToQ16Dot16(right.x() + (int(topBound) - right.y()) * leftSlope);
+ rightIntersectBf = FloatToQ16Dot16(right.x() + (int(topBound) - right.y()) * bottomRightSlope);
Q16Dot16 rowTop, rowBottomLeft, rowBottomRight, rowTopLeft, rowTopRight, rowBottom;
Q16Dot16 topLeftIntersectAf, topLeftIntersectBf, topRightIntersectAf, topRightIntersectBf;
@@ -960,9 +978,9 @@ void QRasterizer::rasterizeLine(const QPointF &a, const QPointF &b, qreal width,
rowTop = qMax(iTopFP, yTopFP);
topLeftIntersectAf = leftIntersectAf +
- Q16Dot16Multiply(leftSlopeFP, rowTop - iTopFP);
+ Q16Dot16Multiply(topLeftSlopeFP, rowTop - iTopFP);
topRightIntersectAf = rightIntersectAf +
- Q16Dot16Multiply(rightSlopeFP, rowTop - iTopFP);
+ Q16Dot16Multiply(topRightSlopeFP, rowTop - iTopFP);
Q16Dot16 yFP = iTopFP;
while (yFP <= iBottomFP) {
@@ -974,30 +992,30 @@ void QRasterizer::rasterizeLine(const QPointF &a, const QPointF &b, qreal width,
if (yFP == iLeftFP) {
const int y = Q16Dot16ToInt(yFP);
- leftIntersectBf = FloatToQ16Dot16(left.x() + (y - left.y()) * rightSlope);
- topLeftIntersectBf = leftIntersectBf + Q16Dot16Multiply(rightSlopeFP, rowTopLeft - yFP);
- bottomLeftIntersectAf = leftIntersectAf + Q16Dot16Multiply(leftSlopeFP, rowBottomLeft - yFP);
+ leftIntersectBf = FloatToQ16Dot16(left.x() + (y - left.y()) * bottomLeftSlope);
+ topLeftIntersectBf = leftIntersectBf + Q16Dot16Multiply(bottomLeftSlopeFP, rowTopLeft - yFP);
+ bottomLeftIntersectAf = leftIntersectAf + Q16Dot16Multiply(topLeftSlopeFP, rowBottomLeft - yFP);
} else {
topLeftIntersectBf = leftIntersectBf;
- bottomLeftIntersectAf = leftIntersectAf + leftSlopeFP;
+ bottomLeftIntersectAf = leftIntersectAf + topLeftSlopeFP;
}
if (yFP == iRightFP) {
const int y = Q16Dot16ToInt(yFP);
- rightIntersectBf = FloatToQ16Dot16(right.x() + (y - right.y()) * leftSlope);
- topRightIntersectBf = rightIntersectBf + Q16Dot16Multiply(leftSlopeFP, rowTopRight - yFP);
- bottomRightIntersectAf = rightIntersectAf + Q16Dot16Multiply(rightSlopeFP, rowBottomRight - yFP);
+ rightIntersectBf = FloatToQ16Dot16(right.x() + (y - right.y()) * bottomRightSlope);
+ topRightIntersectBf = rightIntersectBf + Q16Dot16Multiply(bottomRightSlopeFP, rowTopRight - yFP);
+ bottomRightIntersectAf = rightIntersectAf + Q16Dot16Multiply(topRightSlopeFP, rowBottomRight - yFP);
} else {
topRightIntersectBf = rightIntersectBf;
- bottomRightIntersectAf = rightIntersectAf + rightSlopeFP;
+ bottomRightIntersectAf = rightIntersectAf + topRightSlopeFP;
}
if (yFP == iBottomFP) {
- bottomLeftIntersectBf = leftIntersectBf + Q16Dot16Multiply(rightSlopeFP, rowBottom - yFP);
- bottomRightIntersectBf = rightIntersectBf + Q16Dot16Multiply(leftSlopeFP, rowBottom - yFP);
+ bottomLeftIntersectBf = leftIntersectBf + Q16Dot16Multiply(bottomLeftSlopeFP, rowBottom - yFP);
+ bottomRightIntersectBf = rightIntersectBf + Q16Dot16Multiply(bottomRightSlopeFP, rowBottom - yFP);
} else {
- bottomLeftIntersectBf = leftIntersectBf + rightSlopeFP;
- bottomRightIntersectBf = rightIntersectBf + leftSlopeFP;
+ bottomLeftIntersectBf = leftIntersectBf + bottomLeftSlopeFP;
+ bottomRightIntersectBf = rightIntersectBf + bottomRightSlopeFP;
}
if (yFP < iLeftFP) {
@@ -1042,21 +1060,21 @@ void QRasterizer::rasterizeLine(const QPointF &a, const QPointF &b, qreal width,
if (yFP <= iLeftFP)
excluded += intersectPixelFP(x, rowTop, rowBottomLeft,
bottomLeftIntersectAf, topLeftIntersectAf,
- leftSlopeFP, -rightSlopeFP);
+ topLeftSlopeFP, invTopLeftSlopeFP);
if (yFP >= iLeftFP)
excluded += intersectPixelFP(x, rowTopLeft, rowBottom,
topLeftIntersectBf, bottomLeftIntersectBf,
- rightSlopeFP, -leftSlopeFP);
+ bottomLeftSlopeFP, invBottomLeftSlopeFP);
if (x >= rightMin) {
if (yFP <= iRightFP)
excluded += (rowBottomRight - rowTop) - intersectPixelFP(x, rowTop, rowBottomRight,
topRightIntersectAf, bottomRightIntersectAf,
- rightSlopeFP, -leftSlopeFP);
+ topRightSlopeFP, invTopRightSlopeFP);
if (yFP >= iRightFP)
excluded += (rowBottom - rowTopRight) - intersectPixelFP(x, rowTopRight, rowBottom,
bottomRightIntersectBf, topRightIntersectBf,
- leftSlopeFP, -rightSlopeFP);
+ bottomRightSlopeFP, invBottomRightSlopeFP);
}
Q16Dot16 coverage = rowHeight - excluded;
@@ -1074,11 +1092,11 @@ void QRasterizer::rasterizeLine(const QPointF &a, const QPointF &b, qreal width,
if (yFP <= iRightFP)
excluded += (rowBottomRight - rowTop) - intersectPixelFP(x, rowTop, rowBottomRight,
topRightIntersectAf, bottomRightIntersectAf,
- rightSlopeFP, -leftSlopeFP);
+ topRightSlopeFP, invTopRightSlopeFP);
if (yFP >= iRightFP)
excluded += (rowBottom - rowTopRight) - intersectPixelFP(x, rowTopRight, rowBottom,
bottomRightIntersectBf, topRightIntersectBf,
- leftSlopeFP, -rightSlopeFP);
+ bottomRightSlopeFP, invBottomRightSlopeFP);
Q16Dot16 coverage = rowHeight - excluded;
buffer.addSpan(x, 1, Q16Dot16ToInt(yFP),
@@ -1086,10 +1104,10 @@ void QRasterizer::rasterizeLine(const QPointF &a, const QPointF &b, qreal width,
++x;
}
- leftIntersectAf += leftSlopeFP;
- leftIntersectBf += rightSlopeFP;
- rightIntersectAf += rightSlopeFP;
- rightIntersectBf += leftSlopeFP;
+ leftIntersectAf += topLeftSlopeFP;
+ leftIntersectBf += bottomLeftSlopeFP;
+ rightIntersectAf += topRightSlopeFP;
+ rightIntersectBf += bottomRightSlopeFP;
topLeftIntersectAf = leftIntersectAf;
topRightIntersectAf = rightIntersectAf;
@@ -1103,10 +1121,10 @@ void QRasterizer::rasterizeLine(const QPointF &a, const QPointF &b, qreal width,
int iBottom = bottom.y() < 0.5f? -1 : int(bottom.y() - 0.5f);
int iMiddle = qMin(iLeft, iRight);
- Q16Dot16 leftIntersectAf = FloatToQ16Dot16(top.x() + 0.5f + (iTop + 0.5f - top.y()) * leftSlope);
- Q16Dot16 leftIntersectBf = FloatToQ16Dot16(left.x() + 0.5f + (iLeft + 1.5f - left.y()) * rightSlope);
- Q16Dot16 rightIntersectAf = FloatToQ16Dot16(top.x() - 0.5f + (iTop + 0.5f - top.y()) * rightSlope);
- Q16Dot16 rightIntersectBf = FloatToQ16Dot16(right.x() - 0.5f + (iRight + 1.5f - right.y()) * leftSlope);
+ Q16Dot16 leftIntersectAf = FloatToQ16Dot16(top.x() + 0.5f + (iTop + 0.5f - top.y()) * topLeftSlope);
+ Q16Dot16 leftIntersectBf = FloatToQ16Dot16(left.x() + 0.5f + (iLeft + 1.5f - left.y()) * bottomLeftSlope);
+ Q16Dot16 rightIntersectAf = FloatToQ16Dot16(top.x() - 0.5f + (iTop + 0.5f - top.y()) * topRightSlope);
+ Q16Dot16 rightIntersectBf = FloatToQ16Dot16(right.x() - 0.5f + (iRight + 1.5f - right.y()) * bottomRightSlope);
int ny;
int y = iTop;
@@ -1128,10 +1146,10 @@ void QRasterizer::rasterizeLine(const QPointF &a, const QPointF &b, qreal width,
ri += rs; \
}
- DO_SEGMENT(iMiddle, leftIntersectAf, rightIntersectAf, leftSlopeFP, rightSlopeFP)
- DO_SEGMENT(iRight, leftIntersectBf, rightIntersectAf, rightSlopeFP, rightSlopeFP)
- DO_SEGMENT(iLeft, leftIntersectAf, rightIntersectBf, leftSlopeFP, leftSlopeFP)
- DO_SEGMENT(iBottom, leftIntersectBf, rightIntersectBf, rightSlopeFP, leftSlopeFP)
+ DO_SEGMENT(iMiddle, leftIntersectAf, rightIntersectAf, topLeftSlopeFP, topRightSlopeFP)
+ DO_SEGMENT(iRight, leftIntersectBf, rightIntersectAf, bottomLeftSlopeFP, topRightSlopeFP)
+ DO_SEGMENT(iLeft, leftIntersectAf, rightIntersectBf, topLeftSlopeFP, bottomRightSlopeFP);
+ DO_SEGMENT(iBottom, leftIntersectBf, rightIntersectBf, bottomLeftSlopeFP, bottomRightSlopeFP);
#undef DO_SEGMENT
}
}
@@ -1183,12 +1201,6 @@ void QRasterizer::rasterize(const QT_FT_Outline *outline, Qt::FillRule fillRule)
d->scanConverter.end();
}
-static inline QT_FT_Vector PointToVector(const QPointF &p)
-{
- QT_FT_Vector result = { QT_FT_Pos(p.x() * 64), QT_FT_Pos(p.y() * 64) };
- return result;
-}
-
void QRasterizer::rasterize(const QPainterPath &path, Qt::FillRule fillRule)
{
if (path.isEmpty())
diff --git a/src/gui/styles/qstylehelper_p.h b/src/gui/styles/qstylehelper_p.h
index 71fce55..3759929 100644
--- a/src/gui/styles/qstylehelper_p.h
+++ b/src/gui/styles/qstylehelper_p.h
@@ -108,7 +108,7 @@ template <typename T>
{
typedef HexString<T> type;
enum { ExactSize = true };
- static int size(const HexString<T> &str) { return sizeof(str.val) * 2; }
+ static int size(const HexString<T> &) { return sizeof(T) * 2; }
static inline void appendTo(const HexString<T> &str, QChar *&out) { str.write(out); }
};
diff --git a/src/gui/text/qtextcontrol.cpp b/src/gui/text/qtextcontrol.cpp
index 5fe0c0c..7f2c4e9 100644
--- a/src/gui/text/qtextcontrol.cpp
+++ b/src/gui/text/qtextcontrol.cpp
@@ -404,12 +404,6 @@ void QTextControlPrivate::init(Qt::TextFormat format, const QString &text, QText
Q_Q(QTextControl);
setContent(format, text, document);
- QWidget *parentWidget = qobject_cast<QWidget*>(parent);
- if (parentWidget) {
- QTextOption opt = doc->defaultTextOption();
- opt.setTextDirection(parentWidget->layoutDirection());
- doc->setDefaultTextOption(opt);
- }
doc->setUndoRedoEnabled(interactionFlags & Qt::TextEditable);
q->setCursorWidth(-1);
}
diff --git a/src/gui/widgets/qlabel.cpp b/src/gui/widgets/qlabel.cpp
index bdbd0b0..42be03b 100644
--- a/src/gui/widgets/qlabel.cpp
+++ b/src/gui/widgets/qlabel.cpp
@@ -635,7 +635,7 @@ QSize QLabelPrivate::sizeForWidth(int w) const
br = movie->currentPixmap().rect();
#endif
else if (isTextLabel) {
- int align = QStyle::visualAlignment(q->layoutDirection(), QFlag(this->align));
+ int align = QStyle::visualAlignment(textDirection(), QFlag(this->align));
// Add indentation
int m = indent;
@@ -1059,7 +1059,8 @@ void QLabel::paintEvent(QPaintEvent *)
drawFrame(&painter);
QRect cr = contentsRect();
cr.adjust(d->margin, d->margin, -d->margin, -d->margin);
- int align = QStyle::visualAlignment(layoutDirection(), QFlag(d->align));
+ int align = QStyle::visualAlignment(d->isTextLabel ? d->textDirection()
+ : layoutDirection(), QFlag(d->align));
#ifndef QT_NO_MOVIE
if (d->movie) {
@@ -1119,7 +1120,8 @@ void QLabel::paintEvent(QPaintEvent *)
d->control->drawContents(&painter, QRectF(), this);
painter.restore();
} else {
- int flags = align;
+ int flags = align | (d->textDirection() == Qt::LeftToRight ? Qt::TextForceLeftToRight
+ : Qt::TextForceRightToLeft);
if (d->hasShortcut) {
flags |= Qt::TextShowMnemonic;
if (!style->styleHint(QStyle::SH_UnderlineShortcut, &opt, this))
@@ -1447,10 +1449,6 @@ void QLabel::changeEvent(QEvent *ev)
d->control->setPalette(palette());
} else if (ev->type() == QEvent::ContentsRectChange) {
d->updateLabel();
- } else if (ev->type() == QEvent::LayoutDirectionChange) {
- if (d->isTextLabel && d->control) {
- d->sendControlEvent(ev);
- }
}
QFrame::changeEvent(ev);
}
@@ -1486,6 +1484,15 @@ void QLabel::setScaledContents(bool enable)
update(contentsRect());
}
+Qt::LayoutDirection QLabelPrivate::textDirection() const
+{
+ if (control) {
+ QTextOption opt = control->document()->defaultTextOption();
+ return opt.textDirection();
+ }
+
+ return text.isRightToLeft() ? Qt::RightToLeft : Qt::LeftToRight;
+}
/*!
\fn void QLabel::setAlignment(Qt::AlignmentFlag flag)
@@ -1503,7 +1510,8 @@ QRect QLabelPrivate::documentRect() const
Q_ASSERT_X(isTextLabel, "documentRect", "document rect called for label that is not a text label!");
QRect cr = q->contentsRect();
cr.adjust(margin, margin, -margin, -margin);
- const int align = QStyle::visualAlignment(q->layoutDirection(), QFlag(this->align));
+ const int align = QStyle::visualAlignment(isTextLabel ? textDirection()
+ : q->layoutDirection(), QFlag(this->align));
int m = indent;
if (m < 0 && q->frameWidth()) // no indent, but we do have a frame
m = q->fontMetrics().width(QLatin1Char('x')) / 2 - margin;
@@ -1564,7 +1572,6 @@ void QLabelPrivate::ensureTextLayouted() const
if (!textLayoutDirty)
return;
ensureTextPopulated();
- Q_Q(const QLabel);
if (control) {
QTextDocument *doc = control->document();
QTextOption opt = doc->defaultTextOption();
@@ -1576,8 +1583,6 @@ void QLabelPrivate::ensureTextLayouted() const
else
opt.setWrapMode(QTextOption::ManualWrap);
- opt.setTextDirection(q->layoutDirection());
-
doc->setDefaultTextOption(opt);
QTextFrameFormat fmt = doc->rootFrame()->frameFormat();
diff --git a/src/gui/widgets/qlabel_p.h b/src/gui/widgets/qlabel_p.h
index fba7224..83624c7 100644
--- a/src/gui/widgets/qlabel_p.h
+++ b/src/gui/widgets/qlabel_p.h
@@ -132,6 +132,7 @@ public:
QRectF layoutRect() const;
QRect documentRect() const;
QPoint layoutPoint(const QPoint& p) const;
+ Qt::LayoutDirection textDirection() const;
#ifndef QT_NO_CONTEXTMENU
QMenu *createStandardContextMenu(const QPoint &pos);
#endif
diff --git a/src/imports/folderlistmodel/folderlistmodel.pro b/src/imports/folderlistmodel/folderlistmodel.pro
index c306037..b2e5360 100644
--- a/src/imports/folderlistmodel/folderlistmodel.pro
+++ b/src/imports/folderlistmodel/folderlistmodel.pro
@@ -8,7 +8,6 @@ SOURCES += qdeclarativefolderlistmodel.cpp plugin.cpp
HEADERS += qdeclarativefolderlistmodel.h
QTDIR_build:DESTDIR = $$QT_BUILD_TREE/imports/$$TARGETPATH
-else:DESTDIR = .
target.path = $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
qmldir.files += $$PWD/qmldir
@@ -17,8 +16,9 @@ qmldir.path += $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
symbian:{
TARGET.UID3 = 0x20021320
include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
-
- importFiles.sources = $$DESTDIR/qmlfolderlistmodelplugin$${QT_LIBINFIX}.dll qmldir
+
+ isEmpty(DESTDIR):importFiles.sources = qmlfolderlistmodelplugin$${QT_LIBINFIX}.dll qmldir
+ else:importFiles.sources = $$DESTDIR/qmlfolderlistmodelplugin$${QT_LIBINFIX}.dll qmldir
importFiles.path = $$QT_IMPORTS_BASE_DIR/$$TARGETPATH
DEPLOYMENT = importFiles
diff --git a/src/imports/gestures/gestures.pro b/src/imports/gestures/gestures.pro
index 8a772da..18ffcb9 100644
--- a/src/imports/gestures/gestures.pro
+++ b/src/imports/gestures/gestures.pro
@@ -8,7 +8,6 @@ SOURCES += qdeclarativegesturearea.cpp plugin.cpp
HEADERS += qdeclarativegesturearea_p.h
QTDIR_build:DESTDIR = $$QT_BUILD_TREE/imports/$$TARGETPATH
-else:DESTDIR = .
target.path = $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
qmldir.files += $$PWD/qmldir
@@ -18,7 +17,8 @@ symbian:{
TARGET.UID3 = 0x2002131F
include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
- importFiles.sources = $$DESTDIR/qmlgesturesplugin$${QT_LIBINFIX}.dll qmldir
+ isEmpty(DESTDIR):importFiles.sources = qmlgesturesplugin$${QT_LIBINFIX}.dll qmldir
+ else:importFiles.sources = $$DESTDIR/qmlgesturesplugin$${QT_LIBINFIX}.dll qmldir
importFiles.path = $$QT_IMPORTS_BASE_DIR/$$TARGETPATH
DEPLOYMENT = importFiles
diff --git a/src/imports/gestures/qdeclarativegesturearea.cpp b/src/imports/gestures/qdeclarativegesturearea.cpp
index 500c6bf..0d19ba9 100644
--- a/src/imports/gestures/qdeclarativegesturearea.cpp
+++ b/src/imports/gestures/qdeclarativegesturearea.cpp
@@ -92,7 +92,7 @@ public:
\e {This element is only functional on devices with touch input.}
\qml
- import Qt.labs.gestures 0.1
+ import Qt.labs.gestures 1.0
GestureArea {
anchors.fill: parent
diff --git a/src/imports/particles/particles.pro b/src/imports/particles/particles.pro
index 68462e7..a3eb0d1 100644
--- a/src/imports/particles/particles.pro
+++ b/src/imports/particles/particles.pro
@@ -12,7 +12,6 @@ HEADERS += \
qdeclarativeparticles_p.h
QTDIR_build:DESTDIR = $$QT_BUILD_TREE/imports/$$TARGETPATH
-else:DESTDIR = .
target.path = $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
qmldir.files += $$PWD/qmldir
@@ -22,7 +21,8 @@ symbian:{
TARGET.UID3 = 0x2002131E
include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
- importFiles.sources = $$DESTDIR/qmlparticlesplugin$${QT_LIBINFIX}.dll qmldir
+ isEmpty(DESTDIR):importFiles.sources = qmlparticlesplugin$${QT_LIBINFIX}.dll qmldir
+ else:importFiles.sources = $$DESTDIR/qmlparticlesplugin$${QT_LIBINFIX}.dll qmldir
importFiles.path = $$QT_IMPORTS_BASE_DIR/$$TARGETPATH
DEPLOYMENT = importFiles
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
index 2347e66..ee59830 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
@@ -866,32 +866,6 @@ void QGL2PaintEngineExPrivate::fill(const QVectorPath& path)
if (do_vectorpath_cache)
path.makeCacheable();
- if (!device->format().stencil()) {
- // If there is no stencil buffer, triangulate the path instead.
-
- QRectF bbox = path.controlPointRect();
- // If the path doesn't fit within these limits, it is possible that the triangulation will fail.
- bool withinLimits = (bbox.left() > -0x8000 * inverseScale)
- && (bbox.right() < 0x8000 * inverseScale)
- && (bbox.top() > -0x8000 * inverseScale)
- && (bbox.bottom() < 0x8000 * inverseScale);
- if (withinLimits) {
- QTriangleSet polys = qTriangulate(path, QTransform().scale(1 / inverseScale, 1 / inverseScale));
-
- QVarLengthArray<float> vertices(polys.vertices.size());
- for (int i = 0; i < polys.vertices.size(); ++i)
- vertices[i] = float(inverseScale * polys.vertices.at(i));
-
- prepareForDraw(currentBrush.isOpaque());
- setVertexAttributePointer(QT_VERTEX_COORDS_ATTR, vertices.constData());
- glDrawElements(GL_TRIANGLES, polys.indices.size(), GL_UNSIGNED_INT, polys.indices.constData());
- } else {
- // We can't handle big, concave painter paths with OpenGL without stencil buffer.
- qWarning("Painter path exceeds +/-32767 pixels.");
- }
- return;
- }
-
// The path is too complicated & needs the stencil technique
vertexCoordinateArray.clear();
vertexCoordinateArray.addPath(path, inverseScale, false);
@@ -1340,7 +1314,7 @@ void QGL2PaintEngineEx::drawPixmap(const QRectF& dest, const QPixmap & pixmap, c
QGLRect srcRect(src.left(), top, src.right(), bottom);
bool isBitmap = pixmap.isQBitmap();
- bool isOpaque = !isBitmap && !pixmap.hasAlphaChannel();
+ bool isOpaque = !isBitmap && !pixmap.hasAlpha();
d->updateTextureFilter(GL_TEXTURE_2D, GL_CLAMP_TO_EDGE,
state()->renderHints & QPainter::SmoothPixmapTransform, texture->id);
@@ -1791,7 +1765,7 @@ void QGL2PaintEngineExPrivate::drawPixmapFragments(const QPainter::PixmapFragmen
transferMode(ImageArrayDrawingMode);
bool isBitmap = pixmap.isQBitmap();
- bool isOpaque = !isBitmap && (!pixmap.hasAlphaChannel() || (hints & QPainter::OpaqueHint)) && allOpaque;
+ bool isOpaque = !isBitmap && (!pixmap.hasAlpha() || (hints & QPainter::OpaqueHint)) && allOpaque;
updateTextureFilter(GL_TEXTURE_2D, GL_CLAMP_TO_EDGE,
q->state()->renderHints & QPainter::SmoothPixmapTransform, texture->id);
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index 15070d4..0d1a66e 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -1689,9 +1689,6 @@ void QGLContextPrivate::init(QPaintDevice *dev, const QGLFormat &format)
workaround_brokenFBOReadBack = false;
workaroundsCached = false;
- workaround_brokenTextureFromPixmap = false;
- workaround_brokenTextureFromPixmap_init = false;
-
for (int i = 0; i < QT_GL_VERTEX_ARRAY_TRACKED_COUNT; ++i)
vertexAttributeArraysEnabledState[i] = false;
}
@@ -2577,34 +2574,18 @@ QGLTexture *QGLContextPrivate::bindTexture(const QPixmap &pixmap, GLenum target,
}
}
-#if defined(Q_WS_X11)
- // Try to use texture_from_pixmap
+#if defined(Q_WS_X11) && !defined(QT_NO_EGL)
+ // Only try to use texture_from_pixmap under X11/EGL
const QX11Info *xinfo = qt_x11Info(paintDevice);
if (pd->classId() == QPixmapData::X11Class && pd->pixelType() == QPixmapData::PixmapType
&& xinfo && xinfo->screen() == pixmap.x11Info().screen()
&& target == GL_TEXTURE_2D)
{
- if (!workaround_brokenTextureFromPixmap_init) {
- workaround_brokenTextureFromPixmap_init = true;
-
- const QByteArray versionString(reinterpret_cast<const char*>(glGetString(GL_VERSION)));
- const int pos = versionString.indexOf("NVIDIA ");
-
- if (pos >= 0) {
- const QByteArray nvidiaVersionString = versionString.mid(pos + strlen("NVIDIA "));
-
- if (nvidiaVersionString.startsWith("195") || nvidiaVersionString.startsWith("256"))
- workaround_brokenTextureFromPixmap = true;
- }
- }
-
- if (!workaround_brokenTextureFromPixmap) {
- texture = bindTextureFromNativePixmap(const_cast<QPixmap*>(&pixmap), key, options);
- if (texture) {
- texture->options |= QGLContext::MemoryManagedBindOption;
- texture->boundPixmap = pd;
- boundPixmaps.insert(pd, QPixmap(pixmap));
- }
+ texture = bindTextureFromNativePixmap(const_cast<QPixmap*>(&pixmap), key, options);
+ if (texture) {
+ texture->options |= QGLContext::MemoryManagedBindOption;
+ texture->boundPixmap = pd;
+ boundPixmaps.insert(pd, QPixmap(pixmap));
}
}
#endif
diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h
index 623eeaf..6323ce2 100644
--- a/src/opengl/qgl_p.h
+++ b/src/opengl/qgl_p.h
@@ -401,9 +401,6 @@ public:
uint workaround_brokenFBOReadBack : 1;
uint workaroundsCached : 1;
- uint workaround_brokenTextureFromPixmap : 1;
- uint workaround_brokenTextureFromPixmap_init : 1;
-
QPaintDevice *paintDevice;
QColor transpColor;
QGLContext *q_ptr;
diff --git a/src/opengl/qgl_x11.cpp b/src/opengl/qgl_x11.cpp
index f3a4c95..7f4c670 100644
--- a/src/opengl/qgl_x11.cpp
+++ b/src/opengl/qgl_x11.cpp
@@ -1776,6 +1776,10 @@ QGLTexture *QGLContextPrivate::bindTextureFromNativePixmap(QPixmap *pixmap, cons
QX11PixmapData *pixmapData = static_cast<QX11PixmapData*>(pixmap->data_ptr().data());
Q_ASSERT(pixmapData->classId() == QPixmapData::X11Class);
+ // We can't use TFP if the pixmap has a separate X11 mask
+ if (pixmapData->x11_mask)
+ return 0;
+
if (!qt_resolveTextureFromPixmap(paintDevice))
return 0;
diff --git a/src/opengl/qglframebufferobject.cpp b/src/opengl/qglframebufferobject.cpp
index adbba85..6c9b288 100644
--- a/src/opengl/qglframebufferobject.cpp
+++ b/src/opengl/qglframebufferobject.cpp
@@ -324,10 +324,6 @@ void QGLFBOGLPaintDevice::setFBO(QGLFramebufferObject* f,
fboFormat.setStencil(true);
} else if (attachment == QGLFramebufferObject::Depth) {
fboFormat.setDepth(true);
- fboFormat.setStencil(false);
- } else {
- fboFormat.setDepth(false);
- fboFormat.setStencil(false);
}
GLenum format = f->format().internalTextureFormat();
@@ -472,13 +468,17 @@ void QGLFramebufferObjectPrivate::init(QGLFramebufferObject *q, const QSize &sz,
glGetRenderbufferParameteriv(GL_RENDERBUFFER_EXT, GL_RENDERBUFFER_SAMPLES_EXT, &samples);
}
+ // In practice, a combined depth-stencil buffer is supported by all desktop platforms, while a
+ // separate stencil buffer is not. On embedded devices however, a combined depth-stencil buffer
+ // might not be supported while separate buffers are, according to QTBUG-12861.
+
if (attachment == QGLFramebufferObject::CombinedDepthStencil
&& (QGLExtensions::glExtensions() & QGLExtensions::PackedDepthStencil)) {
// depth and stencil buffer needs another extension
- glGenRenderbuffers(1, &depth_stencil_buffer);
- Q_ASSERT(!glIsRenderbuffer(depth_stencil_buffer));
- glBindRenderbuffer(GL_RENDERBUFFER_EXT, depth_stencil_buffer);
- Q_ASSERT(glIsRenderbuffer(depth_stencil_buffer));
+ glGenRenderbuffers(1, &depth_buffer);
+ Q_ASSERT(!glIsRenderbuffer(depth_buffer));
+ glBindRenderbuffer(GL_RENDERBUFFER_EXT, depth_buffer);
+ Q_ASSERT(glIsRenderbuffer(depth_buffer));
if (samples != 0 && glRenderbufferStorageMultisampleEXT)
glRenderbufferStorageMultisampleEXT(GL_RENDERBUFFER_EXT, samples,
GL_DEPTH24_STENCIL8_EXT, size.width(), size.height());
@@ -486,24 +486,26 @@ void QGLFramebufferObjectPrivate::init(QGLFramebufferObject *q, const QSize &sz,
glRenderbufferStorage(GL_RENDERBUFFER_EXT,
GL_DEPTH24_STENCIL8_EXT, size.width(), size.height());
- GLint i = 0;
- glGetRenderbufferParameteriv(GL_RENDERBUFFER_EXT, GL_RENDERBUFFER_DEPTH_SIZE_EXT, &i);
+ stencil_buffer = depth_buffer;
glFramebufferRenderbuffer(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT,
- GL_RENDERBUFFER_EXT, depth_stencil_buffer);
+ GL_RENDERBUFFER_EXT, depth_buffer);
glFramebufferRenderbuffer(GL_FRAMEBUFFER_EXT, GL_STENCIL_ATTACHMENT_EXT,
- GL_RENDERBUFFER_EXT, depth_stencil_buffer);
- fbo_attachment = QGLFramebufferObject::CombinedDepthStencil;
+ GL_RENDERBUFFER_EXT, stencil_buffer);
valid = checkFramebufferStatus();
- if (!valid)
- glDeleteRenderbuffers(1, &depth_stencil_buffer);
- } else if (attachment == QGLFramebufferObject::Depth
- || attachment == QGLFramebufferObject::CombinedDepthStencil)
+ if (!valid) {
+ glDeleteRenderbuffers(1, &depth_buffer);
+ stencil_buffer = depth_buffer = 0;
+ }
+ }
+
+ if (depth_buffer == 0 && (attachment == QGLFramebufferObject::CombinedDepthStencil
+ || (attachment == QGLFramebufferObject::Depth)))
{
- glGenRenderbuffers(1, &depth_stencil_buffer);
- Q_ASSERT(!glIsRenderbuffer(depth_stencil_buffer));
- glBindRenderbuffer(GL_RENDERBUFFER_EXT, depth_stencil_buffer);
- Q_ASSERT(glIsRenderbuffer(depth_stencil_buffer));
+ glGenRenderbuffers(1, &depth_buffer);
+ Q_ASSERT(!glIsRenderbuffer(depth_buffer));
+ glBindRenderbuffer(GL_RENDERBUFFER_EXT, depth_buffer);
+ Q_ASSERT(glIsRenderbuffer(depth_buffer));
if (samples != 0 && glRenderbufferStorageMultisampleEXT) {
#ifdef QT_OPENGL_ES
#define GL_DEPTH_COMPONENT16 0x81A5
@@ -521,14 +523,53 @@ void QGLFramebufferObjectPrivate::init(QGLFramebufferObject *q, const QSize &sz,
glRenderbufferStorage(GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT, size.width(), size.height());
#endif
}
- GLint i = 0;
- glGetRenderbufferParameteriv(GL_RENDERBUFFER_EXT, GL_RENDERBUFFER_DEPTH_SIZE_EXT, &i);
glFramebufferRenderbuffer(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT,
- GL_RENDERBUFFER_EXT, depth_stencil_buffer);
- fbo_attachment = QGLFramebufferObject::Depth;
+ GL_RENDERBUFFER_EXT, depth_buffer);
valid = checkFramebufferStatus();
- if (!valid)
- glDeleteRenderbuffers(1, &depth_stencil_buffer);
+ if (!valid) {
+ glDeleteRenderbuffers(1, &depth_buffer);
+ depth_buffer = 0;
+ }
+ }
+
+ if (stencil_buffer == 0 && (attachment == QGLFramebufferObject::CombinedDepthStencil)) {
+ glGenRenderbuffers(1, &stencil_buffer);
+ Q_ASSERT(!glIsRenderbuffer(stencil_buffer));
+ glBindRenderbuffer(GL_RENDERBUFFER_EXT, stencil_buffer);
+ Q_ASSERT(glIsRenderbuffer(stencil_buffer));
+ if (samples != 0 && glRenderbufferStorageMultisampleEXT) {
+#ifdef QT_OPENGL_ES
+ glRenderbufferStorageMultisampleEXT(GL_RENDERBUFFER_EXT, samples,
+ GL_STENCIL_INDEX8_EXT, size.width(), size.height());
+#else
+ glRenderbufferStorageMultisampleEXT(GL_RENDERBUFFER_EXT, samples,
+ GL_STENCIL_INDEX, size.width(), size.height());
+#endif
+ } else {
+#ifdef QT_OPENGL_ES
+ glRenderbufferStorage(GL_RENDERBUFFER_EXT, GL_STENCIL_INDEX8_EXT,
+ size.width(), size.height());
+#else
+ glRenderbufferStorage(GL_RENDERBUFFER_EXT, GL_STENCIL_INDEX,
+ size.width(), size.height());
+#endif
+ }
+ glFramebufferRenderbuffer(GL_FRAMEBUFFER_EXT, GL_STENCIL_ATTACHMENT_EXT,
+ GL_RENDERBUFFER_EXT, stencil_buffer);
+ valid = checkFramebufferStatus();
+ if (!valid) {
+ glDeleteRenderbuffers(1, &stencil_buffer);
+ stencil_buffer = 0;
+ }
+ }
+
+ // The FBO might have become valid after removing the depth or stencil buffer.
+ valid = checkFramebufferStatus();
+
+ if (depth_buffer && stencil_buffer) {
+ fbo_attachment = QGLFramebufferObject::CombinedDepthStencil;
+ } else if (depth_buffer) {
+ fbo_attachment = QGLFramebufferObject::Depth;
} else {
fbo_attachment = QGLFramebufferObject::NoAttachment;
}
@@ -539,6 +580,10 @@ void QGLFramebufferObjectPrivate::init(QGLFramebufferObject *q, const QSize &sz,
glDeleteRenderbuffers(1, &color_buffer);
else
glDeleteTextures(1, &texture);
+ if (depth_buffer)
+ glDeleteRenderbuffers(1, &depth_buffer);
+ if (stencil_buffer && depth_buffer != stencil_buffer)
+ glDeleteRenderbuffers(1, &stencil_buffer);
glDeleteFramebuffers(1, &fbo);
fbo_guard.setId(0);
}
@@ -821,8 +866,10 @@ QGLFramebufferObject::~QGLFramebufferObject()
glDeleteTextures(1, &d->texture);
if (d->color_buffer)
glDeleteRenderbuffers(1, &d->color_buffer);
- if (d->depth_stencil_buffer)
- glDeleteRenderbuffers(1, &d->depth_stencil_buffer);
+ if (d->depth_buffer)
+ glDeleteRenderbuffers(1, &d->depth_buffer);
+ if (d->stencil_buffer && d->stencil_buffer != d->depth_buffer)
+ glDeleteRenderbuffers(1, &d->stencil_buffer);
GLuint fbo = d->fbo();
glDeleteFramebuffers(1, &fbo);
}
diff --git a/src/opengl/qglframebufferobject_p.h b/src/opengl/qglframebufferobject_p.h
index d8ff012..58b4e9e 100644
--- a/src/opengl/qglframebufferobject_p.h
+++ b/src/opengl/qglframebufferobject_p.h
@@ -126,7 +126,7 @@ private:
class QGLFramebufferObjectPrivate
{
public:
- QGLFramebufferObjectPrivate() : fbo_guard(0), texture(0), depth_stencil_buffer(0)
+ QGLFramebufferObjectPrivate() : fbo_guard(0), texture(0), depth_buffer(0), stencil_buffer(0)
, color_buffer(0), valid(false), engine(0) {}
~QGLFramebufferObjectPrivate() {}
@@ -136,7 +136,8 @@ public:
bool checkFramebufferStatus() const;
QGLSharedResourceGuard fbo_guard;
GLuint texture;
- GLuint depth_stencil_buffer;
+ GLuint depth_buffer;
+ GLuint stencil_buffer;
GLuint color_buffer;
GLenum target;
QSize size;
diff --git a/src/openvg/qpaintengine_vg.cpp b/src/openvg/qpaintengine_vg.cpp
index 3c2fd3d..74395a2 100644
--- a/src/openvg/qpaintengine_vg.cpp
+++ b/src/openvg/qpaintengine_vg.cpp
@@ -248,7 +248,11 @@ public:
inline void ensurePathTransform()
{
if (!pathTransformSet) {
- setTransform(VG_MATRIX_PATH_USER_TO_SURFACE, pathTransform);
+ QTransform aliasedTransform = pathTransform;
+ if (renderingQuality == VG_RENDERING_QUALITY_NONANTIALIASED && currentPen != Qt::NoPen)
+ aliasedTransform = aliasedTransform
+ * QTransform::fromTranslate(aliasedCoordinateDelta, -aliasedCoordinateDelta);
+ setTransform(VG_MATRIX_PATH_USER_TO_SURFACE, aliasedTransform);
pathTransformSet = true;
}
}
@@ -306,6 +310,7 @@ inline void QVGPaintEnginePrivate::setRenderingQuality(VGRenderingQuality mode)
if (renderingQuality != mode) {
vgSeti(VG_RENDERING_QUALITY, mode);
renderingQuality = mode;
+ pathTransformSet = false; // need to tweak transform for aliased stroking
}
}
diff --git a/src/s60installs/bwins/QtDeclarativeu.def b/src/s60installs/bwins/QtDeclarativeu.def
index cf2f325..f417892 100644
--- a/src/s60installs/bwins/QtDeclarativeu.def
+++ b/src/s60installs/bwins/QtDeclarativeu.def
@@ -242,7 +242,7 @@ EXPORTS
?idString@QDeclarativeDebugObjectReference@@QBE?AVQString@@XZ @ 241 NONAME ; class QString QDeclarativeDebugObjectReference::idString(void) const
?customTypeData@QDeclarativeDomObject@@QBE?AVQByteArray@@XZ @ 242 NONAME ; class QByteArray QDeclarativeDomObject::customTypeData(void) const
?stop@QDeclarativeTransition@@QAEXXZ @ 243 NONAME ; void QDeclarativeTransition::stop(void)
- ?data@QDeclarativeListModel@@UBE?AV?$QHash@HVQVariant@@@@HABV?$QList@H@@@Z @ 244 NONAME ; class QHash<int, class QVariant> QDeclarativeListModel::data(int, class QList<int> const &) const
+ ?data@QDeclarativeListModel@@UBE?AV?$QHash@HVQVariant@@@@HABV?$QList@H@@@Z @ 244 NONAME ABSENT ; class QHash<int, class QVariant> QDeclarativeListModel::data(int, class QList<int> const &) const
?verticalCenterOffset@QDeclarativeAnchors@@QBEMXZ @ 245 NONAME ; float QDeclarativeAnchors::verticalCenterOffset(void) const
?metaObject@QDeclarativeText@@UBEPBUQMetaObject@@XZ @ 246 NONAME ; struct QMetaObject const * QDeclarativeText::metaObject(void) const
??0QDeclarativeComponent@@QAE@PAVQDeclarativeEngine@@PAVQObject@@@Z @ 247 NONAME ; QDeclarativeComponent::QDeclarativeComponent(class QDeclarativeEngine *, class QObject *)
@@ -608,7 +608,7 @@ EXPORTS
??_EQDeclarativeDebugObjectExpressionWatch@@UAE@I@Z @ 607 NONAME ; QDeclarativeDebugObjectExpressionWatch::~QDeclarativeDebugObjectExpressionWatch(unsigned int)
?computeTransformOrigin@QDeclarativeItemPrivate@@QBE?AVQPointF@@XZ @ 608 NONAME ; class QPointF QDeclarativeItemPrivate::computeTransformOrigin(void) const
??0QDeclarativeListReference@@QAE@PAVQObject@@PBDPAVQDeclarativeEngine@@@Z @ 609 NONAME ; QDeclarativeListReference::QDeclarativeListReference(class QObject *, char const *, class QDeclarativeEngine *)
- ?setData@QListModelInterface@@UAE_NHABV?$QHash@HVQVariant@@@@@Z @ 610 NONAME ; bool QListModelInterface::setData(int, class QHash<int, class QVariant> const &)
+ ?setData@QListModelInterface@@UAE_NHABV?$QHash@HVQVariant@@@@@Z @ 610 NONAME ABSENT ; bool QListModelInterface::setData(int, class QHash<int, class QVariant> const &)
??0QDeclarativePen@@QAE@PAVQObject@@@Z @ 611 NONAME ; QDeclarativePen::QDeclarativePen(class QObject *)
?trUtf8@QPacketProtocol@@SA?AVQString@@PBD0H@Z @ 612 NONAME ; class QString QPacketProtocol::trUtf8(char const *, char const *, int)
?setContextObject@QDeclarativeContext@@QAEXPAVQObject@@@Z @ 613 NONAME ; void QDeclarativeContext::setContextObject(class QObject *)
@@ -1715,4 +1715,89 @@ EXPORTS
??0QDeclarativeListModel@@AAE@PBV0@PAVQDeclarativeListModelWorkerAgent@@@Z @ 1714 NONAME ; QDeclarativeListModel::QDeclarativeListModel(class QDeclarativeListModel const *, class QDeclarativeListModelWorkerAgent *)
?inWorkerThread@QDeclarativeListModel@@ABE_NXZ @ 1715 NONAME ; bool QDeclarativeListModel::inWorkerThread(void) const
?canMove@QDeclarativeListModel@@ABE_NHHH@Z @ 1716 NONAME ; bool QDeclarativeListModel::canMove(int, int, int) const
+ ?setLoops@QDeclarativeAbstractAnimation@@QAEXH@Z @ 1717 NONAME ; void QDeclarativeAbstractAnimation::setLoops(int)
+ ?trUtf8@QDeclarativeAbstractAnimation@@SA?AVQString@@PBD0@Z @ 1718 NONAME ; class QString QDeclarativeAbstractAnimation::trUtf8(char const *, char const *)
+ ?staticMetaObject@QDeclarativeAbstractAnimation@@2UQMetaObject@@B @ 1719 NONAME ; struct QMetaObject const QDeclarativeAbstractAnimation::staticMetaObject
+ ?setRunning@QDeclarativeTimer@@QAEX_N@Z @ 1720 NONAME ; void QDeclarativeTimer::setRunning(bool)
+ ?tr@QDeclarativeTimer@@SA?AVQString@@PBD0@Z @ 1721 NONAME ; class QString QDeclarativeTimer::tr(char const *, char const *)
+ ?qt_metacall@QDeclarativeTimer@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1722 NONAME ; int QDeclarativeTimer::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?setPaused@QDeclarativeAbstractAnimation@@QAEX_N@Z @ 1723 NONAME ; void QDeclarativeAbstractAnimation::setPaused(bool)
+ ?setRepeating@QDeclarativeTimer@@QAEX_N@Z @ 1724 NONAME ; void QDeclarativeTimer::setRepeating(bool)
+ ?interval@QDeclarativeTimer@@QBEHXZ @ 1725 NONAME ; int QDeclarativeTimer::interval(void) const
+ ?start@QDeclarativeTimer@@QAEXXZ @ 1726 NONAME ; void QDeclarativeTimer::start(void)
+ ?transition@QDeclarativeAbstractAnimation@@UAEXAAV?$QList@VQDeclarativeAction@@@@AAV?$QList@VQDeclarativeProperty@@@@W4TransitionDirection@1@@Z @ 1727 NONAME ; void QDeclarativeAbstractAnimation::transition(class QList<class QDeclarativeAction> &, class QList<class QDeclarativeProperty> &, enum QDeclarativeAbstractAnimation::TransitionDirection)
+ ?componentComplete@QDeclarativeAbstractAnimation@@UAEXXZ @ 1728 NONAME ; void QDeclarativeAbstractAnimation::componentComplete(void)
+ ?runningChanged@QDeclarativeAbstractAnimation@@IAEX_N@Z @ 1729 NONAME ; void QDeclarativeAbstractAnimation::runningChanged(bool)
+ ?trUtf8@QDeclarativeAbstractAnimation@@SA?AVQString@@PBD0H@Z @ 1730 NONAME ; class QString QDeclarativeAbstractAnimation::trUtf8(char const *, char const *, int)
+ ?metaObject@QDeclarativeTimer@@UBEPBUQMetaObject@@XZ @ 1731 NONAME ; struct QMetaObject const * QDeclarativeTimer::metaObject(void) const
+ ?setGroup@QDeclarativeAbstractAnimation@@QAEXPAVQDeclarativeAnimationGroup@@@Z @ 1732 NONAME ; void QDeclarativeAbstractAnimation::setGroup(class QDeclarativeAnimationGroup *)
+ ?isRepeating@QDeclarativeTimer@@QBE_NXZ @ 1733 NONAME ; bool QDeclarativeTimer::isRepeating(void) const
+ ?setTriggeredOnStart@QDeclarativeTimer@@QAEX_N@Z @ 1734 NONAME ; void QDeclarativeTimer::setTriggeredOnStart(bool)
+ ?currentTime@QDeclarativeAbstractAnimation@@QAEHXZ @ 1735 NONAME ; int QDeclarativeAbstractAnimation::currentTime(void)
+ ??1QDeclarativeAbstractAnimation@@UAE@XZ @ 1736 NONAME ; QDeclarativeAbstractAnimation::~QDeclarativeAbstractAnimation(void)
+ ?triggered@QDeclarativeTimer@@IAEXXZ @ 1737 NONAME ; void QDeclarativeTimer::triggered(void)
+ ?finished@QDeclarativeTimer@@AAEXXZ @ 1738 NONAME ; void QDeclarativeTimer::finished(void)
+ ?pausedChanged@QDeclarativeAbstractAnimation@@IAEX_N@Z @ 1739 NONAME ; void QDeclarativeAbstractAnimation::pausedChanged(bool)
+ ?complete@QDeclarativeAbstractAnimation@@QAEXXZ @ 1740 NONAME ; void QDeclarativeAbstractAnimation::complete(void)
+ ?setRunning@QDeclarativeAbstractAnimation@@QAEX_N@Z @ 1741 NONAME ; void QDeclarativeAbstractAnimation::setRunning(bool)
+ ?completed@QDeclarativeAbstractAnimation@@IAEXXZ @ 1742 NONAME ; void QDeclarativeAbstractAnimation::completed(void)
+ ?trUtf8@QDeclarativeTimer@@SA?AVQString@@PBD0@Z @ 1743 NONAME ; class QString QDeclarativeTimer::trUtf8(char const *, char const *)
+ ?loopCountChanged@QDeclarativeAbstractAnimation@@IAEXH@Z @ 1744 NONAME ; void QDeclarativeAbstractAnimation::loopCountChanged(int)
+ ?repeatChanged@QDeclarativeTimer@@IAEXXZ @ 1745 NONAME ; void QDeclarativeTimer::repeatChanged(void)
+ ?setDisableUserControl@QDeclarativeAbstractAnimation@@QAEXXZ @ 1746 NONAME ; void QDeclarativeAbstractAnimation::setDisableUserControl(void)
+ ?setDefaultTarget@QDeclarativeAbstractAnimation@@QAEXABVQDeclarativeProperty@@@Z @ 1747 NONAME ; void QDeclarativeAbstractAnimation::setDefaultTarget(class QDeclarativeProperty const &)
+ ?triggeredOnStart@QDeclarativeTimer@@QBE_NXZ @ 1748 NONAME ; bool QDeclarativeTimer::triggeredOnStart(void) const
+ ?notifyRunningChanged@QDeclarativeAbstractAnimation@@AAEX_N@Z @ 1749 NONAME ; void QDeclarativeAbstractAnimation::notifyRunningChanged(bool)
+ ?componentComplete@QDeclarativeTimer@@MAEXXZ @ 1750 NONAME ; void QDeclarativeTimer::componentComplete(void)
+ ?tr@QDeclarativeAbstractAnimation@@SA?AVQString@@PBD0@Z @ 1751 NONAME ; class QString QDeclarativeAbstractAnimation::tr(char const *, char const *)
+ ?isRunning@QDeclarativeAbstractAnimation@@QBE_NXZ @ 1752 NONAME ; bool QDeclarativeAbstractAnimation::isRunning(void) const
+ ?d_func@QDeclarativeAbstractAnimation@@ABEPBVQDeclarativeAbstractAnimationPrivate@@XZ @ 1753 NONAME ; class QDeclarativeAbstractAnimationPrivate const * QDeclarativeAbstractAnimation::d_func(void) const
+ ??_EQDeclarativeAbstractAnimation@@UAE@I@Z @ 1754 NONAME ; QDeclarativeAbstractAnimation::~QDeclarativeAbstractAnimation(unsigned int)
+ ?d_func@QDeclarativeAbstractAnimation@@AAEPAVQDeclarativeAbstractAnimationPrivate@@XZ @ 1755 NONAME ; class QDeclarativeAbstractAnimationPrivate * QDeclarativeAbstractAnimation::d_func(void)
+ ?componentFinalized@QDeclarativeAbstractAnimation@@AAEXXZ @ 1756 NONAME ; void QDeclarativeAbstractAnimation::componentFinalized(void)
+ ??_EQDeclarativeTimer@@UAE@I@Z @ 1757 NONAME ; QDeclarativeTimer::~QDeclarativeTimer(unsigned int)
+ ?pause@QDeclarativeAbstractAnimation@@QAEXXZ @ 1758 NONAME ; void QDeclarativeAbstractAnimation::pause(void)
+ ?stop@QDeclarativeTimer@@QAEXXZ @ 1759 NONAME ; void QDeclarativeTimer::stop(void)
+ ?timelineComplete@QDeclarativeAbstractAnimation@@AAEXXZ @ 1760 NONAME ; void QDeclarativeAbstractAnimation::timelineComplete(void)
+ ?setAlwaysRunToEnd@QDeclarativeAbstractAnimation@@QAEX_N@Z @ 1761 NONAME ; void QDeclarativeAbstractAnimation::setAlwaysRunToEnd(bool)
+ ?classBegin@QDeclarativeAbstractAnimation@@UAEXXZ @ 1762 NONAME ; void QDeclarativeAbstractAnimation::classBegin(void)
+ ?d_func@QDeclarativeTimer@@AAEPAVQDeclarativeTimerPrivate@@XZ @ 1763 NONAME ; class QDeclarativeTimerPrivate * QDeclarativeTimer::d_func(void)
+ ??0QDeclarativeAbstractAnimation@@QAE@PAVQObject@@@Z @ 1764 NONAME ; QDeclarativeAbstractAnimation::QDeclarativeAbstractAnimation(class QObject *)
+ ?metaObject@QDeclarativeAbstractAnimation@@UBEPBUQMetaObject@@XZ @ 1765 NONAME ; struct QMetaObject const * QDeclarativeAbstractAnimation::metaObject(void) const
+ ?tr@QDeclarativeAbstractAnimation@@SA?AVQString@@PBD0H@Z @ 1766 NONAME ; class QString QDeclarativeAbstractAnimation::tr(char const *, char const *, int)
+ ?started@QDeclarativeAbstractAnimation@@IAEXXZ @ 1767 NONAME ; void QDeclarativeAbstractAnimation::started(void)
+ ?setInterval@QDeclarativeTimer@@QAEXH@Z @ 1768 NONAME ; void QDeclarativeTimer::setInterval(int)
+ ?d_func@QDeclarativeTimer@@ABEPBVQDeclarativeTimerPrivate@@XZ @ 1769 NONAME ; class QDeclarativeTimerPrivate const * QDeclarativeTimer::d_func(void) const
+ ?staticMetaObject@QDeclarativeTimer@@2UQMetaObject@@B @ 1770 NONAME ; struct QMetaObject const QDeclarativeTimer::staticMetaObject
+ ?qt_metacast@QDeclarativeAbstractAnimation@@UAEPAXPBD@Z @ 1771 NONAME ; void * QDeclarativeAbstractAnimation::qt_metacast(char const *)
+ ?setCurrentTime@QDeclarativeAbstractAnimation@@QAEXH@Z @ 1772 NONAME ; void QDeclarativeAbstractAnimation::setCurrentTime(int)
+ ?restart@QDeclarativeAbstractAnimation@@QAEXXZ @ 1773 NONAME ; void QDeclarativeAbstractAnimation::restart(void)
+ ??0QDeclarativeAbstractAnimation@@IAE@AAVQDeclarativeAbstractAnimationPrivate@@PAVQObject@@@Z @ 1774 NONAME ; QDeclarativeAbstractAnimation::QDeclarativeAbstractAnimation(class QDeclarativeAbstractAnimationPrivate &, class QObject *)
+ ?resume@QDeclarativeAbstractAnimation@@QAEXXZ @ 1775 NONAME ; void QDeclarativeAbstractAnimation::resume(void)
+ ?runningChanged@QDeclarativeTimer@@IAEXXZ @ 1776 NONAME ; void QDeclarativeTimer::runningChanged(void)
+ ?ticked@QDeclarativeTimer@@AAEXXZ @ 1777 NONAME ; void QDeclarativeTimer::ticked(void)
+ ?trUtf8@QDeclarativeTimer@@SA?AVQString@@PBD0H@Z @ 1778 NONAME ; class QString QDeclarativeTimer::trUtf8(char const *, char const *, int)
+ ??0QDeclarativeTimer@@QAE@PAVQObject@@@Z @ 1779 NONAME ; QDeclarativeTimer::QDeclarativeTimer(class QObject *)
+ ?loops@QDeclarativeAbstractAnimation@@QBEHXZ @ 1780 NONAME ; int QDeclarativeAbstractAnimation::loops(void) const
+ ?setTarget@QDeclarativeAbstractAnimation@@EAEXABVQDeclarativeProperty@@@Z @ 1781 NONAME ; void QDeclarativeAbstractAnimation::setTarget(class QDeclarativeProperty const &)
+ ?alwaysRunToEnd@QDeclarativeAbstractAnimation@@QBE_NXZ @ 1782 NONAME ; bool QDeclarativeAbstractAnimation::alwaysRunToEnd(void) const
+ ?tr@QDeclarativeTimer@@SA?AVQString@@PBD0H@Z @ 1783 NONAME ; class QString QDeclarativeTimer::tr(char const *, char const *, int)
+ ?intervalChanged@QDeclarativeTimer@@IAEXXZ @ 1784 NONAME ; void QDeclarativeTimer::intervalChanged(void)
+ ?isPaused@QDeclarativeAbstractAnimation@@QBE_NXZ @ 1785 NONAME ; bool QDeclarativeAbstractAnimation::isPaused(void) const
+ ?getStaticMetaObject@QDeclarativeAbstractAnimation@@SAABUQMetaObject@@XZ @ 1786 NONAME ; struct QMetaObject const & QDeclarativeAbstractAnimation::getStaticMetaObject(void)
+ ?group@QDeclarativeAbstractAnimation@@QBEPAVQDeclarativeAnimationGroup@@XZ @ 1787 NONAME ; class QDeclarativeAnimationGroup * QDeclarativeAbstractAnimation::group(void) const
+ ?classBegin@QDeclarativeTimer@@MAEXXZ @ 1788 NONAME ; void QDeclarativeTimer::classBegin(void)
+ ?restart@QDeclarativeTimer@@QAEXXZ @ 1789 NONAME ; void QDeclarativeTimer::restart(void)
+ ??1QDeclarativeTimer@@UAE@XZ @ 1790 NONAME ; QDeclarativeTimer::~QDeclarativeTimer(void)
+ ?getStaticMetaObject@QDeclarativeTimer@@SAABUQMetaObject@@XZ @ 1791 NONAME ; struct QMetaObject const & QDeclarativeTimer::getStaticMetaObject(void)
+ ?qt_metacast@QDeclarativeTimer@@UAEPAXPBD@Z @ 1792 NONAME ; void * QDeclarativeTimer::qt_metacast(char const *)
+ ?alwaysRunToEndChanged@QDeclarativeAbstractAnimation@@IAEX_N@Z @ 1793 NONAME ; void QDeclarativeAbstractAnimation::alwaysRunToEndChanged(bool)
+ ?triggeredOnStartChanged@QDeclarativeTimer@@IAEXXZ @ 1794 NONAME ; void QDeclarativeTimer::triggeredOnStartChanged(void)
+ ?isRunning@QDeclarativeTimer@@QBE_NXZ @ 1795 NONAME ; bool QDeclarativeTimer::isRunning(void) const
+ ?update@QDeclarativeTimer@@AAEXXZ @ 1796 NONAME ; void QDeclarativeTimer::update(void)
+ ?stop@QDeclarativeAbstractAnimation@@QAEXXZ @ 1797 NONAME ; void QDeclarativeAbstractAnimation::stop(void)
+ ?start@QDeclarativeAbstractAnimation@@QAEXXZ @ 1798 NONAME ; void QDeclarativeAbstractAnimation::start(void)
+ ?qt_metacall@QDeclarativeAbstractAnimation@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1799 NONAME ; int QDeclarativeAbstractAnimation::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?getScriptEngine@QDeclarativeDebugHelper@@SAPAVQScriptEngine@@PAVQDeclarativeEngine@@@Z @ 1800 NONAME ; class QScriptEngine * QDeclarativeDebugHelper::getScriptEngine(class QDeclarativeEngine *)
+ ?setAnimationSlowDownFactor@QDeclarativeDebugHelper@@SAXM@Z @ 1801 NONAME ; void QDeclarativeDebugHelper::setAnimationSlowDownFactor(float)
diff --git a/src/s60installs/eabi/QtDeclarativeu.def b/src/s60installs/eabi/QtDeclarativeu.def
index 11dee4d..c4cd9b6 100644
--- a/src/s60installs/eabi/QtDeclarativeu.def
+++ b/src/s60installs/eabi/QtDeclarativeu.def
@@ -1351,7 +1351,7 @@ EXPORTS
_ZNK21QDeclarativeDomObject8propertyERK10QByteArray @ 1350 NONAME
_ZNK21QDeclarativeListModel10metaObjectEv @ 1351 NONAME
_ZNK21QDeclarativeListModel3getEi @ 1352 NONAME
- _ZNK21QDeclarativeListModel4dataEiRK5QListIiE @ 1353 NONAME
+ _ZNK21QDeclarativeListModel4dataEiRK5QListIiE @ 1353 NONAME ABSENT
_ZNK21QDeclarativeListModel4dataEii @ 1354 NONAME
_ZNK21QDeclarativeListModel5countEv @ 1355 NONAME
_ZNK21QDeclarativeListModel5rolesEv @ 1356 NONAME
@@ -1747,4 +1747,90 @@ EXPORTS
_ZN21QDeclarativeListModelC1EPKS_P32QDeclarativeListModelWorkerAgent @ 1746 NONAME
_ZN21QDeclarativeListModelC2EPKS_P32QDeclarativeListModelWorkerAgent @ 1747 NONAME
_ZNK21QDeclarativeListModel14inWorkerThreadEv @ 1748 NONAME
+ _ZN17QDeclarativeTimer10classBeginEv @ 1749 NONAME
+ _ZN17QDeclarativeTimer10setRunningEb @ 1750 NONAME
+ _ZN17QDeclarativeTimer11qt_metacallEN11QMetaObject4CallEiPPv @ 1751 NONAME
+ _ZN17QDeclarativeTimer11qt_metacastEPKc @ 1752 NONAME
+ _ZN17QDeclarativeTimer11setIntervalEi @ 1753 NONAME
+ _ZN17QDeclarativeTimer12setRepeatingEb @ 1754 NONAME
+ _ZN17QDeclarativeTimer13repeatChangedEv @ 1755 NONAME
+ _ZN17QDeclarativeTimer14runningChangedEv @ 1756 NONAME
+ _ZN17QDeclarativeTimer15intervalChangedEv @ 1757 NONAME
+ _ZN17QDeclarativeTimer16staticMetaObjectE @ 1758 NONAME DATA 16
+ _ZN17QDeclarativeTimer17componentCompleteEv @ 1759 NONAME
+ _ZN17QDeclarativeTimer19getStaticMetaObjectEv @ 1760 NONAME
+ _ZN17QDeclarativeTimer19setTriggeredOnStartEb @ 1761 NONAME
+ _ZN17QDeclarativeTimer23triggeredOnStartChangedEv @ 1762 NONAME
+ _ZN17QDeclarativeTimer4stopEv @ 1763 NONAME
+ _ZN17QDeclarativeTimer5startEv @ 1764 NONAME
+ _ZN17QDeclarativeTimer6tickedEv @ 1765 NONAME
+ _ZN17QDeclarativeTimer6updateEv @ 1766 NONAME
+ _ZN17QDeclarativeTimer7restartEv @ 1767 NONAME
+ _ZN17QDeclarativeTimer8finishedEv @ 1768 NONAME
+ _ZN17QDeclarativeTimer9triggeredEv @ 1769 NONAME
+ _ZN17QDeclarativeTimerC1EP7QObject @ 1770 NONAME
+ _ZN17QDeclarativeTimerC2EP7QObject @ 1771 NONAME
+ _ZN29QDeclarativeAbstractAnimation10classBeginEv @ 1772 NONAME
+ _ZN29QDeclarativeAbstractAnimation10setRunningEb @ 1773 NONAME
+ _ZN29QDeclarativeAbstractAnimation10transitionER5QListI18QDeclarativeActionERS0_I20QDeclarativePropertyENS_19TransitionDirectionE @ 1774 NONAME
+ _ZN29QDeclarativeAbstractAnimation11currentTimeEv @ 1775 NONAME
+ _ZN29QDeclarativeAbstractAnimation11qt_metacallEN11QMetaObject4CallEiPPv @ 1776 NONAME
+ _ZN29QDeclarativeAbstractAnimation11qt_metacastEPKc @ 1777 NONAME
+ _ZN29QDeclarativeAbstractAnimation13pausedChangedEb @ 1778 NONAME
+ _ZN29QDeclarativeAbstractAnimation14runningChangedEb @ 1779 NONAME
+ _ZN29QDeclarativeAbstractAnimation14setCurrentTimeEi @ 1780 NONAME
+ _ZN29QDeclarativeAbstractAnimation16loopCountChangedEi @ 1781 NONAME
+ _ZN29QDeclarativeAbstractAnimation16setDefaultTargetERK20QDeclarativeProperty @ 1782 NONAME
+ _ZN29QDeclarativeAbstractAnimation16staticMetaObjectE @ 1783 NONAME DATA 16
+ _ZN29QDeclarativeAbstractAnimation16timelineCompleteEv @ 1784 NONAME
+ _ZN29QDeclarativeAbstractAnimation17componentCompleteEv @ 1785 NONAME
+ _ZN29QDeclarativeAbstractAnimation17setAlwaysRunToEndEb @ 1786 NONAME
+ _ZN29QDeclarativeAbstractAnimation18componentFinalizedEv @ 1787 NONAME
+ _ZN29QDeclarativeAbstractAnimation19getStaticMetaObjectEv @ 1788 NONAME
+ _ZN29QDeclarativeAbstractAnimation20notifyRunningChangedEb @ 1789 NONAME
+ _ZN29QDeclarativeAbstractAnimation21alwaysRunToEndChangedEb @ 1790 NONAME
+ _ZN29QDeclarativeAbstractAnimation21setDisableUserControlEv @ 1791 NONAME
+ _ZN29QDeclarativeAbstractAnimation4stopEv @ 1792 NONAME
+ _ZN29QDeclarativeAbstractAnimation5pauseEv @ 1793 NONAME
+ _ZN29QDeclarativeAbstractAnimation5startEv @ 1794 NONAME
+ _ZN29QDeclarativeAbstractAnimation6resumeEv @ 1795 NONAME
+ _ZN29QDeclarativeAbstractAnimation7restartEv @ 1796 NONAME
+ _ZN29QDeclarativeAbstractAnimation7startedEv @ 1797 NONAME
+ _ZN29QDeclarativeAbstractAnimation8completeEv @ 1798 NONAME
+ _ZN29QDeclarativeAbstractAnimation8setGroupEP26QDeclarativeAnimationGroup @ 1799 NONAME
+ _ZN29QDeclarativeAbstractAnimation8setLoopsEi @ 1800 NONAME
+ _ZN29QDeclarativeAbstractAnimation9completedEv @ 1801 NONAME
+ _ZN29QDeclarativeAbstractAnimation9setPausedEb @ 1802 NONAME
+ _ZN29QDeclarativeAbstractAnimation9setTargetERK20QDeclarativeProperty @ 1803 NONAME
+ _ZN29QDeclarativeAbstractAnimationC2EP7QObject @ 1804 NONAME
+ _ZN29QDeclarativeAbstractAnimationC2ER36QDeclarativeAbstractAnimationPrivateP7QObject @ 1805 NONAME
+ _ZN29QDeclarativeAbstractAnimationD0Ev @ 1806 NONAME
+ _ZN29QDeclarativeAbstractAnimationD1Ev @ 1807 NONAME
+ _ZN29QDeclarativeAbstractAnimationD2Ev @ 1808 NONAME
+ _ZNK17QDeclarativeTimer10metaObjectEv @ 1809 NONAME
+ _ZNK17QDeclarativeTimer11isRepeatingEv @ 1810 NONAME
+ _ZNK17QDeclarativeTimer16triggeredOnStartEv @ 1811 NONAME
+ _ZNK17QDeclarativeTimer8intervalEv @ 1812 NONAME
+ _ZNK17QDeclarativeTimer9isRunningEv @ 1813 NONAME
+ _ZNK29QDeclarativeAbstractAnimation10metaObjectEv @ 1814 NONAME
+ _ZNK29QDeclarativeAbstractAnimation14alwaysRunToEndEv @ 1815 NONAME
+ _ZNK29QDeclarativeAbstractAnimation5groupEv @ 1816 NONAME
+ _ZNK29QDeclarativeAbstractAnimation5loopsEv @ 1817 NONAME
+ _ZNK29QDeclarativeAbstractAnimation8isPausedEv @ 1818 NONAME
+ _ZNK29QDeclarativeAbstractAnimation9isRunningEv @ 1819 NONAME
+ _ZTI17QDeclarativeTimer @ 1820 NONAME
+ _ZTI29QDeclarativeAbstractAnimation @ 1821 NONAME
+ _ZTV17QDeclarativeTimer @ 1822 NONAME
+ _ZTV29QDeclarativeAbstractAnimation @ 1823 NONAME
+ _ZThn12_N29QDeclarativeAbstractAnimation10classBeginEv @ 1824 NONAME
+ _ZThn12_N29QDeclarativeAbstractAnimation17componentCompleteEv @ 1825 NONAME
+ _ZThn12_N29QDeclarativeAbstractAnimationD0Ev @ 1826 NONAME
+ _ZThn12_N29QDeclarativeAbstractAnimationD1Ev @ 1827 NONAME
+ _ZThn8_N17QDeclarativeTimer10classBeginEv @ 1828 NONAME
+ _ZThn8_N17QDeclarativeTimer17componentCompleteEv @ 1829 NONAME
+ _ZThn8_N29QDeclarativeAbstractAnimation9setTargetERK20QDeclarativeProperty @ 1830 NONAME
+ _ZThn8_N29QDeclarativeAbstractAnimationD0Ev @ 1831 NONAME
+ _ZThn8_N29QDeclarativeAbstractAnimationD1Ev @ 1832 NONAME
+ _ZN23QDeclarativeDebugHelper15getScriptEngineEP18QDeclarativeEngine @ 1833 NONAME
+ _ZN23QDeclarativeDebugHelper26setAnimationSlowDownFactorEf @ 1834 NONAME
diff --git a/src/src.pro b/src/src.pro
index f856a0c..9a8b70fc 100644
--- a/src/src.pro
+++ b/src/src.pro
@@ -110,7 +110,8 @@ src_webkit_declarative.target = sub-webkitdeclarative
contains(QT_CONFIG, opengl):src_multimedia.depends += src_opengl
src_tools_activeqt.depends = src_tools_idc src_gui
src_declarative.depends = src_gui src_script src_network
- src_plugins.depends = src_gui src_sql src_svg src_multimedia
+ src_plugins.depends = src_gui src_sql src_svg
+ contains(QT_CONFIG, multimedia):src_plugins.depends += src_multimedia
src_s60installs.depends = $$TOOLS_SUBDIRS $$SRC_SUBDIRS
src_s60installs.depends -= src_s60installs
src_imports.depends = src_gui src_declarative