summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2010-03-31 09:36:32 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2010-03-31 09:36:32 (GMT)
commit0c439d67f567ba2e7a1b9ada4e3953e5e598f168 (patch)
tree00801dada770fe63e3027df58d116edccfe07cfd
parentedd41ee5488716cf8336a7d8ea0cb3d48d0e7b14 (diff)
parent622a27c582f859274a5b9e40c625a6fda600b7b1 (diff)
downloadQt-0c439d67f567ba2e7a1b9ada4e3953e5e598f168.zip
Qt-0c439d67f567ba2e7a1b9ada4e3953e5e598f168.tar.gz
Qt-0c439d67f567ba2e7a1b9ada4e3953e5e598f168.tar.bz2
Merge remote branch 'origin/4.6' into qt-4.7-from-4.6
Conflicts: configure doc/src/modules.qdoc src/gui/graphicsview/qgraphicsitem_p.h src/gui/graphicsview/qgraphicswidget.h
-rwxr-xr-xconfigure49
-rw-r--r--doc/src/frameworks-technologies/activeqt.qdoc5
-rw-r--r--doc/src/modules.qdoc11
-rw-r--r--src/3rdparty/phonon/mmf/abstractvideooutput.cpp8
-rw-r--r--src/3rdparty/phonon/mmf/abstractvideoplayer.cpp8
-rw-r--r--src/3rdparty/phonon/mmf/videooutput_dsa.cpp6
-rw-r--r--src/3rdparty/phonon/mmf/videoplayer_dsa.cpp25
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/ChangeLog28
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri6
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp47
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/Collector.h9
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/symbian/BlockAllocatorSymbian.cpp132
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/symbian/BlockAllocatorSymbian.h120
-rw-r--r--src/3rdparty/webkit/VERSION2
-rw-r--r--src/gui/dialogs/qfilesystemmodel.cpp10
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp103
-rw-r--r--src/gui/graphicsview/qgraphicsitem.h7
-rw-r--r--src/gui/graphicsview/qgraphicsitem_p.h68
-rw-r--r--src/gui/graphicsview/qgraphicswidget.cpp14
-rw-r--r--src/gui/graphicsview/qgraphicswidget_p.cpp51
-rw-r--r--src/gui/graphicsview/qgraphicswidget_p.h9
-rw-r--r--src/gui/styles/qs60style.cpp2
-rw-r--r--src/gui/text/qfontengine_win.cpp2
-rw-r--r--src/gui/text/qfontengine_win_p.h2
-rw-r--r--src/openvg/qpaintengine_vg.cpp41
-rw-r--r--src/xmlpatterns/api/qxmlresultitems.cpp4
-rw-r--r--tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp32
-rw-r--r--tests/auto/qsharedpointer/externaltests.cpp17
-rw-r--r--tests/auto/qsharedpointer/externaltests.h3
-rw-r--r--tests/auto/qsharedpointer/tst_qsharedpointer.cpp2
-rw-r--r--tools/linguist/linguist.pro2
31 files changed, 424 insertions, 401 deletions
diff --git a/configure b/configure
index 4ffc457..0dbf98f 100755
--- a/configure
+++ b/configure
@@ -173,6 +173,12 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+# detect the "echo without newline" style. usage: echo $ECHO_N "<string>$ECHO_C"
+if echo '\c' | grep '\c' >/dev/null; then
+ ECHO_N=-n
+else
+ ECHO_C='\c'
+fi
#-------------------------------------------------------------------------------
# window system detection
@@ -399,11 +405,7 @@ elif [ $COMMERCIAL_USER = "yes" ]; then
else
if [ -z "$LicenseKeyExt" ]; then
echo
- if echo '\c' | grep '\c' >/dev/null; then
- echo -n "Please enter your license key: "
- else
- echo "Please enter your license key: \c"
- fi
+ echo $ECHO_N "Please enter your license key: $ECHO_C"
read LicenseKeyExt
Licensee="Unknown user"
fi
@@ -4064,11 +4066,7 @@ elif [ "$Edition" = "OpenSource" ]; then
echo "Type 'yes' to accept this license offer."
echo "Type 'no' to decline this license offer."
echo
- if echo '\c' | grep '\c' >/dev/null; then
- echo -n "Do you accept the terms of $affix license? "
- else
- echo "Do you accept the terms of $affix license? \c"
- fi
+ echo $ECHO_N "Do you accept the terms of $affix license? $ECHO_C"
read acceptance
fi
echo
@@ -4099,11 +4097,7 @@ elif [ "$Edition" = "Preview" ]; then
echo "Type 'yes' to accept this license offer."
echo "Type 'no' to decline this license offer."
echo
- if echo '\c' | grep '\c' >/dev/null; then
- echo -n "Do you accept the terms of the license? "
- else
- echo "Do you accept the terms of the license? \c"
- fi
+ echo $ECHO_N "Do you accept the terms of the license? $ECHO_C"
read acceptance
fi
echo
@@ -4189,11 +4183,7 @@ elif [ "$Edition" != "OpenSource" ]; then
echo "Type 'yes' to accept this license offer."
echo "Type 'no' to decline this license offer."
echo
- if echo '\c' | grep '\c' >/dev/null; then
- echo -n "Do you accept the terms of the $TheLicense? "
- else
- echo "Do you accept the terms of the $TheLicense? \c"
- fi
+ echo $ECHO_N "Do you accept the terms of the $TheLicense? $ECHO_C"
read acceptance
fi
echo
@@ -7653,11 +7643,7 @@ else
fi
if [ "$OPT_VERBOSE" = "yes" ]; then
- if echo '\c' | grep '\c' >/dev/null; then
- echo -n "qmake vars ............. "
- else
- echo "qmake vars ............. \c"
- fi
+ echo $ECHO_N "qmake vars .......... $ECHO_C"
cat "$QMAKE_VARS_FILE" | tr '\n' ' '
echo "qmake switches ......... $QMAKE_SWITCHES"
fi
@@ -8040,21 +8026,12 @@ for file in .projects .projects.3; do
continue;
fi
QMAKE_SPEC_ARGS="-spec $SPEC"
- if echo '\c' | grep '\c' >/dev/null; then
- echo -n " for $a"
- else
- echo " for $a\c"
- fi
+ echo $ECHO_N " for $a$ECHO_C"
QMAKE="$outpath/bin/qmake"
QMAKE_ARGS="$QMAKE_SWITCHES $QMAKE_SPEC_ARGS"
if [ "$file" = ".projects.3" ]; then
- if echo '\c' | grep '\c' >/dev/null; then
- echo -n " (fast)"
- else
- echo " (fast)\c"
- fi
- echo
+ echo " (fast)"
cat >"${OUTDIR}/Makefile" <<EOF
# ${OUTDIR}/Makefile: generated by configure
diff --git a/doc/src/frameworks-technologies/activeqt.qdoc b/doc/src/frameworks-technologies/activeqt.qdoc
index a79430d..b752122 100644
--- a/doc/src/frameworks-technologies/activeqt.qdoc
+++ b/doc/src/frameworks-technologies/activeqt.qdoc
@@ -70,7 +70,10 @@
controls.
\endlist
- The ActiveQt framework consists of two frameworks:
+ For more information about using ActiveX with Qt, see
+ \l{Building ActiveX servers and controls with Qt}.
+
+ The ActiveQt framework consists of two modules:
\list
\o The \l{Using ActiveX controls and COM objects in Qt}{QAxContainer}
diff --git a/doc/src/modules.qdoc b/doc/src/modules.qdoc
index 76a52b4..b13861f 100644
--- a/doc/src/modules.qdoc
+++ b/doc/src/modules.qdoc
@@ -493,6 +493,13 @@
\snippet doc/src/snippets/code/doc_src_qtxmlpatterns.qdoc 1
+ \section1 Further Links
+
+ General overviews of XQuery and XSchema can be found in the
+ \l{Using XML Technologies} document.
+
+ An introduction to the XQuery language can be found in \l{A Short Path to XQuery}.
+
\section1 License Information
The XML Schema implementation provided by this module contains the \c xml.xsd file
@@ -810,6 +817,8 @@
\brief The QAxContainer module is a Windows-only extension for
accessing ActiveX controls and COM objects.
+ QAxServer is part of the \l{ActiveQt Framework}.
+
\section1 License Information
The QAxContainer module is not covered by the \l{GNU General Public License (GPL)},
@@ -860,6 +869,8 @@
\brief The QAxServer module is a Windows-only static library that
you can use to turn a standard Qt binary into a COM server.
+ QAxServer is part of the \l{ActiveQt Framework}.
+
\section1 License Information
The QAxContainer module is not covered by the \l{GNU General Public License (GPL)},
diff --git a/src/3rdparty/phonon/mmf/abstractvideooutput.cpp b/src/3rdparty/phonon/mmf/abstractvideooutput.cpp
index 3fe66fc..a8aabfd 100644
--- a/src/3rdparty/phonon/mmf/abstractvideooutput.cpp
+++ b/src/3rdparty/phonon/mmf/abstractvideooutput.cpp
@@ -28,6 +28,8 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
#include <QMoveEvent>
#include <QResizeEvent>
+#include <QApplication> // for QApplication::activeWindow
+
#include <coecntrl.h>
QT_BEGIN_NAMESPACE
@@ -162,6 +164,12 @@ void MMF::AbstractVideoOutput::dump() const
QScopedPointer<ObjectDump::QVisitor> visitor(new ObjectDump::QVisitor);
visitor->setPrefix("Phonon::MMF"); // to aid searchability of logs
ObjectDump::addDefaultAnnotators(*visitor);
+
+ if (QWidget *window = QApplication::activeWindow()) {
+ TRACE("Dumping from root window 0x%08x:", window);
+ ObjectDump::dumpTreeFromLeaf(*window, *visitor);
+ }
+
TRACE("Dumping tree from leaf 0x%08x:", this);
ObjectDump::dumpTreeFromLeaf(*this, *visitor);
diff --git a/src/3rdparty/phonon/mmf/abstractvideoplayer.cpp b/src/3rdparty/phonon/mmf/abstractvideoplayer.cpp
index 8cb9db5..c2bcce0 100644
--- a/src/3rdparty/phonon/mmf/abstractvideoplayer.cpp
+++ b/src/3rdparty/phonon/mmf/abstractvideoplayer.cpp
@@ -193,11 +193,14 @@ qint64 MMF::AbstractVideoPlayer::totalTime() const
void MMF::AbstractVideoPlayer::videoWindowChanged()
{
- TRACE_CONTEXT(AbstractVideoPlayer::videoOutputRegionChanged, EVideoInternal);
+ TRACE_CONTEXT(AbstractVideoPlayer::videoWindowChanged, EVideoInternal);
TRACE_ENTRY("state %d", state());
m_window = m_videoOutput ? m_videoOutput->videoWindow() : 0;
+ if (m_videoOutput)
+ m_videoOutput->dump();
+
handleVideoWindowChanged();
TRACE_EXIT_0();
@@ -253,6 +256,9 @@ void MMF::AbstractVideoPlayer::MvpuoPrepareComplete(TInt aError)
TRAPD(err, getVideoClipParametersL(aError));
if (KErrNone == err) {
+ if (m_videoOutput)
+ m_videoOutput->dump();
+
maxVolumeChanged(m_player->MaxVolume());
if (m_videoOutput)
diff --git a/src/3rdparty/phonon/mmf/videooutput_dsa.cpp b/src/3rdparty/phonon/mmf/videooutput_dsa.cpp
index a5e2ac8..4f9ad7f 100644
--- a/src/3rdparty/phonon/mmf/videooutput_dsa.cpp
+++ b/src/3rdparty/phonon/mmf/videooutput_dsa.cpp
@@ -101,11 +101,17 @@ void MMF::DsaVideoOutput::ancestorMoved()
void MMF::DsaVideoOutput::beginNativePaintEvent(const QRect & /*controlRect*/)
{
+ TRACE_CONTEXT(DsaVideoOutput::beginNativePaintEvent, EVideoInternal);
+ TRACE_ENTRY_0();
+
emit beginVideoWindowNativePaint();
}
void MMF::DsaVideoOutput::endNativePaintEvent(const QRect & /*controlRect*/)
{
+ TRACE_CONTEXT(DsaVideoOutput::endNativePaintEvent, EVideoInternal);
+ TRACE_ENTRY_0();
+
// Ensure that draw ops are executed into the WSERV output framebuffer
CCoeEnv::Static()->WsSession().Flush();
diff --git a/src/3rdparty/phonon/mmf/videoplayer_dsa.cpp b/src/3rdparty/phonon/mmf/videoplayer_dsa.cpp
index 732d2d9..226d079 100644
--- a/src/3rdparty/phonon/mmf/videoplayer_dsa.cpp
+++ b/src/3rdparty/phonon/mmf/videoplayer_dsa.cpp
@@ -190,6 +190,9 @@ public:
void getDsaRegion(RWsSession &session, const RWindowBase &window)
{
+ // Dump complete window tree
+ session.LogCommand(RWsSession::ELoggingStatusDump);
+
RDirectScreenAccess dsa(session);
TInt err = dsa.Construct();
CDummyAO ao;
@@ -214,7 +217,7 @@ void getDsaRegion(RWsSession &session, const RWindowBase &window)
void MMF::DsaVideoPlayer::handleParametersChanged(VideoParameters parameters)
{
TRACE_CONTEXT(DsaVideoPlayer::handleParametersChanged, EVideoInternal);
- TRACE_ENTRY_0();
+ TRACE_ENTRY("parameters 0x%x", parameters);
if (!m_window)
return;
@@ -265,17 +268,32 @@ void MMF::DsaVideoPlayer::handleParametersChanged(VideoParameters parameters)
void MMF::DsaVideoPlayer::startDirectScreenAccess()
{
+ TRACE_CONTEXT(DsaVideoPlayer::startDirectScreenAccess, EVideoInternal);
+ TRACE_ENTRY("dsaActive %d", m_dsaActive);
+
+ int err = KErrNone;
+
if (!m_dsaActive) {
- TRAPD(err, m_player->StartDirectScreenAccessL());
+ TRAP(err, m_player->StartDirectScreenAccessL());
if (KErrNone == err)
m_dsaActive = true;
else
setError(tr("Video display error"), err);
}
+
+ if (m_videoOutput)
+ m_videoOutput->dump();
+
+ TRACE_EXIT("error %d", err);
}
bool MMF::DsaVideoPlayer::stopDirectScreenAccess()
{
+ TRACE_CONTEXT(DsaVideoPlayer::stopDirectScreenAccess, EVideoInternal);
+ TRACE_ENTRY("dsaActive %d", m_dsaActive);
+
+ int err = KErrNone;
+
const bool dsaWasActive = m_dsaActive;
if (m_dsaActive) {
TRAPD(err, m_player->StopDirectScreenAccessL());
@@ -284,6 +302,9 @@ bool MMF::DsaVideoPlayer::stopDirectScreenAccess()
else
setError(tr("Video display error"), err);
}
+
+ TRACE_EXIT("error %d", err);
+
return dsaWasActive;
}
diff --git a/src/3rdparty/webkit/JavaScriptCore/ChangeLog b/src/3rdparty/webkit/JavaScriptCore/ChangeLog
index 6446773..8932b3b 100644
--- a/src/3rdparty/webkit/JavaScriptCore/ChangeLog
+++ b/src/3rdparty/webkit/JavaScriptCore/ChangeLog
@@ -1,3 +1,31 @@
+2010-03-22 Siddharth Mathur <siddharth.mathur@nokia.com>
+
+ Reviewed by Laszlo Gombos.
+
+ [Symbian] More efficient aligned memory allocation for JSC Collector
+ https://bugs.webkit.org/show_bug.cgi?id=34350
+
+ * JavaScriptCore.pri: Added 2 new Symbian source files and HAL linkage
+
+ * runtime/Collector.cpp: Reduced port-specific code and added private data member
+ (JSC::Heap::Heap):
+ (JSC::Heap::~Heap):
+ (JSC::Heap::destroy):
+ (JSC::Heap::allocateBlock):
+ (JSC::Heap::freeBlockPtr):
+
+ * runtime/Collector.h: Added private data member
+
+ * wtf/symbian: Added.
+ * wtf/symbian/BlockAllocatorSymbian.cpp: Added.
+ (WTF::AlignedBlockAllocator::AlignedBlockAllocator): Helper class to allocate
+ aligned blocks more efficiently as required by Collector
+ (WTF::AlignedBlockAllocator::alloc):
+ (WTF::AlignedBlockAllocator::free):
+ (WTF::AlignedBlockAllocator::destroy):
+ (WTF::AlignedBlockAllocator::~AlignedBlockAllocator):
+ * wtf/symbian/BlockAllocatorSymbian.h: Added.
+
2010-02-09 Janne Koskinen <janne.p.koskinen@digia.com>
Reviewed by Laszlo Gombos.
diff --git a/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri
index bb531e5..a0f9f8e 100644
--- a/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri
+++ b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri
@@ -9,6 +9,10 @@ CONFIG(debug, debug|release) {
OBJECTS_DIR = obj/release
}
+symbian {
+ LIBS += -lhal
+}
+
INCLUDEPATH = \
$$PWD \
$$PWD/.. \
@@ -23,6 +27,7 @@ INCLUDEPATH = \
$$PWD/runtime \
$$PWD/wrec \
$$PWD/wtf \
+ $$PWD/wtf/symbian \
$$PWD/wtf/unicode \
$$PWD/yarr \
$$PWD/API \
@@ -243,6 +248,7 @@ SOURCES += \
profiler/TreeProfile.cpp \
wtf/DateMath.cpp \
wtf/FastMalloc.cpp \
+ wtf/symbian/BlockAllocatorSymbian.cpp \
wtf/Threading.cpp \
wtf/qt/MainThreadQt.cpp
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp
index 8b647a0..6626182 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp
@@ -52,11 +52,6 @@
#include <mach/thread_act.h>
#include <mach/vm_map.h>
-#elif PLATFORM(SYMBIAN)
-#include <e32std.h>
-#include <e32cmn.h>
-#include <unistd.h>
-
#elif PLATFORM(WIN_OS)
#include <windows.h>
@@ -124,11 +119,6 @@ const size_t ALLOCATIONS_PER_COLLECTION = 4000;
// a PIC branch in Mach-O binaries, see <rdar://problem/5971391>.
#define MIN_ARRAY_SIZE (static_cast<size_t>(14))
-#if PLATFORM(SYMBIAN)
-const size_t MAX_NUM_BLOCKS = 256; // Max size of collector heap set to 16 MB
-static RHeap* userChunk = 0;
-#endif
-
#if ENABLE(JSC_MULTIPLE_THREADS)
#if PLATFORM(DARWIN)
@@ -165,29 +155,11 @@ Heap::Heap(JSGlobalData* globalData)
, m_currentThreadRegistrar(0)
#endif
, m_globalData(globalData)
+#if PLATFORM(SYMBIAN)
+ , m_blockallocator(JSCCOLLECTOR_VIRTUALMEM_RESERVATION, BLOCK_SIZE)
+#endif
{
ASSERT(globalData);
-
-#if PLATFORM(SYMBIAN)
- // Symbian OpenC supports mmap but currently not the MAP_ANON flag.
- // Using fastMalloc() does not properly align blocks on 64k boundaries
- // and previous implementation was flawed/incomplete.
- // UserHeap::ChunkHeap allows allocation of continuous memory and specification
- // of alignment value for (symbian) cells within that heap.
- //
- // Clarification and mapping of terminology:
- // RHeap (created by UserHeap::ChunkHeap below) is continuos memory chunk,
- // which can dynamically grow up to 8 MB,
- // that holds all CollectorBlocks of this session (static).
- // Each symbian cell within RHeap maps to a 64kb aligned CollectorBlock.
- // JSCell objects are maintained as usual within CollectorBlocks.
- if (!userChunk) {
- userChunk = UserHeap::ChunkHeap(0, 0, MAX_NUM_BLOCKS * BLOCK_SIZE, BLOCK_SIZE, BLOCK_SIZE);
- if (!userChunk)
- CRASH();
- }
-#endif // PLATFORM(SYMBIAN)
-
memset(&primaryHeap, 0, sizeof(CollectorHeap));
memset(&numberHeap, 0, sizeof(CollectorHeap));
}
@@ -233,7 +205,9 @@ void Heap::destroy()
t = next;
}
#endif
-
+#if PLATFORM(SYMBIAN)
+ m_blockallocator.destroy();
+#endif
m_globalData = 0;
}
@@ -247,12 +221,9 @@ NEVER_INLINE CollectorBlock* Heap::allocateBlock()
// FIXME: tag the region as a JavaScriptCore heap when we get a registered VM tag: <rdar://problem/6054788>.
vm_map(current_task(), &address, BLOCK_SIZE, BLOCK_OFFSET_MASK, VM_FLAGS_ANYWHERE | VM_TAG_FOR_COLLECTOR_MEMORY, MEMORY_OBJECT_NULL, 0, FALSE, VM_PROT_DEFAULT, VM_PROT_DEFAULT, VM_INHERIT_DEFAULT);
#elif PLATFORM(SYMBIAN)
- // Allocate a 64 kb aligned CollectorBlock
- unsigned char* mask = reinterpret_cast<unsigned char*>(userChunk->Alloc(BLOCK_SIZE));
- if (!mask)
+ void* address = m_blockallocator.alloc();
+ if (!address)
CRASH();
- uintptr_t address = reinterpret_cast<uintptr_t>(mask);
-
memset(reinterpret_cast<void*>(address), 0, BLOCK_SIZE);
#elif PLATFORM(WINCE)
void* address = VirtualAlloc(NULL, BLOCK_SIZE, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE);
@@ -339,7 +310,7 @@ NEVER_INLINE void Heap::freeBlock(CollectorBlock* block)
#if PLATFORM(DARWIN) && !PLATFORM(QT)
vm_deallocate(current_task(), reinterpret_cast<vm_address_t>(block), BLOCK_SIZE);
#elif PLATFORM(SYMBIAN)
- userChunk->Free(reinterpret_cast<TAny*>(block));
+ m_blockallocator.free(reinterpret_cast<void*>(block));
#elif PLATFORM(WINCE)
VirtualFree(block, 0, MEM_RELEASE);
#elif PLATFORM(WIN_OS)
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.h b/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.h
index 9ca9d18..086e519 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.h
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.h
@@ -35,6 +35,10 @@
#include <pthread.h>
#endif
+#if PLATFORM(SYMBIAN)
+#include <wtf/symbian/BlockAllocatorSymbian.h>
+#endif
+
#define ASSERT_CLASS_FITS_IN_CELL(class) COMPILE_ASSERT(sizeof(class) <= CELL_SIZE, class_fits_in_cell)
namespace JSC {
@@ -157,6 +161,11 @@ namespace JSC {
pthread_key_t m_currentThreadRegistrar;
#endif
+#if PLATFORM(SYMBIAN)
+ // Allocates collector blocks with correct alignment
+ WTF::AlignedBlockAllocator m_blockallocator;
+#endif
+
JSGlobalData* m_globalData;
};
diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/symbian/BlockAllocatorSymbian.cpp b/src/3rdparty/webkit/JavaScriptCore/wtf/symbian/BlockAllocatorSymbian.cpp
new file mode 100644
index 0000000..cc8fd15
--- /dev/null
+++ b/src/3rdparty/webkit/JavaScriptCore/wtf/symbian/BlockAllocatorSymbian.cpp
@@ -0,0 +1,132 @@
+/*
+ * 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 PLATFORM(SYMBIAN)
+
+#include "BlockAllocatorSymbian.h"
+
+
+namespace WTF {
+
+/** Efficiently allocates blocks of size blockSize with blockSize alignment.
+ * Primarly designed for JSC Collector's needs.
+ * Not thread-safe.
+ */
+AlignedBlockAllocator::AlignedBlockAllocator(TUint32 reservationSize, TUint32 blockSize )
+ : m_reservation(reservationSize),
+ m_blockSize(blockSize)
+{
+
+ // 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/block size
+ m_reservation = SYMBIAN_ROUNDUPTOMULTIPLE(m_reservation, m_pageSize);
+ __ASSERT_ALWAYS(SYMBIAN_ROUNDUPTOMULTIPLE(m_blockSize, m_pageSize), User::Panic(_L("AlignedBlockAllocator1"), KErrArgument));
+
+ // Calculate max. bit flags we need to carve a reservationSize range into blockSize-sized blocks
+ m_map.numBits = m_reservation / m_blockSize;
+ const TUint32 bitsPerWord = 8*sizeof(TUint32);
+ const TUint32 numWords = (m_map.numBits + bitsPerWord -1) / bitsPerWord;
+
+ m_map.bits = new TUint32[numWords];
+ __ASSERT_ALWAYS(m_map.bits, User::Panic(_L("AlignedBlockAllocator2"), KErrNoMemory));
+ m_map.clearAll();
+
+ // 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_reservation , EOwnerProcess);
+ if (ret != KErrNone)
+ User::Panic(_L("AlignedBlockAllocator3"), ret);
+
+ // This is the offset to m_chunk.Base() required to make it m_blockSize-aligned
+ m_offset = SYMBIAN_ROUNDUPTOMULTIPLE(TUint32(m_chunk.Base()), m_blockSize) - TUint(m_chunk.Base());
+
+}
+
+void* AlignedBlockAllocator::alloc()
+{
+
+ TInt freeRam = 0;
+ void* address = 0;
+
+ // Look up first free slot in bit map
+ const TInt freeIdx = m_map.findFree();
+
+ // Pseudo OOM: We ate up the address space we reserved..
+ // ..even though the device may have free RAM left
+ if (freeIdx < 0)
+ return 0;
+
+ TInt ret = m_chunk.Commit(m_offset + (m_blockSize * freeIdx), m_blockSize);
+ if (ret != KErrNone)
+ return 0; // True OOM: Device didn't have physical RAM to spare
+
+ // Updated bit to mark region as in use.
+ m_map.set(freeIdx);
+
+ // Calculate address of committed region (block)
+ address = (void*)( (m_chunk.Base() + m_offset) + (TUint)(m_blockSize * freeIdx) );
+
+ return address;
+}
+
+void AlignedBlockAllocator::free(void* block)
+{
+ // Calculate index of block to be freed
+ TInt idx = TUint(static_cast<TUint8*>(block) - m_chunk.Base() - m_offset) / m_blockSize;
+
+ __ASSERT_DEBUG(idx >= 0 && idx < m_map.numBits, User::Panic(_L("AlignedBlockAllocator4"), KErrCorrupt)); // valid index check
+ __ASSERT_DEBUG(m_map.get(idx), User::Panic(_L("AlignedBlockAllocator5"), KErrCorrupt)); // in-use flag check
+
+ // Return committed region to system RAM pool (the physical RAM becomes usable by others)
+ TInt ret = m_chunk.Decommit(m_offset + m_blockSize * idx, m_blockSize);
+
+ // mark this available again
+ m_map.clear(idx);
+}
+
+void AlignedBlockAllocator::destroy()
+{
+ // release everything!
+ m_chunk.Decommit(0, m_chunk.MaxSize());
+ m_map.clearAll();
+}
+
+AlignedBlockAllocator::~AlignedBlockAllocator()
+{
+ destroy();
+ m_chunk.Close();
+ delete [] m_map.bits;
+}
+
+} // end of namespace
+
+#endif // SYMBIAN
diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/symbian/BlockAllocatorSymbian.h b/src/3rdparty/webkit/JavaScriptCore/wtf/symbian/BlockAllocatorSymbian.h
new file mode 100644
index 0000000..21422f6
--- /dev/null
+++ b/src/3rdparty/webkit/JavaScriptCore/wtf/symbian/BlockAllocatorSymbian.h
@@ -0,0 +1,120 @@
+/*
+ * 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 BlockAllocatorSymbian_h
+#define BlockAllocatorSymbian_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) )
+
+// Set sane defaults if -D<flagname=value> wasn't provided via compiler args
+#ifndef JSCCOLLECTOR_VIRTUALMEM_RESERVATION
+#if defined(__WINS__)
+ // Emulator has limited virtual address space
+ #define JSCCOLLECTOR_VIRTUALMEM_RESERVATION (4*1024*1024)
+#else
+ // HW has plenty of virtual addresses
+ #define JSCCOLLECTOR_VIRTUALMEM_RESERVATION (128*1024*1024)
+#endif
+#endif
+
+namespace WTF {
+
+/**
+ * Allocates contiguous region of size blockSize with blockSize-aligned address.
+ * blockSize 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 blockSize Size of a single allocation. Returned address will also be blockSize-aligned.
+ */
+class AlignedBlockAllocator {
+ public:
+ AlignedBlockAllocator(TUint32 reservationSize, TUint32 blockSize);
+ ~AlignedBlockAllocator();
+ void destroy();
+ void* alloc();
+ void free(void* data);
+
+ private:
+ RChunk m_chunk; // Symbian chunk that lets us reserve/commit/decommit
+ TUint m_offset; // offset of first committed region from base
+ TInt m_pageSize; // cached value of system page size, typically 4K on Symbian
+ TUint32 m_reservation;
+ TUint32 m_blockSize;
+
+ // Tracks comitted/decommitted state of a blockSize region
+ struct {
+
+ TUint32 *bits; // array of bit flags
+ TUint32 numBits; // number of regions to keep track of
+
+ bool get(TUint32 n) const
+ {
+ return !!(bits[n >> 5] & (1 << (n & 0x1F)));
+ }
+
+ void set(TUint32 n)
+ {
+ bits[n >> 5] |= (1 << (n & 0x1F));
+ }
+
+ void clear(TUint32 n)
+ {
+ bits[n >> 5] &= ~(1 << (n & 0x1F));
+ }
+
+ void clearAll()
+ {
+ for (TUint32 i = 0; i < numBits; i++)
+ clear(i);
+ }
+
+ TInt findFree() const
+ {
+ for (TUint32 i = 0; i < numBits; i++) {
+ if (!get(i))
+ return i;
+ }
+ return -1;
+ }
+
+ } m_map;
+
+};
+
+}
+
+#endif // end of BlockAllocatorSymbian_h
+
+
diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION
index a8889b3..4de7ad8 100644
--- a/src/3rdparty/webkit/VERSION
+++ b/src/3rdparty/webkit/VERSION
@@ -8,4 +8,4 @@ The commit imported was from the
and has the sha1 checksum
- e9151b11e974f0aa47fd40c225f88f35ced91496
+ ecfa4583e573ce4dff1f0df12f6bdba3022376e5
diff --git a/src/gui/dialogs/qfilesystemmodel.cpp b/src/gui/dialogs/qfilesystemmodel.cpp
index 2f1933c..8a6190f 100644
--- a/src/gui/dialogs/qfilesystemmodel.cpp
+++ b/src/gui/dialogs/qfilesystemmodel.cpp
@@ -1373,6 +1373,16 @@ QModelIndex QFileSystemModel::setRootPath(const QString &newPath)
if (!showDrives && !newPathDir.exists())
return d->index(rootPath());
+ //We remove the watcher on the previous path
+ if (!rootPath().isEmpty() && rootPath() != QLatin1String(".")) {
+ //This remove the watcher for the old rootPath
+ d->fileInfoGatherer.removePath(rootPath());
+ //This line "marks" the node as dirty, so the next fetchMore
+ //call on the path will ask the gatherer to install a watcher again
+ //But it doesn't re-fetch everything
+ d->node(rootPath())->populatedChildren = false;
+ }
+
// We have a new valid root path
d->rootDir = newPathDir;
QModelIndex newRootIndex;
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index e5471b0..65ccf72 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -5248,8 +5248,6 @@ void QGraphicsItemPrivate::addChild(QGraphicsItem *child)
needSortChildren = 1; // ### maybe 0
child->d_ptr->siblingIndex = children.size();
children.append(child);
- if (isObject)
- emit static_cast<QGraphicsObject *>(q_ptr)->childrenChanged();
}
/*!
@@ -5272,8 +5270,6 @@ void QGraphicsItemPrivate::removeChild(QGraphicsItem *child)
// the child is not guaranteed to be at the index after the list is sorted.
// (see ensureSortedChildren()).
child->d_ptr->siblingIndex = -1;
- if (isObject)
- emit static_cast<QGraphicsObject *>(q_ptr)->childrenChanged();
}
/*!
@@ -7481,88 +7477,6 @@ void QGraphicsObject::ungrabGesture(Qt::GestureType gesture)
}
}
-void QGraphicsItemPrivate::append(QDeclarativeListProperty<QGraphicsObject> *list, QGraphicsObject *item)
-{
- QGraphicsItemPrivate::get(item)->setParentItemHelper(static_cast<QGraphicsObject *>(list->object), /*newParentVariant=*/0, /*thisPointerVariant=*/0);
-}
-
-/*!
- Returns a list of this item's children.
-
- The items are sorted by stacking order. This takes into account both the
- items' insertion order and their Z-values.
-
-*/
-QDeclarativeListProperty<QGraphicsObject> QGraphicsItemPrivate::childrenList()
-{
- Q_Q(QGraphicsItem);
- if (isObject) {
- QGraphicsObject *that = static_cast<QGraphicsObject *>(q);
- return QDeclarativeListProperty<QGraphicsObject>(that, &children, QGraphicsItemPrivate::append);
- } else {
- //QGraphicsItem is not supported for this property
- return QDeclarativeListProperty<QGraphicsObject>();
- }
-}
-
-/*!
- \internal
- Returns the width of the item
- Reimplemented by QGraphicsWidget
-*/
-qreal QGraphicsItemPrivate::width() const
-{
- return 0;
-}
-
-/*!
- \internal
- Set the width of the item
- Reimplemented by QGraphicsWidget
-*/
-void QGraphicsItemPrivate::setWidth(qreal w)
-{
- Q_UNUSED(w);
-}
-
-/*!
- \internal
- Reset the width of the item
- Reimplemented by QGraphicsWidget
-*/
-void QGraphicsItemPrivate::resetWidth()
-{
-}
-
-/*!
- \internal
- Returns the height of the item
- Reimplemented by QGraphicsWidget
-*/
-qreal QGraphicsItemPrivate::height() const
-{
- return 0;
-}
-
-/*!
- \internal
- Set the height of the item
- Reimplemented by QGraphicsWidget
-*/
-void QGraphicsItemPrivate::setHeight(qreal h)
-{
- Q_UNUSED(h);
-}
-
-/*!
- \internal
- Reset the height of the item
- Reimplemented by QGraphicsWidget
-*/
-void QGraphicsItemPrivate::resetHeight()
-{
-}
-
/*!
\property QGraphicsObject::parent
\brief the parent of the item
@@ -7749,23 +7663,6 @@ void QGraphicsItemPrivate::resetHeight()
\sa scale, rotation, QGraphicsItem::transformOriginPoint()
*/
-/*!
- \fn void QGraphicsObject::widthChanged()
- \internal
-*/
-
-/*!
- \fn void QGraphicsObject::heightChanged()
- \internal
-*/
-
-/*!
-
- \fn QGraphicsObject::childrenChanged()
-
- This signal gets emitted whenever the children list changes
- \internal
-*/
/*!
\class QAbstractGraphicsShapeItem
diff --git a/src/gui/graphicsview/qgraphicsitem.h b/src/gui/graphicsview/qgraphicsitem.h
index 22be64c..56f94a2 100644
--- a/src/gui/graphicsview/qgraphicsitem.h
+++ b/src/gui/graphicsview/qgraphicsitem.h
@@ -547,10 +547,6 @@ class Q_GUI_EXPORT QGraphicsObject : public QObject, public QGraphicsItem
Q_PROPERTY(qreal rotation READ rotation WRITE setRotation NOTIFY rotationChanged)
Q_PROPERTY(qreal scale READ scale WRITE setScale NOTIFY scaleChanged)
Q_PROPERTY(QPointF transformOriginPoint READ transformOriginPoint WRITE setTransformOriginPoint)
- Q_PRIVATE_PROPERTY(QGraphicsItem::d_func(), QDeclarativeListProperty<QGraphicsObject> children READ childrenList DESIGNABLE false NOTIFY childrenChanged)
- Q_PRIVATE_PROPERTY(QGraphicsItem::d_func(), qreal width READ width WRITE setWidth NOTIFY widthChanged RESET resetWidth FINAL)
- Q_PRIVATE_PROPERTY(QGraphicsItem::d_func(), qreal height READ height WRITE setHeight NOTIFY heightChanged RESET resetHeight FINAL)
- Q_CLASSINFO("DefaultProperty", "children")
Q_INTERFACES(QGraphicsItem)
public:
QGraphicsObject(QGraphicsItem *parent = 0);
@@ -575,9 +571,6 @@ Q_SIGNALS:
void zChanged();
void rotationChanged();
void scaleChanged();
- void childrenChanged();
- void widthChanged();
- void heightChanged();
protected:
QGraphicsObject(QGraphicsItemPrivate &dd, QGraphicsItem *parent, QGraphicsScene *scene);
diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h
index 73b8f04..c256f63 100644
--- a/src/gui/graphicsview/qgraphicsitem_p.h
+++ b/src/gui/graphicsview/qgraphicsitem_p.h
@@ -71,63 +71,6 @@ QT_BEGIN_NAMESPACE
class QGraphicsItemPrivate;
-#ifndef QDECLARATIVELISTPROPERTY
-#define QDECLARATIVELISTPROPERTY
-template<typename T>
-class QDeclarativeListProperty {
-public:
- typedef void (*AppendFunction)(QDeclarativeListProperty<T> *, T*);
- typedef int (*CountFunction)(QDeclarativeListProperty<T> *);
- typedef T *(*AtFunction)(QDeclarativeListProperty<T> *, int);
- typedef void (*ClearFunction)(QDeclarativeListProperty<T> *);
-
- QDeclarativeListProperty()
- : object(0), data(0), append(0), count(0), at(0), clear(0), dummy1(0), dummy2(0) {}
- QDeclarativeListProperty(QObject *o, QList<T *> &list)
- : object(o), data(&list), append(qlist_append), count(qlist_count), at(qlist_at),
- clear(qlist_clear), dummy1(0), dummy2(0) {}
- QDeclarativeListProperty(QObject *o, void *d, AppendFunction a, CountFunction c = 0, AtFunction t = 0,
- ClearFunction r = 0)
- : object(o), data(d), append(a), count(c), at(t), clear(r), dummy1(0), dummy2(0) {}
-
- bool operator==(const QDeclarativeListProperty &o) const {
- return object == o.object &&
- data == o.data &&
- append == o.append &&
- count == o.count &&
- at == o.at &&
- clear == o.clear;
- }
-
- QObject *object;
- void *data;
-
- AppendFunction append;
-
- CountFunction count;
- AtFunction at;
-
- ClearFunction clear;
-
- void *dummy1;
- void *dummy2;
-
-private:
- static void qlist_append(QDeclarativeListProperty *p, T *v) {
- ((QList<T *> *)p->data)->append(v);
- }
- static int qlist_count(QDeclarativeListProperty *p) {
- return ((QList<T *> *)p->data)->count();
- }
- static T *qlist_at(QDeclarativeListProperty *p, int idx) {
- return ((QList<T *> *)p->data)->at(idx);
- }
- static void qlist_clear(QDeclarativeListProperty *p) {
- return ((QList<T *> *)p->data)->clear();
- }
-};
-#endif
-
class QGraphicsItemCache
{
public:
@@ -295,7 +238,6 @@ public:
void resolveDepth();
void addChild(QGraphicsItem *child);
void removeChild(QGraphicsItem *child);
- QDeclarativeListProperty<QGraphicsObject> childrenList();
void setParentItemHelper(QGraphicsItem *parent, const QVariant *newParentVariant,
const QVariant *thisPointerVariant);
void childrenBoundingRectHelper(QTransform *x, QRectF *rect);
@@ -482,21 +424,11 @@ public:
inline QTransform transformToParent() const;
inline void ensureSortedChildren();
- static void append(QDeclarativeListProperty<QGraphicsObject> *list, QGraphicsObject *item);
static inline bool insertionOrder(QGraphicsItem *a, QGraphicsItem *b);
void ensureSequentialSiblingIndex();
inline void sendScenePosChange();
virtual void siblingOrderChange();
- // Private Properties
- virtual qreal width() const;
- virtual void setWidth(qreal);
- virtual void resetWidth();
-
- virtual qreal height() const;
- virtual void setHeight(qreal);
- virtual void resetHeight();
-
QRectF childrenBoundingRect;
QRectF needsRepaint;
QMap<QWidget *, QRect> paintedViewBoundingRects;
diff --git a/src/gui/graphicsview/qgraphicswidget.cpp b/src/gui/graphicsview/qgraphicswidget.cpp
index c5ec01c..edb648b 100644
--- a/src/gui/graphicsview/qgraphicswidget.cpp
+++ b/src/gui/graphicsview/qgraphicswidget.cpp
@@ -324,14 +324,6 @@ void QGraphicsWidget::resize(const QSizeF &size)
*/
/*!
-
- \fn QGraphicsWidget::geometryChanged()
-
- This signal gets emitted whenever the geometry of the item changes
- \internal
-*/
-
-/*!
\property QGraphicsWidget::geometry
\brief the geometry of the widget
@@ -392,17 +384,13 @@ void QGraphicsWidget::setGeometry(const QRectF &rect)
}
QSizeF oldSize = size();
QGraphicsLayoutItem::setGeometry(newGeom);
- emit geometryChanged();
+
// Send resize event
bool resized = newGeom.size() != oldSize;
if (resized) {
QGraphicsSceneResizeEvent re;
re.setOldSize(oldSize);
re.setNewSize(newGeom.size());
- if (oldSize.width() != newGeom.size().width())
- emit widthChanged();
- if (oldSize.height() != newGeom.size().height())
- emit heightChanged();
QApplication::sendEvent(this, &re);
}
}
diff --git a/src/gui/graphicsview/qgraphicswidget_p.cpp b/src/gui/graphicsview/qgraphicswidget_p.cpp
index 6e397b6..1835c74 100644
--- a/src/gui/graphicsview/qgraphicswidget_p.cpp
+++ b/src/gui/graphicsview/qgraphicswidget_p.cpp
@@ -44,7 +44,6 @@
#ifndef QT_NO_GRAPHICSVIEW
#include <QtCore/qdebug.h>
-#include <QtCore/qnumeric.h>
#include "qgraphicswidget_p.h"
#include "qgraphicslayout.h"
#include "qgraphicsscene_p.h"
@@ -826,56 +825,6 @@ void QGraphicsWidgetPrivate::setLayout_helper(QGraphicsLayout *l)
}
}
-qreal QGraphicsWidgetPrivate::width() const
-{
- Q_Q(const QGraphicsWidget);
- return q->geometry().width();
-}
-
-void QGraphicsWidgetPrivate::setWidth(qreal w)
-{
- if (qIsNaN(w))
- return;
- Q_Q(QGraphicsWidget);
- if (q->geometry().width() == w)
- return;
-
- QRectF oldGeom = q->geometry();
-
- q->setGeometry(QRectF(q->x(), q->y(), w, height()));
-}
-
-void QGraphicsWidgetPrivate::resetWidth()
-{
- Q_Q(QGraphicsWidget);
- q->setGeometry(QRectF(q->x(), q->y(), 0, height()));
-}
-
-qreal QGraphicsWidgetPrivate::height() const
-{
- Q_Q(const QGraphicsWidget);
- return q->geometry().height();
-}
-
-void QGraphicsWidgetPrivate::setHeight(qreal h)
-{
- if (qIsNaN(h))
- return;
- Q_Q(QGraphicsWidget);
- if (q->geometry().height() == h)
- return;
-
- QRectF oldGeom = q->geometry();
-
- q->setGeometry(QRectF(q->x(), q->y(), width(), h));
-}
-
-void QGraphicsWidgetPrivate::resetHeight()
-{
- Q_Q(QGraphicsWidget);
- q->setGeometry(QRectF(q->x(), q->y(), width(), 0));
-}
-
QT_END_NAMESPACE
#endif //QT_NO_GRAPHICSVIEW
diff --git a/src/gui/graphicsview/qgraphicswidget_p.h b/src/gui/graphicsview/qgraphicswidget_p.h
index 7116a23..3ab8737 100644
--- a/src/gui/graphicsview/qgraphicswidget_p.h
+++ b/src/gui/graphicsview/qgraphicswidget_p.h
@@ -131,15 +131,6 @@ public:
void windowFrameHoverLeaveEvent(QGraphicsSceneHoverEvent *event);
bool hasDecoration() const;
- // Private Properties
- qreal width() const;
- void setWidth(qreal);
- void resetWidth();
-
- qreal height() const;
- void setHeight(qreal);
- void resetHeight();
-
// State
inline int attributeToBitIndex(Qt::WidgetAttribute att) const
{
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp
index 000696c..f49acc4 100644
--- a/src/gui/styles/qs60style.cpp
+++ b/src/gui/styles/qs60style.cpp
@@ -2433,7 +2433,7 @@ QSize QS60Style::sizeFromContents(ContentsType ct, const QStyleOption *opt,
const int contentHeight =
qMax(qMax(iconHeight, decoratorHeight) + pixelMetric(PM_ButtonMargin),
textHeight + 2*pixelMetric(PM_ButtonMargin));
- sz.setHeight(contentHeight);
+ sz.setHeight(qMax(sz.height(), contentHeight));
sz += QSize(2 * pixelMetric(PM_ButtonMargin), 0);
}
break;
diff --git a/src/gui/text/qfontengine_win.cpp b/src/gui/text/qfontengine_win.cpp
index 93a7c75..a805612 100644
--- a/src/gui/text/qfontengine_win.cpp
+++ b/src/gui/text/qfontengine_win.cpp
@@ -654,6 +654,7 @@ static const ushort char_table[] = {
static const int char_table_entries = sizeof(char_table)/sizeof(ushort);
+#ifndef Q_CC_MINGW
void QFontEngineWin::getGlyphBearings(glyph_t glyph, qreal *leftBearing, qreal *rightBearing)
{
HDC hdc = shared_dc();
@@ -678,6 +679,7 @@ void QFontEngineWin::getGlyphBearings(glyph_t glyph, qreal *leftBearing, qreal *
}
#endif
}
+#endif // Q_CC_MINGW
qreal QFontEngineWin::minLeftBearing() const
{
diff --git a/src/gui/text/qfontengine_win_p.h b/src/gui/text/qfontengine_win_p.h
index f19e48e..68b53b5 100644
--- a/src/gui/text/qfontengine_win_p.h
+++ b/src/gui/text/qfontengine_win_p.h
@@ -106,7 +106,9 @@ public:
virtual QImage alphaMapForGlyph(glyph_t, const QTransform &xform);
virtual QImage alphaRGBMapForGlyph(glyph_t t, int margin, const QTransform &xform);
+#ifndef Q_CC_MINGW
virtual void getGlyphBearings(glyph_t glyph, qreal *leftBearing = 0, qreal *rightBearing = 0);
+#endif
int getGlyphIndexes(const QChar *ch, int numChars, QGlyphLayout *glyphs, bool mirrored) const;
void getCMap();
diff --git a/src/openvg/qpaintengine_vg.cpp b/src/openvg/qpaintengine_vg.cpp
index b3b923d..d1e899a 100644
--- a/src/openvg/qpaintengine_vg.cpp
+++ b/src/openvg/qpaintengine_vg.cpp
@@ -182,6 +182,7 @@ public:
qreal penScale; // Pen scaling factor from "transform".
QTransform pathTransform; // Calculated VG path transformation.
+ QTransform glyphTransform; // Calculated VG glyph transformation.
QTransform imageTransform; // Calculated VG image transformation.
bool pathTransformSet; // True if path transform set in the VG context.
@@ -499,24 +500,31 @@ extern bool qt_scaleForTransform(const QTransform &transform, qreal *scale);
void QVGPaintEnginePrivate::updateTransform(QPaintDevice *pdev)
{
- VGfloat devh = pdev->height() - 1;
+ VGfloat devh = pdev->height();
// Construct the VG transform by combining the Qt transform with
// the following viewport transformation:
- // | 1 0 0 | | 1 0 0.5 | | 1 0 0.5 |
- // | 0 -1 devh | * | 0 1 -0.5 | = | 0 -1 (0.5 + devh) |
- // | 0 0 1 | | 0 0 1 | | 0 0 1 |
+ // | 1 0 0 |
+ // | 0 -1 devh |
+ // | 0 0 1 |
+ // The glyph transform uses a slightly different transformation:
+ // | 1 0 0 | | 1 0 0.5 | | 1 0 0.5 |
+ // | 0 -1 devh - 1 | * | 0 1 -0.5 | = | 0 -1 (devh - 0.5) |
+ // | 0 0 1 | | 0 0 1 | | 0 0 1 |
// The full VG transform is effectively:
// 1. Apply the user's transformation matrix.
- // 2. Translate by (0.5, -0.5) to correct for Qt and VG putting
- // the centre of the pixel at different positions.
+ // 2. Translate glyphs by an extra (0.5, -0.5).
// 3. Flip the co-ordinate system upside down.
QTransform viewport(1.0f, 0.0f, 0.0f,
0.0f, -1.0f, 0.0f,
- 0.5f, devh + 0.5f, 1.0f);
+ 0.0f, devh, 1.0f);
+ QTransform gviewport(1.0f, 0.0f, 0.0f,
+ 0.0f, -1.0f, 0.0f,
+ 0.5f, devh - 0.5f, 1.0f);
// Compute the path transform and determine if it is projective.
pathTransform = transform * viewport;
+ glyphTransform = transform * gviewport;
bool projective = (pathTransform.m13() != 0.0f ||
pathTransform.m23() != 0.0f ||
pathTransform.m33() != 1.0f);
@@ -525,6 +533,7 @@ void QVGPaintEnginePrivate::updateTransform(QPaintDevice *pdev)
// so we will have to convert the co-ordinates ourselves.
// Change the matrix to just the viewport transformation.
pathTransform = viewport;
+ glyphTransform = gviewport;
simpleTransform = false;
} else {
simpleTransform = true;
@@ -532,13 +541,7 @@ void QVGPaintEnginePrivate::updateTransform(QPaintDevice *pdev)
pathTransformSet = false;
// The image transform is always the full transformation,
- // because it can be projective. It also does not need the
- // (0.5, -0.5) translation because vgDrawImage() implicitly
- // adds 0.5 to each co-ordinate.
- QTransform viewport2(1.0f, 0.0f, 0.0f,
- 0.0f, -1.0f, 0.0f,
- 0.0f, devh + 1, 1.0f);
- imageTransform = transform * viewport2;
+ imageTransform = transform * viewport;
// Calculate the scaling factor to use for turning cosmetic pens
// into ordinary non-cosmetic pens.
@@ -3331,7 +3334,7 @@ void QVGPaintEngine::drawStaticTextItem(QStaticTextItem *textItem)
}
// Set the transformation to use for drawing the current glyphs.
- QTransform glyphTransform(d->pathTransform);
+ QTransform glyphTransform(d->glyphTransform);
glyphTransform.translate(p.x(), p.y());
#if defined(QVG_NO_IMAGE_GLYPHS)
glyphTransform.scale(glyphCache->scaleX, glyphCache->scaleY);
@@ -3669,10 +3672,10 @@ void QVGCompositionHelper::fillBackground
} else {
// Set the path transform to the default viewport transformation.
- VGfloat devh = screenSize.height() - 1;
+ VGfloat devh = screenSize.height();
QTransform viewport(1.0f, 0.0f, 0.0f,
0.0f, -1.0f, 0.0f,
- -0.5f, devh + 0.5f, 1.0f);
+ 0.0f, devh, 1.0f);
d->setTransform(VG_MATRIX_PATH_USER_TO_SURFACE, viewport);
// Set the brush to use to fill the background.
@@ -3708,10 +3711,10 @@ void QVGCompositionHelper::drawCursorPixmap
}
// Set the image transformation and modes.
- VGfloat devh = screenSize.height() - 1;
+ VGfloat devh = screenSize.height();
QTransform transform(1.0f, 0.0f, 0.0f,
0.0f, -1.0f, 0.0f,
- -0.5f, devh + 0.5f, 1.0f);
+ 0.0f, devh, 1.0f);
transform.translate(offset.x(), offset.y());
d->setTransform(VG_MATRIX_IMAGE_USER_TO_SURFACE, transform);
d->setImageMode(VG_DRAW_IMAGE_NORMAL);
diff --git a/src/xmlpatterns/api/qxmlresultitems.cpp b/src/xmlpatterns/api/qxmlresultitems.cpp
index c474082..98c5bdc 100644
--- a/src/xmlpatterns/api/qxmlresultitems.cpp
+++ b/src/xmlpatterns/api/qxmlresultitems.cpp
@@ -70,6 +70,10 @@ QT_BEGIN_NAMESPACE
sequence and returns it, and current() always returns the QXmlItem
that next() returned the last time it was called.
+ \note When using the QXmlResultItems overload of QXmlQuery::evaluateTo()
+ to execute a query, it is advisable to create a new instance of this
+ class for each new set of results rather than reusing an old instance.
+
\sa QXmlItem::isNode(), QXmlItem::isAtomicValue(), QXmlNodeModelIndex
*/
diff --git a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp
index 4c0bc78..2a1c55a 100644
--- a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp
+++ b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp
@@ -111,8 +111,6 @@ private slots:
void fontPropagationSceneChange();
void geometry_data();
void geometry();
- void width();
- void height();
void getContentsMargins_data();
void getContentsMargins();
void initStyleOption_data();
@@ -768,42 +766,14 @@ void tst_QGraphicsWidget::geometry()
{
SubQGraphicsWidget widget;
QCOMPARE(widget.geometry(), QRectF(widget.pos(), widget.size()));
- QSignalSpy spy(&widget, SIGNAL(geometryChanged()));
+
QFETCH(QPointF, pos);
QFETCH(QSizeF, size);
widget.setPos(pos);
widget.resize(size);
- if (!size.isNull())
- QCOMPARE(spy.count(), 1);
QCOMPARE(widget.geometry(), QRectF(pos, size));
}
-void tst_QGraphicsWidget::width()
-{
- QGraphicsWidget w;
- QCOMPARE(w.property("width").toReal(), qreal(0));
- QSignalSpy spy(&w, SIGNAL(widthChanged()));
- w.setProperty("width", qreal(50));
- QCOMPARE(w.property("width").toReal(), qreal(50));
- QCOMPARE(spy.count(), 1);
- //calling old school setGeometry should work too
- w.setGeometry(0, 0, 200, 200);
- QCOMPARE(spy.count(), 2);
-}
-
-void tst_QGraphicsWidget::height()
-{
- QGraphicsWidget w;
- QCOMPARE(w.property("height").toReal(), qreal(0));
- QSignalSpy spy(&w, SIGNAL(heightChanged()));
- w.setProperty("height", qreal(50));
- QCOMPARE(w.property("height").toReal(), qreal(50));
- QCOMPARE(spy.count(), 1);
- //calling old school setGeometry should work too
- w.setGeometry(0, 0, 200, 200);
- QCOMPARE(spy.count(), 2);
-}
-
void tst_QGraphicsWidget::getContentsMargins_data()
{
QTest::addColumn<qreal>("left");
diff --git a/tests/auto/qsharedpointer/externaltests.cpp b/tests/auto/qsharedpointer/externaltests.cpp
index 7eae3c1..e685cd3 100644
--- a/tests/auto/qsharedpointer/externaltests.cpp
+++ b/tests/auto/qsharedpointer/externaltests.cpp
@@ -140,7 +140,6 @@ namespace QTest {
QExternalTestPrivate()
: qtModules(QExternalTest::QtCore | QExternalTest::QtGui | QExternalTest::QtTest),
appType(QExternalTest::AutoApplication),
- debugMode(true),
exitCode(-1)
{
}
@@ -156,7 +155,6 @@ namespace QTest {
QByteArray programHeader;
QExternalTest::QtModules qtModules;
QExternalTest::ApplicationType appType;
- bool debugMode;
QString temporaryDir;
QByteArray sourceCode;
@@ -190,16 +188,6 @@ namespace QTest {
delete d;
}
- bool QExternalTest::isDebugMode() const
- {
- return d->debugMode;
- }
-
- void QExternalTest::setDebugMode(bool enable)
- {
- d->debugMode = enable;
- }
-
QList<QByteArray> QExternalTest::qmakeSettings() const
{
return d->qmakeLines;
@@ -524,10 +512,11 @@ namespace QTest {
"INCLUDEPATH += . ");
projectFile.write(QFile::encodeName(QDir::currentPath()));
- if (debugMode)
+#ifndef QT_NO_DEBUG
projectFile.write("\nCONFIG += debug\n");
- else
+#else
projectFile.write("\nCONFIG += release\n");
+#endif
QByteArray extraSources = QFile::encodeName(extraProgramSources.join(" "));
if (!extraSources.isEmpty()) {
diff --git a/tests/auto/qsharedpointer/externaltests.h b/tests/auto/qsharedpointer/externaltests.h
index 5e79a7d..1170cd5 100644
--- a/tests/auto/qsharedpointer/externaltests.h
+++ b/tests/auto/qsharedpointer/externaltests.h
@@ -91,9 +91,6 @@ namespace QTest {
QApplicationGuiServer
};
- bool isDebugMode() const;
- void setDebugMode(bool enable);
-
QList<QByteArray> qmakeSettings() const;
void setQmakeSettings(const QList<QByteArray> &settings);
diff --git a/tests/auto/qsharedpointer/tst_qsharedpointer.cpp b/tests/auto/qsharedpointer/tst_qsharedpointer.cpp
index 07df707..4e23cb1 100644
--- a/tests/auto/qsharedpointer/tst_qsharedpointer.cpp
+++ b/tests/auto/qsharedpointer/tst_qsharedpointer.cpp
@@ -1817,11 +1817,11 @@ void tst_QSharedPointer::invalidConstructs()
#endif
QTest::QExternalTest test;
- test.setDebugMode(true);
test.setQtModules(QTest::QExternalTest::QtCore);
test.setExtraProgramSources(QStringList() << SRCDIR "forwarddeclared.cpp");
test.setProgramHeader(
"#define QT_SHAREDPOINTER_TRACK_POINTERS\n"
+ "#define QT_DEBUG\n"
"#include <QtCore/qsharedpointer.h>\n"
"#include <QtCore/qcoreapplication.h>\n"
"\n"
diff --git a/tools/linguist/linguist.pro b/tools/linguist/linguist.pro
index e1c8a63..85ecd5a 100644
--- a/tools/linguist/linguist.pro
+++ b/tools/linguist/linguist.pro
@@ -4,5 +4,3 @@ SUBDIRS = \
lrelease \
lupdate \
lconvert
-CONFIG += ordered
-