summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/3rdparty/s60/eiksoftkeyimage.h17
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/ChangeLog13
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/JSValue.cpp4
-rw-r--r--src/3rdparty/webkit/VERSION2
-rw-r--r--src/3rdparty/webkit/WebCore/ChangeLog12
-rw-r--r--src/3rdparty/webkit/WebCore/WebCore.pro4
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/KURLQt.cpp6
-rw-r--r--src/corelib/arch/sparc/arch.pri2
-rw-r--r--src/corelib/codecs/qsimplecodec.cpp2
-rw-r--r--src/corelib/codecs/qtextcodec.cpp46
-rw-r--r--src/corelib/global/qglobal.cpp2
-rw-r--r--src/corelib/global/qglobal.h3
-rw-r--r--src/corelib/global/qnamespace.qdoc6
-rw-r--r--src/corelib/tools/qstring.h2
-rw-r--r--src/declarative/debugger/qmldebugservice.cpp33
-rw-r--r--src/declarative/debugger/qmldebugservice_p.h4
-rw-r--r--src/declarative/graphicsitems/graphicsitems.pri3
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsanchors.cpp2
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsanimatedimage.cpp1
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsborderimage.cpp2
-rw-r--r--src/declarative/graphicsitems/qmlgraphicseffects.cpp13
-rw-r--r--src/declarative/graphicsitems/qmlgraphicseffects_p.h65
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsevents.cpp3
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsflickable.cpp37
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsflickable_p_p.h32
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsflipable.cpp2
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsfocuspanel.cpp2
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsfocusscope.cpp1
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsgraphicsobjectcontainer.cpp3
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsgridview.cpp61
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsgridview_p.h58
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsimage.cpp2
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsitem.cpp210
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsitem.h2
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsitem_p.h201
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsitemsmodule.cpp164
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsitemsmodule_p.h63
-rw-r--r--src/declarative/graphicsitems/qmlgraphicslayoutitem.cpp2
-rw-r--r--src/declarative/graphicsitems/qmlgraphicslistview.cpp71
-rw-r--r--src/declarative/graphicsitems/qmlgraphicslistview_p.h67
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsloader.cpp2
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsmouseregion.cpp3
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsparticles.cpp10
-rw-r--r--src/declarative/graphicsitems/qmlgraphicspath.cpp8
-rw-r--r--src/declarative/graphicsitems/qmlgraphicspathview.cpp3
-rw-r--r--src/declarative/graphicsitems/qmlgraphicspositioners.cpp4
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsrectangle.cpp4
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsrepeater.cpp2
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsscalegrid.cpp1
-rw-r--r--src/declarative/graphicsitems/qmlgraphicstext.cpp1
-rw-r--r--src/declarative/graphicsitems/qmlgraphicstextedit.cpp1
-rw-r--r--src/declarative/graphicsitems/qmlgraphicstextinput.cpp6
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsvisualitemmodel.cpp42
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsvisualitemmodel_p.h39
-rw-r--r--src/declarative/graphicsitems/qmlgraphicswebview.cpp28
-rw-r--r--src/declarative/graphicsitems/qmlgraphicswebview_p.h26
-rw-r--r--src/declarative/qml/qmlcomponent.cpp1
-rw-r--r--src/declarative/qml/qmlengine.cpp8
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp5
-rw-r--r--src/gui/image/qicon.cpp17
-rw-r--r--src/gui/image/qimagereader.cpp28
-rw-r--r--src/gui/image/qpixmapfilter.cpp17
-rw-r--r--src/gui/itemviews/qlistview.cpp2
-rw-r--r--src/gui/kernel/qapplication.cpp14
-rw-r--r--src/gui/kernel/qapplication_mac.mm6
-rw-r--r--src/gui/kernel/qapplication_p.h2
-rw-r--r--src/gui/kernel/qapplication_s60.cpp11
-rw-r--r--src/gui/kernel/qapplication_win.cpp28
-rw-r--r--src/gui/kernel/qapplication_x11.cpp8
-rw-r--r--src/gui/kernel/qclipboard_mac.cpp12
-rw-r--r--src/gui/kernel/qcocoaview_mac.mm5
-rw-r--r--src/gui/kernel/qkeymapper_x11.cpp14
-rw-r--r--src/gui/kernel/qsoftkeymanager_s60.cpp16
-rw-r--r--src/gui/kernel/qsoftkeymanager_s60_p.h1
-rw-r--r--src/gui/kernel/qwidget.cpp4
-rw-r--r--src/gui/kernel/qwidget_p.h5
-rw-r--r--src/gui/kernel/qwidget_s60.cpp2
-rw-r--r--src/gui/painting/qdrawhelper.cpp36
-rw-r--r--src/gui/painting/qdrawhelper_mmx_p.h45
-rw-r--r--src/gui/painting/qdrawhelper_p.h3
-rw-r--r--src/gui/painting/qpaintengine_x11.cpp3
-rw-r--r--src/gui/painting/qpainter.cpp23
-rw-r--r--src/gui/painting/qwindowsurface_s60.cpp11
-rw-r--r--src/gui/text/qfont.cpp5
-rw-r--r--src/gui/text/qfontengine_s60.cpp2
-rw-r--r--src/gui/text/qtextlayout.cpp6
-rw-r--r--src/gui/util/qsystemtrayicon_p.h2
-rw-r--r--src/gui/util/qsystemtrayicon_x11.cpp2
-rw-r--r--src/gui/widgets/qabstractslider.cpp6
-rw-r--r--src/gui/widgets/qabstractspinbox.h2
-rw-r--r--src/gui/widgets/qcombobox.h2
-rw-r--r--src/gui/widgets/qlinecontrol.cpp2
-rw-r--r--src/gui/widgets/qmenu.h2
-rw-r--r--src/gui/widgets/qscrollbar.cpp2
-rw-r--r--src/multimedia/video/qabstractvideobuffer.cpp1
-rw-r--r--src/multimedia/video/qabstractvideosurface.cpp1
-rw-r--r--src/multimedia/video/qvideoframe.cpp1
-rw-r--r--src/multimedia/video/qvideosurfaceformat.cpp1
-rw-r--r--src/network/access/qhttpnetworkconnectionchannel.cpp27
-rw-r--r--src/network/access/qhttpnetworkreply.cpp68
-rw-r--r--src/network/access/qnetworkaccessmanager.cpp2
-rw-r--r--src/network/access/qnetworkcookie.h2
-rw-r--r--src/network/access/qnetworkcookiejar.h2
-rw-r--r--src/opengl/qgl.cpp9
-rw-r--r--src/opengl/qgl_mac.mm2
-rw-r--r--src/opengl/qgl_p.h4
-rw-r--r--src/opengl/qglpixelbuffer_x11.cpp6
-rw-r--r--src/opengl/qglpixmapfilter.cpp1
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp11
-rw-r--r--src/qt3support/dialogs/q3filedialog.cpp40
-rw-r--r--src/qt3support/itemviews/q3iconview.cpp13
-rw-r--r--src/qt3support/itemviews/q3listview.cpp3
-rw-r--r--src/s60installs/bwins/QtGuiu.def53
-rw-r--r--src/s60installs/bwins/QtOpenVGu.def29
-rw-r--r--src/s60installs/eabi/QtOpenVGu.def23
-rw-r--r--src/s60installs/qt.iby3
-rw-r--r--src/sql/drivers/sqlite/qsql_sqlite.cpp47
-rw-r--r--src/sql/kernel/qsqldatabase.cpp1
-rw-r--r--src/xmlpatterns/data/qatomicvalue.cpp2
-rw-r--r--src/xmlpatterns/schema/qxsdschemaparser.cpp2
120 files changed, 1344 insertions, 775 deletions
diff --git a/src/3rdparty/s60/eiksoftkeyimage.h b/src/3rdparty/s60/eiksoftkeyimage.h
index 84f6108a..a658421 100644
--- a/src/3rdparty/s60/eiksoftkeyimage.h
+++ b/src/3rdparty/s60/eiksoftkeyimage.h
@@ -39,23 +39,6 @@
**
****************************************************************************/
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Changes cba button's label to image.
-*
-*/
-
#ifndef EIKSOFTKEYIMAGE_H
#define EIKSOFTKEYIMAGE_H
diff --git a/src/3rdparty/webkit/JavaScriptCore/ChangeLog b/src/3rdparty/webkit/JavaScriptCore/ChangeLog
index b943840..6446773 100644
--- a/src/3rdparty/webkit/JavaScriptCore/ChangeLog
+++ b/src/3rdparty/webkit/JavaScriptCore/ChangeLog
@@ -1,3 +1,16 @@
+2010-02-09 Janne Koskinen <janne.p.koskinen@digia.com>
+
+ Reviewed by Laszlo Gombos.
+
+ [Qt] use nanval() for Symbian as nonInlineNaN
+ https://bugs.webkit.org/show_bug.cgi?id=34170
+
+ numeric_limits<double>::quiet_NaN is broken in Symbian
+ causing NaN to be evaluated as a number.
+
+ * runtime/JSValue.cpp:
+ (JSC::nonInlineNaN):
+
2010-01-07 Norbert Leser <norbert.leser@nokia.com>
Reviewed by NOBODY (OOPS!).
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/JSValue.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/JSValue.cpp
index 699c1cd..bafb85b 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/JSValue.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/JSValue.cpp
@@ -174,7 +174,11 @@ uint32_t toUInt32SlowCase(double d, bool& ok)
NEVER_INLINE double nonInlineNaN()
{
+#if PLATFORM(SYMBIAN)
+ return nanval();
+#else
return std::numeric_limits<double>::quiet_NaN();
+#endif
}
} // namespace JSC
diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION
index 4348cbc..cc0e04f 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
- da5d96a26e80162027bc95ce7e5725fe4b277ff7
+ ffae5e11181a3961193fa21ea405851cad714d4b
diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog
index 1f6f290..61c2227 100644
--- a/src/3rdparty/webkit/WebCore/ChangeLog
+++ b/src/3rdparty/webkit/WebCore/ChangeLog
@@ -1,3 +1,15 @@
+2010-01-14 Diego Gonzalez <diego.gonzalez@openbossa.org>
+
+ Reviewed by Kenneth Christiansen.
+
+ [Qt] Missing fileSystemPath() method in Qt KURL implementation
+ https://bugs.webkit.org/show_bug.cgi?id=33614
+
+ No new tests.
+
+ * platform/qt/KURLQt.cpp:
+ (WebCore::KURL::fileSystemPath):
+
2010-02-01 Andreas Kling <andreas.kling@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro
index 7b0366d..c9b622a 100644
--- a/src/3rdparty/webkit/WebCore/WebCore.pro
+++ b/src/3rdparty/webkit/WebCore/WebCore.pro
@@ -26,9 +26,7 @@ symbian: {
# RO text (code) section in qtwebkit.dll exceeds allocated space for gcce udeb target.
# Move RW-section base address to start from 0xE00000 instead of the toolchain default 0x400000.
- MMP_RULES += "LINKEROPTION armcc --rw-base 0xE00000"
- MMP_RULES += ALWAYS_BUILD_AS_ARM
- QMAKE_CXXFLAGS.ARMCC += -OTime -O3
+ QMAKE_LFLAGS.ARMCC += --rw-base 0xE00000
}
include($$PWD/../WebKit.pri)
diff --git a/src/3rdparty/webkit/WebCore/platform/qt/KURLQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/KURLQt.cpp
index 0763fe0..1f62006 100644
--- a/src/3rdparty/webkit/WebCore/platform/qt/KURLQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/qt/KURLQt.cpp
@@ -95,8 +95,10 @@ KURL::operator QUrl() const
String KURL::fileSystemPath() const
{
- notImplemented();
- return String();
+ if (!isValid() || !protocolIs("file"))
+ return String();
+
+ return String(path());
}
}
diff --git a/src/corelib/arch/sparc/arch.pri b/src/corelib/arch/sparc/arch.pri
index 3113dd3..9bb3a88 100644
--- a/src/corelib/arch/sparc/arch.pri
+++ b/src/corelib/arch/sparc/arch.pri
@@ -1,7 +1,7 @@
#
# SPARC architecture
#
-*-64 {
+*-64* {
SOURCES += $$QT_ARCH_CPP/qatomic64.s
}
else {
diff --git a/src/corelib/codecs/qsimplecodec.cpp b/src/corelib/codecs/qsimplecodec.cpp
index 445565a..4cc7912 100644
--- a/src/corelib/codecs/qsimplecodec.cpp
+++ b/src/corelib/codecs/qsimplecodec.cpp
@@ -681,7 +681,7 @@ QByteArray QSimpleTextCodec::convertFromUnicode(const QChar *in, int length, Con
int u;
const QChar* ucp = in;
unsigned char* rp = (unsigned char *)r.data();
- const unsigned char* rmp = (const unsigned char *)reverseMap->data();
+ const unsigned char* rmp = (const unsigned char *)reverseMap->constData();
int rmsize = (int) reverseMap->size();
while(i--)
{
diff --git a/src/corelib/codecs/qtextcodec.cpp b/src/corelib/codecs/qtextcodec.cpp
index 43ea1c8..1c607a6 100644
--- a/src/corelib/codecs/qtextcodec.cpp
+++ b/src/corelib/codecs/qtextcodec.cpp
@@ -79,7 +79,7 @@
# endif
#endif // QT_NO_CODECS
#include "qlocale.h"
-#include "private/qmutexpool_p.h"
+#include "qmutex.h"
#include <stdlib.h>
#include <ctype.h>
@@ -659,13 +659,13 @@ static void setupLocaleMapper()
#endif
}
-
-static void setup()
-{
#ifndef QT_NO_THREAD
- QMutexLocker locker(QMutexPool::globalInstanceGet(&all));
+Q_GLOBAL_STATIC_WITH_ARGS(QMutex, textCodecsMutex, (QMutex::Recursive));
#endif
+// textCodecsMutex need to be locked to enter this function
+static void setup()
+{
if (all)
return;
@@ -903,8 +903,6 @@ QTextCodec::ConverterState::~ConverterState()
*/
/*!
- \nonreentrant
-
Constructs a QTextCodec, and gives it the highest precedence. The
QTextCodec should always be constructed on the heap (i.e. with \c
new). Qt takes ownership and will delete it when the application
@@ -912,6 +910,9 @@ QTextCodec::ConverterState::~ConverterState()
*/
QTextCodec::QTextCodec()
{
+#ifndef QT_NO_THREAD
+ QMutexLocker locker(textCodecsMutex());
+#endif
setup();
all->prepend(this);
}
@@ -929,8 +930,12 @@ QTextCodec::~QTextCodec()
if (!destroying_is_ok)
qWarning("QTextCodec::~QTextCodec: Called by application");
#endif
- if (all)
+ if (all) {
+#ifndef QT_NO_THREAD
+ QMutexLocker locker(textCodecsMutex());
+#endif
all->removeAll(this);
+ }
}
/*!
@@ -951,6 +956,9 @@ QTextCodec *QTextCodec::codecForName(const QByteArray &name)
if (name.isEmpty())
return 0;
+#ifndef QT_NO_THREAD
+ QMutexLocker locker(textCodecsMutex());
+#endif
setup();
for (int i = 0; i < all->size(); ++i) {
@@ -973,6 +981,9 @@ QTextCodec *QTextCodec::codecForName(const QByteArray &name)
*/
QTextCodec* QTextCodec::codecForMib(int mib)
{
+#ifndef QT_NO_THREAD
+ QMutexLocker locker(textCodecsMutex());
+#endif
setup();
// Qt 3 used 1000 (mib for UCS2) as its identifier for the utf16 codec. Map
@@ -1001,6 +1012,9 @@ QTextCodec* QTextCodec::codecForMib(int mib)
*/
QList<QByteArray> QTextCodec::availableCodecs()
{
+#ifndef QT_NO_THREAD
+ QMutexLocker locker(textCodecsMutex());
+#endif
setup();
QList<QByteArray> codecs;
@@ -1008,6 +1022,11 @@ QList<QByteArray> QTextCodec::availableCodecs()
codecs += all->at(i)->name();
codecs += all->at(i)->aliases();
}
+
+#ifndef QT_NO_THREAD
+ locker.unlock();
+#endif
+
#ifndef QT_NO_TEXTCODECPLUGIN
QFactoryLoader *l = loader();
QStringList keys = l->keys();
@@ -1031,11 +1050,19 @@ QList<QByteArray> QTextCodec::availableCodecs()
*/
QList<int> QTextCodec::availableMibs()
{
+#ifndef QT_NO_THREAD
+ QMutexLocker locker(textCodecsMutex());
+#endif
setup();
QList<int> codecs;
for (int i = 0; i < all->size(); ++i)
codecs += all->at(i)->mibEnum();
+
+#ifndef QT_NO_THREAD
+ locker.unlock();
+#endif
+
#ifndef QT_NO_TEXTCODECPLUGIN
QFactoryLoader *l = loader();
QStringList keys = l->keys();
@@ -1082,6 +1109,9 @@ QTextCodec* QTextCodec::codecForLocale()
if (localeMapper)
return localeMapper;
+#ifndef QT_NO_THREAD
+ QMutexLocker locker(textCodecsMutex());
+#endif
setup();
return localeMapper;
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index f48c1b3..c8f836a 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -1994,7 +1994,6 @@ void qt_check_pointer(const char *n, int l)
qWarning("In file %s, line %d: Out of memory", n, l);
}
-#ifndef QT_NO_EXCEPTIONS
/* \internal
Allows you to throw an exception without including <new>
Called internally from Q_CHECK_PTR on certain OS combinations
@@ -2003,7 +2002,6 @@ void qBadAlloc()
{
QT_THROW(std::bad_alloc());
}
-#endif
/*
The Q_ASSERT macro calls this function when the test fails.
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index b237659..99bbe42 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -1676,10 +1676,7 @@ Q_CORE_EXPORT void qt_assert_x(const char *where, const char *what, const char *
#endif
Q_CORE_EXPORT void qt_check_pointer(const char *, int);
-
-#ifndef QT_NO_EXCEPTIONS
Q_CORE_EXPORT void qBadAlloc();
-#endif
#ifdef QT_NO_EXCEPTIONS
# if defined(QT_NO_DEBUG)
diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc
index 3d49d60..1f1c8f7 100644
--- a/src/corelib/global/qnamespace.qdoc
+++ b/src/corelib/global/qnamespace.qdoc
@@ -157,7 +157,7 @@
\value AA_MacDontSwapCtrlAndMeta On Mac OS X by default, Qt swaps the
Control and Meta (Command) keys (i.e., whenever Control is pressed, Qt
- sends Meta and whenever Meta is pressed Control is sent. When this
+ sends Meta, and whenever Meta is pressed Control is sent). When this
attribute is true, Qt will not do the flip. QKeySequence::StandardShortcuts
will also flip accordingly (i.e., QKeySequence::Copy will be
Command+C on the keyboard regardless of the value set, though what is output for
@@ -493,7 +493,7 @@
\omitvalue WordBreak
\omitvalue TextForceLeftToRight
\omitvalue TextForceRightToLeft
- \omitvalue TextLongestVariant Always use the longest variant when computing the size of a multi-variant string
+ \omitvalue TextLongestVariant Always use the longest variant when computing the size of a multi-variant string.
You can use as many modifier flags as you want, except that
Qt::TextSingleLine and Qt::TextWordWrap cannot be combined.
@@ -2115,7 +2115,7 @@
On some platforms this implies Qt::WindowSystemMenuHint for it to work.
\value MacWindowToolBarButtonHint On Mac OS X adds a tool bar button (i.e.,
- the oblong button that is on the top right of windows that have toolbars.
+ the oblong button that is on the top right of windows that have toolbars).
\value BypassGraphicsProxyWidget Prevents the window and its children from
automatically embedding themselves into a QGraphicsProxyWidget if the
diff --git a/src/corelib/tools/qstring.h b/src/corelib/tools/qstring.h
index 5e3b0fd..702a21a 100644
--- a/src/corelib/tools/qstring.h
+++ b/src/corelib/tools/qstring.h
@@ -595,7 +595,7 @@ private:
struct Data {
QBasicAtomicInt ref;
int alloc, size;
- ushort *data;
+ ushort *data; // QT5: put that after the bit field to fill alignment gap; don't use sizeof any more then
ushort clean : 1;
ushort simpletext : 1;
ushort righttoleft : 1;
diff --git a/src/declarative/debugger/qmldebugservice.cpp b/src/declarative/debugger/qmldebugservice.cpp
index 810fbed..2c9586f 100644
--- a/src/declarative/debugger/qmldebugservice.cpp
+++ b/src/declarative/debugger/qmldebugservice.cpp
@@ -61,9 +61,11 @@ class QmlDebugServer : public QObject
public:
static QmlDebugServer *instance();
void wait();
+ void registerForStartNotification(QObject *object, const char *receiver);
private Q_SLOTS:
void readyRead();
+ void registeredObjectDestroyed(QObject *object);
private:
friend class QmlDebugService;
@@ -83,6 +85,7 @@ public:
QPacketProtocol *protocol;
QHash<QString, QmlDebugService *> plugins;
QStringList enabledPlugins;
+ QList<QPair<QObject*, QByteArray> > notifyClients;
};
class QmlDebugServicePrivate : public QObjectPrivate
@@ -112,6 +115,14 @@ void QmlDebugServerPrivate::wait()
qWarning("QmlDebugServer: Waiting for connection on port %d...", port);
+ for (int i=0; i<notifyClients.count(); i++) {
+ if (!QMetaObject::invokeMethod(notifyClients[i].first, notifyClients[i].second)) {
+ qWarning() << "QmlDebugServer: unable to call method" << notifyClients[i].second
+ << "on object" << notifyClients[i].first << "to notify of debug server start";
+ }
+ }
+ notifyClients.clear();
+
if (!server.waitForNewConnection(-1)) {
qWarning("QmlDebugServer: Connection error");
return;
@@ -165,6 +176,23 @@ void QmlDebugServer::wait()
d->wait();
}
+void QmlDebugServer::registerForStartNotification(QObject *object, const char *methodName)
+{
+ Q_D(QmlDebugServer);
+ connect(object, SIGNAL(destroyed(QObject*)), SLOT(registeredObjectDestroyed(QObject*)));
+ d->notifyClients.append(qMakePair(object, QByteArray(methodName)));
+}
+
+void QmlDebugServer::registeredObjectDestroyed(QObject *object)
+{
+ Q_D(QmlDebugServer);
+ QMutableListIterator<QPair<QObject*, QByteArray> > i(d->notifyClients);
+ while (i.hasNext()) {
+ if (i.next().first == object)
+ i.remove();
+ }
+}
+
QmlDebugServer::QmlDebugServer(int port)
: QObject(*(new QmlDebugServerPrivate))
{
@@ -367,6 +395,11 @@ void QmlDebugService::waitForClients()
QmlDebugServer::instance()->wait();
}
+void QmlDebugService::notifyOnServerStart(QObject *object, const char *receiver)
+{
+ QmlDebugServer::instance()->registerForStartNotification(object, receiver);
+}
+
void QmlDebugService::sendMessage(const QByteArray &message)
{
Q_D(QmlDebugService);
diff --git a/src/declarative/debugger/qmldebugservice_p.h b/src/declarative/debugger/qmldebugservice_p.h
index b406a3c..ec90d95 100644
--- a/src/declarative/debugger/qmldebugservice_p.h
+++ b/src/declarative/debugger/qmldebugservice_p.h
@@ -68,17 +68,19 @@ public:
static int idForObject(QObject *);
static QObject *objectForId(int);
-
static bool isDebuggingEnabled();
static QString objectToString(QObject *obj);
static void waitForClients();
+ static void notifyOnServerStart(QObject *object, const char *receiver);
+
protected:
virtual void enabledChanged(bool);
virtual void messageReceived(const QByteArray &);
private:
+ void registerForStartNotification(QObject *object, const char *methodName);
friend class QmlDebugServer;
};
diff --git a/src/declarative/graphicsitems/graphicsitems.pri b/src/declarative/graphicsitems/graphicsitems.pri
index eb6e0ad..db9c29e 100644
--- a/src/declarative/graphicsitems/graphicsitems.pri
+++ b/src/declarative/graphicsitems/graphicsitems.pri
@@ -1,9 +1,11 @@
INCLUDEPATH += $$PWD
HEADERS += \
+ $$PWD/qmlgraphicsitemsmodule_p.h \
$$PWD/qmlgraphicsanchors_p.h \
$$PWD/qmlgraphicsanchors_p_p.h \
$$PWD/qmlgraphicsevents_p_p.h \
+ $$PWD/qmlgraphicseffects_p.h \
$$PWD/qmlgraphicsflickable_p.h \
$$PWD/qmlgraphicsflickable_p_p.h \
$$PWD/qmlgraphicsflipable_p.h \
@@ -52,6 +54,7 @@ HEADERS += \
$$PWD/qmlgraphicseffects.cpp
SOURCES += \
+ $$PWD/qmlgraphicsitemsmodule.cpp \
$$PWD/qmlgraphicsanchors.cpp \
$$PWD/qmlgraphicsevents.cpp \
$$PWD/qmlgraphicsflickable.cpp \
diff --git a/src/declarative/graphicsitems/qmlgraphicsanchors.cpp b/src/declarative/graphicsitems/qmlgraphicsanchors.cpp
index 93055fc..816e580 100644
--- a/src/declarative/graphicsitems/qmlgraphicsanchors.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsanchors.cpp
@@ -50,8 +50,6 @@
QT_BEGIN_NAMESPACE
-QML_DEFINE_NOCREATE_TYPE(QmlGraphicsAnchors)
-
//TODO: should we cache relationships, so we don't have to check each time (parent-child or sibling)?
//TODO: support non-parent, non-sibling (need to find lowest common ancestor)
diff --git a/src/declarative/graphicsitems/qmlgraphicsanimatedimage.cpp b/src/declarative/graphicsitems/qmlgraphicsanimatedimage.cpp
index e01e569..7d1c87a 100644
--- a/src/declarative/graphicsitems/qmlgraphicsanimatedimage.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsanimatedimage.cpp
@@ -78,7 +78,6 @@ Item {
\endqml
\endtable
*/
-QML_DEFINE_TYPE(Qt,4,6,AnimatedImage,QmlGraphicsAnimatedImage)
QmlGraphicsAnimatedImage::QmlGraphicsAnimatedImage(QmlGraphicsItem *parent)
: QmlGraphicsImage(*(new QmlGraphicsAnimatedImagePrivate), parent)
diff --git a/src/declarative/graphicsitems/qmlgraphicsborderimage.cpp b/src/declarative/graphicsitems/qmlgraphicsborderimage.cpp
index 877e141..19da151 100644
--- a/src/declarative/graphicsitems/qmlgraphicsborderimage.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsborderimage.cpp
@@ -50,8 +50,6 @@
QT_BEGIN_NAMESPACE
-QML_DEFINE_TYPE(Qt,4,6,BorderImage,QmlGraphicsBorderImage)
-
/*!
\qmlclass BorderImage QmlGraphicsBorderImage
\brief The BorderImage element provides an image that can be used as a border.
diff --git a/src/declarative/graphicsitems/qmlgraphicseffects.cpp b/src/declarative/graphicsitems/qmlgraphicseffects.cpp
index e1f5687..268ba28 100644
--- a/src/declarative/graphicsitems/qmlgraphicseffects.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicseffects.cpp
@@ -43,12 +43,6 @@
#include <QtGui/qgraphicseffect.h>
-QML_DECLARE_TYPE(QGraphicsEffect)
-QML_DEFINE_NOCREATE_TYPE(QGraphicsEffect)
-
-QML_DECLARE_TYPE(QGraphicsBlurEffect)
-QML_DEFINE_TYPE(Qt,4,6,Blur,QGraphicsBlurEffect)
-
/*!
\qmlclass Blur QGraphicsBlurEffect
\brief The Blur object provides a blur effect.
@@ -84,9 +78,6 @@ QML_DEFINE_TYPE(Qt,4,6,Blur,QGraphicsBlurEffect)
The default hint is Qt.PerformanceHint.
*/
-QML_DECLARE_TYPE(QGraphicsColorizeEffect)
-QML_DEFINE_TYPE(Qt,4,6,Colorize,QGraphicsColorizeEffect)
-
/*!
\qmlclass Colorize QGraphicsColorizeEffect
\brief The Colorize object provides a colorize effect.
@@ -112,8 +103,6 @@ QML_DEFINE_TYPE(Qt,4,6,Colorize,QGraphicsColorizeEffect)
while 1.0 means full colorization. By default, the strength is 1.0.
*/
-QML_DECLARE_TYPE(QGraphicsDropShadowEffect)
-QML_DEFINE_TYPE(Qt,4,6,DropShadow,QGraphicsDropShadowEffect)
/*!
\qmlclass DropShadow QGraphicsDropShadowEffect
@@ -155,8 +144,6 @@ QML_DEFINE_TYPE(Qt,4,6,DropShadow,QGraphicsDropShadowEffect)
By default, the drop color is a semi-transparent dark gray.
*/
-QML_DECLARE_TYPE(QGraphicsOpacityEffect)
-QML_DEFINE_TYPE(Qt,4,6,Opacity,QGraphicsOpacityEffect)
/*!
\qmlclass Opacity QGraphicsOpacityEffect
diff --git a/src/declarative/graphicsitems/qmlgraphicseffects_p.h b/src/declarative/graphicsitems/qmlgraphicseffects_p.h
new file mode 100644
index 0000000..2e561f8
--- /dev/null
+++ b/src/declarative/graphicsitems/qmlgraphicseffects_p.h
@@ -0,0 +1,65 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtDeclarative module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QMLGRAPHICSEFFECTS_P_H
+#define QMLGRAPHICSEFFECTS_P_H
+
+//
+// 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 <qml.h>
+#include <QtGui/qgraphicseffect.h>
+
+QML_DECLARE_TYPE(QGraphicsEffect)
+QML_DECLARE_TYPE(QGraphicsBlurEffect)
+QML_DECLARE_TYPE(QGraphicsColorizeEffect)
+QML_DECLARE_TYPE(QGraphicsDropShadowEffect)
+QML_DECLARE_TYPE(QGraphicsOpacityEffect)
+
+#endif // QMLGRAPHICSEFFECTS_P_H
diff --git a/src/declarative/graphicsitems/qmlgraphicsevents.cpp b/src/declarative/graphicsitems/qmlgraphicsevents.cpp
index 9958dea..0d6adf6 100644
--- a/src/declarative/graphicsitems/qmlgraphicsevents.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsevents.cpp
@@ -189,7 +189,4 @@ MouseRegion {
\endqml
*/
-QML_DEFINE_NOCREATE_TYPE(QmlGraphicsKeyEvent)
-QML_DEFINE_NOCREATE_TYPE(QmlGraphicsMouseEvent)
-
QT_END_NAMESPACE
diff --git a/src/declarative/graphicsitems/qmlgraphicsflickable.cpp b/src/declarative/graphicsitems/qmlgraphicsflickable.cpp
index 2ff3b30..5143251 100644
--- a/src/declarative/graphicsitems/qmlgraphicsflickable.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsflickable.cpp
@@ -56,36 +56,6 @@ static const int FlickThreshold = 20;
// Really slow flicks can be annoying.
static const int minimumFlickVelocity = 200;
-class QmlGraphicsFlickableVisibleArea : public QObject
-{
- Q_OBJECT
-
- Q_PROPERTY(qreal xPosition READ xPosition NOTIFY pageChanged)
- Q_PROPERTY(qreal yPosition READ yPosition NOTIFY pageChanged)
- Q_PROPERTY(qreal widthRatio READ widthRatio NOTIFY pageChanged)
- Q_PROPERTY(qreal heightRatio READ heightRatio NOTIFY pageChanged)
-
-public:
- QmlGraphicsFlickableVisibleArea(QmlGraphicsFlickable *parent=0);
-
- qreal xPosition() const;
- qreal widthRatio() const;
- qreal yPosition() const;
- qreal heightRatio() const;
-
- void updateVisible();
-
-signals:
- void pageChanged();
-
-private:
- QmlGraphicsFlickable *flickable;
- qreal m_xPosition;
- qreal m_widthRatio;
- qreal m_yPosition;
- qreal m_heightRatio;
-};
-
QmlGraphicsFlickableVisibleArea::QmlGraphicsFlickableVisibleArea(QmlGraphicsFlickable *parent)
: QObject(parent), flickable(parent), m_xPosition(0.), m_widthRatio(0.)
, m_yPosition(0.), m_heightRatio(0.)
@@ -356,8 +326,6 @@ void QmlGraphicsFlickablePrivate::updateBeginningEnd()
visibleArea->updateVisible();
}
-QML_DEFINE_TYPE(Qt,4,6,Flickable,QmlGraphicsFlickable)
-
/*!
\qmlclass Flickable QmlGraphicsFlickable
\brief The Flickable item provides a surface that can be "flicked".
@@ -1367,8 +1335,3 @@ void QmlGraphicsFlickablePrivate::updateVelocity()
}
QT_END_NAMESPACE
-
-QML_DECLARE_TYPE(QmlGraphicsFlickableVisibleArea)
-QML_DEFINE_TYPE(Qt,4,6,VisibleArea,QmlGraphicsFlickableVisibleArea)
-
-#include <qmlgraphicsflickable.moc>
diff --git a/src/declarative/graphicsitems/qmlgraphicsflickable_p_p.h b/src/declarative/graphicsitems/qmlgraphicsflickable_p_p.h
index ae164cc..e83e81b 100644
--- a/src/declarative/graphicsitems/qmlgraphicsflickable_p_p.h
+++ b/src/declarative/graphicsitems/qmlgraphicsflickable_p_p.h
@@ -159,6 +159,38 @@ public:
QML_DECLARE_LIST_PROXY(QmlGraphicsFlickablePrivate, QObject *, data)
};
+class QmlGraphicsFlickableVisibleArea : public QObject
+{
+ Q_OBJECT
+
+ Q_PROPERTY(qreal xPosition READ xPosition NOTIFY pageChanged)
+ Q_PROPERTY(qreal yPosition READ yPosition NOTIFY pageChanged)
+ Q_PROPERTY(qreal widthRatio READ widthRatio NOTIFY pageChanged)
+ Q_PROPERTY(qreal heightRatio READ heightRatio NOTIFY pageChanged)
+
+public:
+ QmlGraphicsFlickableVisibleArea(QmlGraphicsFlickable *parent=0);
+
+ qreal xPosition() const;
+ qreal widthRatio() const;
+ qreal yPosition() const;
+ qreal heightRatio() const;
+
+ void updateVisible();
+
+signals:
+ void pageChanged();
+
+private:
+ QmlGraphicsFlickable *flickable;
+ qreal m_xPosition;
+ qreal m_widthRatio;
+ qreal m_yPosition;
+ qreal m_heightRatio;
+};
+
QT_END_NAMESPACE
+QML_DECLARE_TYPE(QmlGraphicsFlickableVisibleArea)
+
#endif
diff --git a/src/declarative/graphicsitems/qmlgraphicsflipable.cpp b/src/declarative/graphicsitems/qmlgraphicsflipable.cpp
index ff8995b..4116817 100644
--- a/src/declarative/graphicsitems/qmlgraphicsflipable.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsflipable.cpp
@@ -49,8 +49,6 @@
QT_BEGIN_NAMESPACE
-QML_DEFINE_TYPE(Qt,4,6,Flipable,QmlGraphicsFlipable)
-
class QmlGraphicsFlipablePrivate : public QmlGraphicsItemPrivate
{
Q_DECLARE_PUBLIC(QmlGraphicsFlipable)
diff --git a/src/declarative/graphicsitems/qmlgraphicsfocuspanel.cpp b/src/declarative/graphicsitems/qmlgraphicsfocuspanel.cpp
index 333b689..4e1542a 100644
--- a/src/declarative/graphicsitems/qmlgraphicsfocuspanel.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsfocuspanel.cpp
@@ -46,8 +46,6 @@
QT_BEGIN_NAMESPACE
-QML_DEFINE_TYPE(Qt,4,6,FocusPanel,QmlGraphicsFocusPanel)
-
/*!
\qmlclass FocusPanel QmlGraphicsFocusPanel
\brief The FocusPanel item explicitly creates a focus panel.
diff --git a/src/declarative/graphicsitems/qmlgraphicsfocusscope.cpp b/src/declarative/graphicsitems/qmlgraphicsfocusscope.cpp
index 828756c..ce0e376 100644
--- a/src/declarative/graphicsitems/qmlgraphicsfocusscope.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsfocusscope.cpp
@@ -42,7 +42,6 @@
#include "qmlgraphicsfocusscope_p.h"
QT_BEGIN_NAMESPACE
-QML_DEFINE_TYPE(Qt,4,6,FocusScope,QmlGraphicsFocusScope)
/*!
\qmlclass FocusScope QmlGraphicsFocusScope
diff --git a/src/declarative/graphicsitems/qmlgraphicsgraphicsobjectcontainer.cpp b/src/declarative/graphicsitems/qmlgraphicsgraphicsobjectcontainer.cpp
index a5a7935..f2b3c00 100644
--- a/src/declarative/graphicsitems/qmlgraphicsgraphicsobjectcontainer.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsgraphicsobjectcontainer.cpp
@@ -131,9 +131,6 @@ public:
\brief The QmlGraphicsGraphicsObjectContainer class allows you to add QGraphicsObjects into Fluid UI applications.
*/
-QML_DEFINE_NOCREATE_TYPE(QGraphicsObject)
-QML_DEFINE_TYPE(Qt,4,6,GraphicsObjectContainer,QmlGraphicsGraphicsObjectContainer)
-
QmlGraphicsGraphicsObjectContainer::QmlGraphicsGraphicsObjectContainer(QmlGraphicsItem *parent)
: QmlGraphicsItem(*new QmlGraphicsGraphicsObjectContainerPrivate, parent)
{
diff --git a/src/declarative/graphicsitems/qmlgraphicsgridview.cpp b/src/declarative/graphicsitems/qmlgraphicsgridview.cpp
index 83911c0..ee711b4 100644
--- a/src/declarative/graphicsitems/qmlgraphicsgridview.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsgridview.cpp
@@ -51,63 +51,6 @@
QT_BEGIN_NAMESPACE
-class QmlGraphicsGridViewAttached : public QObject
-{
- Q_OBJECT
-public:
- QmlGraphicsGridViewAttached(QObject *parent)
- : QObject(parent), m_isCurrent(false), m_delayRemove(false) {}
- ~QmlGraphicsGridViewAttached() {
- attachedProperties.remove(parent());
- }
-
- Q_PROPERTY(QmlGraphicsGridView *view READ view CONSTANT)
- QmlGraphicsGridView *view() { return m_view; }
-
- Q_PROPERTY(bool isCurrentItem READ isCurrentItem NOTIFY currentItemChanged)
- bool isCurrentItem() const { return m_isCurrent; }
- void setIsCurrentItem(bool c) {
- if (m_isCurrent != c) {
- m_isCurrent = c;
- emit currentItemChanged();
- }
- }
-
- Q_PROPERTY(bool delayRemove READ delayRemove WRITE setDelayRemove NOTIFY delayRemoveChanged)
- bool delayRemove() const { return m_delayRemove; }
- void setDelayRemove(bool delay) {
- if (m_delayRemove != delay) {
- m_delayRemove = delay;
- emit delayRemoveChanged();
- }
- }
-
- static QmlGraphicsGridViewAttached *properties(QObject *obj) {
- QmlGraphicsGridViewAttached *rv = attachedProperties.value(obj);
- if (!rv) {
- rv = new QmlGraphicsGridViewAttached(obj);
- attachedProperties.insert(obj, rv);
- }
- return rv;
- }
-
- void emitAdd() { emit add(); }
- void emitRemove() { emit remove(); }
-
-Q_SIGNALS:
- void currentItemChanged();
- void delayRemoveChanged();
- void add();
- void remove();
-
-public:
- QmlGraphicsGridView *m_view;
- bool m_isCurrent;
- bool m_delayRemove;
-
- static QHash<QObject*, QmlGraphicsGridViewAttached*> attachedProperties;
-};
-
QHash<QObject*, QmlGraphicsGridViewAttached*> QmlGraphicsGridViewAttached::attachedProperties;
@@ -1754,8 +1697,4 @@ QmlGraphicsGridViewAttached *QmlGraphicsGridView::qmlAttachedProperties(QObject
return QmlGraphicsGridViewAttached::properties(obj);
}
-QML_DEFINE_TYPE(Qt, 4,6, GridView, QmlGraphicsGridView)
-
QT_END_NAMESPACE
-
-#include <qmlgraphicsgridview.moc>
diff --git a/src/declarative/graphicsitems/qmlgraphicsgridview_p.h b/src/declarative/graphicsitems/qmlgraphicsgridview_p.h
index d2ef70e..25a76a3 100644
--- a/src/declarative/graphicsitems/qmlgraphicsgridview_p.h
+++ b/src/declarative/graphicsitems/qmlgraphicsgridview_p.h
@@ -154,6 +154,64 @@ private:
void refill();
};
+class QmlGraphicsGridViewAttached : public QObject
+{
+ Q_OBJECT
+public:
+ QmlGraphicsGridViewAttached(QObject *parent)
+ : QObject(parent), m_isCurrent(false), m_delayRemove(false) {}
+ ~QmlGraphicsGridViewAttached() {
+ attachedProperties.remove(parent());
+ }
+
+ Q_PROPERTY(QmlGraphicsGridView *view READ view CONSTANT)
+ QmlGraphicsGridView *view() { return m_view; }
+
+ Q_PROPERTY(bool isCurrentItem READ isCurrentItem NOTIFY currentItemChanged)
+ bool isCurrentItem() const { return m_isCurrent; }
+ void setIsCurrentItem(bool c) {
+ if (m_isCurrent != c) {
+ m_isCurrent = c;
+ emit currentItemChanged();
+ }
+ }
+
+ Q_PROPERTY(bool delayRemove READ delayRemove WRITE setDelayRemove NOTIFY delayRemoveChanged)
+ bool delayRemove() const { return m_delayRemove; }
+ void setDelayRemove(bool delay) {
+ if (m_delayRemove != delay) {
+ m_delayRemove = delay;
+ emit delayRemoveChanged();
+ }
+ }
+
+ static QmlGraphicsGridViewAttached *properties(QObject *obj) {
+ QmlGraphicsGridViewAttached *rv = attachedProperties.value(obj);
+ if (!rv) {
+ rv = new QmlGraphicsGridViewAttached(obj);
+ attachedProperties.insert(obj, rv);
+ }
+ return rv;
+ }
+
+ void emitAdd() { emit add(); }
+ void emitRemove() { emit remove(); }
+
+Q_SIGNALS:
+ void currentItemChanged();
+ void delayRemoveChanged();
+ void add();
+ void remove();
+
+public:
+ QmlGraphicsGridView *m_view;
+ bool m_isCurrent;
+ bool m_delayRemove;
+
+ static QHash<QObject*, QmlGraphicsGridViewAttached*> attachedProperties;
+};
+
+
QT_END_NAMESPACE
QML_DECLARE_TYPE(QmlGraphicsGridView)
diff --git a/src/declarative/graphicsitems/qmlgraphicsimage.cpp b/src/declarative/graphicsitems/qmlgraphicsimage.cpp
index 7e63c8b..558511d 100644
--- a/src/declarative/graphicsitems/qmlgraphicsimage.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsimage.cpp
@@ -48,8 +48,6 @@
QT_BEGIN_NAMESPACE
-QML_DEFINE_TYPE(Qt,4,6,Image,QmlGraphicsImage)
-
/*!
\qmlclass Image QmlGraphicsImage
\brief The Image element allows you to add bitmaps to a scene.
diff --git a/src/declarative/graphicsitems/qmlgraphicsitem.cpp b/src/declarative/graphicsitems/qmlgraphicsitem.cpp
index 8973cb4..9fd8702 100644
--- a/src/declarative/graphicsitems/qmlgraphicsitem.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsitem.cpp
@@ -69,12 +69,6 @@ QT_BEGIN_NAMESPACE
#define FLT_MAX 1E+37
#endif
-QML_DEFINE_TYPE(Qt,4,6,Item,QmlGraphicsItem)
-
-QML_DEFINE_NOCREATE_TYPE(QGraphicsTransform);
-QML_DEFINE_TYPE(Qt,4,6,Scale,QGraphicsScale)
-QML_DEFINE_TYPE(Qt,4,6,Rotation,QGraphicsRotation)
-
#include "qmlgraphicseffects.cpp"
/*!
@@ -325,28 +319,6 @@ void QmlGraphicsContents::setItem(QmlGraphicsItem *item)
calcWidth();
}
-/*
- Key filters can be installed on a QmlGraphicsItem, but not removed. Currently they
- are only used by attached objects (which are only destroyed on Item
- destruction), so this isn't a problem. If in future this becomes any form
- of public API, they will have to support removal too.
-*/
-class QmlGraphicsItemKeyFilter
-{
-public:
- QmlGraphicsItemKeyFilter(QmlGraphicsItem * = 0);
- virtual ~QmlGraphicsItemKeyFilter();
-
- virtual void keyPressed(QKeyEvent *event);
- virtual void keyReleased(QKeyEvent *event);
- virtual void inputMethodEvent(QInputMethodEvent *event);
- virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const;
- virtual void componentComplete();
-
-private:
- QmlGraphicsItemKeyFilter *m_next;
-};
-
QmlGraphicsItemKeyFilter::QmlGraphicsItemKeyFilter(QmlGraphicsItem *item)
: m_next(0)
{
@@ -458,49 +430,6 @@ void QmlGraphicsItemKeyFilter::componentComplete()
pressed.
*/
-class QmlGraphicsKeyNavigationAttachedPrivate : public QObjectPrivate
-{
-public:
- QmlGraphicsKeyNavigationAttachedPrivate()
- : QObjectPrivate(), left(0), right(0), up(0), down(0) {}
-
- QmlGraphicsItem *left;
- QmlGraphicsItem *right;
- QmlGraphicsItem *up;
- QmlGraphicsItem *down;
-};
-
-class QmlGraphicsKeyNavigationAttached : public QObject, public QmlGraphicsItemKeyFilter
-{
- Q_OBJECT
- Q_DECLARE_PRIVATE(QmlGraphicsKeyNavigationAttached)
-
- Q_PROPERTY(QmlGraphicsItem *left READ left WRITE setLeft NOTIFY changed)
- Q_PROPERTY(QmlGraphicsItem *right READ right WRITE setRight NOTIFY changed)
- Q_PROPERTY(QmlGraphicsItem *up READ up WRITE setUp NOTIFY changed)
- Q_PROPERTY(QmlGraphicsItem *down READ down WRITE setDown NOTIFY changed)
-public:
- QmlGraphicsKeyNavigationAttached(QObject * = 0);
-
- QmlGraphicsItem *left() const;
- void setLeft(QmlGraphicsItem *);
- QmlGraphicsItem *right() const;
- void setRight(QmlGraphicsItem *);
- QmlGraphicsItem *up() const;
- void setUp(QmlGraphicsItem *);
- QmlGraphicsItem *down() const;
- void setDown(QmlGraphicsItem *);
-
- static QmlGraphicsKeyNavigationAttached *qmlAttachedProperties(QObject *);
-
-Q_SIGNALS:
- void changed();
-
-private:
- virtual void keyPressed(QKeyEvent *event);
- virtual void keyReleased(QKeyEvent *event);
-};
-
QmlGraphicsKeyNavigationAttached::QmlGraphicsKeyNavigationAttached(QObject *parent)
: QObject(*(new QmlGraphicsKeyNavigationAttachedPrivate), parent),
QmlGraphicsItemKeyFilter(qobject_cast<QmlGraphicsItem*>(parent))
@@ -964,137 +893,6 @@ void QmlGraphicsKeyNavigationAttached::keyReleased(QKeyEvent *event)
*/
-class QmlGraphicsKeysAttachedPrivate : public QObjectPrivate
-{
-public:
- QmlGraphicsKeysAttachedPrivate()
- : QObjectPrivate(), inPress(false), inRelease(false)
- , inIM(false), enabled(true), imeItem(0), item(0)
- {}
-
- bool isConnected(const char *signalName);
-
- QGraphicsItem *finalFocusProxy(QGraphicsItem *item) const
- {
- QGraphicsItem *fp;
- while ((fp = item->focusProxy()))
- item = fp;
- return item;
- }
-
- //loop detection
- bool inPress:1;
- bool inRelease:1;
- bool inIM:1;
-
- bool enabled : 1;
-
- QGraphicsItem *imeItem;
- QList<QmlGraphicsItem *> targets;
- QmlGraphicsItem *item;
-};
-
-class QmlGraphicsKeysAttached : public QObject, public QmlGraphicsItemKeyFilter
-{
- Q_OBJECT
- Q_DECLARE_PRIVATE(QmlGraphicsKeysAttached)
-
- Q_PROPERTY(bool enabled READ enabled WRITE setEnabled NOTIFY enabledChanged)
- Q_PROPERTY(QList<QmlGraphicsItem *> *forwardTo READ forwardTo)
-
-public:
- QmlGraphicsKeysAttached(QObject *parent=0);
- ~QmlGraphicsKeysAttached();
-
- bool enabled() const { Q_D(const QmlGraphicsKeysAttached); return d->enabled; }
- void setEnabled(bool enabled) {
- Q_D(QmlGraphicsKeysAttached);
- if (enabled != d->enabled) {
- d->enabled = enabled;
- emit enabledChanged();
- }
- }
-
- QList<QmlGraphicsItem *> *forwardTo() {
- Q_D(QmlGraphicsKeysAttached);
- return &d->targets;
- }
-
- virtual void componentComplete();
-
- static QmlGraphicsKeysAttached *qmlAttachedProperties(QObject *);
-
-Q_SIGNALS:
- void enabledChanged();
- void pressed(QmlGraphicsKeyEvent *event);
- void released(QmlGraphicsKeyEvent *event);
- void digit0Pressed(QmlGraphicsKeyEvent *event);
- void digit1Pressed(QmlGraphicsKeyEvent *event);
- void digit2Pressed(QmlGraphicsKeyEvent *event);
- void digit3Pressed(QmlGraphicsKeyEvent *event);
- void digit4Pressed(QmlGraphicsKeyEvent *event);
- void digit5Pressed(QmlGraphicsKeyEvent *event);
- void digit6Pressed(QmlGraphicsKeyEvent *event);
- void digit7Pressed(QmlGraphicsKeyEvent *event);
- void digit8Pressed(QmlGraphicsKeyEvent *event);
- void digit9Pressed(QmlGraphicsKeyEvent *event);
-
- void leftPressed(QmlGraphicsKeyEvent *event);
- void rightPressed(QmlGraphicsKeyEvent *event);
- void upPressed(QmlGraphicsKeyEvent *event);
- void downPressed(QmlGraphicsKeyEvent *event);
-
- void asteriskPressed(QmlGraphicsKeyEvent *event);
- void numberSignPressed(QmlGraphicsKeyEvent *event);
- void escapePressed(QmlGraphicsKeyEvent *event);
- void returnPressed(QmlGraphicsKeyEvent *event);
- void enterPressed(QmlGraphicsKeyEvent *event);
- void deletePressed(QmlGraphicsKeyEvent *event);
- void spacePressed(QmlGraphicsKeyEvent *event);
- void backPressed(QmlGraphicsKeyEvent *event);
- void cancelPressed(QmlGraphicsKeyEvent *event);
- void selectPressed(QmlGraphicsKeyEvent *event);
- void yesPressed(QmlGraphicsKeyEvent *event);
- void noPressed(QmlGraphicsKeyEvent *event);
- void context1Pressed(QmlGraphicsKeyEvent *event);
- void context2Pressed(QmlGraphicsKeyEvent *event);
- void context3Pressed(QmlGraphicsKeyEvent *event);
- void context4Pressed(QmlGraphicsKeyEvent *event);
- void callPressed(QmlGraphicsKeyEvent *event);
- void hangupPressed(QmlGraphicsKeyEvent *event);
- void flipPressed(QmlGraphicsKeyEvent *event);
- void menuPressed(QmlGraphicsKeyEvent *event);
- void volumeUpPressed(QmlGraphicsKeyEvent *event);
- void volumeDownPressed(QmlGraphicsKeyEvent *event);
-
-private:
- virtual void keyPressed(QKeyEvent *event);
- virtual void keyReleased(QKeyEvent *event);
- virtual void inputMethodEvent(QInputMethodEvent *);
- virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const;
-
- const QByteArray keyToSignal(int key) {
- QByteArray keySignal;
- if (key >= Qt::Key_0 && key <= Qt::Key_9) {
- keySignal = "digit0Pressed";
- keySignal[5] = '0' + (key - Qt::Key_0);
- } else {
- int i = 0;
- while (sigMap[i].key && sigMap[i].key != key)
- ++i;
- keySignal = sigMap[i].sig;
- }
- return keySignal;
- }
-
- struct SigMap {
- int key;
- const char *sig;
- };
-
- static const SigMap sigMap[];
-};
-
const QmlGraphicsKeysAttached::SigMap QmlGraphicsKeysAttached::sigMap[] = {
{ Qt::Key_Left, "leftPressed" },
{ Qt::Key_Right, "rightPressed" },
@@ -3086,14 +2884,6 @@ int QmlGraphicsItemPrivate::restart(QTime &t)
return n;
}
-#include <qmlgraphicsitem.moc>
#include <moc_qmlgraphicsitem.cpp>
QT_END_NAMESPACE
-
-QML_DECLARE_TYPE(QmlGraphicsKeysAttached)
-QML_DECLARE_TYPEINFO(QmlGraphicsKeysAttached, QML_HAS_ATTACHED_PROPERTIES)
-QML_DEFINE_TYPE(Qt,4,6,Keys,QmlGraphicsKeysAttached)
-QML_DECLARE_TYPE(QmlGraphicsKeyNavigationAttached)
-QML_DECLARE_TYPEINFO(QmlGraphicsKeyNavigationAttached, QML_HAS_ATTACHED_PROPERTIES)
-QML_DEFINE_TYPE(Qt,4,6,KeyNavigation,QmlGraphicsKeyNavigationAttached)
diff --git a/src/declarative/graphicsitems/qmlgraphicsitem.h b/src/declarative/graphicsitems/qmlgraphicsitem.h
index 8ae2d5c..e0f33c7 100644
--- a/src/declarative/graphicsitems/qmlgraphicsitem.h
+++ b/src/declarative/graphicsitems/qmlgraphicsitem.h
@@ -50,6 +50,7 @@
#include <QtGui/qgraphicsitem.h>
#include <QtGui/qgraphicstransform.h>
#include <QtGui/qfont.h>
+#include <QtGui/qaction.h>
QT_BEGIN_HEADER
@@ -233,6 +234,7 @@ QML_DECLARE_TYPE(QmlGraphicsItem)
QML_DECLARE_TYPE(QGraphicsTransform)
QML_DECLARE_TYPE(QGraphicsScale)
QML_DECLARE_TYPE(QGraphicsRotation)
+QML_DECLARE_TYPE(QAction)
QT_END_HEADER
diff --git a/src/declarative/graphicsitems/qmlgraphicsitem_p.h b/src/declarative/graphicsitems/qmlgraphicsitem_p.h
index 1741808..9a77dbb 100644
--- a/src/declarative/graphicsitems/qmlgraphicsitem_p.h
+++ b/src/declarative/graphicsitems/qmlgraphicsitem_p.h
@@ -280,8 +280,209 @@ public:
static int restart(QTime &);
};
+/*
+ Key filters can be installed on a QmlGraphicsItem, but not removed. Currently they
+ are only used by attached objects (which are only destroyed on Item
+ destruction), so this isn't a problem. If in future this becomes any form
+ of public API, they will have to support removal too.
+*/
+class QmlGraphicsItemKeyFilter
+{
+public:
+ QmlGraphicsItemKeyFilter(QmlGraphicsItem * = 0);
+ virtual ~QmlGraphicsItemKeyFilter();
+
+ virtual void keyPressed(QKeyEvent *event);
+ virtual void keyReleased(QKeyEvent *event);
+ virtual void inputMethodEvent(QInputMethodEvent *event);
+ virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const;
+ virtual void componentComplete();
+
+private:
+ QmlGraphicsItemKeyFilter *m_next;
+};
+
+class QmlGraphicsKeyNavigationAttachedPrivate : public QObjectPrivate
+{
+public:
+ QmlGraphicsKeyNavigationAttachedPrivate()
+ : QObjectPrivate(), left(0), right(0), up(0), down(0) {}
+
+ QmlGraphicsItem *left;
+ QmlGraphicsItem *right;
+ QmlGraphicsItem *up;
+ QmlGraphicsItem *down;
+};
+
+class QmlGraphicsKeyNavigationAttached : public QObject, public QmlGraphicsItemKeyFilter
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QmlGraphicsKeyNavigationAttached)
+
+ Q_PROPERTY(QmlGraphicsItem *left READ left WRITE setLeft NOTIFY changed)
+ Q_PROPERTY(QmlGraphicsItem *right READ right WRITE setRight NOTIFY changed)
+ Q_PROPERTY(QmlGraphicsItem *up READ up WRITE setUp NOTIFY changed)
+ Q_PROPERTY(QmlGraphicsItem *down READ down WRITE setDown NOTIFY changed)
+public:
+ QmlGraphicsKeyNavigationAttached(QObject * = 0);
+
+ QmlGraphicsItem *left() const;
+ void setLeft(QmlGraphicsItem *);
+ QmlGraphicsItem *right() const;
+ void setRight(QmlGraphicsItem *);
+ QmlGraphicsItem *up() const;
+ void setUp(QmlGraphicsItem *);
+ QmlGraphicsItem *down() const;
+ void setDown(QmlGraphicsItem *);
+
+ static QmlGraphicsKeyNavigationAttached *qmlAttachedProperties(QObject *);
+
+Q_SIGNALS:
+ void changed();
+
+private:
+ virtual void keyPressed(QKeyEvent *event);
+ virtual void keyReleased(QKeyEvent *event);
+};
+
+class QmlGraphicsKeysAttachedPrivate : public QObjectPrivate
+{
+public:
+ QmlGraphicsKeysAttachedPrivate()
+ : QObjectPrivate(), inPress(false), inRelease(false)
+ , inIM(false), enabled(true), imeItem(0), item(0)
+ {}
+
+ bool isConnected(const char *signalName);
+
+ QGraphicsItem *finalFocusProxy(QGraphicsItem *item) const
+ {
+ QGraphicsItem *fp;
+ while ((fp = item->focusProxy()))
+ item = fp;
+ return item;
+ }
+
+ //loop detection
+ bool inPress:1;
+ bool inRelease:1;
+ bool inIM:1;
+
+ bool enabled : 1;
+
+ QGraphicsItem *imeItem;
+ QList<QmlGraphicsItem *> targets;
+ QmlGraphicsItem *item;
+};
+
+class QmlGraphicsKeysAttached : public QObject, public QmlGraphicsItemKeyFilter
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QmlGraphicsKeysAttached)
+
+ Q_PROPERTY(bool enabled READ enabled WRITE setEnabled NOTIFY enabledChanged)
+ Q_PROPERTY(QList<QmlGraphicsItem *> *forwardTo READ forwardTo)
+
+public:
+ QmlGraphicsKeysAttached(QObject *parent=0);
+ ~QmlGraphicsKeysAttached();
+
+ bool enabled() const { Q_D(const QmlGraphicsKeysAttached); return d->enabled; }
+ void setEnabled(bool enabled) {
+ Q_D(QmlGraphicsKeysAttached);
+ if (enabled != d->enabled) {
+ d->enabled = enabled;
+ emit enabledChanged();
+ }
+ }
+
+ QList<QmlGraphicsItem *> *forwardTo() {
+ Q_D(QmlGraphicsKeysAttached);
+ return &d->targets;
+ }
+
+ virtual void componentComplete();
+
+ static QmlGraphicsKeysAttached *qmlAttachedProperties(QObject *);
+
+Q_SIGNALS:
+ void enabledChanged();
+ void pressed(QmlGraphicsKeyEvent *event);
+ void released(QmlGraphicsKeyEvent *event);
+ void digit0Pressed(QmlGraphicsKeyEvent *event);
+ void digit1Pressed(QmlGraphicsKeyEvent *event);
+ void digit2Pressed(QmlGraphicsKeyEvent *event);
+ void digit3Pressed(QmlGraphicsKeyEvent *event);
+ void digit4Pressed(QmlGraphicsKeyEvent *event);
+ void digit5Pressed(QmlGraphicsKeyEvent *event);
+ void digit6Pressed(QmlGraphicsKeyEvent *event);
+ void digit7Pressed(QmlGraphicsKeyEvent *event);
+ void digit8Pressed(QmlGraphicsKeyEvent *event);
+ void digit9Pressed(QmlGraphicsKeyEvent *event);
+
+ void leftPressed(QmlGraphicsKeyEvent *event);
+ void rightPressed(QmlGraphicsKeyEvent *event);
+ void upPressed(QmlGraphicsKeyEvent *event);
+ void downPressed(QmlGraphicsKeyEvent *event);
+
+ void asteriskPressed(QmlGraphicsKeyEvent *event);
+ void numberSignPressed(QmlGraphicsKeyEvent *event);
+ void escapePressed(QmlGraphicsKeyEvent *event);
+ void returnPressed(QmlGraphicsKeyEvent *event);
+ void enterPressed(QmlGraphicsKeyEvent *event);
+ void deletePressed(QmlGraphicsKeyEvent *event);
+ void spacePressed(QmlGraphicsKeyEvent *event);
+ void backPressed(QmlGraphicsKeyEvent *event);
+ void cancelPressed(QmlGraphicsKeyEvent *event);
+ void selectPressed(QmlGraphicsKeyEvent *event);
+ void yesPressed(QmlGraphicsKeyEvent *event);
+ void noPressed(QmlGraphicsKeyEvent *event);
+ void context1Pressed(QmlGraphicsKeyEvent *event);
+ void context2Pressed(QmlGraphicsKeyEvent *event);
+ void context3Pressed(QmlGraphicsKeyEvent *event);
+ void context4Pressed(QmlGraphicsKeyEvent *event);
+ void callPressed(QmlGraphicsKeyEvent *event);
+ void hangupPressed(QmlGraphicsKeyEvent *event);
+ void flipPressed(QmlGraphicsKeyEvent *event);
+ void menuPressed(QmlGraphicsKeyEvent *event);
+ void volumeUpPressed(QmlGraphicsKeyEvent *event);
+ void volumeDownPressed(QmlGraphicsKeyEvent *event);
+
+private:
+ virtual void keyPressed(QKeyEvent *event);
+ virtual void keyReleased(QKeyEvent *event);
+ virtual void inputMethodEvent(QInputMethodEvent *);
+ virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const;
+
+ const QByteArray keyToSignal(int key) {
+ QByteArray keySignal;
+ if (key >= Qt::Key_0 && key <= Qt::Key_9) {
+ keySignal = "digit0Pressed";
+ keySignal[5] = '0' + (key - Qt::Key_0);
+ } else {
+ int i = 0;
+ while (sigMap[i].key && sigMap[i].key != key)
+ ++i;
+ keySignal = sigMap[i].sig;
+ }
+ return keySignal;
+ }
+
+ struct SigMap {
+ int key;
+ const char *sig;
+ };
+
+ static const SigMap sigMap[];
+};
+
Q_DECLARE_OPERATORS_FOR_FLAGS(QmlGraphicsItemPrivate::ChangeTypes);
QT_END_NAMESPACE
+QML_DECLARE_TYPE(QmlGraphicsKeysAttached)
+QML_DECLARE_TYPEINFO(QmlGraphicsKeysAttached, QML_HAS_ATTACHED_PROPERTIES)
+QML_DECLARE_TYPE(QmlGraphicsKeyNavigationAttached)
+QML_DECLARE_TYPEINFO(QmlGraphicsKeyNavigationAttached, QML_HAS_ATTACHED_PROPERTIES)
+
#endif // QMLGRAPHICSITEM_P_H
diff --git a/src/declarative/graphicsitems/qmlgraphicsitemsmodule.cpp b/src/declarative/graphicsitems/qmlgraphicsitemsmodule.cpp
new file mode 100644
index 0000000..127aec8
--- /dev/null
+++ b/src/declarative/graphicsitems/qmlgraphicsitemsmodule.cpp
@@ -0,0 +1,164 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtDeclarative module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qmlgraphicsitemsmodule_p.h"
+
+#include <QtGui/qaction.h>
+#include <QtGui/qvalidator.h>
+#include <QtGui/qgraphicseffect.h>
+
+#include "qmlgraphicsevents_p_p.h"
+#include "qmlgraphicseffects_p.h"
+#include "qmlgraphicsscalegrid_p_p.h"
+#include "qmlgraphicsanimatedimage_p.h"
+#include "qmlgraphicsborderimage_p.h"
+#include "qmlgraphicspositioners_p.h"
+#include "qmlgraphicsmouseregion_p.h"
+#include "qmlgraphicsflickable_p.h"
+#include "qmlgraphicsflickable_p_p.h"
+#include "qmlgraphicsflipable_p.h"
+#include "qmlgraphicsfocuspanel_p.h"
+#include "qmlgraphicsfocusscope_p.h"
+#include "qmlgraphicsgraphicsobjectcontainer_p.h"
+#include "qmlgraphicsgridview_p.h"
+#include "qmlgraphicsimage_p.h"
+#include "qmlgraphicsitem_p.h"
+#include "qmlgraphicslayoutitem_p.h"
+#include "qmlgraphicslistview_p.h"
+#include "qmlgraphicsloader_p.h"
+#include "qmlgraphicsmouseregion_p.h"
+#include "qmlgraphicsparticles_p.h"
+#include "qmlgraphicspath_p.h"
+#include "qmlgraphicspathview_p.h"
+#include "qmlgraphicsrectangle_p.h"
+#include "qmlgraphicsrepeater_p.h"
+#include "qmlgraphicstext_p.h"
+#include "qmlgraphicstextedit_p.h"
+#include "qmlgraphicstextinput_p.h"
+#include "qmlgraphicsvisualitemmodel_p.h"
+#ifdef QT_WEBKIT_LIB
+#include "qmlgraphicswebview_p.h"
+#include "qmlgraphicswebview_p_p.h"
+#endif
+#include "qmlgraphicsanchors_p.h"
+
+#define QML_REGISTER_TYPE(URI,VMAJ,VMIN,TYPE,CLASS) \
+ qmlRegisterType<CLASS>(#URI, VMAJ, VMIN, #TYPE, #CLASS)
+
+#define QML_REGISTER_NOCREATE_TYPE(CLASS) \
+ qmlRegisterType<CLASS>(#CLASS)
+
+void QmlGraphicsItemModule::defineModule()
+{
+ QML_REGISTER_TYPE(Qt,4,6,AnimatedImage,QmlGraphicsAnimatedImage);
+ QML_REGISTER_TYPE(Qt,4,6,Blur,QGraphicsBlurEffect);
+ QML_REGISTER_TYPE(Qt,4,6,BorderImage,QmlGraphicsBorderImage);
+ QML_REGISTER_TYPE(Qt,4,6,Colorize,QGraphicsColorizeEffect);
+ QML_REGISTER_TYPE(Qt,4,6,Column,QmlGraphicsColumn);
+ QML_REGISTER_TYPE(Qt,4,6,Drag,QmlGraphicsDrag);
+ QML_REGISTER_TYPE(Qt,4,6,DropShadow,QGraphicsDropShadowEffect);
+ QML_REGISTER_TYPE(Qt,4,6,Flickable,QmlGraphicsFlickable);
+ QML_REGISTER_TYPE(Qt,4,6,Flipable,QmlGraphicsFlipable);
+ QML_REGISTER_TYPE(Qt,4,6,Flow,QmlGraphicsFlow);
+ QML_REGISTER_TYPE(Qt,4,6,FocusPanel,QmlGraphicsFocusPanel);
+ QML_REGISTER_TYPE(Qt,4,6,FocusScope,QmlGraphicsFocusScope);
+ QML_REGISTER_TYPE(Qt,4,6,Gradient,QmlGraphicsGradient);
+ QML_REGISTER_TYPE(Qt,4,6,GradientStop,QmlGraphicsGradientStop);
+ QML_REGISTER_TYPE(Qt,4,6,GraphicsObjectContainer,QmlGraphicsGraphicsObjectContainer);
+ QML_REGISTER_TYPE(Qt,4,6,Grid,QmlGraphicsGrid);
+ QML_REGISTER_TYPE(Qt,4,6,GridView,QmlGraphicsGridView);
+ QML_REGISTER_TYPE(Qt,4,6,Image,QmlGraphicsImage);
+ QML_REGISTER_TYPE(Qt,4,6,Item,QmlGraphicsItem);
+ QML_REGISTER_TYPE(Qt,4,6,KeyNavigation,QmlGraphicsKeyNavigationAttached);
+ QML_REGISTER_TYPE(Qt,4,6,Keys,QmlGraphicsKeysAttached);
+ QML_REGISTER_TYPE(Qt,4,6,LayoutItem,QmlGraphicsLayoutItem);
+ QML_REGISTER_TYPE(Qt,4,6,ListView,QmlGraphicsListView);
+ QML_REGISTER_TYPE(Qt,4,6,Loader,QmlGraphicsLoader);
+ QML_REGISTER_TYPE(Qt,4,6,MouseRegion,QmlGraphicsMouseRegion);
+ QML_REGISTER_TYPE(Qt,4,6,Opacity,QGraphicsOpacityEffect);
+ QML_REGISTER_TYPE(Qt,4,6,ParticleMotion,QmlGraphicsParticleMotion);
+ QML_REGISTER_TYPE(Qt,4,6,ParticleMotionGravity,QmlGraphicsParticleMotionGravity);
+ QML_REGISTER_TYPE(Qt,4,6,ParticleMotionLinear,QmlGraphicsParticleMotionLinear);
+ QML_REGISTER_TYPE(Qt,4,6,ParticleMotionWander,QmlGraphicsParticleMotionWander);
+ QML_REGISTER_TYPE(Qt,4,6,Particles,QmlGraphicsParticles);
+ QML_REGISTER_TYPE(Qt,4,6,Path,QmlGraphicsPath);
+ QML_REGISTER_TYPE(Qt,4,6,PathAttribute,QmlGraphicsPathAttribute);
+ QML_REGISTER_TYPE(Qt,4,6,PathCubic,QmlGraphicsPathCubic);
+ QML_REGISTER_TYPE(Qt,4,6,PathLine,QmlGraphicsPathLine);
+ QML_REGISTER_TYPE(Qt,4,6,PathPercent,QmlGraphicsPathPercent);
+ QML_REGISTER_TYPE(Qt,4,6,PathQuad,QmlGraphicsPathQuad);
+ QML_REGISTER_TYPE(Qt,4,6,PathView,QmlGraphicsPathView);
+ QML_REGISTER_TYPE(Qt,4,6,Pen,QmlGraphicsPen);
+ QML_REGISTER_TYPE(Qt,4,6,QDoubleValidator,QDoubleValidator);
+ QML_REGISTER_TYPE(Qt,4,6,QIntValidator,QIntValidator);
+ QML_REGISTER_TYPE(Qt,4,6,QRegExpValidator,QRegExpValidator);
+ QML_REGISTER_TYPE(Qt,4,6,Rectangle,QmlGraphicsRectangle);
+ QML_REGISTER_TYPE(Qt,4,6,Repeater,QmlGraphicsRepeater);
+ QML_REGISTER_TYPE(Qt,4,6,Rotation,QGraphicsRotation);
+ QML_REGISTER_TYPE(Qt,4,6,Row,QmlGraphicsRow);
+ QML_REGISTER_TYPE(Qt,4,6,Scale,QGraphicsScale);
+ QML_REGISTER_TYPE(Qt,4,6,Text,QmlGraphicsText);
+ QML_REGISTER_TYPE(Qt,4,6,TextEdit,QmlGraphicsTextEdit);
+ QML_REGISTER_TYPE(Qt,4,6,TextInput,QmlGraphicsTextInput);
+ QML_REGISTER_TYPE(Qt,4,6,ViewSection,QmlGraphicsViewSection);
+ QML_REGISTER_TYPE(Qt,4,6,VisibleArea,QmlGraphicsFlickableVisibleArea);
+ QML_REGISTER_TYPE(Qt,4,6,VisualDataModel,QmlGraphicsVisualDataModel);
+ QML_REGISTER_TYPE(Qt,4,6,VisualItemModel,QmlGraphicsVisualItemModel);
+#ifdef QT_WEBKIT_LIB
+ QML_REGISTER_TYPE(Qt,4,6,WebView,QmlGraphicsWebView);
+#endif
+
+ QML_REGISTER_NOCREATE_TYPE(QmlGraphicsAnchors);
+ QML_REGISTER_NOCREATE_TYPE(QGraphicsEffect);
+ QML_REGISTER_NOCREATE_TYPE(QmlGraphicsKeyEvent);
+ QML_REGISTER_NOCREATE_TYPE(QmlGraphicsMouseEvent);
+ QML_REGISTER_NOCREATE_TYPE(QGraphicsObject);
+ QML_REGISTER_NOCREATE_TYPE(QGraphicsTransform);
+ QML_REGISTER_NOCREATE_TYPE(QmlGraphicsPathElement);
+ QML_REGISTER_NOCREATE_TYPE(QmlGraphicsCurve);
+ QML_REGISTER_NOCREATE_TYPE(QmlGraphicsScaleGrid);
+ QML_REGISTER_NOCREATE_TYPE(QValidator);
+ QML_REGISTER_NOCREATE_TYPE(QmlGraphicsVisualModel);
+ QML_REGISTER_NOCREATE_TYPE(QAction);
+#ifdef QT_WEBKIT_LIB
+ QML_REGISTER_NOCREATE_TYPE(QmlGraphicsWebSettings);
+#endif
+}
diff --git a/src/declarative/graphicsitems/qmlgraphicsitemsmodule_p.h b/src/declarative/graphicsitems/qmlgraphicsitemsmodule_p.h
new file mode 100644
index 0000000..bf38c24
--- /dev/null
+++ b/src/declarative/graphicsitems/qmlgraphicsitemsmodule_p.h
@@ -0,0 +1,63 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtDeclarative module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QMLGRAPHICSITEMMODULE_H
+#define QMLGRAPHICSITEMMODULE_H
+
+#include <qml.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QmlGraphicsItemModule
+{
+public:
+ static void defineModule();
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QMLGRAPHICSITEMMODULE_H
diff --git a/src/declarative/graphicsitems/qmlgraphicslayoutitem.cpp b/src/declarative/graphicsitems/qmlgraphicslayoutitem.cpp
index 7227eb0..98361dc 100644
--- a/src/declarative/graphicsitems/qmlgraphicslayoutitem.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicslayoutitem.cpp
@@ -47,8 +47,6 @@
QT_BEGIN_NAMESPACE
-QML_DEFINE_TYPE(Qt,4,6,LayoutItem,QmlGraphicsLayoutItem)
-
/*!
\qmlclass LayoutItem QmlGraphicsLayoutItem
\brief The LayoutItem element allows you to place your Fluid UI elements inside a classical Qt layout.
diff --git a/src/declarative/graphicsitems/qmlgraphicslistview.cpp b/src/declarative/graphicsitems/qmlgraphicslistview.cpp
index d0b3739..db0afe1 100644
--- a/src/declarative/graphicsitems/qmlgraphicslistview.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicslistview.cpp
@@ -85,72 +85,6 @@ QString QmlGraphicsViewSection::sectionString(const QString &value)
return value;
}
-class QmlGraphicsListViewAttached : public QObject
-{
- Q_OBJECT
-public:
- QmlGraphicsListViewAttached(QObject *parent)
- : QObject(parent), m_view(0), m_isCurrent(false), m_delayRemove(false) {}
- ~QmlGraphicsListViewAttached() {}
-
- Q_PROPERTY(QmlGraphicsListView *view READ view CONSTANT)
- QmlGraphicsListView *view() { return m_view; }
-
- Q_PROPERTY(bool isCurrentItem READ isCurrentItem NOTIFY currentItemChanged)
- bool isCurrentItem() const { return m_isCurrent; }
- void setIsCurrentItem(bool c) {
- if (m_isCurrent != c) {
- m_isCurrent = c;
- emit currentItemChanged();
- }
- }
-
- Q_PROPERTY(QString prevSection READ prevSection NOTIFY prevSectionChanged)
- QString prevSection() const { return m_prevSection; }
- void setPrevSection(const QString &sect) {
- if (m_prevSection != sect) {
- m_prevSection = sect;
- emit prevSectionChanged();
- }
- }
-
- Q_PROPERTY(QString section READ section NOTIFY sectionChanged)
- QString section() const { return m_section; }
- void setSection(const QString &sect) {
- if (m_section != sect) {
- m_section = sect;
- emit sectionChanged();
- }
- }
-
- Q_PROPERTY(bool delayRemove READ delayRemove WRITE setDelayRemove NOTIFY delayRemoveChanged)
- bool delayRemove() const { return m_delayRemove; }
- void setDelayRemove(bool delay) {
- if (m_delayRemove != delay) {
- m_delayRemove = delay;
- emit delayRemoveChanged();
- }
- }
-
- void emitAdd() { emit add(); }
- void emitRemove() { emit remove(); }
-
-Q_SIGNALS:
- void currentItemChanged();
- void sectionChanged();
- void prevSectionChanged();
- void delayRemoveChanged();
- void add();
- void remove();
-
-public:
- QmlGraphicsListView *m_view;
- bool m_isCurrent;
- mutable QString m_section;
- QString m_prevSection;
- bool m_delayRemove;
-};
-
//----------------------------------------------------------------------------
class FxListItem
@@ -2740,9 +2674,4 @@ QmlGraphicsListViewAttached *QmlGraphicsListView::qmlAttachedProperties(QObject
return new QmlGraphicsListViewAttached(obj);
}
-QML_DEFINE_TYPE(Qt,4,6,ListView,QmlGraphicsListView)
-QML_DEFINE_TYPE(Qt,4,6,ViewSection,QmlGraphicsViewSection)
-
QT_END_NAMESPACE
-
-#include <qmlgraphicslistview.moc>
diff --git a/src/declarative/graphicsitems/qmlgraphicslistview_p.h b/src/declarative/graphicsitems/qmlgraphicslistview_p.h
index 79d678a..42ace15 100644
--- a/src/declarative/graphicsitems/qmlgraphicslistview_p.h
+++ b/src/declarative/graphicsitems/qmlgraphicslistview_p.h
@@ -227,6 +227,73 @@ private Q_SLOTS:
void animStopped();
};
+class QmlGraphicsListViewAttached : public QObject
+{
+ Q_OBJECT
+public:
+ QmlGraphicsListViewAttached(QObject *parent)
+ : QObject(parent), m_view(0), m_isCurrent(false), m_delayRemove(false) {}
+ ~QmlGraphicsListViewAttached() {}
+
+ Q_PROPERTY(QmlGraphicsListView *view READ view CONSTANT)
+ QmlGraphicsListView *view() { return m_view; }
+
+ Q_PROPERTY(bool isCurrentItem READ isCurrentItem NOTIFY currentItemChanged)
+ bool isCurrentItem() const { return m_isCurrent; }
+ void setIsCurrentItem(bool c) {
+ if (m_isCurrent != c) {
+ m_isCurrent = c;
+ emit currentItemChanged();
+ }
+ }
+
+ Q_PROPERTY(QString prevSection READ prevSection NOTIFY prevSectionChanged)
+ QString prevSection() const { return m_prevSection; }
+ void setPrevSection(const QString &sect) {
+ if (m_prevSection != sect) {
+ m_prevSection = sect;
+ emit prevSectionChanged();
+ }
+ }
+
+ Q_PROPERTY(QString section READ section NOTIFY sectionChanged)
+ QString section() const { return m_section; }
+ void setSection(const QString &sect) {
+ if (m_section != sect) {
+ m_section = sect;
+ emit sectionChanged();
+ }
+ }
+
+ Q_PROPERTY(bool delayRemove READ delayRemove WRITE setDelayRemove NOTIFY delayRemoveChanged)
+ bool delayRemove() const { return m_delayRemove; }
+ void setDelayRemove(bool delay) {
+ if (m_delayRemove != delay) {
+ m_delayRemove = delay;
+ emit delayRemoveChanged();
+ }
+ }
+
+ void emitAdd() { emit add(); }
+ void emitRemove() { emit remove(); }
+
+Q_SIGNALS:
+ void currentItemChanged();
+ void sectionChanged();
+ void prevSectionChanged();
+ void delayRemoveChanged();
+ void add();
+ void remove();
+
+public:
+ QmlGraphicsListView *m_view;
+ bool m_isCurrent;
+ mutable QString m_section;
+ QString m_prevSection;
+ bool m_delayRemove;
+};
+
+
QT_END_NAMESPACE
QML_DECLARE_TYPEINFO(QmlGraphicsListView, QML_HAS_ATTACHED_PROPERTIES)
diff --git a/src/declarative/graphicsitems/qmlgraphicsloader.cpp b/src/declarative/graphicsitems/qmlgraphicsloader.cpp
index b3486ef..d778c83 100644
--- a/src/declarative/graphicsitems/qmlgraphicsloader.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsloader.cpp
@@ -108,8 +108,6 @@ void QmlGraphicsLoaderPrivate::initResize()
_q_updateSize();
}
-QML_DEFINE_TYPE(Qt,4,6,Loader,QmlGraphicsLoader)
-
/*!
\qmlclass Loader QmlGraphicsLoader
\inherits Item
diff --git a/src/declarative/graphicsitems/qmlgraphicsmouseregion.cpp b/src/declarative/graphicsitems/qmlgraphicsmouseregion.cpp
index bd21e7a..fe72e84 100644
--- a/src/declarative/graphicsitems/qmlgraphicsmouseregion.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsmouseregion.cpp
@@ -49,7 +49,6 @@
QT_BEGIN_NAMESPACE
static const int PressAndHoldDelay = 800;
-QML_DEFINE_TYPE(Qt,4,6,Drag,QmlGraphicsDrag)
QmlGraphicsDrag::QmlGraphicsDrag(QObject *parent)
: QObject(parent), _target(0), _axis(XandYAxis), _xmin(0), _xmax(0), _ymin(0), _ymax(0)
{
@@ -231,8 +230,6 @@ QmlGraphicsMouseRegionPrivate::~QmlGraphicsMouseRegionPrivate()
The \e accepted property of the MouseEvent parameter is ignored in this handler.
*/
-QML_DEFINE_TYPE(Qt,4,6,MouseRegion,QmlGraphicsMouseRegion)
-
/*!
\internal
\class QmlGraphicsMouseRegion
diff --git a/src/declarative/graphicsitems/qmlgraphicsparticles.cpp b/src/declarative/graphicsitems/qmlgraphicsparticles.cpp
index 8c5fb4f..5edd59e 100644
--- a/src/declarative/graphicsitems/qmlgraphicsparticles.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsparticles.cpp
@@ -108,8 +108,6 @@ public:
//---------------------------------------------------------------------------
-QML_DEFINE_TYPE(Qt,4,6,ParticleMotion,QmlGraphicsParticleMotion)
-
/*!
\class QmlGraphicsParticleMotion
\ingroup group_effects
@@ -169,8 +167,6 @@ void QmlGraphicsParticleMotion::destroy(QmlGraphicsParticle &particle)
\brief The QmlGraphicsParticleMotionLinear class moves the particles linearly.
*/
-QML_DEFINE_TYPE(Qt,4,6,ParticleMotionLinear,QmlGraphicsParticleMotionLinear)
-
void QmlGraphicsParticleMotionLinear::advance(QmlGraphicsParticle &p, int interval)
{
p.x += interval * p.x_velocity;
@@ -191,8 +187,6 @@ void QmlGraphicsParticleMotionLinear::advance(QmlGraphicsParticle &p, int interv
\brief The QmlGraphicsParticleMotionGravity class moves the particles towards a point.
*/
-QML_DEFINE_TYPE(Qt,4,6,ParticleMotionGravity,QmlGraphicsParticleMotionGravity)
-
/*!
\qmlproperty int ParticleMotionGravity::xattractor
\qmlproperty int ParticleMotionGravity::yattractor
@@ -293,8 +287,6 @@ Rectangle {
This property holds how quickly the paricles will move from side to side.
*/
-QML_DEFINE_TYPE(Qt,4,6,ParticleMotionWander,QmlGraphicsParticleMotionWander)
-
void QmlGraphicsParticleMotionWander::advance(QmlGraphicsParticle &p, int interval)
{
if (!particles)
@@ -561,8 +553,6 @@ void QmlGraphicsParticlesPrivate::updateOpacity(QmlGraphicsParticle &p, int age)
}
}
-QML_DEFINE_TYPE(Qt,4,6,Particles,QmlGraphicsParticles)
-
/*!
\qmlclass Particles
\brief The Particles object generates and moves particles.
diff --git a/src/declarative/graphicsitems/qmlgraphicspath.cpp b/src/declarative/graphicsitems/qmlgraphicspath.cpp
index 18f27af..fae8161 100644
--- a/src/declarative/graphicsitems/qmlgraphicspath.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicspath.cpp
@@ -49,14 +49,6 @@
#include <private/qbezier_p.h>
QT_BEGIN_NAMESPACE
-QML_DEFINE_TYPE(Qt,4,6,Path,QmlGraphicsPath)
-QML_DEFINE_NOCREATE_TYPE(QmlGraphicsPathElement)
-QML_DEFINE_NOCREATE_TYPE(QmlGraphicsCurve)
-QML_DEFINE_TYPE(Qt,4,6,PathAttribute,QmlGraphicsPathAttribute)
-QML_DEFINE_TYPE(Qt,4,6,PathPercent,QmlGraphicsPathPercent)
-QML_DEFINE_TYPE(Qt,4,6,PathLine,QmlGraphicsPathLine)
-QML_DEFINE_TYPE(Qt,4,6,PathQuad,QmlGraphicsPathQuad)
-QML_DEFINE_TYPE(Qt,4,6,PathCubic,QmlGraphicsPathCubic)
/*!
\qmlclass PathElement QmlGraphicsPathElement
diff --git a/src/declarative/graphicsitems/qmlgraphicspathview.cpp b/src/declarative/graphicsitems/qmlgraphicspathview.cpp
index 6718d25..a1c9229 100644
--- a/src/declarative/graphicsitems/qmlgraphicspathview.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicspathview.cpp
@@ -54,9 +54,6 @@
QT_BEGIN_NAMESPACE
-QML_DEFINE_TYPE(Qt,4,6,PathView,QmlGraphicsPathView)
-
-
inline qreal qmlMod(qreal x, qreal y)
{
#ifdef QT_USE_MATH_H_FLOATS
diff --git a/src/declarative/graphicsitems/qmlgraphicspositioners.cpp b/src/declarative/graphicsitems/qmlgraphicspositioners.cpp
index 5b081a2..142cdce 100644
--- a/src/declarative/graphicsitems/qmlgraphicspositioners.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicspositioners.cpp
@@ -288,7 +288,6 @@ void QmlGraphicsBasePositioner::finishApplyTransitions()
d->moveActions.clear();
}
-QML_DEFINE_TYPE(Qt,4,6,Column,QmlGraphicsColumn)
/*!
\qmlclass Column QmlGraphicsColumn
\brief The Column item lines up its children vertically.
@@ -418,7 +417,6 @@ void QmlGraphicsColumn::doPositioning()
}
}
-QML_DEFINE_TYPE(Qt,4,6,Row,QmlGraphicsRow)
/*!
\qmlclass Row QmlGraphicsRow
\brief The Row item lines up its children horizontally.
@@ -523,7 +521,6 @@ void QmlGraphicsRow::doPositioning()
}
}
-QML_DEFINE_TYPE(Qt,4,6,Grid,QmlGraphicsGrid)
/*!
\qmlclass Grid QmlGraphicsGrid
@@ -711,7 +708,6 @@ void QmlGraphicsGrid::doPositioning()
}
-QML_DEFINE_TYPE(Qt,4,6,Flow,QmlGraphicsFlow)
/*!
\qmlclass Flow QmlGraphicsFlow
\brief The Flow item lines up its children side by side, wrapping as necessary.
diff --git a/src/declarative/graphicsitems/qmlgraphicsrectangle.cpp b/src/declarative/graphicsitems/qmlgraphicsrectangle.cpp
index cc09436..ec44d93 100644
--- a/src/declarative/graphicsitems/qmlgraphicsrectangle.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsrectangle.cpp
@@ -46,9 +46,6 @@
#include <QtCore/qmath.h>
QT_BEGIN_NAMESPACE
-QML_DEFINE_TYPE(Qt,4,6,Pen,QmlGraphicsPen)
-QML_DEFINE_TYPE(Qt,4,6,GradientStop,QmlGraphicsGradientStop)
-QML_DEFINE_TYPE(Qt,4,6,Gradient,QmlGraphicsGradient)
/*!
\internal
@@ -149,7 +146,6 @@ void QmlGraphicsGradient::doUpdate()
emit updated();
}
-QML_DEFINE_TYPE(Qt,4,6,Rectangle,QmlGraphicsRectangle)
/*!
\qmlclass Rectangle QmlGraphicsRectangle
diff --git a/src/declarative/graphicsitems/qmlgraphicsrepeater.cpp b/src/declarative/graphicsitems/qmlgraphicsrepeater.cpp
index 99f0faa..f0e5bb3 100644
--- a/src/declarative/graphicsitems/qmlgraphicsrepeater.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsrepeater.cpp
@@ -60,8 +60,6 @@ QmlGraphicsRepeaterPrivate::~QmlGraphicsRepeaterPrivate()
delete model;
}
-QML_DEFINE_TYPE(Qt,4,6,Repeater,QmlGraphicsRepeater)
-
/*!
\qmlclass Repeater QmlGraphicsRepeater
\inherits Item
diff --git a/src/declarative/graphicsitems/qmlgraphicsscalegrid.cpp b/src/declarative/graphicsitems/qmlgraphicsscalegrid.cpp
index f50b79b..94b562b 100644
--- a/src/declarative/graphicsitems/qmlgraphicsscalegrid.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsscalegrid.cpp
@@ -52,7 +52,6 @@ QT_BEGIN_NAMESPACE
\class QmlGraphicsScaleGrid
\brief The QmlGraphicsScaleGrid class allows you to specify a 3x3 grid to use in scaling an image.
*/
-QML_DEFINE_NOCREATE_TYPE(QmlGraphicsScaleGrid)
QmlGraphicsScaleGrid::QmlGraphicsScaleGrid(QObject *parent) : QObject(parent), _left(0), _top(0), _right(0), _bottom(0)
{
diff --git a/src/declarative/graphicsitems/qmlgraphicstext.cpp b/src/declarative/graphicsitems/qmlgraphicstext.cpp
index b13fb7c..89081eb 100644
--- a/src/declarative/graphicsitems/qmlgraphicstext.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicstext.cpp
@@ -55,7 +55,6 @@
#include <qmath.h>
QT_BEGIN_NAMESPACE
-QML_DEFINE_TYPE(Qt,4,6,Text,QmlGraphicsText)
/*!
\qmlclass Text QmlGraphicsText
diff --git a/src/declarative/graphicsitems/qmlgraphicstextedit.cpp b/src/declarative/graphicsitems/qmlgraphicstextedit.cpp
index fc80258..00f7e42 100644
--- a/src/declarative/graphicsitems/qmlgraphicstextedit.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicstextedit.cpp
@@ -56,7 +56,6 @@
#include <private/qtextcontrol_p.h>
QT_BEGIN_NAMESPACE
-QML_DEFINE_TYPE(Qt,4,6,TextEdit,QmlGraphicsTextEdit)
/*!
\qmlclass TextEdit QmlGraphicsTextEdit
diff --git a/src/declarative/graphicsitems/qmlgraphicstextinput.cpp b/src/declarative/graphicsitems/qmlgraphicstextinput.cpp
index 6d79c7a..ea54351 100644
--- a/src/declarative/graphicsitems/qmlgraphicstextinput.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicstextinput.cpp
@@ -51,12 +51,6 @@
QT_BEGIN_NAMESPACE
-QML_DEFINE_TYPE(Qt,4,6,TextInput,QmlGraphicsTextInput);
-QML_DEFINE_NOCREATE_TYPE(QValidator);
-QML_DEFINE_TYPE(Qt,4,6,QIntValidator,QIntValidator);
-QML_DEFINE_TYPE(Qt,4,6,QDoubleValidator,QDoubleValidator);
-QML_DEFINE_TYPE(Qt,4,6,QRegExpValidator,QRegExpValidator);
-
/*!
\qmlclass TextInput QmlGraphicsTextInput
The TextInput item allows you to add an editable line of text to a scene.
diff --git a/src/declarative/graphicsitems/qmlgraphicsvisualitemmodel.cpp b/src/declarative/graphicsitems/qmlgraphicsvisualitemmodel.cpp
index 2fc143d..b4487a6 100644
--- a/src/declarative/graphicsitems/qmlgraphicsvisualitemmodel.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsvisualitemmodel.cpp
@@ -66,44 +66,6 @@ QML_DECLARE_TYPE(QListModelInterface)
QT_BEGIN_NAMESPACE
-class QmlGraphicsVisualItemModelAttached : public QObject
-{
- Q_OBJECT
-
-public:
- QmlGraphicsVisualItemModelAttached(QObject *parent)
- : QObject(parent), m_index(0) {}
- ~QmlGraphicsVisualItemModelAttached() {
- attachedProperties.remove(parent());
- }
-
- Q_PROPERTY(int index READ index NOTIFY indexChanged)
- int index() const { return m_index; }
- void setIndex(int idx) {
- if (m_index != idx) {
- m_index = idx;
- emit indexChanged();
- }
- }
-
- static QmlGraphicsVisualItemModelAttached *properties(QObject *obj) {
- QmlGraphicsVisualItemModelAttached *rv = attachedProperties.value(obj);
- if (!rv) {
- rv = new QmlGraphicsVisualItemModelAttached(obj);
- attachedProperties.insert(obj, rv);
- }
- return rv;
- }
-
-Q_SIGNALS:
- void indexChanged();
-
-public:
- int m_index;
-
- static QHash<QObject*, QmlGraphicsVisualItemModelAttached*> attachedProperties;
-};
-
QHash<QObject*, QmlGraphicsVisualItemModelAttached*> QmlGraphicsVisualItemModelAttached::attachedProperties;
@@ -1146,10 +1108,6 @@ void QmlGraphicsVisualDataModel::_q_destroyingPackage(QmlPackage *package)
emit destroyingItem(qobject_cast<QmlGraphicsItem*>(package->part(d->m_part)));
}
-QML_DEFINE_NOCREATE_TYPE(QmlGraphicsVisualModel);
-QML_DEFINE_TYPE(Qt,4,6,VisualItemModel,QmlGraphicsVisualItemModel)
-QML_DEFINE_TYPE(Qt,4,6,VisualDataModel,QmlGraphicsVisualDataModel)
-
QT_END_NAMESPACE
#include <qmlgraphicsvisualitemmodel.moc>
diff --git a/src/declarative/graphicsitems/qmlgraphicsvisualitemmodel_p.h b/src/declarative/graphicsitems/qmlgraphicsvisualitemmodel_p.h
index ef849b0..9ebf626 100644
--- a/src/declarative/graphicsitems/qmlgraphicsvisualitemmodel_p.h
+++ b/src/declarative/graphicsitems/qmlgraphicsvisualitemmodel_p.h
@@ -195,6 +195,45 @@ private:
Q_DISABLE_COPY(QmlGraphicsVisualDataModel)
};
+class QmlGraphicsVisualItemModelAttached : public QObject
+{
+ Q_OBJECT
+
+public:
+ QmlGraphicsVisualItemModelAttached(QObject *parent)
+ : QObject(parent), m_index(0) {}
+ ~QmlGraphicsVisualItemModelAttached() {
+ attachedProperties.remove(parent());
+ }
+
+ Q_PROPERTY(int index READ index NOTIFY indexChanged)
+ int index() const { return m_index; }
+ void setIndex(int idx) {
+ if (m_index != idx) {
+ m_index = idx;
+ emit indexChanged();
+ }
+ }
+
+ static QmlGraphicsVisualItemModelAttached *properties(QObject *obj) {
+ QmlGraphicsVisualItemModelAttached *rv = attachedProperties.value(obj);
+ if (!rv) {
+ rv = new QmlGraphicsVisualItemModelAttached(obj);
+ attachedProperties.insert(obj, rv);
+ }
+ return rv;
+ }
+
+Q_SIGNALS:
+ void indexChanged();
+
+public:
+ int m_index;
+
+ static QHash<QObject*, QmlGraphicsVisualItemModelAttached*> attachedProperties;
+};
+
+
QT_END_NAMESPACE
QML_DECLARE_TYPE(QmlGraphicsVisualModel)
diff --git a/src/declarative/graphicsitems/qmlgraphicswebview.cpp b/src/declarative/graphicsitems/qmlgraphicswebview.cpp
index 85fd0d7..c71a366 100644
--- a/src/declarative/graphicsitems/qmlgraphicswebview.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicswebview.cpp
@@ -64,13 +64,9 @@
#include <qlistmodelinterface_p.h>
QT_BEGIN_NAMESPACE
-QML_DEFINE_TYPE(Qt,4,6,WebView,QmlGraphicsWebView)
-QML_DEFINE_NOCREATE_TYPE(QAction)
static const int MAX_DOUBLECLICK_TIME=500; // XXX need better gesture system
-QML_DEFINE_NOCREATE_TYPE(QmlGraphicsWebSettings)
-
class QmlGraphicsWebViewPrivate : public QmlGraphicsPaintedItemPrivate
{
Q_DECLARE_PUBLIC(QmlGraphicsWebView)
@@ -461,30 +457,6 @@ QmlList<QObject *> *QmlGraphicsWebView::javaScriptWindowObjects()
return &d->windowObjects;
}
-class QmlGraphicsWebViewAttached : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(QString windowObjectName READ windowObjectName WRITE setWindowObjectName)
-public:
- QmlGraphicsWebViewAttached(QObject *parent)
- : QObject(parent)
- {
- }
-
- QString windowObjectName() const
- {
- return m_windowObjectName;
- }
-
- void setWindowObjectName(const QString &n)
- {
- m_windowObjectName = n;
- }
-
-private:
- QString m_windowObjectName;
-};
-
QmlGraphicsWebViewAttached *QmlGraphicsWebView::qmlAttachedProperties(QObject *o)
{
return new QmlGraphicsWebViewAttached(o);
diff --git a/src/declarative/graphicsitems/qmlgraphicswebview_p.h b/src/declarative/graphicsitems/qmlgraphicswebview_p.h
index f5edb7a..0aaf895 100644
--- a/src/declarative/graphicsitems/qmlgraphicswebview_p.h
+++ b/src/declarative/graphicsitems/qmlgraphicswebview_p.h
@@ -246,11 +246,35 @@ private:
friend class QmlGraphicsWebPage;
};
+class QmlGraphicsWebViewAttached : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QString windowObjectName READ windowObjectName WRITE setWindowObjectName)
+public:
+ QmlGraphicsWebViewAttached(QObject *parent)
+ : QObject(parent)
+ {
+ }
+
+ QString windowObjectName() const
+ {
+ return m_windowObjectName;
+ }
+
+ void setWindowObjectName(const QString &n)
+ {
+ m_windowObjectName = n;
+ }
+
+private:
+ QString m_windowObjectName;
+};
+
+
QT_END_NAMESPACE
QML_DECLARE_TYPE(QmlGraphicsWebView)
QML_DECLARE_TYPEINFO(QmlGraphicsWebView, QML_HAS_ATTACHED_PROPERTIES)
-QML_DECLARE_TYPE(QAction)
QT_END_HEADER
diff --git a/src/declarative/qml/qmlcomponent.cpp b/src/declarative/qml/qmlcomponent.cpp
index 9e06016..343bd4b 100644
--- a/src/declarative/qml/qmlcomponent.cpp
+++ b/src/declarative/qml/qmlcomponent.cpp
@@ -539,7 +539,6 @@ QObject *QmlComponent::create(QmlContext *context)
QObject *QmlComponentPrivate::create(QmlContext *context,
const QBitField &bindings)
{
- QObject *create(QmlContext *context, const QBitField &);
if (!context)
context = engine->rootContext();
diff --git a/src/declarative/qml/qmlengine.cpp b/src/declarative/qml/qmlengine.cpp
index cdbe5f3..35fc3d4 100644
--- a/src/declarative/qml/qmlengine.cpp
+++ b/src/declarative/qml/qmlengine.cpp
@@ -95,6 +95,8 @@
#include <private/qobject_p.h>
#include <private/qscriptdeclarativeclass_p.h>
+#include <private/qmlgraphicsitemsmodule_p.h>
+
#ifdef Q_OS_WIN // for %APPDATA%
#include <qt_windows.h>
#include <qlibrary.h>
@@ -136,6 +138,8 @@ struct StaticQtMetaObject : public QObject
{ return &static_cast<StaticQtMetaObject*> (0)->staticQtMetaObject; }
};
+static bool qt_QmlQtModule_registered = false;
+
QmlEnginePrivate::QmlEnginePrivate(QmlEngine *e)
: captureProperties(false), rootContext(0), currentExpression(0), isDebugging(false),
contextClass(0), sharedContext(0), sharedScope(0), objectClass(0), valueTypeClass(0),
@@ -144,6 +148,10 @@ QmlEnginePrivate::QmlEnginePrivate(QmlEngine *e)
networkAccessManager(0), networkAccessManagerFactory(0),
typeManager(e), uniqueId(1)
{
+ if (!qt_QmlQtModule_registered) {
+ qt_QmlQtModule_registered = true;
+ QmlGraphicsItemModule::defineModule();
+ }
globalClass = new QmlGlobalScriptClass(&scriptEngine);
fileImportPath.append(QLibraryInfo::location(QLibraryInfo::DataPath)+QDir::separator()+QLatin1String("qml"));
}
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index b7d3c0d..63b0ec7 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -319,7 +319,7 @@
QGraphicsItem::keyPressEvent() and QGraphicsItem::keyReleaseEvent().
\value ItemClipsToShape The item clips to its own shape. The item cannot
- draw or receive mouse, tablet, drag and drop or hover events outside ts
+ draw or receive mouse, tablet, drag and drop or hover events outside its
shape. It is disabled by default. This behavior is enforced by
QGraphicsView::drawItems() or QGraphicsScene::drawItems(). This flag was
introduced in Qt 4.3.
@@ -1393,7 +1393,8 @@ QGraphicsItem::~QGraphicsItem()
}
delete d_ptr->transformData;
- qt_dataStore()->data.remove(this);
+ if (QGraphicsItemCustomDataStore *dataStore = qt_dataStore())
+ dataStore->data.remove(this);
}
/*!
diff --git a/src/gui/image/qicon.cpp b/src/gui/image/qicon.cpp
index ac1d303..bf6eb8d 100644
--- a/src/gui/image/qicon.cpp
+++ b/src/gui/image/qicon.cpp
@@ -104,6 +104,15 @@ QT_BEGIN_NAMESPACE
static QBasicAtomicInt serialNumCounter = Q_BASIC_ATOMIC_INITIALIZER(1);
+static void qt_cleanup_icon_cache();
+typedef QCache<QString, QIcon> IconCache;
+Q_GLOBAL_STATIC_WITH_INITIALIZER(IconCache, qtIconCache, qAddPostRoutine(qt_cleanup_icon_cache))
+
+static void qt_cleanup_icon_cache()
+{
+ qtIconCache()->clear();
+}
+
QIconPrivate::QIconPrivate()
: engine(0), ref(1),
serialNum(serialNumCounter.fetchAndAddRelaxed(1)),
@@ -963,15 +972,13 @@ QString QIcon::themeName()
*/
QIcon QIcon::fromTheme(const QString &name, const QIcon &fallback)
{
- static QCache <QString, QIcon> iconCache;
-
QIcon icon;
- if (iconCache.contains(name)) {
- icon = *iconCache.object(name);
+ if (qtIconCache()->contains(name)) {
+ icon = *qtIconCache()->object(name);
} else {
QIcon *cachedIcon = new QIcon(new QIconLoaderEngine(name));
- iconCache.insert(name, cachedIcon);
+ qtIconCache()->insert(name, cachedIcon);
icon = *cachedIcon;
}
diff --git a/src/gui/image/qimagereader.cpp b/src/gui/image/qimagereader.cpp
index c9e015c..9320cfc 100644
--- a/src/gui/image/qimagereader.cpp
+++ b/src/gui/image/qimagereader.cpp
@@ -263,25 +263,37 @@ static QImageIOHandler *createReadHandlerHelper(QIODevice *device,
device->seek(pos);
}
- if (!handler && !testFormat.isEmpty() && autoDetectImageFormat && !ignoresFormatAndExtension) {
+ if (!handler && !testFormat.isEmpty() && !ignoresFormatAndExtension) {
// check if any plugin supports the format (they are not allowed to
// read from the device yet).
const qint64 pos = device ? device->pos() : 0;
- for (int i = 0; i < keys.size(); ++i) {
- if (i != suffixPluginIndex) {
- QImageIOPlugin *plugin = qobject_cast<QImageIOPlugin *>(l->instance(keys.at(i)));
- if (plugin && plugin->capabilities(device, testFormat) & QImageIOPlugin::CanRead) {
+
+ if (autoDetectImageFormat) {
+ for (int i = 0; i < keys.size(); ++i) {
+ if (i != suffixPluginIndex) {
+ QImageIOPlugin *plugin = qobject_cast<QImageIOPlugin *>(l->instance(keys.at(i)));
+ if (plugin && plugin->capabilities(device, testFormat) & QImageIOPlugin::CanRead) {
#ifdef QIMAGEREADER_DEBUG
- qDebug() << "QImageReader::createReadHandler: the" << keys.at(i) << "plugin can read this format";
+ qDebug() << "QImageReader::createReadHandler: the" << keys.at(i) << "plugin can read this format";
#endif
- handler = plugin->create(device, testFormat);
- break;
+ handler = plugin->create(device, testFormat);
+ break;
+ }
}
}
+ } else {
+ QImageIOPlugin *plugin = qobject_cast<QImageIOPlugin *>(l->instance(QLatin1String(testFormat)));
+ if (plugin && plugin->capabilities(device, testFormat) & QImageIOPlugin::CanRead) {
+#ifdef QIMAGEREADER_DEBUG
+ qDebug() << "QImageReader::createReadHandler: the" << testFormat << "plugin can read this format";
+#endif
+ handler = plugin->create(device, testFormat);
+ }
}
if (device && !device->isSequential())
device->seek(pos);
}
+
#endif // QT_NO_LIBRARY
// if we don't have a handler yet, check if we have built-in support for
diff --git a/src/gui/image/qpixmapfilter.cpp b/src/gui/image/qpixmapfilter.cpp
index 37a6a18..2792e45 100644
--- a/src/gui/image/qpixmapfilter.cpp
+++ b/src/gui/image/qpixmapfilter.cpp
@@ -422,6 +422,9 @@ void QPixmapConvolutionFilter::draw(QPainter *painter, const QPointF &p, const Q
if(d->kernelWidth<=0 || d->kernelHeight <= 0)
return;
+ if (src.isNull())
+ return;
+
QPixmapFilter *filter = painter->paintEngine() && painter->paintEngine()->isExtended() ?
static_cast<QPaintEngineEx *>(painter->paintEngine())->pixmapFilter(type(), this) : 0;
QPixmapConvolutionFilter *convolutionFilter = static_cast<QPixmapConvolutionFilter*>(filter);
@@ -710,7 +713,8 @@ void expblur(QImage &img, qreal radius, bool improvedQuality = false, int transp
radius *= qreal(0.5);
Q_ASSERT(img.format() == QImage::Format_ARGB32_Premultiplied
- || img.format() == QImage::Format_RGB32);
+ || img.format() == QImage::Format_RGB32
+ || img.format() == QImage::Format_Indexed8);
// choose the alpha such that pixels at radius distance from a fully
// saturated pixel will have an alpha component of no greater than
@@ -902,6 +906,9 @@ void QPixmapBlurFilter::draw(QPainter *painter, const QPointF &p, const QPixmap
if (!painter->isActive())
return;
+ if (src.isNull())
+ return;
+
QRectF srcRect = rect;
if (srcRect.isNull())
srcRect = src.rect();
@@ -1082,6 +1089,10 @@ void QPixmapColorizeFilter::setStrength(qreal strength)
void QPixmapColorizeFilter::draw(QPainter *painter, const QPointF &dest, const QPixmap &src, const QRectF &srcRect) const
{
Q_D(const QPixmapColorizeFilter);
+
+ if (src.isNull())
+ return;
+
QPixmapFilter *filter = painter->paintEngine() && painter->paintEngine()->isExtended() ?
static_cast<QPaintEngineEx *>(painter->paintEngine())->pixmapFilter(type(), this) : 0;
QPixmapColorizeFilter *colorizeFilter = static_cast<QPixmapColorizeFilter*>(filter);
@@ -1312,6 +1323,10 @@ void QPixmapDropShadowFilter::draw(QPainter *p,
const QRectF &src) const
{
Q_D(const QPixmapDropShadowFilter);
+
+ if (px.isNull())
+ return;
+
QPixmapFilter *filter = p->paintEngine() && p->paintEngine()->isExtended() ?
static_cast<QPaintEngineEx *>(p->paintEngine())->pixmapFilter(type(), this) : 0;
QPixmapDropShadowFilter *dropShadowFilter = static_cast<QPixmapDropShadowFilter*>(filter);
diff --git a/src/gui/itemviews/qlistview.cpp b/src/gui/itemviews/qlistview.cpp
index 19b1e8c..b2def39 100644
--- a/src/gui/itemviews/qlistview.cpp
+++ b/src/gui/itemviews/qlistview.cpp
@@ -2160,7 +2160,7 @@ void QListModeViewBase::scrollContentsBy(int dx, int dy, bool scrollElasticBand)
} else {
if (flowPositions.isEmpty())
return;
- const int max = flowPositions.count() - 1;
+ const int max = scrollValueMap.count() - 1;
if (vertical && flow() == QListView::TopToBottom && dy != 0) {
int currentValue = qBound(0, verticalValue, max);
int previousValue = qBound(0, currentValue + dy, max);
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
index bb6aca9..336be91 100644
--- a/src/gui/kernel/qapplication.cpp
+++ b/src/gui/kernel/qapplication.cpp
@@ -5264,10 +5264,20 @@ QInputContext *QApplication::inputContext() const
qic = QInputContextFactory::create(QLatin1String("xim"), that);
that->d_func()->inputContext = qic;
}
-#elif defined(Q_WS_S60)
+#elif defined(Q_OS_SYMBIAN)
if (!d->inputContext) {
QApplication *that = const_cast<QApplication *>(this);
- that->d_func()->inputContext = QInputContextFactory::create(QString::fromLatin1("coefep"), that);
+ const QStringList keys = QInputContextFactory::keys();
+ // Try hbim and coefep first, then try others.
+ if (keys.contains("hbim")) {
+ that->d_func()->inputContext = QInputContextFactory::create(QLatin1String("hbim"), that);
+ } else if (keys.contains("coefep")) {
+ that->d_func()->inputContext = QInputContextFactory::create(QLatin1String("coefep"), that);
+ } else {
+ for (int c = 0; c < keys.size() && !d->inputContext; ++c) {
+ that->d_func()->inputContext = QInputContextFactory::create(keys[c], that);
+ }
+ }
}
#endif
return d->inputContext;
diff --git a/src/gui/kernel/qapplication_mac.mm b/src/gui/kernel/qapplication_mac.mm
index 3fba833..25c98c5 100644
--- a/src/gui/kernel/qapplication_mac.mm
+++ b/src/gui/kernel/qapplication_mac.mm
@@ -2168,6 +2168,7 @@ QApplicationPrivate::globalEventProcessor(EventHandlerCallRef er, EventRef event
}
if (wheel_deltaX || wheel_deltaY) {
+#ifndef QT_NO_WHEELEVENT
if (wheel_deltaX) {
QWheelEvent qwe(plocal, p, wheel_deltaX, buttons, modifiers, Qt::Horizontal);
QApplication::sendSpontaneousEvent(widget, &qwe);
@@ -2190,6 +2191,7 @@ QApplicationPrivate::globalEventProcessor(EventHandlerCallRef er, EventRef event
handled_event = false;
}
}
+#endif // QT_NO_WHEELEVENT
} else {
#ifdef QMAC_SPEAK_TO_ME
const int speak_keys = Qt::AltModifier | Qt::ShiftModifier;
@@ -2764,6 +2766,7 @@ int QApplication::keyboardInputInterval()
return QApplicationPrivate::keyboard_input_time;
}
+#ifndef QT_NO_WHEELEVENT
void QApplication::setWheelScrollLines(int n)
{
QApplicationPrivate::wheel_scroll_lines = n;
@@ -2773,6 +2776,7 @@ int QApplication::wheelScrollLines()
{
return QApplicationPrivate::wheel_scroll_lines;
}
+#endif
void QApplication::setEffectEnabled(Qt::UIEffect effect, bool enable)
{
@@ -2935,9 +2939,11 @@ bool QApplicationPrivate::qt_mac_apply_settings()
QApplication::cursorFlashTime()).toInt();
QApplication::setCursorFlashTime(num);
+#ifndef QT_NO_WHEELEVENT
num = settings.value(QLatin1String("wheelScrollLines"),
QApplication::wheelScrollLines()).toInt();
QApplication::setWheelScrollLines(num);
+#endif
QString colorspec = settings.value(QLatin1String("colorSpec"),
QVariant(QLatin1String("default"))).toString();
diff --git a/src/gui/kernel/qapplication_p.h b/src/gui/kernel/qapplication_p.h
index d19d86e..e0a6103 100644
--- a/src/gui/kernel/qapplication_p.h
+++ b/src/gui/kernel/qapplication_p.h
@@ -427,7 +427,9 @@ public:
static int cursor_flash_time;
static int mouse_double_click_time;
static int keyboard_input_time;
+#ifndef QT_NO_WHEELEVENT
static int wheel_scroll_lines;
+#endif
static bool animate_ui;
static bool animate_menu;
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index 87de602..3e2e6f6 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -809,12 +809,15 @@ TCoeInputCapabilities QSymbianControl::InputCapabilities() const
void QSymbianControl::Draw(const TRect& controlRect) const
{
// Set flag to avoid calling DrawNow in window surface
- QWExtra *extra = qwidget->d_func()->extraData();
- if (extra && !extra->inExpose) {
- extra->inExpose = true;
+ QWidget *window = qwidget->window();
+ Q_ASSERT(window);
+ QTLWExtra *topExtra = window->d_func()->maybeTopData();
+ Q_ASSERT(topExtra);
+ if (!topExtra->inExpose) {
+ topExtra->inExpose = true;
QRect exposeRect = qt_TRect2QRect(controlRect);
qwidget->d_func()->syncBackingStore(exposeRect);
- extra->inExpose = false;
+ topExtra->inExpose = false;
}
QWindowSurface *surface = qwidget->windowSurface();
diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp
index 3355272..0a4869b 100644
--- a/src/gui/kernel/qapplication_win.cpp
+++ b/src/gui/kernel/qapplication_win.cpp
@@ -928,7 +928,11 @@ const QString qt_reg_winclass(QWidget *w) // register window class
uint style;
bool icon;
QString cname;
- if (flags & Qt::MSWindowsOwnDC) {
+ if (qt_widget_private(w)->isGLWidget) {
+ cname = QLatin1String("QGLWidget");
+ style = CS_DBLCLKS;
+ icon = true;
+ } else if (flags & Qt::MSWindowsOwnDC) {
cname = QLatin1String("QWidgetOwnDC");
style = CS_DBLCLKS;
#ifndef Q_WS_WINCE
@@ -1021,7 +1025,7 @@ const QString qt_reg_winclass(QWidget *w) // register window class
}
wc.hCursor = 0;
#ifndef Q_WS_WINCE
- wc.hbrBackground = (HBRUSH)GetSysColorBrush(COLOR_WINDOW);
+ wc.hbrBackground = qt_widget_private(w)->isGLWidget ? 0 : (HBRUSH)GetSysColorBrush(COLOR_WINDOW);
#else
wc.hbrBackground = 0;
#endif
@@ -3616,13 +3620,19 @@ bool QETWidget::translatePaintEvent(const MSG &msg)
return true;
setAttribute(Qt::WA_PendingUpdate, false);
- const QRegion dirtyInBackingStore(qt_dirtyRegion(this));
- // Make sure the invalidated region contains the region we're about to repaint.
- // BeginPaint will set the clip to the invalidated region and it is impossible
- // to enlarge it afterwards (only shrink it). Using GetDCEx is not suffient
- // as it may return an invalid context (especially on Windows Vista).
- if (!dirtyInBackingStore.isEmpty())
- InvalidateRgn(internalWinId(), dirtyInBackingStore.handle(), false);
+
+ if (d_func()->isGLWidget) {
+ if (d_func()->usesDoubleBufferedGLContext)
+ InvalidateRect(internalWinId(), 0, false);
+ } else {
+ const QRegion dirtyInBackingStore(qt_dirtyRegion(this));
+ // Make sure the invalidated region contains the region we're about to repaint.
+ // BeginPaint will set the clip to the invalidated region and it is impossible
+ // to enlarge it afterwards (only shrink it). Using GetDCEx is not suffient
+ // as it may return an invalid context (especially on Windows Vista).
+ if (!dirtyInBackingStore.isEmpty())
+ InvalidateRgn(internalWinId(), dirtyInBackingStore.handle(), false);
+ }
PAINTSTRUCT ps;
d_func()->hd = BeginPaint(internalWinId(), &ps);
diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp
index 667db39..34865b5 100644
--- a/src/gui/kernel/qapplication_x11.cpp
+++ b/src/gui/kernel/qapplication_x11.cpp
@@ -949,10 +949,12 @@ bool QApplicationPrivate::x11_apply_settings()
QApplication::cursorFlashTime()).toInt();
QApplication::setCursorFlashTime(num);
+#ifndef QT_NO_WHEELEVENT
num =
settings.value(QLatin1String("wheelScrollLines"),
QApplication::wheelScrollLines()).toInt();
QApplication::setWheelScrollLines(num);
+#endif
QString colorspec = settings.value(QLatin1String("colorSpec"),
QVariant(QLatin1String("default"))).toString();
@@ -4406,8 +4408,10 @@ bool QETWidget::translateWheelEvent(int global_x, int global_y, int delta,
QWidget* popup = qApp->activePopupWidget();
if (popup && window() != popup)
popup->close();
+#ifndef QT_NO_WHEELEVENT
QWheelEvent e(pos, globalPos, delta, buttons, modifiers, orient);
if (QApplication::sendSpontaneousEvent(widget, &e))
+#endif
return true;
}
@@ -4418,8 +4422,10 @@ bool QETWidget::translateWheelEvent(int global_x, int global_y, int delta,
QWidget* popup = qApp->activePopupWidget();
if (popup && widget != popup)
popup->hide();
+#ifndef QT_NO_WHEELEVENT
QWheelEvent e(pos, globalPos, delta, buttons, modifiers, orient);
if (QApplication::sendSpontaneousEvent(widget, &e))
+#endif
return true;
}
return false;
@@ -5318,6 +5324,7 @@ int QApplication::keyboardInputInterval()
return QApplicationPrivate::keyboard_input_time;
}
+#ifndef QT_NO_WHEELEVENT
void QApplication::setWheelScrollLines(int n)
{
QApplicationPrivate::wheel_scroll_lines = n;
@@ -5327,6 +5334,7 @@ int QApplication::wheelScrollLines()
{
return QApplicationPrivate::wheel_scroll_lines;
}
+#endif
void QApplication::setEffectEnabled(Qt::UIEffect effect, bool enable)
{
diff --git a/src/gui/kernel/qclipboard_mac.cpp b/src/gui/kernel/qclipboard_mac.cpp
index f3a971d..49a6cc8 100644
--- a/src/gui/kernel/qclipboard_mac.cpp
+++ b/src/gui/kernel/qclipboard_mac.cpp
@@ -388,6 +388,18 @@ QMacPasteboard::setMimeData(QMimeData *mime_src)
clear_helper();
QStringList formats = mime_src->formats();
+#ifdef QT_MAC_USE_COCOA
+ // QMimeData sub classes reimplementing the formats() might not expose the
+ // temporary "application/x-qt-mime-type-name" mimetype. So check the existence
+ // of this mime type while doing drag and drop.
+ QString dummyMimeType(QLatin1String("application/x-qt-mime-type-name"));
+ if (!formats.contains(dummyMimeType)) {
+ QByteArray dummyType = mime_src->data(dummyMimeType);
+ if (!dummyType.isEmpty()) {
+ formats.append(dummyMimeType);
+ }
+ }
+#endif
for(int f = 0; f < formats.size(); ++f) {
QString mimeType = formats.at(f);
for (QList<QMacPasteboardMime *>::Iterator it = availableConverters.begin(); it != availableConverters.end(); ++it) {
diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm
index 70c78c8..873fb7e 100644
--- a/src/gui/kernel/qcocoaview_mac.mm
+++ b/src/gui/kernel/qcocoaview_mac.mm
@@ -786,6 +786,7 @@ extern "C" {
deltaZ = qBound(-120, int([theEvent deltaZ] * 10000), 120);
}
+#ifndef QT_NO_WHEELEVENT
if (deltaX != 0) {
QWheelEvent qwe(qlocal, qglobal, deltaX, buttons, keyMods, Qt::Horizontal);
qt_sendSpontaneousEvent(widgetToGetMouse, &qwe);
@@ -826,6 +827,8 @@ extern "C" {
wheelOK = qwe2.isAccepted();
}
}
+#endif //QT_NO_WHEELEVENT
+
if (!wheelOK) {
return [super scrollWheel:theEvent];
}
@@ -1362,7 +1365,7 @@ Qt::DropAction QDragManager::drag(QDrag *o)
// setup the data
QMacPasteboard dragBoard((CFStringRef) NSDragPboard, QMacPasteboardMime::MIME_DND);
- dragPrivate()->data->setData(QLatin1String("application/x-qt-mime-type-name"), QByteArray());
+ dragPrivate()->data->setData(QLatin1String("application/x-qt-mime-type-name"), QByteArray("dummy"));
dragBoard.setMimeData(dragPrivate()->data);
// create the image
diff --git a/src/gui/kernel/qkeymapper_x11.cpp b/src/gui/kernel/qkeymapper_x11.cpp
index 70574e7..4e6c847 100644
--- a/src/gui/kernel/qkeymapper_x11.cpp
+++ b/src/gui/kernel/qkeymapper_x11.cpp
@@ -360,6 +360,13 @@ QList<int> QKeyMapperPrivate::possibleKeysXKB(QKeyEvent *event)
if (code && code < 0xfffe)
code = QChar(code).toUpper().unicode();
+
+ if (code == Qt::Key_Tab && (baseModifiers & Qt::ShiftModifier)) {
+ // map shift+tab to shift+backtab
+ code = Qt::Key_Backtab;
+ text = QString();
+ }
+
if (code == baseCode)
continue;
@@ -448,6 +455,13 @@ QList<int> QKeyMapperPrivate::possibleKeysCore(QKeyEvent *event)
if (code && code < 0xfffe)
code = QChar(code).toUpper().unicode();
+
+ if (code == Qt::Key_Tab && (baseModifiers & Qt::ShiftModifier)) {
+ // map shift+tab to shift+backtab
+ code = Qt::Key_Backtab;
+ text = QString();
+ }
+
if (code == baseCode)
continue;
diff --git a/src/gui/kernel/qsoftkeymanager_s60.cpp b/src/gui/kernel/qsoftkeymanager_s60.cpp
index af84a8f..8ac1e31 100644
--- a/src/gui/kernel/qsoftkeymanager_s60.cpp
+++ b/src/gui/kernel/qsoftkeymanager_s60.cpp
@@ -66,17 +66,18 @@ QSoftKeyManagerPrivateS60::QSoftKeyManagerPrivateS60()
cachedCbaIconSize[1] = QSize(0,0);
cachedCbaIconSize[2] = QSize(0,0);
cachedCbaIconSize[3] = QSize(0,0);
- skipNextUpdate = false;
}
bool QSoftKeyManagerPrivateS60::skipCbaUpdate()
{
- // lets not update softkeys if
+ // Lets not update softkeys if
// 1. We don't have application panes, i.e. cba
- // 2. S60 native dialog or menu is shown
- if (QApplication::testAttribute(Qt::AA_S60DontConstructApplicationPanes) ||
- CCoeEnv::Static()->AppUi()->IsDisplayingMenuOrDialog() || skipNextUpdate) {
- skipNextUpdate = false;
+ // 2. Our CBA is not active, i.e. S60 native dialog or menu with custom CBA is shown
+ // Note: Cannot use IsDisplayingMenuOrDialog since CBA update can be triggered before
+ // menu/dialog CBA is actually displayed i.e. it is being costructed.
+ CEikButtonGroupContainer *appUiCba = S60->buttonGroupContainer();
+ CEikButtonGroupContainer *currentCba = CEikButtonGroupContainer::Current();
+ if (QApplication::testAttribute(Qt::AA_S60DontConstructApplicationPanes) || appUiCba != currentCba) {
return true;
}
return false;
@@ -384,9 +385,6 @@ bool QSoftKeyManagerPrivateS60::handleCommand(int command)
}
qt_symbian_next_menu_from_action(actionContainer);
QT_TRAP_THROWING(S60->menuBar()->TryDisplayMenuBarL());
- // TODO: hack remove, it can happen that IsDisplayingMenuOrDialog return false
- // in updateSoftKeys_sys, and we will override menu CBA with our own
- skipNextUpdate = true;
} else {
Q_ASSERT(action->softKeyRole() != QAction::NoSoftKey);
QWidget *actionParent = action->parentWidget();
diff --git a/src/gui/kernel/qsoftkeymanager_s60_p.h b/src/gui/kernel/qsoftkeymanager_s60_p.h
index f8bd6d9..823a2db 100644
--- a/src/gui/kernel/qsoftkeymanager_s60_p.h
+++ b/src/gui/kernel/qsoftkeymanager_s60_p.h
@@ -98,7 +98,6 @@ private:
private:
QHash<int, QAction*> realSoftKeyActions;
QSize cachedCbaIconSize[4];
- bool skipNextUpdate;
};
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index 2e951b6..d433048 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -192,6 +192,7 @@ QWidgetPrivate::QWidgetPrivate(int version)
, inDirtyList(0)
, isScrolled(0)
, isMoved(0)
+ , isGLWidget(0)
, usesDoubleBufferedGLContext(0)
#if defined(Q_WS_X11)
, picture(0)
@@ -200,7 +201,6 @@ QWidgetPrivate::QWidgetPrivate(int version)
, nativeGesturePanEnabled(0)
#elif defined(Q_WS_MAC)
, needWindowChange(0)
- , isGLWidget(0)
, window_event(0)
, qd_hd(0)
#endif
@@ -8277,7 +8277,7 @@ bool QWidget::event(QEvent *event)
}
#ifdef QT_SOFTKEYS_ENABLED
- if (isWindow() && isActiveWindow())
+ if (isWindow())
QSoftKeyManager::updateSoftKeys();
#endif
diff --git a/src/gui/kernel/qwidget_p.h b/src/gui/kernel/qwidget_p.h
index ff8f276..75b4c12 100644
--- a/src/gui/kernel/qwidget_p.h
+++ b/src/gui/kernel/qwidget_p.h
@@ -174,6 +174,8 @@ struct QTLWExtra {
#ifndef QT_NO_QWS_MANAGER
QWSManager *qwsManager;
#endif
+#elif defined(Q_OS_SYMBIAN)
+ uint inExpose : 1; // Prevents drawing recursion
#endif
};
@@ -230,7 +232,6 @@ struct QWExtra {
#endif
#elif defined(Q_OS_SYMBIAN) // <----------------------------------------------------- Symbian
uint activated : 1; // RWindowBase::Activated has been called
- uint inExpose : 1; // Prevents drawing recursion
/**
* Defines the behaviour of QSymbianControl::Draw.
@@ -685,6 +686,7 @@ public:
uint inDirtyList : 1;
uint isScrolled : 1;
uint isMoved : 1;
+ uint isGLWidget : 1;
uint usesDoubleBufferedGLContext : 1;
// *************************** Platform specific ************************************
@@ -716,7 +718,6 @@ public:
#elif defined(Q_WS_MAC) // <--------------------------------------------------------- MAC
// This is new stuff
uint needWindowChange : 1;
- uint isGLWidget : 1;
// Each wiget keeps a list of all its child and grandchild OpenGL widgets.
// This list is used to update the gl context whenever a parent and a granparent
diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp
index a844430..ebd289c 100644
--- a/src/gui/kernel/qwidget_s60.cpp
+++ b/src/gui/kernel/qwidget_s60.cpp
@@ -878,6 +878,7 @@ void QWidgetPrivate::registerDropSite(bool /* on */)
void QWidgetPrivate::createTLSysExtra()
{
extra->topextra->backingStore = 0;
+ extra->topextra->inExpose = 0;
}
void QWidgetPrivate::deleteTLSysExtra()
@@ -891,7 +892,6 @@ void QWidgetPrivate::createSysExtra()
extra->activated = 0;
extra->nativePaintMode = QWExtra::Default;
extra->receiveNativePaintEvents = 0;
- extra->inExpose = 0;
}
void QWidgetPrivate::deleteSysExtra()
diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp
index 660a2a8..7a3da20 100644
--- a/src/gui/painting/qdrawhelper.cpp
+++ b/src/gui/painting/qdrawhelper.cpp
@@ -1267,32 +1267,28 @@ static const uint L2CacheLineLengthInInts = L2CacheLineLength/sizeof(uint);
result = 0
d = d * cia
*/
+#define comp_func_Clear_impl(dest, length, const_alpha)\
+{\
+ if (const_alpha == 255) {\
+ QT_MEMFILL_UINT(dest, length, 0);\
+ } else {\
+ int ialpha = 255 - const_alpha;\
+ PRELOAD_INIT(dest)\
+ for (int i = 0; i < length; ++i) {\
+ PRELOAD_COND(dest)\
+ dest[i] = BYTE_MUL(dest[i], ialpha);\
+ }\
+ }\
+}
+
static void QT_FASTCALL comp_func_solid_Clear(uint *dest, int length, uint, uint const_alpha)
{
- if (const_alpha == 255) {
- QT_MEMFILL_UINT(dest, length, 0);
- } else {
- int ialpha = 255 - const_alpha;
- PRELOAD_INIT(dest)
- for (int i = 0; i < length; ++i) {
- PRELOAD_COND(dest)
- dest[i] = BYTE_MUL(dest[i], ialpha);
- }
- }
+ comp_func_Clear_impl(dest, length, const_alpha);
}
static void QT_FASTCALL comp_func_Clear(uint *dest, const uint *, int length, uint const_alpha)
{
- if (const_alpha == 255) {
- QT_MEMFILL_UINT(dest, length, 0);
- } else {
- int ialpha = 255 - const_alpha;
- PRELOAD_INIT(dest)
- for (int i = 0; i < length; ++i) {
- PRELOAD_COND(dest)
- dest[i] = BYTE_MUL(dest[i], ialpha);
- }
- }
+ comp_func_Clear_impl(dest, length, const_alpha);
}
/*
diff --git a/src/gui/painting/qdrawhelper_mmx_p.h b/src/gui/painting/qdrawhelper_mmx_p.h
index 8482262..59b3804 100644
--- a/src/gui/painting/qdrawhelper_mmx_p.h
+++ b/src/gui/painting/qdrawhelper_mmx_p.h
@@ -146,36 +146,30 @@ struct QMMXCommonIntrinsics
result = 0
d = d * cia
*/
+#define comp_func_Clear_impl(dest, length, const_alpha)\
+{\
+ if (const_alpha == 255) {\
+ qt_memfill(static_cast<quint32*>(dest), quint32(0), length);\
+ } else {\
+ C_FF; C_80; C_00;\
+ m64 ia = MM::negate(MM::load_alpha(const_alpha));\
+ for (int i = 0; i < length; ++i) {\
+ dest[i] = MM::store(MM::byte_mul(MM::load(dest[i]), ia));\
+ }\
+ MM::end();\
+ }\
+}
+
template <class MM>
static void QT_FASTCALL comp_func_solid_Clear(uint *dest, int length, uint, uint const_alpha)
{
- if (!length)
- return;
-
- if (const_alpha == 255) {
- qt_memfill(static_cast<quint32*>(dest), quint32(0), length);
- } else {
- C_FF; C_80; C_00;
- m64 ia = MM::negate(MM::load_alpha(const_alpha));
- for (int i = 0; i < length; ++i) {
- dest[i] = MM::store(MM::byte_mul(MM::load(dest[i]), ia));
- }
- }
- MM::end();
+ comp_func_Clear_impl(dest, length, const_alpha);
}
template <class MM>
static void QT_FASTCALL comp_func_Clear(uint *dest, const uint *, int length, uint const_alpha)
{
- if (const_alpha == 255) {
- qt_memfill(static_cast<quint32*>(dest), quint32(0), length);
- } else {
- C_FF; C_80; C_00;
- m64 ia = MM::negate(MM::load_alpha(const_alpha));
- for (int i = 0; i < length; ++i)
- dest[i] = MM::store(MM::byte_mul(MM::load(dest[i]), ia));
- }
- MM::end();
+ comp_func_Clear_impl(dest, length, const_alpha);
}
/*
@@ -246,7 +240,10 @@ static void QT_FASTCALL comp_func_SourceOver(uint *dest, const uint *src, int le
C_FF; C_80; C_00;
if (const_alpha == 255) {
for (int i = 0; i < length; ++i) {
- if ((0xff000000 & src[i]) == 0xff000000) {
+ const uint alphaMaskedSource = 0xff000000 & src[i];
+ if (alphaMaskedSource == 0)
+ continue;
+ if (alphaMaskedSource == 0xff000000) {
dest[i] = src[i];
} else {
m64 s = MM::load(src[i]);
@@ -257,6 +254,8 @@ static void QT_FASTCALL comp_func_SourceOver(uint *dest, const uint *src, int le
} else {
m64 ca = MM::load_alpha(const_alpha);
for (int i = 0; i < length; ++i) {
+ if ((0xff000000 & src[i]) == 0)
+ continue;
m64 s = MM::byte_mul(MM::load(src[i]), ca);
m64 ia = MM::negate(MM::alpha(s));
dest[i] = MM::store(MM::add(s, MM::byte_mul(MM::load(dest[i]), ia)));
diff --git a/src/gui/painting/qdrawhelper_p.h b/src/gui/painting/qdrawhelper_p.h
index 6c47aac..cb0db4f 100644
--- a/src/gui/painting/qdrawhelper_p.h
+++ b/src/gui/painting/qdrawhelper_p.h
@@ -1549,6 +1549,9 @@ template<> inline void qt_memfill(quint8 *dest, quint8 color, int count)
template <class T>
inline void qt_memfill(T *dest, T value, int count)
{
+ if (!count)
+ return;
+
int n = (count + 7) / 8;
switch (count & 0x07)
{
diff --git a/src/gui/painting/qpaintengine_x11.cpp b/src/gui/painting/qpaintengine_x11.cpp
index 147491e..da48fcb 100644
--- a/src/gui/painting/qpaintengine_x11.cpp
+++ b/src/gui/painting/qpaintengine_x11.cpp
@@ -1989,6 +1989,9 @@ void QX11PaintEngine::drawPixmap(const QRectF &r, const QPixmap &px, const QRect
}
XFillRectangle(d->dpy, d->hd, d->gc, x, y, sw, sh);
restore_clip = true;
+ } else if (mono_dst && !mono_src) {
+ QBitmap bitmap(pixmap);
+ XCopyArea(d->dpy, bitmap.handle(), d->hd, d->gc, sx, sy, sw, sh, x, y);
} else {
XCopyArea(d->dpy, pixmap.handle(), d->hd, d->gc, sx, sy, sw, sh, x, y);
}
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp
index bf12c6b..3bcaf8c 100644
--- a/src/gui/painting/qpainter.cpp
+++ b/src/gui/painting/qpainter.cpp
@@ -1986,12 +1986,25 @@ QPaintEngine *QPainter::paintEngine() const
endNativePainting().
Note that only the states the underlying paint engine changes will be reset
- to their respective default states. If, for example, the OpenGL polygon
- mode is changed by the user inside a beginNativePaint()/endNativePainting()
- block, it will not be reset to the default state by endNativePainting().
+ to their respective default states. The states we reset may change from
+ release to release. The following states are currently reset in the OpenGL
+ 2 engine:
- Here is an example that shows intermixing of painter commands
- and raw OpenGL commands:
+ \list
+ \i blending is disabled
+ \i the depth, stencil and scissor tests are disabled
+ \i the active texture unit is reset to 0
+ \i the depth mask, depth function and the clear depth are reset to their
+ default values
+ \i the stencil mask, stencil operation and stencil function are reset to
+ their default values
+ \i the current color is reset to solid white
+ \endlist
+
+ If, for example, the OpenGL polygon mode is changed by the user inside a
+ beginNativePaint()/endNativePainting() block, it will not be reset to the
+ default state by endNativePainting(). Here is an example that shows
+ intermixing of painter commands and raw OpenGL commands:
\snippet doc/src/snippets/code/src_gui_painting_qpainter.cpp 21
diff --git a/src/gui/painting/qwindowsurface_s60.cpp b/src/gui/painting/qwindowsurface_s60.cpp
index b41dc2c..6cbf3d9 100644
--- a/src/gui/painting/qwindowsurface_s60.cpp
+++ b/src/gui/painting/qwindowsurface_s60.cpp
@@ -145,12 +145,15 @@ QImage* QS60WindowSurface::buffer(const QWidget *widget)
void QS60WindowSurface::flush(QWidget *widget, const QRegion &region, const QPoint &)
{
- QWExtra *extra = widget->d_func()->extraData();
- if (extra && !extra->inExpose) {
- extra->inExpose = true; // Prevent DrawNow() from calling syncBackingStore() again
+ QWidget *window = widget->window();
+ Q_ASSERT(window);
+ QTLWExtra *topExtra = window->d_func()->maybeTopData();
+ Q_ASSERT(topExtra);
+ if (!topExtra->inExpose) {
+ topExtra->inExpose = true; // Prevent DrawNow() from calling syncBackingStore() again
TRect tr = qt_QRect2TRect(region.boundingRect());
widget->winId()->DrawNow(tr);
- extra->inExpose = false;
+ topExtra->inExpose = false;
}
}
diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp
index bbd35f1..dd9e69e 100644
--- a/src/gui/text/qfont.cpp
+++ b/src/gui/text/qfont.cpp
@@ -629,8 +629,9 @@ QFontEngineData::~QFontEngineData()
Returns the name of the font within the underlying window system.
- Only on X11 when Qt was built without FontConfig support the XLFD (X Logical Font Description)
- is returned; otherwise an empty string.
+ On X11, this function will return an empty string if Qt is built with
+ FontConfig support; otherwise the XLFD (X Logical Font Description) is
+ returned.
Using the return value of this function is usually \e not \e
portable.
diff --git a/src/gui/text/qfontengine_s60.cpp b/src/gui/text/qfontengine_s60.cpp
index 9dd4af7..3ea084b 100644
--- a/src/gui/text/qfontengine_s60.cpp
+++ b/src/gui/text/qfontengine_s60.cpp
@@ -44,7 +44,7 @@
#include "qglobal.h"
#include <private/qapplication_p.h>
#include "qimage.h"
-#include "qt_s60_p.h"
+#include <private/qt_s60_p.h>
#include <e32base.h>
#include <e32std.h>
diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp
index 26c7c1e..af91603 100644
--- a/src/gui/text/qtextlayout.cpp
+++ b/src/gui/text/qtextlayout.cpp
@@ -1331,7 +1331,7 @@ void QTextLayout::drawCursor(QPainter *p, const QPointF &pos, int cursorPosition
QTextLine l(line, d);
const QScriptLine &sl = d->lines[line];
- const qreal x = position.x() + l.cursorToX(cursorPosition);
+ qreal x = position.x() + l.cursorToX(cursorPosition);
int itm = d->findItem(cursorPosition - 1);
QFixed base = sl.base();
@@ -1350,6 +1350,10 @@ void QTextLayout::drawCursor(QPainter *p, const QPointF &pos, int cursorPosition
&& (p->transform().type() > QTransform::TxTranslate);
if (toggleAntialiasing)
p->setRenderHint(QPainter::Antialiasing);
+#if defined(QT_MAC_USE_COCOA)
+ // Always draw the cursor aligned to pixel boundary.
+ x = qRound(x);
+#endif
p->fillRect(QRectF(x, y, qreal(width), (base + descent + 1).toReal()), p->pen().brush());
if (toggleAntialiasing)
p->setRenderHint(QPainter::Antialiasing, false);
diff --git a/src/gui/util/qsystemtrayicon_p.h b/src/gui/util/qsystemtrayicon_p.h
index b881f68..e8bf197 100644
--- a/src/gui/util/qsystemtrayicon_p.h
+++ b/src/gui/util/qsystemtrayicon_p.h
@@ -164,7 +164,9 @@ protected:
bool x11Event(XEvent *event);
void mousePressEvent(QMouseEvent *event);
void mouseDoubleClickEvent(QMouseEvent *event);
+#ifndef QT_NO_WHEELEVENT
void wheelEvent(QWheelEvent *event);
+#endif
bool event(QEvent *e);
private:
diff --git a/src/gui/util/qsystemtrayicon_x11.cpp b/src/gui/util/qsystemtrayicon_x11.cpp
index a645050..82b4325 100644
--- a/src/gui/util/qsystemtrayicon_x11.cpp
+++ b/src/gui/util/qsystemtrayicon_x11.cpp
@@ -308,10 +308,12 @@ void QSystemTrayIconSys::mouseDoubleClickEvent(QMouseEvent *ev)
emit q->activated(QSystemTrayIcon::DoubleClick);
}
+#ifndef QT_NO_WHEELEVENT
void QSystemTrayIconSys::wheelEvent(QWheelEvent *e)
{
QApplication::sendEvent(q, e);
}
+#endif
bool QSystemTrayIconSys::event(QEvent *e)
{
diff --git a/src/gui/widgets/qabstractslider.cpp b/src/gui/widgets/qabstractslider.cpp
index 73c17db..4bd7b5a 100644
--- a/src/gui/widgets/qabstractslider.cpp
+++ b/src/gui/widgets/qabstractslider.cpp
@@ -705,7 +705,11 @@ bool QAbstractSliderPrivate::scrollByDelta(Qt::Orientation orientation, Qt::Keyb
// Calculate how many lines to scroll. Depending on what delta is (and
// offset), we might end up with a fraction (e.g. scroll 1.3 lines). We can
// only scroll whole lines, so we keep the reminder until next event.
- qreal stepsToScrollF = offset * QApplication::wheelScrollLines() * effectiveSingleStep();
+ qreal stepsToScrollF =
+#ifndef QT_NO_WHEELEVENT
+ QApplication::wheelScrollLines() *
+#endif
+ offset * effectiveSingleStep();
// Check if wheel changed direction since last event:
if (offset_accumulated != 0 && (offset / offset_accumulated) < 0)
offset_accumulated = 0;
diff --git a/src/gui/widgets/qabstractspinbox.h b/src/gui/widgets/qabstractspinbox.h
index 059943a..6c062c0 100644
--- a/src/gui/widgets/qabstractspinbox.h
+++ b/src/gui/widgets/qabstractspinbox.h
@@ -137,7 +137,9 @@ protected:
void resizeEvent(QResizeEvent *event);
void keyPressEvent(QKeyEvent *event);
void keyReleaseEvent(QKeyEvent *event);
+#ifndef QT_NO_WHEELEVENT
void wheelEvent(QWheelEvent *event);
+#endif
void focusInEvent(QFocusEvent *event);
void focusOutEvent(QFocusEvent *event);
void contextMenuEvent(QContextMenuEvent *event);
diff --git a/src/gui/widgets/qcombobox.h b/src/gui/widgets/qcombobox.h
index f332d31..9b19a66 100644
--- a/src/gui/widgets/qcombobox.h
+++ b/src/gui/widgets/qcombobox.h
@@ -245,7 +245,9 @@ protected:
void mouseReleaseEvent(QMouseEvent *e);
void keyPressEvent(QKeyEvent *e);
void keyReleaseEvent(QKeyEvent *e);
+#ifndef QT_NO_WHEELEVENT
void wheelEvent(QWheelEvent *e);
+#endif
void contextMenuEvent(QContextMenuEvent *e);
void inputMethodEvent(QInputMethodEvent *);
QVariant inputMethodQuery(Qt::InputMethodQuery) const;
diff --git a/src/gui/widgets/qlinecontrol.cpp b/src/gui/widgets/qlinecontrol.cpp
index b0a64ea..db099e8 100644
--- a/src/gui/widgets/qlinecontrol.cpp
+++ b/src/gui/widgets/qlinecontrol.cpp
@@ -1371,6 +1371,8 @@ bool QLineControl::processEvent(QEvent* ev)
processInputMethodEvent(static_cast<QInputMethodEvent*>(ev)); break;
#ifndef QT_NO_SHORTCUT
case QEvent::ShortcutOverride:{
+ if (isReadOnly())
+ return false;
QKeyEvent* ke = static_cast<QKeyEvent*>(ev);
if (ke == QKeySequence::Copy
|| ke == QKeySequence::Paste
diff --git a/src/gui/widgets/qmenu.h b/src/gui/widgets/qmenu.h
index 28bd859..a040afa 100644
--- a/src/gui/widgets/qmenu.h
+++ b/src/gui/widgets/qmenu.h
@@ -162,7 +162,9 @@ protected:
void mouseReleaseEvent(QMouseEvent *);
void mousePressEvent(QMouseEvent *);
void mouseMoveEvent(QMouseEvent *);
+#ifndef QT_NO_WHEELEVENT
void wheelEvent(QWheelEvent *);
+#endif
void enterEvent(QEvent *);
void leaveEvent(QEvent *);
void hideEvent(QHideEvent *);
diff --git a/src/gui/widgets/qscrollbar.cpp b/src/gui/widgets/qscrollbar.cpp
index 3eed3a9..4eff260 100644
--- a/src/gui/widgets/qscrollbar.cpp
+++ b/src/gui/widgets/qscrollbar.cpp
@@ -521,6 +521,7 @@ bool QScrollBar::event(QEvent *event)
if (const QHoverEvent *he = static_cast<const QHoverEvent *>(event))
d_func()->updateHoverControl(he->pos());
break;
+#ifndef QT_NO_WHEELEVENT
case QEvent::Wheel: {
// override wheel event without adding virtual function override
QWheelEvent *ev = static_cast<QWheelEvent *>(event);
@@ -537,6 +538,7 @@ bool QScrollBar::event(QEvent *event)
event->accept();
return true;
}
+#endif
default:
break;
}
diff --git a/src/multimedia/video/qabstractvideobuffer.cpp b/src/multimedia/video/qabstractvideobuffer.cpp
index 22b36f2..465a1e7 100644
--- a/src/multimedia/video/qabstractvideobuffer.cpp
+++ b/src/multimedia/video/qabstractvideobuffer.cpp
@@ -48,7 +48,6 @@ QT_BEGIN_NAMESPACE
/*!
\class QAbstractVideoBuffer
\brief The QAbstractVideoBuffer class is an abstraction for video data.
- \preliminary
\since 4.6
The QVideoFrame class makes use of a QAbstractVideoBuffer internally to reference a buffer of
diff --git a/src/multimedia/video/qabstractvideosurface.cpp b/src/multimedia/video/qabstractvideosurface.cpp
index 3f6bc08..3dabb6b 100644
--- a/src/multimedia/video/qabstractvideosurface.cpp
+++ b/src/multimedia/video/qabstractvideosurface.cpp
@@ -46,7 +46,6 @@ QT_BEGIN_NAMESPACE
/*!
\class QAbstractVideoSurface
\brief The QAbstractVideoSurface class is a base class for video presentation surfaces.
- \preliminary
\since 4.6
The QAbstractVideoSurface class defines the standard interface that video producers use to
diff --git a/src/multimedia/video/qvideoframe.cpp b/src/multimedia/video/qvideoframe.cpp
index f10ce97..2d66d9e 100644
--- a/src/multimedia/video/qvideoframe.cpp
+++ b/src/multimedia/video/qvideoframe.cpp
@@ -102,7 +102,6 @@ private:
/*!
\class QVideoFrame
\brief The QVideoFrame class provides a representation of a frame of video data.
- \preliminary
\since 4.6
A QVideoFrame encapsulates the data of a video frame, and information about the frame.
diff --git a/src/multimedia/video/qvideosurfaceformat.cpp b/src/multimedia/video/qvideosurfaceformat.cpp
index 6b16e6a..1fc13a6 100644
--- a/src/multimedia/video/qvideosurfaceformat.cpp
+++ b/src/multimedia/video/qvideosurfaceformat.cpp
@@ -136,7 +136,6 @@ public:
\class QVideoSurfaceFormat
\brief The QVideoSurfaceFormat class specifies the stream format of a video presentation
surface.
- \preliminary
\since 4.6
A video surface presents a stream of video frames. The surface's format describes the type of
diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp
index 70a301d..b0e632a 100644
--- a/src/network/access/qhttpnetworkconnectionchannel.cpp
+++ b/src/network/access/qhttpnetworkconnectionchannel.cpp
@@ -286,7 +286,6 @@ void QHttpNetworkConnectionChannel::_q_receiveReply()
if (!socket->bytesAvailable()) {
if (reply && reply->d_func()->state == QHttpNetworkReplyPrivate::ReadingDataState) {
reply->d_func()->state = QHttpNetworkReplyPrivate::AllDoneState;
- this->state = QHttpNetworkConnectionChannel::IdleState;
allDone();
} else {
// try to reconnect/resend before sending an error.
@@ -305,9 +304,12 @@ void QHttpNetworkConnectionChannel::_q_receiveReply()
while (socket->bytesAvailable()) {
QHttpNetworkReplyPrivate::ReplyState state = reply ? reply->d_func()->state : QHttpNetworkReplyPrivate::AllDoneState;
switch (state) {
- case QHttpNetworkReplyPrivate::NothingDoneState:
- case QHttpNetworkReplyPrivate::ReadingStatusState: {
+ case QHttpNetworkReplyPrivate::NothingDoneState: {
+ // only eat whitespace on the first call
eatWhitespace();
+ state = reply->d_func()->state = QHttpNetworkReplyPrivate::ReadingStatusState;
+ }
+ case QHttpNetworkReplyPrivate::ReadingStatusState: {
qint64 statusBytes = reply->d_func()->readStatus(socket);
if (statusBytes == -1 && reconnectAttempts <= 0) {
// too many errors reading/receiving/parsing the status, close the socket and emit error
@@ -344,7 +346,6 @@ void QHttpNetworkConnectionChannel::_q_receiveReply()
emit reply->headerChanged();
if (!replyPrivate->expectContent()) {
replyPrivate->state = QHttpNetworkReplyPrivate::AllDoneState;
- this->state = QHttpNetworkConnectionChannel::IdleState;
allDone();
return;
}
@@ -421,7 +422,6 @@ void QHttpNetworkConnectionChannel::_q_receiveReply()
// everything done, fall through
}
case QHttpNetworkReplyPrivate::AllDoneState:
- this->state = QHttpNetworkConnectionChannel::IdleState;
allDone();
break;
default:
@@ -567,6 +567,9 @@ void QHttpNetworkConnectionChannel::allDone()
// in case of failures, each channel will attempt two reconnects before emitting error.
reconnectAttempts = 2;
+ // now the channel can be seen as free/idle again, all signal emissions for the reply have been done
+ this->state = QHttpNetworkConnectionChannel::IdleState;
+
detectPipeliningSupport();
// move next from pipeline to current request
@@ -607,19 +610,19 @@ void QHttpNetworkConnectionChannel::allDone()
void QHttpNetworkConnectionChannel::detectPipeliningSupport()
{
// detect HTTP Pipelining support
- QByteArray serverHeaderField = reply->headerField("Server");
+ QByteArray serverHeaderField;
if (
- // check for broken servers in server reply header
- // this is adapted from http://mxr.mozilla.org/firefox/ident?i=SupportsPipelining
- (!serverHeaderField.contains("Microsoft-IIS/4."))
- && (!serverHeaderField.contains("Microsoft-IIS/5."))
- && (!serverHeaderField.contains("Netscape-Enterprise/3."))
// check for HTTP/1.1
- && (reply->d_func()->majorVersion == 1 && reply->d_func()->minorVersion == 1)
+ (reply->d_func()->majorVersion == 1 && reply->d_func()->minorVersion == 1)
// check for not having connection close
&& (!reply->d_func()->isConnectionCloseEnabled())
// check if it is still connected
&& (socket->state() == QAbstractSocket::ConnectedState)
+ // check for broken servers in server reply header
+ // this is adapted from http://mxr.mozilla.org/firefox/ident?i=SupportsPipelining
+ && (serverHeaderField = reply->headerField("Server"), !serverHeaderField.contains("Microsoft-IIS/4."))
+ && (!serverHeaderField.contains("Microsoft-IIS/5."))
+ && (!serverHeaderField.contains("Netscape-Enterprise/3."))
) {
pipeliningSupported = QHttpNetworkConnectionChannel::PipeliningProbablySupported;
} else {
diff --git a/src/network/access/qhttpnetworkreply.cpp b/src/network/access/qhttpnetworkreply.cpp
index a5223d1..512c045 100644
--- a/src/network/access/qhttpnetworkreply.cpp
+++ b/src/network/access/qhttpnetworkreply.cpp
@@ -423,13 +423,26 @@ int QHttpNetworkReplyPrivate::gunzipBodyPartially(QByteArray &compressed, QByteA
qint64 QHttpNetworkReplyPrivate::readStatus(QAbstractSocket *socket)
{
+ if (fragment.isEmpty()) {
+ // reserve bytes for the status line. This is better than always append() which reallocs the byte array
+ fragment.reserve(32);
+ }
+
qint64 bytes = 0;
char c;
+ qint64 haveRead = 0;
+
+ do {
+ haveRead = socket->read(&c, 1);
+ if (haveRead == -1)
+ return -1; // unexpected EOF
+ else if (haveRead == 0)
+ break; // read more later
+
+ bytes++;
- while (socket->bytesAvailable()) {
// allow both CRLF & LF (only) line endings
- if (socket->peek(&c, 1) == 1 && c == '\n') {
- bytes += socket->read(&c, 1); // read the "n"
+ if (c == '\n') {
// remove the CR at the end
if (fragment.endsWith('\r')) {
fragment.truncate(fragment.length()-1);
@@ -442,11 +455,6 @@ qint64 QHttpNetworkReplyPrivate::readStatus(QAbstractSocket *socket)
}
break;
} else {
- c = 0;
- int haveRead = socket->read(&c, 1);
- if (haveRead == -1)
- return -1;
- bytes += haveRead;
fragment.append(c);
}
@@ -456,8 +464,7 @@ qint64 QHttpNetworkReplyPrivate::readStatus(QAbstractSocket *socket)
fragment.clear();
return -1;
}
-
- }
+ } while (haveRead == 1);
return bytes;
}
@@ -500,20 +507,41 @@ bool QHttpNetworkReplyPrivate::parseStatus(const QByteArray &status)
qint64 QHttpNetworkReplyPrivate::readHeader(QAbstractSocket *socket)
{
+ if (fragment.isEmpty()) {
+ // according to http://dev.opera.com/articles/view/mama-http-headers/ the average size of the header
+ // block is 381 bytes.
+ // reserve bytes. This is better than always append() which reallocs the byte array.
+ fragment.reserve(512);
+ }
+
qint64 bytes = 0;
char c = 0;
bool allHeaders = false;
- while (!allHeaders && socket->bytesAvailable()) {
- if (socket->peek(&c, 1) == 1 && c == '\n') {
- // check for possible header endings. As per HTTP rfc,
- // the header endings will be marked by CRLFCRLF. But
- // we will allow CRLFLF, LFLF & CRLFCRLF
- if (fragment.endsWith("\n\r") || fragment.endsWith('\n'))
- allHeaders = true;
+ qint64 haveRead = 0;
+ do {
+ haveRead = socket->read(&c, 1);
+ if (haveRead == 0) {
+ // read more later
+ break;
+ } else if (haveRead == -1) {
+ // connection broke down
+ return -1;
+ } else {
+ fragment.append(c);
+ bytes++;
+
+ if (c == '\n') {
+ // check for possible header endings. As per HTTP rfc,
+ // the header endings will be marked by CRLFCRLF. But
+ // we will allow CRLFCRLF, CRLFLF, LFLF
+ if (fragment.endsWith("\r\n\r\n")
+ || fragment.endsWith("\r\n\n")
+ || fragment.endsWith("\n\n"))
+ allHeaders = true;
+ }
}
- bytes += socket->read(&c, 1);
- fragment.append(c);
- }
+ } while (!allHeaders && haveRead > 0);
+
// we received all headers now parse them
if (allHeaders) {
parseHeader(fragment);
diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp
index e16aedc..0b32533 100644
--- a/src/network/access/qnetworkaccessmanager.cpp
+++ b/src/network/access/qnetworkaccessmanager.cpp
@@ -549,7 +549,7 @@ void QNetworkAccessManager::setCookieJar(QNetworkCookieJar *cookieJar)
/*!
Posts a request to obtain the network headers for \a request
- and returns a new QNetworkReply object which will contain such headers
+ and returns a new QNetworkReply object which will contain such headers.
The function is named after the HTTP request associated (HEAD).
*/
diff --git a/src/network/access/qnetworkcookie.h b/src/network/access/qnetworkcookie.h
index f34396f..3cc4cee 100644
--- a/src/network/access/qnetworkcookie.h
+++ b/src/network/access/qnetworkcookie.h
@@ -114,7 +114,7 @@ Q_NETWORK_EXPORT QDebug operator<<(QDebug, const QNetworkCookie &);
QT_END_NAMESPACE
// ### Qt5 remove this include
-#include "qnetworkcookiejar.h"
+#include <QtNetwork/QNetworkCookieJar>
Q_DECLARE_METATYPE(QNetworkCookie)
Q_DECLARE_METATYPE(QList<QNetworkCookie>)
diff --git a/src/network/access/qnetworkcookiejar.h b/src/network/access/qnetworkcookiejar.h
index 813bf3e..8086f38 100644
--- a/src/network/access/qnetworkcookiejar.h
+++ b/src/network/access/qnetworkcookiejar.h
@@ -46,7 +46,7 @@
#include <QtCore/QUrl>
// ### Qt5 remove this include
-#include "qnetworkcookie.h"
+#include <QtNetwork/QNetworkCookie>
QT_BEGIN_HEADER
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index 3e5c4fc..cfcbbf8 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -99,6 +99,10 @@ QT_BEGIN_NAMESPACE
QGLExtensionFuncs QGLContextPrivate::qt_extensionFuncs;
#endif
+#ifdef Q_WS_X11
+extern const QX11Info *qt_x11Info(const QPaintDevice *pd);
+#endif
+
struct QGLThreadContext {
QGLContext *context;
};
@@ -2448,7 +2452,10 @@ QGLTexture *QGLContextPrivate::bindTexture(const QPixmap &pixmap, GLenum target,
#if defined(Q_WS_X11)
// Try to use texture_from_pixmap
- if (pd->classId() == QPixmapData::X11Class && pd->pixelType() == QPixmapData::PixmapType) {
+ const QX11Info *xinfo = qt_x11Info(paintDevice);
+ if (pd->classId() == QPixmapData::X11Class && pd->pixelType() == QPixmapData::PixmapType
+ && xinfo && xinfo->screen() == pixmap.x11Info().screen())
+ {
texture = bindTextureFromNativePixmap(pd, key, options);
if (texture) {
texture->options |= QGLContext::MemoryManagedBindOption;
diff --git a/src/opengl/qgl_mac.mm b/src/opengl/qgl_mac.mm
index c01575b..4d7532e 100644
--- a/src/opengl/qgl_mac.mm
+++ b/src/opengl/qgl_mac.mm
@@ -951,8 +951,6 @@ void QGLWidgetPrivate::init(QGLContext *context, const QGLWidget *shareWidget)
break;
current = current->parentWidget();
}
-
- isGLWidget = 1;
}
bool QGLWidgetPrivate::renderCxPm(QPixmap*)
diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h
index 18fc9c2..efd2090 100644
--- a/src/opengl/qgl_p.h
+++ b/src/opengl/qgl_p.h
@@ -173,7 +173,9 @@ public:
#if defined(Q_WS_X11) && defined(QT_OPENGL_ES)
, eglSurfaceWindowId(0)
#endif
- {}
+ {
+ isGLWidget = 1;
+ }
~QGLWidgetPrivate() {}
diff --git a/src/opengl/qglpixelbuffer_x11.cpp b/src/opengl/qglpixelbuffer_x11.cpp
index 5b34cbb..32a42a2 100644
--- a/src/opengl/qglpixelbuffer_x11.cpp
+++ b/src/opengl/qglpixelbuffer_x11.cpp
@@ -181,7 +181,11 @@ bool QGLPixelBufferPrivate::init(const QSize &size, const QGLFormat &f, QGLWidge
qt_format_to_attrib_list(f, attribs);
- GLXFBConfig *configs = glXChooseFBConfig(X11->display, X11->defaultScreen, attribs, &num_configs);
+ int screen = X11->defaultScreen;
+ if (shareWidget)
+ screen = shareWidget->x11Info().screen();
+
+ GLXFBConfig *configs = glXChooseFBConfig(X11->display, screen, attribs, &num_configs);
if (configs && num_configs) {
int res;
glXGetFBConfigAttrib(X11->display, configs[0], GLX_LEVEL, &res);
diff --git a/src/opengl/qglpixmapfilter.cpp b/src/opengl/qglpixmapfilter.cpp
index 37bb7c0..d5a11d9 100644
--- a/src/opengl/qglpixmapfilter.cpp
+++ b/src/opengl/qglpixmapfilter.cpp
@@ -394,6 +394,7 @@ void QGLBlurTextureCache::insertBlurTextureInfo(const QPixmap &pixmap, QGLBlurTe
static bool hookAdded = false;
if (!hookAdded) {
QImagePixmapCleanupHooks::instance()->addPixmapDataDestructionHook(pixmapDestroyed);
+ QImagePixmapCleanupHooks::instance()->addPixmapDataModificationHook(pixmapDestroyed);
hookAdded = true;
}
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
index f27440e..ba50329 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
@@ -593,6 +593,17 @@ void QDirectFBPixmapData::invalidate()
imageFormat = QImage::Format_Invalid;
}
+#ifndef QT_DIRECTFB_PLUGIN
+Q_GUI_EXPORT IDirectFBSurface *qt_directfb_surface_for_pixmap(const QPixmap &pixmap)
+{
+ const QPixmapData *data = pixmap.pixmapData();
+ if (!data || data->classId() != QPixmapData::DirectFBClass)
+ return 0;
+ const QDirectFBPixmapData *dfbData = static_cast<const QDirectFBPixmapData*>(data);
+ return dfbData->directFBSurface();
+}
+#endif
+
QT_END_NAMESPACE
#endif // QT_NO_QWS_DIRECTFB
diff --git a/src/qt3support/dialogs/q3filedialog.cpp b/src/qt3support/dialogs/q3filedialog.cpp
index 9b8e4d3..35f7890 100644
--- a/src/qt3support/dialogs/q3filedialog.cpp
+++ b/src/qt3support/dialogs/q3filedialog.cpp
@@ -475,9 +475,17 @@ static int sortFilesBy = (int)QDir::Name;
static bool sortAscending = true;
static bool detailViewMode = false;
-static Q3CleanupHandler<QPixmap> qfd_cleanup_pixmap;
static Q3CleanupHandler<QString> qfd_cleanup_string;
+static void qt_cleanup_fd_pixmaps();
+typedef QList<QPixmap *> FDPixmaps;
+Q_GLOBAL_STATIC_WITH_INITIALIZER(FDPixmaps, qfd_pixmaps, qAddPostRoutine(qt_cleanup_fd_pixmaps))
+
+static void qt_cleanup_fd_pixmaps()
+{
+ qDeleteAll(*qfd_pixmaps());
+}
+
static QString toRootIfNotExists( const QString &path )
{
if ( !path.isEmpty() )
@@ -533,37 +541,37 @@ static void makeVariables() {
qfd_cleanup_string.add(&workingDirectory);
openFolderIcon = new QPixmap((const char **)open_xpm);
- qfd_cleanup_pixmap.add(&openFolderIcon);
+ qfd_pixmaps()->append(openFolderIcon);
symLinkDirIcon = new QPixmap((const char **)link_dir_xpm);
- qfd_cleanup_pixmap.add(&symLinkDirIcon);
+ qfd_pixmaps()->append(symLinkDirIcon);
symLinkFileIcon = new QPixmap((const char **)link_file_xpm);
- qfd_cleanup_pixmap.add(&symLinkFileIcon);
+ qfd_pixmaps()->append(symLinkFileIcon);
fileIcon = new QPixmap((const char **)file_xpm);
- qfd_cleanup_pixmap.add(&fileIcon);
+ qfd_pixmaps()->append(fileIcon);
closedFolderIcon = new QPixmap((const char **)closed_xpm);
- qfd_cleanup_pixmap.add(&closedFolderIcon);
+ qfd_pixmaps()->append(closedFolderIcon);
detailViewIcon = new QPixmap((const char **)detailedview_xpm);
- qfd_cleanup_pixmap.add(&detailViewIcon);
+ qfd_pixmaps()->append(detailViewIcon);
multiColumnListViewIcon = new QPixmap((const char **)mclistview_xpm);
- qfd_cleanup_pixmap.add(&multiColumnListViewIcon);
+ qfd_pixmaps()->append(multiColumnListViewIcon);
cdToParentIcon = new QPixmap((const char **)cdtoparent_xpm);
- qfd_cleanup_pixmap.add(&cdToParentIcon);
+ qfd_pixmaps()->append(cdToParentIcon);
newFolderIcon = new QPixmap((const char **)newfolder_xpm);
- qfd_cleanup_pixmap.add(&newFolderIcon);
+ qfd_pixmaps()->append(newFolderIcon);
previewInfoViewIcon
= new QPixmap((const char **)previewinfoview_xpm);
- qfd_cleanup_pixmap.add(&previewInfoViewIcon);
+ qfd_pixmaps()->append(previewInfoViewIcon);
previewContentsViewIcon
= new QPixmap((const char **)previewcontentsview_xpm);
- qfd_cleanup_pixmap.add(&previewContentsViewIcon);
+ qfd_pixmaps()->append(previewContentsViewIcon);
startCopyIcon = new QPixmap((const char **)start_xpm);
- qfd_cleanup_pixmap.add(&startCopyIcon);
+ qfd_pixmaps()->append(startCopyIcon);
endCopyIcon = new QPixmap((const char **)end_xpm);
- qfd_cleanup_pixmap.add(&endCopyIcon);
+ qfd_pixmaps()->append(endCopyIcon);
goBackIcon = new QPixmap((const char **)back_xpm);
- qfd_cleanup_pixmap.add(&goBackIcon);
+ qfd_pixmaps()->append(goBackIcon);
fifteenTransparentPixels = new QPixmap(closedFolderIcon->width(), 1);
- qfd_cleanup_pixmap.add(&fifteenTransparentPixels);
+ qfd_pixmaps()->append(fifteenTransparentPixels);
QBitmap m(fifteenTransparentPixels->width(), 1);
m.fill(Qt::color0);
fifteenTransparentPixels->setMask(m);
diff --git a/src/qt3support/itemviews/q3iconview.cpp b/src/qt3support/itemviews/q3iconview.cpp
index 67c956e..683e3d6 100644
--- a/src/qt3support/itemviews/q3iconview.cpp
+++ b/src/qt3support/itemviews/q3iconview.cpp
@@ -132,14 +132,21 @@ static QPixmap *qiv_selection = 0;
#endif
static bool optimize_layout = false;
-static Q3CleanupHandler<QPixmap> qiv_cleanup_pixmap;
+static void qt_cleanup_iv_pixmaps();
+typedef QList<QPixmap *> IVPixmaps;
+Q_GLOBAL_STATIC_WITH_INITIALIZER(IVPixmaps, qiv_pixmaps, qAddPostRoutine(qt_cleanup_iv_pixmaps))
+
+static void qt_cleanup_iv_pixmaps()
+{
+ qDeleteAll(*qiv_pixmaps());
+}
static QPixmap *get_qiv_buffer_pixmap(const QSize &s)
{
if (!qiv_buffer_pixmap) {
qiv_buffer_pixmap = new QPixmap(s);
- qiv_cleanup_pixmap.add(&qiv_buffer_pixmap);
+ qiv_pixmaps()->append(qiv_buffer_pixmap);
return qiv_buffer_pixmap;
}
@@ -2580,7 +2587,7 @@ Q3IconView::Q3IconView(QWidget *parent, const char *name, Qt::WindowFlags f)
{
if (!unknown_icon) {
unknown_icon = new QPixmap((const char **)unknown_xpm);
- qiv_cleanup_pixmap.add(&unknown_icon);
+ qiv_pixmaps()->append(unknown_icon);
}
d = new Q3IconViewPrivate;
diff --git a/src/qt3support/itemviews/q3listview.cpp b/src/qt3support/itemviews/q3listview.cpp
index 2c15ad0..12dad84 100644
--- a/src/qt3support/itemviews/q3listview.cpp
+++ b/src/qt3support/itemviews/q3listview.cpp
@@ -70,9 +70,6 @@ QT_BEGIN_NAMESPACE
const int Unsorted = 16383;
-static Q3CleanupHandler<QBitmap> qlv_cleanup_bitmap;
-
-
struct Q3ListViewPrivate
{
// classes that are here to avoid polluting the global name space
diff --git a/src/s60installs/bwins/QtGuiu.def b/src/s60installs/bwins/QtGuiu.def
index be7a6a0..4f30cb5 100644
--- a/src/s60installs/bwins/QtGuiu.def
+++ b/src/s60installs/bwins/QtGuiu.def
@@ -12548,4 +12548,57 @@ EXPORTS
?timerEvent@QS60Style@@MAEXPAVQTimerEvent@@@Z @ 12547 NONAME ; void QS60Style::timerEvent(class QTimerEvent *)
?updateAncestorFlags@QGraphicsItemPrivate@@QAEXXZ @ 12548 NONAME ; void QGraphicsItemPrivate::updateAncestorFlags(void)
?updateChildWithGraphicsEffectFlagRecursively@QGraphicsItemPrivate@@QAEXXZ @ 12549 NONAME ; void QGraphicsItemPrivate::updateChildWithGraphicsEffectFlagRecursively(void)
+ ?isOpacityNull@QGraphicsItemPrivate@@SA_NM@Z @ 12550 NONAME ; bool QGraphicsItemPrivate::isOpacityNull(float)
+ ?isOpacityNull@QGraphicsItemPrivate@@QBE_NXZ @ 12551 NONAME ; bool QGraphicsItemPrivate::isOpacityNull(void) const
+ ?api@QEglContext@@QBE?AW4API@QEgl@@XZ @ 12552 NONAME ABSENT ; enum QEgl::API QEglContext::api(void) const
+ ?chooseConfig@QEglContext@@QAE_NABVQEglProperties@@W4PixelFormatMatch@QEgl@@@Z @ 12553 NONAME ABSENT ; bool QEglContext::chooseConfig(class QEglProperties const &, enum QEgl::PixelFormatMatch)
+ ?destroySurface@QEglContext@@QAEXH@Z @ 12554 NONAME ABSENT ; void QEglContext::destroySurface(int)
+ ?lazyDoneCurrent@QEglContext@@QAE_NXZ @ 12555 NONAME ABSENT ; bool QEglContext::lazyDoneCurrent(void)
+ ?waitNative@QEglContext@@QAEXXZ @ 12556 NONAME ABSENT ; void QEglContext::waitNative(void)
+ ?context@QEglContext@@QBEHXZ @ 12557 NONAME ABSENT ; int QEglContext::context(void) const
+ ?configAttrib@QEglContext@@QBE_NHPAH@Z @ 12558 NONAME ABSENT ; bool QEglContext::configAttrib(int, int *) const
+ ??0QEglProperties@@QAE@ABV0@@Z @ 12559 NONAME ABSENT ; QEglProperties::QEglProperties(class QEglProperties const &)
+ ?config@QEglContext@@QBEHXZ @ 12560 NONAME ABSENT ; int QEglContext::config(void) const
+ ?openDisplay@QEglContext@@QAE_NPAVQPaintDevice@@@Z @ 12561 NONAME ABSENT ; bool QEglContext::openDisplay(class QPaintDevice *)
+ ?error@QEglContext@@SAHXZ @ 12562 NONAME ABSENT ; int QEglContext::error(void)
+ ?swapBuffers@QEglContext@@QAE_NH@Z @ 12563 NONAME ABSENT ; bool QEglContext::swapBuffers(int)
+ ?setApi@QEglContext@@QAEXW4API@QEgl@@@Z @ 12564 NONAME ABSENT ; void QEglContext::setApi(enum QEgl::API)
+ ?makeCurrent@QEglContext@@QAE_NH@Z @ 12565 NONAME ABSENT ; bool QEglContext::makeCurrent(int)
+ ?createSurface@QEglContext@@QAEHPAVQPaintDevice@@PBVQEglProperties@@@Z @ 12566 NONAME ABSENT ; int QEglContext::createSurface(class QPaintDevice *, class QEglProperties const *)
+ ?dumpAllConfigs@QEglContext@@QAEXXZ @ 12567 NONAME ABSENT ; void QEglContext::dumpAllConfigs(void)
+ ?reduceConfiguration@QEglProperties@@QAE_NXZ @ 12568 NONAME ABSENT ; bool QEglProperties::reduceConfiguration(void)
+ ?removeValue@QEglProperties@@QAE_NH@Z @ 12569 NONAME ABSENT ; bool QEglProperties::removeValue(int)
+ ?toString@QEglProperties@@QBE?AVQString@@XZ @ 12570 NONAME ABSENT ; class QString QEglProperties::toString(void) const
+ ?dumpAllConfigs@QEglProperties@@SAXXZ @ 12571 NONAME ABSENT ; void QEglProperties::dumpAllConfigs(void)
+ ?defaultDisplay@QEglContext@@SAHPAVQPaintDevice@@@Z @ 12572 NONAME ABSENT ; int QEglContext::defaultDisplay(class QPaintDevice *)
+ ?configProperties@QEglContext@@QBE?AVQEglProperties@@H@Z @ 12573 NONAME ABSENT ; class QEglProperties QEglContext::configProperties(int) const
+ ?properties@QEglProperties@@QBEPBHXZ @ 12574 NONAME ABSENT ; int const * QEglProperties::properties(void) const
+ ??0QEglContext@@QAE@XZ @ 12575 NONAME ABSENT ; QEglContext::QEglContext(void)
+ ??1QEglContext@@QAE@XZ @ 12576 NONAME ABSENT ; QEglContext::~QEglContext(void)
+ ?isValid@QEglContext@@QBE_NXZ @ 12577 NONAME ABSENT ; bool QEglContext::isValid(void) const
+ ?value@QEglProperties@@QBEHH@Z @ 12578 NONAME ABSENT ; int QEglProperties::value(int) const
+ ?clearError@QEglContext@@SAXXZ @ 12579 NONAME ABSENT ; void QEglContext::clearError(void)
+ ??0QEglProperties@@QAE@H@Z @ 12580 NONAME ABSENT ; QEglProperties::QEglProperties(int)
+ ?setValue@QEglProperties@@QAEXHH@Z @ 12581 NONAME ABSENT ; void QEglProperties::setValue(int, int)
+ ?setPaintDeviceFormat@QEglProperties@@QAEXPAVQPaintDevice@@@Z @ 12582 NONAME ABSENT ; void QEglProperties::setPaintDeviceFormat(class QPaintDevice *)
+ ?destroy@QEglContext@@QAEXXZ @ 12583 NONAME ABSENT ; void QEglContext::destroy(void)
+ ?setRenderableType@QEglProperties@@QAEXW4API@QEgl@@@Z @ 12584 NONAME ABSENT ; void QEglProperties::setRenderableType(enum QEgl::API)
+ ?setContext@QEglContext@@QAEXH@Z @ 12585 NONAME ABSENT ; void QEglContext::setContext(int)
+ ?waitClient@QEglContext@@QAEXXZ @ 12586 NONAME ABSENT ; void QEglContext::waitClient(void)
+ ?isEmpty@QEglProperties@@QBE_NXZ @ 12587 NONAME ABSENT ; bool QEglProperties::isEmpty(void) const
+ ?getDisplay@QEglContext@@CAHPAVQPaintDevice@@@Z @ 12588 NONAME ABSENT ; int QEglContext::getDisplay(class QPaintDevice *)
+ ?isSharing@QEglContext@@QBE_NXZ @ 12589 NONAME ABSENT ; bool QEglContext::isSharing(void) const
+ ?isCurrent@QEglContext@@QBE_NXZ @ 12590 NONAME ABSENT ; bool QEglContext::isCurrent(void) const
+ ??0QEglProperties@@QAE@XZ @ 12591 NONAME ABSENT ; QEglProperties::QEglProperties(void)
+ ?extensions@QEglContext@@SA?AVQString@@XZ @ 12592 NONAME ABSENT ; class QString QEglContext::extensions(void)
+ ?setCurrentContext@QEglContext@@CAXW4API@QEgl@@PAV1@@Z @ 12593 NONAME ABSENT ; void QEglContext::setCurrentContext(enum QEgl::API, class QEglContext *)
+ ??1QEglProperties@@QAE@XZ @ 12594 NONAME ABSENT ; QEglProperties::~QEglProperties(void)
+ ?createContext@QEglContext@@QAE_NPAV1@PBVQEglProperties@@@Z @ 12595 NONAME ABSENT ; bool QEglContext::createContext(class QEglContext *, class QEglProperties const *)
+ ?setConfig@QEglContext@@QAEXH@Z @ 12596 NONAME ABSENT ; void QEglContext::setConfig(int)
+ ?hasExtension@QEglContext@@SA_NPBD@Z @ 12597 NONAME ABSENT ; bool QEglContext::hasExtension(char const *)
+ ?doneCurrent@QEglContext@@QAE_NXZ @ 12598 NONAME ABSENT ; bool QEglContext::doneCurrent(void)
+ ?display@QEglContext@@QBEHXZ @ 12599 NONAME ABSENT ; int QEglContext::display(void) const
+ ?setPixelFormat@QEglProperties@@QAEXW4Format@QImage@@@Z @ 12600 NONAME ABSENT ; void QEglProperties::setPixelFormat(enum QImage::Format)
+ ?currentContext@QEglContext@@CAPAV1@W4API@QEgl@@@Z @ 12601 NONAME ABSENT ; class QEglContext * QEglContext::currentContext(enum QEgl::API)
+ ?errorString@QEglContext@@SA?AVQString@@H@Z @ 12602 NONAME ABSENT ; class QString QEglContext::errorString(int)
diff --git a/src/s60installs/bwins/QtOpenVGu.def b/src/s60installs/bwins/QtOpenVGu.def
index 88e724f..26ee862 100644
--- a/src/s60installs/bwins/QtOpenVGu.def
+++ b/src/s60installs/bwins/QtOpenVGu.def
@@ -48,7 +48,7 @@ EXPORTS
?paintEngine@QVGWindowSurface@@UBEPAVQPaintEngine@@XZ @ 47 NONAME ; class QPaintEngine * QVGWindowSurface::paintEngine(void) const
??0QVGPainterState@@QAE@XZ @ 48 NONAME ; QVGPainterState::QVGPainterState(void)
?d_func@QVGPaintEngine@@ABEPBVQVGPaintEnginePrivate@@XZ @ 49 NONAME ; class QVGPaintEnginePrivate const * QVGPaintEngine::d_func(void) const
- ?qt_vg_create_context@@YAPAVQEglContext@@PAVQPaintDevice@@@Z @ 50 NONAME ; class QEglContext * qt_vg_create_context(class QPaintDevice *)
+ ?qt_vg_create_context@@YAPAVQEglContext@@PAVQPaintDevice@@@Z @ 50 NONAME ABSENT ; class QEglContext * qt_vg_create_context(class QPaintDevice *)
?clip@QVGPaintEngine@@UAEXABVQRegion@@W4ClipOperation@Qt@@@Z @ 51 NONAME ; void QVGPaintEngine::clip(class QRegion const &, enum Qt::ClipOperation)
?endNativePainting@QVGPaintEngine@@UAEXXZ @ 52 NONAME ; void QVGPaintEngine::endNativePainting(void)
?brushChanged@QVGPaintEngine@@UAEXXZ @ 53 NONAME ; void QVGPaintEngine::brushChanged(void)
@@ -78,7 +78,7 @@ EXPORTS
?beginPaint@QVGEGLWindowSurfaceVGImage@@UAEXPAVQWidget@@@Z @ 77 NONAME ; void QVGEGLWindowSurfaceVGImage::beginPaint(class QWidget *)
?createState@QVGPaintEngine@@UBEPAVQPainterState@@PAV2@@Z @ 78 NONAME ; class QPainterState * QVGPaintEngine::createState(class QPainterState *) const
?buffer@QVGPixmapData@@UAEPAVQImage@@XZ @ 79 NONAME ; class QImage * QVGPixmapData::buffer(void)
- ?qt_vg_destroy_context@@YAXPAVQEglContext@@@Z @ 80 NONAME ; void qt_vg_destroy_context(class QEglContext *)
+ ?qt_vg_destroy_context@@YAXPAVQEglContext@@@Z @ 80 NONAME ABSENT ; void qt_vg_destroy_context(class QEglContext *)
?clip@QVGPaintEngine@@UAEXABVQVectorPath@@W4ClipOperation@Qt@@@Z @ 81 NONAME ; void QVGPaintEngine::clip(class QVectorPath const &, enum Qt::ClipOperation)
?drawPolygon@QVGPaintEngine@@UAEXPBVQPoint@@HW4PolygonDrawMode@QPaintEngine@@@Z @ 82 NONAME ; void QVGPaintEngine::drawPolygon(class QPoint const *, int, enum QPaintEngine::PolygonDrawMode)
?fromImage@QVGPixmapData@@UAEXABVQImage@@V?$QFlags@W4ImageConversionFlag@Qt@@@@@Z @ 83 NONAME ; void QVGPixmapData::fromImage(class QImage const &, class QFlags<enum Qt::ImageConversionFlag>)
@@ -139,4 +139,29 @@ EXPORTS
??_EQVGPaintEngine@@UAE@I@Z @ 138 NONAME ; QVGPaintEngine::~QVGPaintEngine(unsigned int)
?clip@QVGPaintEngine@@UAEXABVQPainterPath@@W4ClipOperation@Qt@@@Z @ 139 NONAME ; void QVGPaintEngine::clip(class QPainterPath const &, enum Qt::ClipOperation)
?vgPrivate@QVGPaintEngine@@QAEPAVQVGPaintEnginePrivate@@XZ @ 140 NONAME ; class QVGPaintEnginePrivate * QVGPaintEngine::vgPrivate(void)
+ ?removeFromLRU@QVGImagePool@@IAEXPAVQVGPixmapData@@@Z @ 141 NONAME ; void QVGImagePool::removeFromLRU(class QVGPixmapData *)
+ ?releaseImage@QVGImagePool@@UAEXPAVQVGPixmapData@@K@Z @ 142 NONAME ; void QVGImagePool::releaseImage(class QVGPixmapData *, unsigned long)
+ ?d_func@QVGImagePool@@AAEPAVQVGImagePoolPrivate@@XZ @ 143 NONAME ; class QVGImagePoolPrivate * QVGImagePool::d_func(void)
+ ?detachImageFromPool@QVGPixmapData@@UAEXXZ @ 144 NONAME ; void QVGPixmapData::detachImageFromPool(void)
+ ?createImageForPixmap@QVGImagePool@@UAEKW4VGImageFormat@@JJKPAVQVGPixmapData@@@Z @ 145 NONAME ; unsigned long QVGImagePool::createImageForPixmap(enum VGImageFormat, long, long, unsigned long, class QVGPixmapData *)
+ ?destroyImageAndContext@QVGPixmapData@@IAEXXZ @ 146 NONAME ; void QVGPixmapData::destroyImageAndContext(void)
+ ?moveToHeadOfLRU@QVGImagePool@@IAEXPAVQVGPixmapData@@@Z @ 147 NONAME ; void QVGImagePool::moveToHeadOfLRU(class QVGPixmapData *)
+ ?instance@QVGImagePool@@SAPAV1@XZ @ 148 NONAME ; class QVGImagePool * QVGImagePool::instance(void)
+ ?useImage@QVGImagePool@@UAEXPAVQVGPixmapData@@@Z @ 149 NONAME ; void QVGImagePool::useImage(class QVGPixmapData *)
+ ??1QVGImagePool@@UAE@XZ @ 150 NONAME ; QVGImagePool::~QVGImagePool(void)
+ ?destroyImages@QVGPixmapData@@IAEXXZ @ 151 NONAME ; void QVGPixmapData::destroyImages(void)
+ ?reclaimSpace@QVGImagePool@@UAE_NW4VGImageFormat@@JJPAVQVGPixmapData@@@Z @ 152 NONAME ; bool QVGImagePool::reclaimSpace(enum VGImageFormat, long, long, class QVGPixmapData *)
+ ?detachImage@QVGImagePool@@UAEXPAVQVGPixmapData@@@Z @ 153 NONAME ; void QVGImagePool::detachImage(class QVGPixmapData *)
+ ?createPermanentImage@QVGImagePool@@UAEKW4VGImageFormat@@JJK@Z @ 154 NONAME ; unsigned long QVGImagePool::createPermanentImage(enum VGImageFormat, long, long, unsigned long)
+ ?d_func@QVGImagePool@@ABEPBVQVGImagePoolPrivate@@XZ @ 155 NONAME ; class QVGImagePoolPrivate const * QVGImagePool::d_func(void) const
+ ?createTemporaryImage@QVGImagePool@@UAEKW4VGImageFormat@@JJKPAVQVGPixmapData@@@Z @ 156 NONAME ; unsigned long QVGImagePool::createTemporaryImage(enum VGImageFormat, long, long, unsigned long, class QVGPixmapData *)
+ ??_EQVGImagePool@@UAE@I@Z @ 157 NONAME ; QVGImagePool::~QVGImagePool(unsigned int)
+ ?hibernate@QVGImagePool@@UAEXXZ @ 158 NONAME ; void QVGImagePool::hibernate(void)
+ ?qt_vg_destroy_context@@YAXPAVQEglContext@@H@Z @ 159 NONAME ; void qt_vg_destroy_context(class QEglContext *, int)
+ ??0QVGImagePool@@QAE@XZ @ 160 NONAME ; QVGImagePool::QVGImagePool(void)
+ ?setImagePool@QVGImagePool@@SAXPAV1@@Z @ 161 NONAME ; void QVGImagePool::setImagePool(class QVGImagePool *)
+ ?pixmapLRU@QVGImagePool@@IAEPAVQVGPixmapData@@XZ @ 162 NONAME ; class QVGPixmapData * QVGImagePool::pixmapLRU(void)
+ ?qt_vg_create_context@@YAPAVQEglContext@@PAVQPaintDevice@@H@Z @ 163 NONAME ; class QEglContext * qt_vg_create_context(class QPaintDevice *, int)
+ ?reclaimImages@QVGPixmapData@@UAEXXZ @ 164 NONAME ; void QVGPixmapData::reclaimImages(void)
+ ?hibernate@QVGPixmapData@@UAEXXZ @ 165 NONAME ; void QVGPixmapData::hibernate(void)
diff --git a/src/s60installs/eabi/QtOpenVGu.def b/src/s60installs/eabi/QtOpenVGu.def
index 7526632..eb4caef 100644
--- a/src/s60installs/eabi/QtOpenVGu.def
+++ b/src/s60installs/eabi/QtOpenVGu.def
@@ -173,4 +173,27 @@ EXPORTS
_Z21qt_vg_destroy_contextP11QEglContexti @ 172 NONAME
_ZN13QVGPixmapData22destroyImageAndContextEv @ 173 NONAME
_ZN13QVGPixmapData9hibernateEv @ 174 NONAME
+ _ZN12QVGImagePool11detachImageEP13QVGPixmapData @ 175 NONAME
+ _ZN12QVGImagePool12reclaimSpaceE13VGImageFormatllP13QVGPixmapData @ 176 NONAME
+ _ZN12QVGImagePool12releaseImageEP13QVGPixmapDatam @ 177 NONAME
+ _ZN12QVGImagePool12setImagePoolEPS_ @ 178 NONAME
+ _ZN12QVGImagePool13removeFromLRUEP13QVGPixmapData @ 179 NONAME
+ _ZN12QVGImagePool15moveToHeadOfLRUEP13QVGPixmapData @ 180 NONAME
+ _ZN12QVGImagePool20createImageForPixmapE13VGImageFormatllmP13QVGPixmapData @ 181 NONAME
+ _ZN12QVGImagePool20createPermanentImageE13VGImageFormatllm @ 182 NONAME
+ _ZN12QVGImagePool20createTemporaryImageE13VGImageFormatllmP13QVGPixmapData @ 183 NONAME
+ _ZN12QVGImagePool8instanceEv @ 184 NONAME
+ _ZN12QVGImagePool8useImageEP13QVGPixmapData @ 185 NONAME
+ _ZN12QVGImagePool9hibernateEv @ 186 NONAME
+ _ZN12QVGImagePool9pixmapLRUEv @ 187 NONAME
+ _ZN12QVGImagePoolC1Ev @ 188 NONAME
+ _ZN12QVGImagePoolC2Ev @ 189 NONAME
+ _ZN12QVGImagePoolD0Ev @ 190 NONAME
+ _ZN12QVGImagePoolD1Ev @ 191 NONAME
+ _ZN12QVGImagePoolD2Ev @ 192 NONAME
+ _ZN13QVGPixmapData13destroyImagesEv @ 193 NONAME
+ _ZN13QVGPixmapData13reclaimImagesEv @ 194 NONAME
+ _ZN13QVGPixmapData19detachImageFromPoolEv @ 195 NONAME
+ _ZTI12QVGImagePool @ 196 NONAME
+ _ZTV12QVGImagePool @ 197 NONAME
diff --git a/src/s60installs/qt.iby b/src/s60installs/qt.iby
index bdd668c..a6a96ec 100644
--- a/src/s60installs/qt.iby
+++ b/src/s60installs/qt.iby
@@ -113,6 +113,7 @@ data=\epoc32\data\z\resource\qt\plugins\phonon_backend\phonon_mmf.qtplugin resou
data=\epoc32\data\z\resource\qt\plugins\graphicssystems\qvggraphicssystem.qtplugin resource\qt\plugins\graphicssystems\qvggraphicssystem.qtplugin
// Stub sis file
-data=ZSYSTEM\install\qt.sis System\Install\qt.sis
+data=ZSYSTEM\install\qt_stub.sis System\Install\qt_stub.sis
+data=ZSYSTEM\install\qtwebkit_stub.sis System\Install\qtwebkit_stub.sis
#endif // __QT_IBY__
diff --git a/src/sql/drivers/sqlite/qsql_sqlite.cpp b/src/sql/drivers/sqlite/qsql_sqlite.cpp
index 9fff552..d3be304 100644
--- a/src/sql/drivers/sqlite/qsql_sqlite.cpp
+++ b/src/sql/drivers/sqlite/qsql_sqlite.cpp
@@ -500,32 +500,6 @@ bool QSQLiteDriver::hasFeature(DriverFeature f) const
return false;
}
-static int qGetSqliteTimeout(QString opts)
-{
- enum { DefaultTimeout = 5000 };
-
- opts.remove(QLatin1Char(' '));
- foreach(QString option, opts.split(QLatin1Char(';'))) {
- if (option.startsWith(QLatin1String("QSQLITE_BUSY_TIMEOUT="))) {
- bool ok;
- int nt = option.mid(21).toInt(&ok);
- if (ok)
- return nt;
- }
- }
- return DefaultTimeout;
-}
-
-static int qGetSqliteOpenMode(QString opts)
-{
- opts.remove(QLatin1Char(' '));
- foreach(QString option, opts.split(QLatin1Char(';'))) {
- if (option == QLatin1String("QSQLITE_OPEN_READONLY"))
- return SQLITE_OPEN_READONLY;
- }
- return SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE;
-}
-
/*
SQLite dbs have no user name, passwords, hosts or ports.
just file names.
@@ -537,9 +511,26 @@ bool QSQLiteDriver::open(const QString & db, const QString &, const QString &, c
if (db.isEmpty())
return false;
+ bool sharedCache = false;
+ int openMode = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, timeOut=5000;
+ QStringList opts=QString(conOpts).remove(QLatin1Char(' ')).split(QLatin1Char(';'));
+ foreach(const QString &option, opts) {
+ if (option.startsWith(QLatin1String("QSQLITE_BUSY_TIMEOUT="))) {
+ bool ok;
+ int nt = option.mid(21).toInt(&ok);
+ if (ok)
+ timeOut = nt;
+ }
+ if (option == QLatin1String("QSQLITE_OPEN_READONLY"))
+ openMode = SQLITE_OPEN_READONLY;
+ if (option == QLatin1String("QSQLITE_ENABLE_SHARED_CACHE"))
+ sharedCache = true;
+ }
+
+ sqlite3_enable_shared_cache(sharedCache);
- if (sqlite3_open_v2(db.toUtf8().constData(), &d->access, qGetSqliteOpenMode(conOpts), NULL) == SQLITE_OK) {
- sqlite3_busy_timeout(d->access, qGetSqliteTimeout(conOpts));
+ if (sqlite3_open_v2(db.toUtf8().constData(), &d->access, openMode, NULL) == SQLITE_OK) {
+ sqlite3_busy_timeout(d->access, timeOut);
setOpen(true);
setOpenError(false);
return true;
diff --git a/src/sql/kernel/qsqldatabase.cpp b/src/sql/kernel/qsqldatabase.cpp
index 031261d..1416ee3 100644
--- a/src/sql/kernel/qsqldatabase.cpp
+++ b/src/sql/kernel/qsqldatabase.cpp
@@ -1267,6 +1267,7 @@ QSqlRecord QSqlDatabase::record(const QString& tablename) const
\list
\i QSQLITE_BUSY_TIMEOUT
\i QSQLITE_OPEN_READONLY
+ \i QSQLITE_ENABLE_SHARED_CACHE
\endlist
\i
diff --git a/src/xmlpatterns/data/qatomicvalue.cpp b/src/xmlpatterns/data/qatomicvalue.cpp
index 6858e27..c4f3578 100644
--- a/src/xmlpatterns/data/qatomicvalue.cpp
+++ b/src/xmlpatterns/data/qatomicvalue.cpp
@@ -226,6 +226,8 @@ ItemType::Ptr AtomicValue::qtToXDMType(const QXmlItem &item)
/* Fallthrough. */
case QVariant::Time:
return BuiltinTypes::xsDateTime;
+ case QMetaType::Float:
+ return BuiltinTypes::xsFloat;
case QVariant::Double:
return BuiltinTypes::xsDouble;
default:
diff --git a/src/xmlpatterns/schema/qxsdschemaparser.cpp b/src/xmlpatterns/schema/qxsdschemaparser.cpp
index 6d878e8..6ed28af 100644
--- a/src/xmlpatterns/schema/qxsdschemaparser.cpp
+++ b/src/xmlpatterns/schema/qxsdschemaparser.cpp
@@ -4832,7 +4832,7 @@ XsdTerm::Ptr XsdSchemaParser::parseLocalElement(const XsdParticle::Ptr &particle
if (isSchemaTag(XsdSchemaToken::Annotation, token, namespaceToken)) {
const XsdAnnotation::Ptr annotation = parseAnnotation();
- element->addAnnotation(annotation);
+ term->addAnnotation(annotation);
} else if (isSchemaTag(XsdSchemaToken::SimpleType, token, namespaceToken)) {
if (hasRefAttribute) {
error(QtXmlPatterns::tr("%1 element with %2 child element must not have a %3 attribute.")