summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@nokia.com>2011-02-25 11:51:57 +0100
committerGunnar Sletta <gunnar.sletta@nokia.com>2011-02-25 11:51:57 +0100
commit0a022996bd138553360562444d8b85a6141ab0ae (patch)
tree664c1239a58c4136940e662ddd5a173a40d0b26d
parent53ab13a1a403ebe7e7c4c59ce9f605bacf3e2b18 (diff)
parent52211876f610cf81c47f32bda6a271d9e9875bff (diff)
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-fire-team
-rw-r--r--doc/src/getting-started/installation.qdoc23
-rw-r--r--doc/src/snippets/code/doc_src_installation.qdoc7
-rw-r--r--mkspecs/features/symbian/symbian_building.prf6
-rw-r--r--src/3rdparty/webkit/WebCore/WebCore.pro2
-rw-r--r--src/corelib/animation/qabstractanimation.cpp1
-rw-r--r--src/corelib/arch/qatomic_armv5.h2
-rw-r--r--src/corelib/global/qglobal.h19
-rw-r--r--src/corelib/global/qnamespace.h3
-rw-r--r--src/corelib/global/qnamespace.qdoc8
-rw-r--r--src/corelib/kernel/qeventdispatcher_win.cpp5
-rw-r--r--src/corelib/tools/qshareddata.h4
-rw-r--r--src/declarative/debugger/qdeclarativedebugserver.cpp2
-rw-r--r--src/declarative/graphicsitems/qdeclarativeflickable.cpp7
-rw-r--r--src/declarative/graphicsitems/qdeclarativemousearea.cpp2
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextinput.cpp9
-rw-r--r--src/declarative/qml/qdeclarativeimport.cpp31
-rw-r--r--src/declarative/qml/qdeclarativeworkerscript.cpp66
-rw-r--r--src/gui/image/qxpmhandler.cpp2
-rw-r--r--src/gui/kernel/qwidget.cpp21
-rw-r--r--src/gui/kernel/qwidget_p.h1
-rw-r--r--src/gui/kernel/qwidget_s60.cpp14
-rw-r--r--src/gui/math3d/qgenericmatrix.h6
-rw-r--r--src/gui/math3d/qmatrix4x4.h6
-rw-r--r--src/gui/painting/qdrawhelper_arm_simd.cpp4
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp8
-rw-r--r--src/gui/painting/qpainterpath.cpp2
-rw-r--r--src/gui/styles/qstylesheetstyle.cpp2
-rw-r--r--src/multimedia/audio/qaudiooutput_symbian_p.cpp2
-rw-r--r--src/network/bearer/qnetworkconfigmanager.cpp17
-rw-r--r--src/network/bearer/qnetworksession.cpp4
-rw-r--r--src/openvg/qpaintengine_vg.cpp35
-rw-r--r--src/openvg/qwindowsurface_vgegl.cpp3
-rw-r--r--src/plugins/graphicssystems/meego/dithering.cpp147
-rw-r--r--src/plugins/plugins.pro2
-rw-r--r--src/plugins/qmltooling/qmltooling.pro (renamed from src/plugins/qmldebugging/qmldebugging.pro)0
-rw-r--r--src/plugins/qmltooling/tcpserver/qtcpserverconnection.cpp (renamed from src/plugins/qmldebugging/tcpserver/qtcpserverconnection.cpp)0
-rw-r--r--src/plugins/qmltooling/tcpserver/qtcpserverconnection.h (renamed from src/plugins/qmldebugging/tcpserver/qtcpserverconnection.h)0
-rw-r--r--src/plugins/qmltooling/tcpserver/tcpserver.pro (renamed from src/plugins/qmldebugging/tcpserver/tcpserver.pro)4
-rw-r--r--src/qbase.pri2
-rw-r--r--src/s60installs/s60installs.pro19
-rw-r--r--src/script/api/qscriptengine.cpp4
-rw-r--r--src/sql/models/qsqltablemodel.cpp4
-rw-r--r--src/sql/models/qsqltablemodel_p.h2
-rw-r--r--src/src.pro1
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp40
-rw-r--r--tests/auto/declarative/qdeclarativemoduleplugin/data/importsMixedQmlCppPlugin.2.qml21
-rw-r--r--tests/auto/declarative/qdeclarativemoduleplugin/data/importsMixedQmlCppPlugin.qml13
-rw-r--r--tests/auto/declarative/qdeclarativemoduleplugin/data/versionNotInstalled.2.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativemoduleplugin/data/versionNotInstalled.2.qml5
-rw-r--r--tests/auto/declarative/qdeclarativemoduleplugin/data/versionNotInstalled.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativemoduleplugin/data/versionNotInstalled.qml6
-rw-r--r--tests/auto/declarative/qdeclarativemoduleplugin/imports/com/nokia/AutoTestQmlMixedPluginType/Foo.qml5
-rw-r--r--tests/auto/declarative/qdeclarativemoduleplugin/imports/com/nokia/AutoTestQmlMixedPluginType/qmldir2
-rw-r--r--tests/auto/declarative/qdeclarativemoduleplugin/imports/com/nokia/AutoTestQmlVersionPluginType/qmldir1
-rw-r--r--tests/auto/declarative/qdeclarativemoduleplugin/pluginMixed/plugin.cpp73
-rw-r--r--tests/auto/declarative/qdeclarativemoduleplugin/pluginMixed/pluginMixed.pro9
-rw-r--r--tests/auto/declarative/qdeclarativemoduleplugin/pluginVersion/plugin.cpp73
-rw-r--r--tests/auto/declarative/qdeclarativemoduleplugin/pluginVersion/pluginVersion.pro9
-rw-r--r--tests/auto/declarative/qdeclarativemoduleplugin/qdeclarativemoduleplugin.pro2
-rw-r--r--tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp64
-rw-r--r--tests/auto/declarative/qdeclarativeworkerscript/data/script_error_onCall.js6
-rw-r--r--tests/auto/declarative/qdeclarativeworkerscript/data/script_error_onLoad.js5
-rw-r--r--tests/auto/declarative/qdeclarativeworkerscript/data/worker_error_onCall.qml6
-rw-r--r--tests/auto/declarative/qdeclarativeworkerscript/data/worker_error_onLoad.qml7
-rw-r--r--tests/auto/declarative/qdeclarativeworkerscript/tst_qdeclarativeworkerscript.cpp52
-rw-r--r--tests/auto/qimagereader/images/corrupt-pixel-count.xpm11
-rw-r--r--tests/auto/qimagereader/tst_qimagereader.cpp3
-rw-r--r--tests/auto/qinputcontext/tst_qinputcontext.cpp32
-rw-r--r--tests/auto/qsqltablemodel/tst_qsqltablemodel.cpp21
-rw-r--r--tests/auto/qstylesheetstyle/tst_qstylesheetstyle.cpp18
-rw-r--r--tools/assistant/tools/assistant/helpviewer_qwv.cpp2
-rw-r--r--tools/designer/src/components/signalsloteditor/signalslot_utils.cpp7
-rw-r--r--tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp8
-rw-r--r--tools/designer/src/lib/shared/grid.cpp20
-rw-r--r--tools/qml/qml.pro4
75 files changed, 817 insertions, 219 deletions
diff --git a/doc/src/getting-started/installation.qdoc b/doc/src/getting-started/installation.qdoc
index c906f84c6d..6d0256e88e 100644
--- a/doc/src/getting-started/installation.qdoc
+++ b/doc/src/getting-started/installation.qdoc
@@ -874,9 +874,10 @@ If the installation fails, please make sure that there is
no previously installed version of Qt on the phone.
Qt requires some dependent packages to be installed on the device,
-they are shipped in the Symbian SDK and can be installed using the
-runonphone tool as well.
-The packages can be found in the EPOCROOT at the following locations;
+which can be installed using the runonphone tool as well. One is
+the \c{sqlite3.sis}, which is included in the Qt distribution, while
+the others are shipped with the Symbian SDK. The required packages
+can be found from the following locations:
\snippet doc/src/snippets/code/doc_src_installation.qdoc 50
@@ -1274,10 +1275,18 @@ We hope you will enjoy using Qt.
in this release.
\endlist
- Running Qt on real device requires the Open C to be installed on the device.
- The Open C installation packages are embedded into \c{qt_installer.sis}, which is included in
- Qt for Symbian binary package. If you are building Qt from scratch, you can find the
- required packages in the Symbian SDK where you installed Open C/C++:
+ Running Qt on real device requires the Open C and sqlite3 to be installed on the device.
+ These installation packages are embedded into \c{qt_installer.sis}, which is included in
+ Qt for Symbian binary package.
+
+ If you are building Qt from scratch, you can find the sqlite3 package from
+ under your Qt installation:
+
+ \list
+ \o \c{src\s60installs\sqlite3.sis}
+ \endlist
+
+ The Open C packages you can find in the Symbian SDK where you installed Open C/C++:
\list
\o \c{nokia_plugin\openc\s60opencsis\pips_s60_<version>.sis}
\o \c{nokia_plugin\openc\s60opencsis\openc_ssl_s60_<version>.sis}
diff --git a/doc/src/snippets/code/doc_src_installation.qdoc b/doc/src/snippets/code/doc_src_installation.qdoc
index cf204b5292..5aaa2b09eb 100644
--- a/doc/src/snippets/code/doc_src_installation.qdoc
+++ b/doc/src/snippets/code/doc_src_installation.qdoc
@@ -328,9 +328,10 @@ runonphone -s myapp.sis myapp.exe
//! [49]
//! [50]
-nokia_plugin/openc/s60opencsis/openc_ssl_s60_1_6_ss.sis
-nokia_plugin/openc/s60opencsis/pips_s60_1_6_ss.sis
-nokia_plugin/opencpp/s60opencppsis/stdcpp_s60_1_6_ss.sis
+src/s60installs/sqlite3.sis
+$EPOCROOT/nokia_plugin/openc/s60opencsis/openc_ssl_s60_1_6_ss.sis
+$EPOCROOT/nokia_plugin/openc/s60opencsis/pips_s60_1_6_ss.sis
+$EPOCROOT/nokia_plugin/opencpp/s60opencppsis/stdcpp_s60_1_6_ss.sis
//! [50]
diff --git a/mkspecs/features/symbian/symbian_building.prf b/mkspecs/features/symbian/symbian_building.prf
index 678838c5b9..28046b457b 100644
--- a/mkspecs/features/symbian/symbian_building.prf
+++ b/mkspecs/features/symbian/symbian_building.prf
@@ -56,7 +56,7 @@ defineReplace(processSymbianLibrary) {
}
# This part turn "-llibc" into "libc.dso", and moves -L entries to QMAKE_LIBDIR.
-libsToProcess = LIBS QMAKE_LIBS
+libsToProcess = LIBS LIBS_PRIVATE QMAKE_LIBS
for(libToProcess, libsToProcess) {
qt_libraries = $$split($$libToProcess, " ")
eval($$libToProcess =)
@@ -95,8 +95,8 @@ count(splitVersion, 0) {
} else {
count(splitVersion, 3) {
hexVersion = $$system("perl -e \"printf (\\\"%02x\\\", $$member(splitVersion, 0))\"")
- hexPart2 = $$system("perl -e \"printf (\\\"%02x\\\", $$member(splitVersion, 1))\"")"
- hexPart2 = $$hexPart2$$system("perl -e \"printf (\\\"%02x\\\", $$member(splitVersion, 2))\"")"
+ hexPart2 = $$system("perl -e \"printf (\\\"%02x\\\", $$member(splitVersion, 1))\"")
+ hexPart2 = $$hexPart2$$system("perl -e \"printf (\\\"%02x\\\", $$member(splitVersion, 2))\"")
decVersion = $$system("perl -e \"printf (\\\"%1d\\\", 0x$$hexVersion)\"").
hexVersion = $$hexVersion$$hexPart2
decVersion = $$decVersion$$system("perl -e \"printf (\\\"%d\\\", 0x$$hexPart2)\"")
diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro
index e82ec4cfe9..2de6961475 100644
--- a/src/3rdparty/webkit/WebCore/WebCore.pro
+++ b/src/3rdparty/webkit/WebCore/WebCore.pro
@@ -15,7 +15,7 @@ symbian: {
webkitlibs.path = /sys/bin
vendorinfo = \
"; Localised Vendor name" \
- "%{\"Nokia, Qt\"}" \
+ "%{\"Nokia\"}" \
" " \
"; Unique Vendor name" \
":\"Nokia, Qt\"" \
diff --git a/src/corelib/animation/qabstractanimation.cpp b/src/corelib/animation/qabstractanimation.cpp
index 08a17a2b67..2d5cfabe2f 100644
--- a/src/corelib/animation/qabstractanimation.cpp
+++ b/src/corelib/animation/qabstractanimation.cpp
@@ -501,6 +501,7 @@ QDefaultAnimationDriver::QDefaultAnimationDriver(QUnifiedTimer *timer)
void QDefaultAnimationDriver::timerEvent(QTimerEvent *e)
{
Q_ASSERT(e->timerId() == m_timer.timerId());
+ Q_UNUSED(e); // if the assertions are disabled
advance();
}
diff --git a/src/corelib/arch/qatomic_armv5.h b/src/corelib/arch/qatomic_armv5.h
index f0f2f9aae6..820be7b5e9 100644
--- a/src/corelib/arch/qatomic_armv5.h
+++ b/src/corelib/arch/qatomic_armv5.h
@@ -107,7 +107,7 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isFetchAndAddWaitFree()
// kernel places a restartable cmpxchg implementation at a fixed address
extern "C" typedef int (qt_atomic_eabi_cmpxchg_int_t)(int oldval, int newval, volatile int *ptr);
-extern "C" typedef int (qt_atomic_eabi_cmpxchg_ptr_t)(const void *oldval, void *newval, volatile void *ptr);
+extern "C" typedef int (qt_atomic_eabi_cmpxchg_ptr_t)(const void *oldval, const void *newval, volatile void *ptr);
#define qt_atomic_eabi_cmpxchg_int (*reinterpret_cast<qt_atomic_eabi_cmpxchg_int_t *>(0xffff0fc0))
#define qt_atomic_eabi_cmpxchg_ptr (*reinterpret_cast<qt_atomic_eabi_cmpxchg_ptr_t *>(0xffff0fc0))
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index 960fe6e90f..d849349b71 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -460,7 +460,6 @@ namespace QT_NAMESPACE {}
# if defined(__INTEL_COMPILER)
/* Intel C++ also masquerades as GCC 3.2.0 */
# define Q_CC_INTEL
-# define Q_NO_TEMPLATE_FRIENDS
# endif
# if defined(__clang__)
/* Clang also masquerades as GCC 4.2.1 */
@@ -763,6 +762,24 @@ namespace QT_NAMESPACE {}
# error "Qt has not been tested with this compiler - talk to qt-bugs@trolltech.com"
#endif
+#ifdef Q_CC_INTEL
+# if __INTEL_COMPILER < 1200
+# define Q_NO_TEMPLATE_FRIENDS
+# endif
+# if defined(__GXX_EXPERIMENTAL_CXX0X__) || defined(__GXX_EXPERIMENTAL_CPP0X__)
+# if __INTEL_COMPILER >= 1100
+# define Q_COMPILER_RVALUE_REFS
+# define Q_COMPILER_EXTERN_TEMPLATES
+# elif __INTEL_COMPILER >= 1200
+# define Q_COMPILER_VARIADIC_TEMPLATES
+# define Q_COMPILER_AUTO_TYPE
+# define Q_COMPILER_DEFAULT_DELETE_MEMBERS
+# define Q_COMPILER_CLASS_ENUM
+# define Q_COMPILER_LAMBDA
+# endif
+# endif
+#endif
+
#ifndef Q_PACKED
# define Q_PACKED
# undef Q_NO_PACKED_REFERENCE
diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h
index 1b22c77557..d84da0ddeb 100644
--- a/src/corelib/global/qnamespace.h
+++ b/src/corelib/global/qnamespace.h
@@ -543,7 +543,8 @@ public:
AA_DontUseNativeMenuBar = 6,
AA_MacDontSwapCtrlAndMeta = 7,
AA_S60DontConstructApplicationPanes = 8,
- AA_X11InitThreads = 9,
+ AA_S60DisablePartialScreenInputMode = 9,
+ AA_X11InitThreads = 10,
// Add new attributes before this line
AA_AttributeCount
diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc
index 0a0232859d..cbdf9d184c 100644
--- a/src/corelib/global/qnamespace.qdoc
+++ b/src/corelib/global/qnamespace.qdoc
@@ -156,11 +156,17 @@
whole lifetime. This attribute must be set before QApplication is
constructed.
+ \omitvalue AA_S60DisablePartialScreenInputMode By default in Symbian^3,
+ a separate editing window is opened on top of an application. This is exactly
+ like editing on previous versions of Symbian behave. When this attribute
+ is true, a virtual keyboard window is shown on top of application and it
+ is ensured that the focused text widget is visible. This is only supported in
+ Symbian^3. (internal)
+
\value AA_X11InitThreads Calls XInitThreads() as part of the QApplication
construction in order to make Xlib calls thread-safe. This
attribute must be set before QApplication is constructed.
-
\omitvalue AA_AttributeCount
*/
diff --git a/src/corelib/kernel/qeventdispatcher_win.cpp b/src/corelib/kernel/qeventdispatcher_win.cpp
index 3d8352e2b5..6badb6a2f8 100644
--- a/src/corelib/kernel/qeventdispatcher_win.cpp
+++ b/src/corelib/kernel/qeventdispatcher_win.cpp
@@ -532,10 +532,7 @@ LRESULT QT_WIN_CALLBACK qt_GetMessageHook(int code, WPARAM wp, LPARAM lp)
PostMessage(d->internalHwnd, WM_QT_SENDPOSTEDEVENTS, 0, 0);
}
} else if (d->sendPostedEventsWindowsTimerId == 0
- && localSerialNumber != d->lastSerialNumber
- // if this message IS the one that triggers sendPostedEvents(), no need to post it again
- && (msg->hwnd != d->internalHwnd
- || msg->message != WM_QT_SENDPOSTEDEVENTS)) {
+ && localSerialNumber != d->lastSerialNumber) {
// start a special timer to continue delivering posted events while
// there are still input and timer messages in the message queue
d->sendPostedEventsWindowsTimerId = SetTimer(d->internalHwnd,
diff --git a/src/corelib/tools/qshareddata.h b/src/corelib/tools/qshareddata.h
index 1bdba2cdb4..14943734c5 100644
--- a/src/corelib/tools/qshareddata.h
+++ b/src/corelib/tools/qshareddata.h
@@ -114,6 +114,7 @@ public:
return *this;
}
#ifdef Q_COMPILER_RVALUE_REFS
+ QSharedDataPointer(QSharedDataPointer &&o) : d(o.d) { o.d = 0; }
inline QSharedDataPointer<T> &operator=(QSharedDataPointer<T> &&other)
{ qSwap(d, other.d); return *this; }
#endif
@@ -197,7 +198,8 @@ public:
return *this;
}
#ifdef Q_COMPILER_RVALUE_REFS
- inline QSharedDataPointer<T> &operator=(QSharedDataPointer<T> &&other)
+ inline QExplicitlySharedDataPointer(QExplicitlySharedDataPointer &&o) : d(o.d) { o.d = 0; }
+ inline QExplicitlySharedDataPointer<T> &operator=(QExplicitlySharedDataPointer<T> &&other)
{ qSwap(d, other.d); return *this; }
#endif
diff --git a/src/declarative/debugger/qdeclarativedebugserver.cpp b/src/declarative/debugger/qdeclarativedebugserver.cpp
index a2699843d9..ea3d9a35c9 100644
--- a/src/declarative/debugger/qdeclarativedebugserver.cpp
+++ b/src/declarative/debugger/qdeclarativedebugserver.cpp
@@ -118,7 +118,7 @@ QDeclarativeDebugServerConnection *QDeclarativeDebugServerPrivate::loadConnectio
QStringList pluginCandidates;
const QStringList paths = QCoreApplication::libraryPaths();
foreach (const QString &libPath, paths) {
- const QDir dir(libPath + QLatin1String("/qmldebugging"));
+ const QDir dir(libPath + QLatin1String("/qmltooling"));
if (dir.exists()) {
QStringList plugins(dir.entryList(QDir::Files));
foreach (const QString &pluginPath, plugins) {
diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
index 2a16d215fd..0faa296ccb 100644
--- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
@@ -53,6 +53,10 @@ QT_BEGIN_NAMESPACE
// before we perform a flick.
static const int FlickThreshold = 20;
+// RetainGrabVelocity is the maxmimum instantaneous velocity that
+// will ensure the Flickable retains the grab on consecutive flicks.
+static const int RetainGrabVelocity = 15;
+
QDeclarativeFlickableVisibleArea::QDeclarativeFlickableVisibleArea(QDeclarativeFlickable *parent)
: QObject(parent), flickable(parent), m_xPosition(0.), m_widthRatio(0.)
, m_yPosition(0.), m_heightRatio(0.)
@@ -672,7 +676,8 @@ void QDeclarativeFlickable::setFlickableDirection(FlickableDirection direction)
void QDeclarativeFlickablePrivate::handleMousePressEvent(QGraphicsSceneMouseEvent *event)
{
Q_Q(QDeclarativeFlickable);
- if (interactive && timeline.isActive() && (qAbs(hData.velocity) > 10 || qAbs(vData.velocity) > 10))
+ if (interactive && timeline.isActive()
+ && (qAbs(hData.smoothVelocity.value()) > RetainGrabVelocity || qAbs(vData.smoothVelocity.value()) > RetainGrabVelocity))
stealMouse = true; // If we've been flicked then steal the click.
else
stealMouse = false;
diff --git a/src/declarative/graphicsitems/qdeclarativemousearea.cpp b/src/declarative/graphicsitems/qdeclarativemousearea.cpp
index ffbae3f6c7..5b73a29447 100644
--- a/src/declarative/graphicsitems/qdeclarativemousearea.cpp
+++ b/src/declarative/graphicsitems/qdeclarativemousearea.cpp
@@ -314,6 +314,8 @@ QDeclarativeMouseAreaPrivate::~QDeclarativeMouseAreaPrivate()
position of the release of the click, and whether the click was held.
The \e accepted property of the MouseEvent parameter is ignored in this handler.
+
+ \sa onCanceled()
*/
/*!
diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
index f9f2b1838d..3c95ab8ecf 100644
--- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
@@ -776,6 +776,15 @@ bool QDeclarativeTextInput::hasAcceptableInput() const
}
/*!
+ \qmlsignal TextInput::onAccepted()
+
+ This handler is called when the Return or Enter key is pressed.
+ Note that if there is a \l validator or \l inputMask set on the text
+ input, the handler will only be emitted if the input is in an acceptable
+ state.
+*/
+
+/*!
\qmlproperty enumeration TextInput::echoMode
Specifies how the text should be displayed in the TextInput.
diff --git a/src/declarative/qml/qdeclarativeimport.cpp b/src/declarative/qml/qdeclarativeimport.cpp
index 87183c41da..7a1234d66f 100644
--- a/src/declarative/qml/qdeclarativeimport.cpp
+++ b/src/declarative/qml/qdeclarativeimport.cpp
@@ -457,6 +457,7 @@ bool QDeclarativeImportsPrivate::add(const QDeclarativeDirComponents &qmldircomp
}
QString url = uri;
+ bool versionFound = false;
if (importType == QDeclarativeScriptParser::Import::Library) {
url.replace(QLatin1Char('.'), QLatin1Char('/'));
bool found = false;
@@ -522,18 +523,18 @@ bool QDeclarativeImportsPrivate::add(const QDeclarativeDirComponents &qmldircomp
}
}
- if (!found) {
- found = QDeclarativeMetaType::isModule(uri.toUtf8(), vmaj, vmin);
- if (!found) {
- if (errorString) {
- bool anyversion = QDeclarativeMetaType::isModule(uri.toUtf8(), -1, -1);
- if (anyversion)
- *errorString = QDeclarativeImportDatabase::tr("module \"%1\" version %2.%3 is not installed").arg(uri_arg).arg(vmaj).arg(vmin);
- else
- *errorString = QDeclarativeImportDatabase::tr("module \"%1\" is not installed").arg(uri_arg);
- }
- return false;
+ if (QDeclarativeMetaType::isModule(uri.toUtf8(), vmaj, vmin))
+ versionFound = true;
+
+ if (!versionFound && qmldircomponents.isEmpty()) {
+ if (errorString) {
+ bool anyversion = QDeclarativeMetaType::isModule(uri.toUtf8(), -1, -1);
+ if (anyversion)
+ *errorString = QDeclarativeImportDatabase::tr("module \"%1\" version %2.%3 is not installed").arg(uri_arg).arg(vmaj).arg(vmin);
+ else
+ *errorString = QDeclarativeImportDatabase::tr("module \"%1\" is not installed").arg(uri_arg);
}
+ return false;
}
} else {
@@ -578,7 +579,7 @@ bool QDeclarativeImportsPrivate::add(const QDeclarativeDirComponents &qmldircomp
url.chop(1);
}
- if (vmaj > -1 && vmin > -1 && !qmldircomponents.isEmpty()) {
+ if (!versionFound && vmaj > -1 && vmin > -1 && !qmldircomponents.isEmpty()) {
QList<QDeclarativeDirParser::Component>::ConstIterator it = qmldircomponents.begin();
int lowest_maj = INT_MAX;
int lowest_min = INT_MAX;
@@ -952,7 +953,8 @@ void QDeclarativeImportDatabase::addPluginPath(const QString& path)
qDebug().nospace() << "QDeclarativeImportDatabase::addPluginPath: " << path;
QUrl url = QUrl(path);
- if (url.isRelative() || url.scheme() == QLatin1String("file")) {
+ if (url.isRelative() || url.scheme() == QLatin1String("file")
+ || (url.scheme().length() == 1 && QFile::exists(path)) ) { // windows path
QDir dir = QDir(path);
filePluginPath.prepend(dir.canonicalPath());
} else {
@@ -974,7 +976,8 @@ void QDeclarativeImportDatabase::addImportPath(const QString& path)
QUrl url = QUrl(path);
QString cPath;
- if (url.isRelative() || url.scheme() == QLatin1String("file")) {
+ if (url.isRelative() || url.scheme() == QLatin1String("file")
+ || (url.scheme().length() == 1 && QFile::exists(path)) ) { // windows path
QDir dir = QDir(path);
cPath = dir.canonicalPath();
} else {
diff --git a/src/declarative/qml/qdeclarativeworkerscript.cpp b/src/declarative/qml/qdeclarativeworkerscript.cpp
index 6cd99e2d5c..2e8ab18722 100644
--- a/src/declarative/qml/qdeclarativeworkerscript.cpp
+++ b/src/declarative/qml/qdeclarativeworkerscript.cpp
@@ -43,6 +43,7 @@
#include "private/qdeclarativelistmodel_p.h"
#include "private/qdeclarativelistmodelworkeragent_p.h"
#include "private/qdeclarativeengine_p.h"
+#include "private/qdeclarativeexpression_p.h"
#include <QtCore/qcoreevent.h>
#include <QtCore/qcoreapplication.h>
@@ -104,6 +105,19 @@ private:
int m_id;
};
+class WorkerErrorEvent : public QEvent
+{
+public:
+ enum Type { WorkerError = WorkerRemoveEvent::WorkerRemove + 1 };
+
+ WorkerErrorEvent(const QDeclarativeError &error);
+
+ QDeclarativeError error() const;
+
+private:
+ QDeclarativeError m_error;
+};
+
class QDeclarativeWorkerScriptEnginePrivate : public QObject
{
Q_OBJECT
@@ -146,6 +160,7 @@ public:
WorkerScript();
int id;
+ QUrl source;
bool initialized;
QDeclarativeWorkerScript *owner;
QScriptValue object;
@@ -173,6 +188,7 @@ protected:
private:
void processMessage(int, const QVariant &);
void processLoad(int, const QUrl &);
+ void reportScriptException(WorkerScript *);
};
QDeclarativeWorkerScriptEnginePrivate::QDeclarativeWorkerScriptEnginePrivate(QDeclarativeEngine *engine)
@@ -273,6 +289,11 @@ void QDeclarativeWorkerScriptEnginePrivate::processMessage(int id, const QVarian
args.setProperty(0, variantToScriptValue(data, workerEngine));
script->callback.call(script->object, args);
+
+ if (workerEngine->hasUncaughtException()) {
+ reportScriptException(script);
+ workerEngine->clearExceptions();
+ }
}
}
@@ -286,7 +307,7 @@ void QDeclarativeWorkerScriptEnginePrivate::processLoad(int id, const QUrl &url)
QFile f(fileName);
if (f.open(QIODevice::ReadOnly)) {
QByteArray data = f.readAll();
- QString script = QString::fromUtf8(data);
+ QString sourceCode = QString::fromUtf8(data);
QScriptValue activation = getWorker(id);
@@ -296,10 +317,19 @@ void QDeclarativeWorkerScriptEnginePrivate::processLoad(int id, const QUrl &url)
ctxt->pushScope(urlContext);
ctxt->pushScope(activation);
ctxt->setActivationObject(activation);
- QDeclarativeScriptParser::extractPragmas(script);
+ QDeclarativeScriptParser::extractPragmas(sourceCode);
workerEngine->baseUrl = url;
- workerEngine->evaluate(script);
+ workerEngine->evaluate(sourceCode);
+
+ WorkerScript *script = workers.value(id);
+ if (script) {
+ script->source = url;
+ if (workerEngine->hasUncaughtException()) {
+ reportScriptException(script);
+ workerEngine->clearExceptions();
+ }
+ }
workerEngine->popContext();
} else {
@@ -307,6 +337,22 @@ void QDeclarativeWorkerScriptEnginePrivate::processLoad(int id, const QUrl &url)
}
}
+void QDeclarativeWorkerScriptEnginePrivate::reportScriptException(WorkerScript *script)
+{
+ if (!script || !workerEngine->hasUncaughtException())
+ return;
+
+ QDeclarativeError error;
+ QDeclarativeExpressionPrivate::exceptionToError(workerEngine, error);
+ error.setUrl(script->source);
+
+ QDeclarativeWorkerScriptEnginePrivate *p = QDeclarativeWorkerScriptEnginePrivate::get(workerEngine);
+
+ QMutexLocker(&p->m_lock);
+ if (script->owner)
+ QCoreApplication::postEvent(script->owner, new WorkerErrorEvent(error));
+}
+
QVariant QDeclarativeWorkerScriptEnginePrivate::scriptValueToVariant(const QScriptValue &value)
{
if (value.isBool()) {
@@ -453,6 +499,16 @@ int WorkerRemoveEvent::workerId() const
return m_id;
}
+WorkerErrorEvent::WorkerErrorEvent(const QDeclarativeError &error)
+: QEvent((QEvent::Type)WorkerError), m_error(error)
+{
+}
+
+QDeclarativeError WorkerErrorEvent::error() const
+{
+ return m_error;
+}
+
QDeclarativeWorkerScriptEngine::QDeclarativeWorkerScriptEngine(QDeclarativeEngine *parent)
: QThread(parent), d(new QDeclarativeWorkerScriptEnginePrivate(parent))
{
@@ -682,6 +738,10 @@ bool QDeclarativeWorkerScript::event(QEvent *event)
emit message(value);
}
return true;
+ } else if (event->type() == (QEvent::Type)WorkerErrorEvent::WorkerError) {
+ WorkerErrorEvent *workerEvent = static_cast<WorkerErrorEvent *>(event);
+ QDeclarativeEnginePrivate::warning(qmlEngine(this), workerEvent->error());
+ return true;
} else {
return QObject::event(event);
}
diff --git a/src/gui/image/qxpmhandler.cpp b/src/gui/image/qxpmhandler.cpp
index ffad75bb6d..075d5dadc7 100644
--- a/src/gui/image/qxpmhandler.cpp
+++ b/src/gui/image/qxpmhandler.cpp
@@ -864,7 +864,7 @@ static bool read_xpm_body(
QByteArray buf(200, 0);
int i;
- if (cpp > 15)
+ if (cpp < 0 || cpp > 15)
return false;
// For > 256 colors, we delay creation of the image until
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index 475d4da4da..bf9f6f94d7 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -403,11 +403,24 @@ void QWidgetPrivate::scrollChildren(int dx, int dy)
}
}
+QInputContext *QWidgetPrivate::assignedInputContext() const
+{
+#ifndef QT_NO_IM
+ const QWidget *widget = q_func();
+ while (widget) {
+ if (QInputContext *qic = widget->d_func()->ic)
+ return qic;
+ widget = widget->parentWidget();
+ }
+#endif
+ return 0;
+}
+
QInputContext *QWidgetPrivate::inputContext() const
{
#ifndef QT_NO_IM
- if (ic)
- return ic;
+ if (QInputContext *qic = assignedInputContext())
+ return qic;
return qApp->inputContext();
#else
return 0;
@@ -10782,7 +10795,7 @@ void QWidget::setAttribute(Qt::WidgetAttribute attribute, bool on)
case Qt::WA_InputMethodEnabled: {
#ifndef QT_NO_IM
QWidget *focusWidget = d->effectiveFocusWidget();
- QInputContext *ic = focusWidget->d_func()->ic;
+ QInputContext *ic = focusWidget->d_func()->assignedInputContext();
if (!ic && (!on || hasFocus()))
ic = focusWidget->d_func()->inputContext();
if (ic) {
@@ -11269,7 +11282,7 @@ void QWidget::updateMicroFocus()
#if !defined(QT_NO_IM) && (defined(Q_WS_X11) || defined(Q_WS_QWS) || defined(Q_OS_SYMBIAN))
Q_D(QWidget);
// and optimization to update input context only it has already been created.
- if (d->ic || qApp->d_func()->inputContext) {
+ if (d->assignedInputContext() || qApp->d_func()->inputContext) {
QInputContext *ic = inputContext();
if (ic)
ic->update();
diff --git a/src/gui/kernel/qwidget_p.h b/src/gui/kernel/qwidget_p.h
index 0ac66cb5f7..1083a1fd89 100644
--- a/src/gui/kernel/qwidget_p.h
+++ b/src/gui/kernel/qwidget_p.h
@@ -568,6 +568,7 @@ public:
// sub-classes that their internals are about to be released.
virtual void aboutToDestroy() {}
+ QInputContext *assignedInputContext() const;
QInputContext *inputContext() const;
inline QWidget *effectiveFocusWidget() {
QWidget *w = q_func();
diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp
index d8779c88eb..85164d2dac 100644
--- a/src/gui/kernel/qwidget_s60.cpp
+++ b/src/gui/kernel/qwidget_s60.cpp
@@ -54,7 +54,6 @@
#ifdef Q_WS_S60
#include <aknappui.h>
-#include <akntoolbar.h>
#include <eikbtgpc.h>
#endif
@@ -64,6 +63,19 @@
// CCoeControl objects until after the CONE event handler has finished running.
Q_DECLARE_METATYPE(WId)
+// Workaround for the fact that S60 SDKs 3.x do not contain the akntoolbar.h
+// header, even though the documentation says that it should be there, and indeed
+// it is present in the library.
+class CAknToolbar : public CAknControl,
+ public MCoeControlObserver,
+ public MCoeControlBackground,
+ public MEikCommandObserver,
+ public MAknFadedComponent
+{
+public:
+ IMPORT_C void SetToolbarVisibility(const TBool visible);
+};
+
QT_BEGIN_NAMESPACE
extern bool qt_nograb();
diff --git a/src/gui/math3d/qgenericmatrix.h b/src/gui/math3d/qgenericmatrix.h
index d9aef20c8c..181eda8e27 100644
--- a/src/gui/math3d/qgenericmatrix.h
+++ b/src/gui/math3d/qgenericmatrix.h
@@ -79,9 +79,9 @@ public:
void copyDataTo(T *values) const;
- T *data() { return m[0]; }
- const T *data() const { return m[0]; }
- const T *constData() const { return m[0]; }
+ T *data() { return *m; }
+ const T *data() const { return *m; }
+ const T *constData() const { return *m; }
#if !defined(Q_NO_TEMPLATE_FRIENDS)
template<int NN, int MM, typename TT>
diff --git a/src/gui/math3d/qmatrix4x4.h b/src/gui/math3d/qmatrix4x4.h
index 706450a9c1..ad051160c9 100644
--- a/src/gui/math3d/qmatrix4x4.h
+++ b/src/gui/math3d/qmatrix4x4.h
@@ -173,8 +173,8 @@ public:
QGenericMatrix<N, M, qreal> toGenericMatrix() const;
inline qreal *data();
- inline const qreal *data() const { return m[0]; }
- inline const qreal *constData() const { return m[0]; }
+ inline const qreal *data() const { return *m; }
+ inline const qreal *constData() const { return *m; }
void optimize();
@@ -974,7 +974,7 @@ inline qreal *QMatrix4x4::data()
// We have to assume that the caller will modify the matrix elements,
// so we flip it over to "General" mode.
flagBits = General;
- return m[0];
+ return *m;
}
#ifndef QT_NO_DEBUG_STREAM
diff --git a/src/gui/painting/qdrawhelper_arm_simd.cpp b/src/gui/painting/qdrawhelper_arm_simd.cpp
index 806df297f2..af9854c03b 100644
--- a/src/gui/painting/qdrawhelper_arm_simd.cpp
+++ b/src/gui/painting/qdrawhelper_arm_simd.cpp
@@ -201,8 +201,8 @@ argb32constalpha_next_pixel
uxtb16 r10, r9
uxtb16 r6, r9, ror #8
- // Negate r11 and extract src alpha
- mvn r9, r11 // bitwise not
+ // Negate r8 and extract src alpha
+ mvn r9, r8 // bitwise not
uxtb r9, r9, ror #24
mla r10, r9, r10, r14
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp
index 47caa9f124..5513010709 100644
--- a/src/gui/painting/qpaintengine_raster.cpp
+++ b/src/gui/painting/qpaintengine_raster.cpp
@@ -662,19 +662,19 @@ QRasterPaintEngineState::QRasterPaintEngineState()
QRasterPaintEngineState::QRasterPaintEngineState(QRasterPaintEngineState &s)
: QPainterState(s)
+ , lastPen(s.lastPen)
+ , penData(s.penData)
, stroker(s.stroker)
+ , strokeFlags(s.strokeFlags)
, lastBrush(s.lastBrush)
, brushData(s.brushData)
- , lastPen(s.lastPen)
- , penData(s.penData)
, fillFlags(s.fillFlags)
- , strokeFlags(s.strokeFlags)
, pixmapFlags(s.pixmapFlags)
, intOpacity(s.intOpacity)
, txscale(s.txscale)
- , flag_bits(s.flag_bits)
, clip(s.clip)
, dirty(s.dirty)
+ , flag_bits(s.flag_bits)
{
brushData.tempImage = 0;
penData.tempImage = 0;
diff --git a/src/gui/painting/qpainterpath.cpp b/src/gui/painting/qpainterpath.cpp
index 81ca40fd2e..8bff0212df 100644
--- a/src/gui/painting/qpainterpath.cpp
+++ b/src/gui/painting/qpainterpath.cpp
@@ -874,7 +874,7 @@ void QPainterPath::arcTo(const QRectF &rect, qreal startAngle, qreal sweepLength
rect.x(), rect.y(), rect.width(), rect.height(), startAngle, sweepLength);
#endif
- if (!qt_is_finite(rect.x()) && !qt_is_finite(rect.y()) || !qt_is_finite(rect.width()) || !qt_is_finite(rect.height())
+ if ((!qt_is_finite(rect.x()) && !qt_is_finite(rect.y())) || !qt_is_finite(rect.width()) || !qt_is_finite(rect.height())
|| !qt_is_finite(startAngle) || !qt_is_finite(sweepLength)) {
#ifndef QT_NO_DEBUG
qWarning("QPainterPath::arcTo: Adding arc where a parameter is NaN or Inf, ignoring call");
diff --git a/src/gui/styles/qstylesheetstyle.cpp b/src/gui/styles/qstylesheetstyle.cpp
index 4b591e2e46..ecf924caca 100644
--- a/src/gui/styles/qstylesheetstyle.cpp
+++ b/src/gui/styles/qstylesheetstyle.cpp
@@ -4238,7 +4238,7 @@ void QStyleSheetStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *op
return;
case PE_Widget:
- if (!rule.hasDrawable()) {
+ if (w && !rule.hasDrawable()) {
QWidget *container = containerWidget(w);
if (styleSheetCaches->autoFillDisabledWidgets.contains(container)
&& (container == w || !renderRule(container, opt).hasBackground())) {
diff --git a/src/multimedia/audio/qaudiooutput_symbian_p.cpp b/src/multimedia/audio/qaudiooutput_symbian_p.cpp
index ea7cd9f7c8..5db7099ac4 100644
--- a/src/multimedia/audio/qaudiooutput_symbian_p.cpp
+++ b/src/multimedia/audio/qaudiooutput_symbian_p.cpp
@@ -436,8 +436,8 @@ void QAudioOutputPrivate::writePaddingData()
unsigned char *ptr = const_cast<unsigned char*>(outputBuffer.Ptr());
Mem::FillZ(ptr, paddingBytes);
outputBuffer.SetLength(outputBuffer.Length() + paddingBytes);
+ Q_ASSERT(m_bytesPadding >= paddingBytes);
m_bytesPadding -= paddingBytes;
- Q_ASSERT(m_bytesPadding >= 0);
if (m_pullMode && m_source->atEnd())
lastBufferFilled();
diff --git a/src/network/bearer/qnetworkconfigmanager.cpp b/src/network/bearer/qnetworkconfigmanager.cpp
index 9927f29536..2a46229eb3 100644
--- a/src/network/bearer/qnetworkconfigmanager.cpp
+++ b/src/network/bearer/qnetworkconfigmanager.cpp
@@ -57,16 +57,17 @@ QT_BEGIN_NAMESPACE
{ \
delete this_##NAME.pointer; \
this_##NAME.pointer = 0; \
- this_##NAME.destroyed = true; \
} \
static TYPE *NAME() \
{ \
- if (!this_##NAME.pointer && !this_##NAME.destroyed) { \
+ if (!this_##NAME.pointer) { \
TYPE *x = new TYPE; \
if (!this_##NAME.pointer.testAndSetOrdered(0, x)) \
delete x; \
- else \
+ else { \
qAddPostRoutine(NAME##_cleanup); \
+ this_##NAME.pointer->updateConfigurations(); \
+ } \
} \
return this_##NAME.pointer; \
}
@@ -75,15 +76,7 @@ Q_GLOBAL_STATIC_QAPP_DESTRUCTION(QNetworkConfigurationManagerPrivate, connManage
QNetworkConfigurationManagerPrivate *qNetworkConfigurationManagerPrivate()
{
- static bool initialized = false;
-
- QNetworkConfigurationManagerPrivate *m = connManager();
- if (!initialized) {
- initialized = true;
- m->updateConfigurations();
- }
-
- return m;
+ return connManager();
}
/*!
diff --git a/src/network/bearer/qnetworksession.cpp b/src/network/bearer/qnetworksession.cpp
index 553410e8ab..af60a43bdd 100644
--- a/src/network/bearer/qnetworksession.cpp
+++ b/src/network/bearer/qnetworksession.cpp
@@ -680,7 +680,7 @@ void QNetworkSession::connectNotify(const char *signal)
//check for preferredConfigurationChanged() signal connect notification
//This is not required on all platforms
- if (QLatin1String(signal) == SIGNAL(preferredConfigurationChanged(QNetworkConfiguration,bool)))
+ if (qstrcmp(signal, SIGNAL(preferredConfigurationChanged(QNetworkConfiguration,bool))) == 0)
d->setALREnabled(true);
}
@@ -701,7 +701,7 @@ void QNetworkSession::disconnectNotify(const char *signal)
//check for preferredConfigurationChanged() signal disconnect notification
//This is not required on all platforms
- if (QLatin1String(signal) == SIGNAL(preferredConfigurationChanged(QNetworkConfiguration,bool)))
+ if (qstrcmp(signal, SIGNAL(preferredConfigurationChanged(QNetworkConfiguration,bool))) == 0)
d->setALREnabled(false);
}
diff --git a/src/openvg/qpaintengine_vg.cpp b/src/openvg/qpaintengine_vg.cpp
index a15f0c367e..22cbbf5d19 100644
--- a/src/openvg/qpaintengine_vg.cpp
+++ b/src/openvg/qpaintengine_vg.cpp
@@ -2201,6 +2201,12 @@ void QVGPaintEngine::updateScissor()
#if defined(QVG_SCISSOR_CLIP)
// Using the scissor to do clipping, so combine the systemClip
// with the current painting clipRegion.
+
+ if (d->maskValid) {
+ vgSeti(VG_MASKING, VG_FALSE);
+ d->maskValid = false;
+ }
+
QVGPainterState *s = state();
if (s->clipEnabled) {
if (region.isEmpty())
@@ -2250,8 +2256,33 @@ void QVGPaintEngine::updateScissor()
QVector<QRect> rects = region.rects();
int count = rects.count();
- if (count > d->maxScissorRects)
- count = d->maxScissorRects;
+ if (count > d->maxScissorRects) {
+#if !defined(QVG_SCISSOR_CLIP)
+ count = d->maxScissorRects;
+#else
+ // Use masking
+ int width = paintDevice()->width();
+ int height = paintDevice()->height();
+ vgMask(VG_INVALID_HANDLE, VG_CLEAR_MASK,
+ 0, 0, width, height);
+ for (int i = 0; i < rects.size(); ++i) {
+ vgMask(VG_INVALID_HANDLE, VG_FILL_MASK,
+ rects[i].x(), height - rects[i].y() - rects[i].height(),
+ rects[i].width(), rects[i].height());
+ }
+
+ vgSeti(VG_SCISSORING, VG_FALSE);
+ vgSeti(VG_MASKING, VG_TRUE);
+ d->maskValid = true;
+ d->maskIsSet = false;
+ d->scissorMask = false;
+ d->scissorActive = false;
+ d->scissorDirty = false;
+ d->scissorRegion = region;
+ return;
+#endif
+ }
+
QVarLengthArray<VGint> params(count * 4);
int height = paintDevice()->height();
for (int i = 0; i < count; ++i) {
diff --git a/src/openvg/qwindowsurface_vgegl.cpp b/src/openvg/qwindowsurface_vgegl.cpp
index c6db8697b8..ca80886fd2 100644
--- a/src/openvg/qwindowsurface_vgegl.cpp
+++ b/src/openvg/qwindowsurface_vgegl.cpp
@@ -267,10 +267,7 @@ static QEglContext *createContext(QPaintDevice *device)
int redSize = configProps.value(EGL_RED_SIZE);
if (redSize == EGL_DONT_CARE || redSize == 0)
configProps.setPixelFormat(QImage::Format_ARGB32); // XXX
-#ifndef QVG_SCISSOR_CLIP
- // If we are using the mask to clip, then explicitly request a mask.
configProps.setValue(EGL_ALPHA_MASK_SIZE, 1);
-#endif
#ifdef EGL_VG_ALPHA_FORMAT_PRE_BIT
configProps.setValue(EGL_SURFACE_TYPE, EGL_WINDOW_BIT |
EGL_VG_ALPHA_FORMAT_PRE_BIT);
diff --git a/src/plugins/graphicssystems/meego/dithering.cpp b/src/plugins/graphicssystems/meego/dithering.cpp
index 91e3337170..2561c22ff6 100644
--- a/src/plugins/graphicssystems/meego/dithering.cpp
+++ b/src/plugins/graphicssystems/meego/dithering.cpp
@@ -39,15 +39,22 @@
**
****************************************************************************/
-// This is an implementation of the 32bit => 16bit Floyd-Steinberg dithering.
+// Implements two dithering methods:
+//
+// * convertRGBA32_to_RGB565
+//
+// This is implemented using Ordered Bayer Dithering. The code has been adapted
+// from QX11PixmapData::fromImage. This method was originally implemented using
+// Floyd-Steinberg dithering but was later changed to Ordered Dithering because
+// of the better quality of the results.
+//
+// * convertRGBA32_to_RGBA4444
+//
+// This is implemented using Floyd-Steinberg dithering.
+//
// The alghorithm used here is not the fastest possible but it's prolly fast enough:
// uses look-up tables, integer-only arthmetics and works in one pass on two lines
// at a time. It's a high-quality dithering using 1/8 diffusion precission.
-// Two functions here to look at:
-//
-// * convertRGBA32_to_RGB565
-// * convertRGBA32_to_RGBA4444
-//
// Each channel (RGBA) is diffused independently and alpha is dithered too.
#include <string.h>
@@ -76,113 +83,63 @@
// Converts incoming RGB32 (QImage::Format_RGB32) to RGB565. Returns the newly allocated data.
unsigned short* convertRGB32_to_RGB565(const unsigned char *in, int width, int height, int stride)
{
+ static bool thresholdMapInitialized = false;
+ static int thresholdMap[16][16];
+
+ if (!thresholdMapInitialized) {
+ int i;
+ int j;
+ int n;
+
+ thresholdMap[0][0] = 0;
+ thresholdMap[1][0] = 2;
+ thresholdMap[0][1] = 3;
+ thresholdMap[1][1] = 1;
+
+ for (n=2; n<16; n*=2) {
+ for (i=0; i<n; i++) {
+ for (j=0; j<n; j++) {
+ thresholdMap[i][j] *= 4;
+ thresholdMap[i+n][j] = thresholdMap[i][j] + 2;
+ thresholdMap[i][j+n] = thresholdMap[i][j] + 3;
+ thresholdMap[i+n][j+n] = thresholdMap[i][j] + 1;
+ }
+ }
+ }
+
+ thresholdMapInitialized = true;
+ }
+
// Output line stride. Aligned to 4 bytes.
int alignedWidth = width;
if (alignedWidth % 2 > 0)
alignedWidth++;
// Will store output
- unsigned short *out = (unsigned short *) malloc(alignedWidth * height * 2);
-
- // Lookup tables for the 8bit => 6bit and 8bit => 5bit conversion
- unsigned char lookup_8bit_to_5bit[256];
- short lookup_8bit_to_5bit_diff[256];
- unsigned char lookup_8bit_to_6bit[256];
- short lookup_8bit_to_6bit_diff[256];
-
- // Macros for the conversion using the lookup table.
- #define CONVERT_8BIT_TO_5BIT(v) (lookup_8bit_to_5bit[v])
- #define DIFF_8BIT_TO_5BIT(v) (lookup_8bit_to_5bit_diff[v])
-
- #define CONVERT_8BIT_TO_6BIT(v) (lookup_8bit_to_6bit[v])
- #define DIFF_8BIT_TO_6BIT(v) (lookup_8bit_to_6bit_diff[v])
-
- int i;
- int x, y, c; // Pixel we're processing. c is component number (0, 1, 2 for r, b, b)
- short component[3]; // Stores the new components (r, g, b) for pixel produced during conversion
- short diff; // The difference between the converted value and the original one. To be accumulated.
- QVarLengthArray <short> accumulatorData(3 * width * 2); // Data for three acumulators for r, g, b. Each accumulator is two lines.
- short *accumulator[3]; // Helper for accessing the accumulator on a per-channel basis more easily.
- accumulator[0] = accumulatorData.data();
- accumulator[1] = accumulatorData.data() + width;
- accumulator[2] = accumulatorData.data() + (width * 2);
-
- // Produce the conversion lookup tables.
- for (i = 0; i < 256; i++) {
- lookup_8bit_to_5bit[i] = round(i / 8.0);
-
- // Before bitshifts: (i * 8) - (... * 8 * 8)
- lookup_8bit_to_5bit_diff[i] = (i << 3) - (lookup_8bit_to_5bit[i] << 6);
- if (lookup_8bit_to_5bit[i] > 31)
- lookup_8bit_to_5bit[i] -= 1;
-
- lookup_8bit_to_6bit[i] = round(i / 4.0);
-
- // Before bitshifts: (i * 8) - (... * 4 * 8)
- lookup_8bit_to_6bit_diff[i] = (i << 3) - (lookup_8bit_to_6bit[i] << 5);
- if (lookup_8bit_to_6bit[i] > 63)
- lookup_8bit_to_6bit[i] -= 1;
- }
+ unsigned short *out = (unsigned short *)malloc (alignedWidth * height * 2);
- // Clear the accumulators
- memset(accumulator[0], 0, width * 4);
- memset(accumulator[1], 0, width * 4);
- memset(accumulator[2], 0, width * 4);
+ int x;
+ int y;
+ int threshold;
// For each line...
for (y = 0; y < height; y++) {
- // For each accumulator, move the second line (index 1) to replace the first line (index 0).
- // Clear the second line (index 1)
- memcpy(accumulator[0], accumulator[0] + width, width * 2);
- memset(accumulator[0] + width, 0, width * 2);
-
- memcpy(accumulator[1], accumulator[1] + width, width * 2);
- memset(accumulator[1] + width, 0, width * 2);
-
- memcpy(accumulator[2], accumulator[2] + width, width * 2);
- memset(accumulator[2] + width, 0, width * 2);
-
// For each column....
for (x = 0; x < width; x++) {
- // For each component (r, g, b)...
- for (c = 0; c < 3; c++) {
+ int r = GET_RGBA_COMPONENT(in, x, y, stride, 0);
+ int g = GET_RGBA_COMPONENT(in, x, y, stride, 1);
+ int b = GET_RGBA_COMPONENT(in, x, y, stride, 2);
- // Get the 8bit value from the original image
- component[c] = GET_RGBA_COMPONENT(in, x, y, stride, c);
-
- // Add the diffusion for this pixel we stored in the accumulator.
- // >> 7 because the values in accumulator are stored * 128
- if (x != 0 && x != (width - 1)) {
- if (accumulator[c][x] >> 7 != 0)
- component[c] += rand() % accumulator[c][x] >> 7;
- }
-
- // Make sure we're not over the boundaries.
- CLAMP_256(component[c]);
-
- // For green component we use 6 bits. Otherwise 5 bits.
- // Store the difference from converting 8bit => 6 bit and the orig pixel.
- // Convert 8bit => 6(5) bit.
- if (c == 1) {
- diff = DIFF_8BIT_TO_6BIT(component[c]);
- component[c] = CONVERT_8BIT_TO_6BIT(component[c]);
- } else {
- diff = DIFF_8BIT_TO_5BIT(component[c]);
- component[c] = CONVERT_8BIT_TO_5BIT(component[c]);
- }
+ threshold = thresholdMap[x%16][y%16];
- // Distribute the difference according to the matrix in the
- // accumulation bufffer.
- ACCUMULATE(accumulator[c], x + 1, 0, width, diff * 3);
- ACCUMULATE(accumulator[c], x - 1, 1, width, diff * 5);
- ACCUMULATE(accumulator[c], x, 1, width, diff * 5);
- ACCUMULATE(accumulator[c], x + 1, 1, width, diff * 3);
- }
+ if (r <= (255-(1<<3)) && ((r<<5) & 255) > threshold) r += (1<<3);
+ if (g <= (255-(1<<2)) && ((g<<6) & 255) > threshold) g += (1<<2);
+ if (b <= (255-(1<<3)) && ((b<<5) & 255) > threshold) b += (1<<3);
// Write the newly produced pixel
- PUT_565(out, x, y, alignedWidth, component[2], component[1], component[0]);
+ PUT_565(out, x, y, alignedWidth, ((b >> 3) & 0x1f), ((g >> 2) & 0x3f), ((r >> 3) & 0x1f));
}
}
diff --git a/src/plugins/plugins.pro b/src/plugins/plugins.pro
index 5859574761..3e7da0e20b 100644
--- a/src/plugins/plugins.pro
+++ b/src/plugins/plugins.pro
@@ -15,4 +15,4 @@ symbian:SUBDIRS += s60
contains(QT_CONFIG, phonon): SUBDIRS *= phonon
contains(QT_CONFIG, multimedia): SUBDIRS *= audio
qpa:SUBDIRS += platforms
-contains(QT_CONFIG, declarative): SUBDIRS *= qmldebugging
+contains(QT_CONFIG, declarative): SUBDIRS *= qmltooling
diff --git a/src/plugins/qmldebugging/qmldebugging.pro b/src/plugins/qmltooling/qmltooling.pro
index 01cf1a9934..01cf1a9934 100644
--- a/src/plugins/qmldebugging/qmldebugging.pro
+++ b/src/plugins/qmltooling/qmltooling.pro
diff --git a/src/plugins/qmldebugging/tcpserver/qtcpserverconnection.cpp b/src/plugins/qmltooling/tcpserver/qtcpserverconnection.cpp
index 69c1ef5ab4..69c1ef5ab4 100644
--- a/src/plugins/qmldebugging/tcpserver/qtcpserverconnection.cpp
+++ b/src/plugins/qmltooling/tcpserver/qtcpserverconnection.cpp
diff --git a/src/plugins/qmldebugging/tcpserver/qtcpserverconnection.h b/src/plugins/qmltooling/tcpserver/qtcpserverconnection.h
index a6e17e69b0..a6e17e69b0 100644
--- a/src/plugins/qmldebugging/tcpserver/qtcpserverconnection.h
+++ b/src/plugins/qmltooling/tcpserver/qtcpserverconnection.h
diff --git a/src/plugins/qmldebugging/tcpserver/tcpserver.pro b/src/plugins/qmltooling/tcpserver/tcpserver.pro
index e90fb34835..f4f2666b25 100644
--- a/src/plugins/qmldebugging/tcpserver/tcpserver.pro
+++ b/src/plugins/qmltooling/tcpserver/tcpserver.pro
@@ -3,7 +3,7 @@ QT += declarative network
include(../../qpluginbase.pri)
-QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/qmldebugging
+QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/qmltooling
QTDIR_build:REQUIRES += "contains(QT_CONFIG, declarative)"
SOURCES += \
@@ -12,7 +12,7 @@ SOURCES += \
HEADERS += \
qtcpserverconnection.h
-target.path += $$[QT_INSTALL_PLUGINS]/qmldebugging
+target.path += $$[QT_INSTALL_PLUGINS]/qmltooling
INSTALLS += target
symbian:TARGET.UID3=0x20031E90 \ No newline at end of file
diff --git a/src/qbase.pri b/src/qbase.pri
index 4d835bd3a2..ce69757378 100644
--- a/src/qbase.pri
+++ b/src/qbase.pri
@@ -197,7 +197,7 @@ symbian {
# Partial upgrade SIS file
vendorinfo = \
"; Localised Vendor name" \
- "%{\"Nokia, Qt\"}" \
+ "%{\"Nokia\"}" \
" " \
"; Unique Vendor name" \
":\"Nokia, Qt\"" \
diff --git a/src/s60installs/s60installs.pro b/src/s60installs/s60installs.pro
index 0a2f614fe8..1c91422a08 100644
--- a/src/s60installs/s60installs.pro
+++ b/src/s60installs/s60installs.pro
@@ -11,23 +11,6 @@ symbian: {
isEmpty(QT_LIBINFIX) {
TARGET.UID3 = 0x2001E61C
-
- # Sqlite3 is expected to be already found on phone if infixed configuration is built.
- # It is also expected that devices newer than those based on S60 5.0 all have sqlite3.dll.
- contains(S60_VERSION, 3.1)|contains(S60_VERSION, 3.2)|contains(S60_VERSION, 5.0) {
- BLD_INF_RULES.prj_exports += \
- "sqlite3.sis /epoc32/data/qt/sis/sqlite3.sis"
- symbian-abld|symbian-sbsv2 {
- sqlitedeployment = \
- "; Deploy sqlite onto phone that does not have it already" \
- "@\"$${EPOCROOT}epoc32/data/qt/sis/sqlite3.sis\", (0x2002af5f)"
- } else {
- sqlitedeployment = \
- "; Deploy sqlite onto phone that does not have it already" \
- "@\"$${PWD}/sqlite3.sis\", (0x2002af5f)"
- }
- qtlibraries.pkg_postrules += sqlitedeployment
- }
} else {
# Always use experimental UID for infixed configuration to avoid UID clash
TARGET.UID3 = 0xE001E61C
@@ -92,7 +75,7 @@ symbian: {
vendorinfo = \
"; Localised Vendor name" \
- "%{\"Nokia, Qt\"}" \
+ "%{\"Nokia\"}" \
" " \
"; Unique Vendor name" \
":\"Nokia, Qt\"" \
diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp
index 9f36953214..14ab2eb01c 100644
--- a/src/script/api/qscriptengine.cpp
+++ b/src/script/api/qscriptengine.cpp
@@ -2763,9 +2763,7 @@ JSC::CallFrame *QScriptEnginePrivate::pushContext(JSC::CallFrame *exec, JSC::JSV
if (!clearScopeChain) {
newCallFrame->init(0, /*vPC=*/0, exec->scopeChain(), exec, flags | ShouldRestoreCallFrame, argc, callee);
} else {
- JSC::JSObject *jscObject = originalGlobalObject();
- JSC::ScopeChainNode *scn = new JSC::ScopeChainNode(0, jscObject, &exec->globalData(), exec->lexicalGlobalObject(), jscObject);
- newCallFrame->init(0, /*vPC=*/0, scn, exec, flags | ShouldRestoreCallFrame, argc, callee);
+ newCallFrame->init(0, /*vPC=*/0, globalExec()->scopeChain(), exec, flags | ShouldRestoreCallFrame, argc, callee);
}
} else {
setContextFlags(newCallFrame, flags);
diff --git a/src/sql/models/qsqltablemodel.cpp b/src/sql/models/qsqltablemodel.cpp
index 4df1d63e4d..bf7c0aa0db 100644
--- a/src/sql/models/qsqltablemodel.cpp
+++ b/src/sql/models/qsqltablemodel.cpp
@@ -657,7 +657,7 @@ bool QSqlTableModel::insertRowIntoTable(const QSqlRecord &values)
return false;
}
- return d->exec(stmt, prepStatement, rec);
+ return d->exec(stmt, prepStatement, rec, QSqlRecord() /* no where values */);
}
/*!
@@ -695,7 +695,7 @@ bool QSqlTableModel::deleteRowFromTable(int row)
}
stmt.append(QLatin1Char(' ')).append(where);
- return d->exec(stmt, prepStatement, whereValues);
+ return d->exec(stmt, prepStatement, QSqlRecord() /* no new values */, whereValues);
}
/*!
diff --git a/src/sql/models/qsqltablemodel_p.h b/src/sql/models/qsqltablemodel_p.h
index d2b96e6356..f4f38111c0 100644
--- a/src/sql/models/qsqltablemodel_p.h
+++ b/src/sql/models/qsqltablemodel_p.h
@@ -75,7 +75,7 @@ public:
QSqlRecord record(const QVector<QVariant> &values) const;
bool exec(const QString &stmt, bool prepStatement,
- const QSqlRecord &rec, const QSqlRecord &whereValues = QSqlRecord());
+ const QSqlRecord &rec, const QSqlRecord &whereValues);
virtual void revertCachedRow(int row);
void revertInsertedRow();
bool setRecord(int row, const QSqlRecord &record);
diff --git a/src/src.pro b/src/src.pro
index 0bf3b52da2..0908911e6c 100644
--- a/src/src.pro
+++ b/src/src.pro
@@ -113,6 +113,7 @@ src_webkit_declarative.target = sub-webkitdeclarative
src_declarative.depends = src_gui src_script src_network
src_plugins.depends = src_gui src_sql src_svg
contains(QT_CONFIG, multimedia):src_plugins.depends += src_multimedia
+ contains(QT_CONFIG, declarative):src_plugins.depends += src_declarative
src_s60installs.depends = $$TOOLS_SUBDIRS $$SRC_SUBDIRS
src_s60installs.depends -= src_s60installs
src_imports.depends = src_gui src_declarative
diff --git a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
index b19b3c9735..40b0e1baab 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
+++ b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
@@ -50,6 +50,7 @@
#include <QtCore/qnumeric.h>
#include <private/qdeclarativeengine_p.h>
#include <private/qdeclarativeglobalscriptclass_p.h>
+#include <private/qscriptdeclarativeclass_p.h>
#include "testtypes.h"
#include "testhttpserver.h"
#include "../../../shared/util.h"
@@ -174,6 +175,7 @@ private slots:
void aliasBindingsAssignCorrectly();
void aliasBindingsOverrideTarget();
void aliasWritesOverrideBindings();
+ void pushCleanContext();
void include();
@@ -3015,6 +3017,44 @@ void tst_qdeclarativeecmascript::revision()
}
}
+// Test for QScriptDeclarativeClass::pushCleanContext()
+void tst_qdeclarativeecmascript::pushCleanContext()
+{
+ QScriptEngine engine;
+ engine.globalObject().setProperty("a", 6);
+ QCOMPARE(engine.evaluate("a").toInt32(), 6);
+
+ // First confirm pushContext() behaves as we expect
+ QScriptValue object = engine.newObject();
+ object.setProperty("a", 15);
+ QScriptContext *context1 = engine.pushContext();
+ context1->pushScope(object);
+ QCOMPARE(engine.evaluate("a").toInt32(), 15);
+
+ QScriptContext *context2 = engine.pushContext();
+ Q_UNUSED(context2);
+ QCOMPARE(engine.evaluate("a").toInt32(), 15);
+ QScriptValue func1 = engine.evaluate("(function() { return a; })");
+
+ // Now check that pushCleanContext() works
+ QScriptDeclarativeClass::pushCleanContext(&engine);
+ QCOMPARE(engine.evaluate("a").toInt32(), 6);
+ QScriptValue func2 = engine.evaluate("(function() { return a; })");
+
+ engine.popContext();
+ QCOMPARE(engine.evaluate("a").toInt32(), 15);
+
+ engine.popContext();
+ QCOMPARE(engine.evaluate("a").toInt32(), 15);
+
+ engine.popContext();
+ QCOMPARE(engine.evaluate("a").toInt32(), 6);
+
+ // Check that function objects created in these contexts work
+ QCOMPARE(func1.call().toInt32(), 15);
+ QCOMPARE(func2.call().toInt32(), 6);
+}
+
QTEST_MAIN(tst_qdeclarativeecmascript)
#include "tst_qdeclarativeecmascript.moc"
diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/data/importsMixedQmlCppPlugin.2.qml b/tests/auto/declarative/qdeclarativemoduleplugin/data/importsMixedQmlCppPlugin.2.qml
new file mode 100644
index 0000000000..70b2bfd837
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativemoduleplugin/data/importsMixedQmlCppPlugin.2.qml
@@ -0,0 +1,21 @@
+import com.nokia.AutoTestQmlMixedPluginType 1.5
+import QtQuick 1.0
+
+Item {
+ property bool test: false
+ property bool test2: false
+
+ Bar {
+ id: bar
+ }
+
+ Foo {
+ id: foo
+ }
+
+ Component.onCompleted: {
+ test = (bar.value == 16);
+ test2 = (foo.value == 89);
+ }
+}
+
diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/data/importsMixedQmlCppPlugin.qml b/tests/auto/declarative/qdeclarativemoduleplugin/data/importsMixedQmlCppPlugin.qml
new file mode 100644
index 0000000000..da6ff4656a
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativemoduleplugin/data/importsMixedQmlCppPlugin.qml
@@ -0,0 +1,13 @@
+import com.nokia.AutoTestQmlMixedPluginType 1.0
+import QtQuick 1.0
+
+Item {
+ property bool test: false
+ Bar {
+ id: bar
+ }
+
+ Component.onCompleted: {
+ test = (bar.value == 16);
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/data/versionNotInstalled.2.errors.txt b/tests/auto/declarative/qdeclarativemoduleplugin/data/versionNotInstalled.2.errors.txt
new file mode 100644
index 0000000000..a40c1c8211
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativemoduleplugin/data/versionNotInstalled.2.errors.txt
@@ -0,0 +1 @@
+1:1:module "com.nokia.AutoTestQmlVersionPluginType" version 1.9 is not installed
diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/data/versionNotInstalled.2.qml b/tests/auto/declarative/qdeclarativemoduleplugin/data/versionNotInstalled.2.qml
new file mode 100644
index 0000000000..59fd084a49
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativemoduleplugin/data/versionNotInstalled.2.qml
@@ -0,0 +1,5 @@
+import com.nokia.AutoTestQmlVersionPluginType 1.9
+import QtQuick 1.0
+
+QtObject {
+}
diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/data/versionNotInstalled.errors.txt b/tests/auto/declarative/qdeclarativemoduleplugin/data/versionNotInstalled.errors.txt
new file mode 100644
index 0000000000..2634223de7
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativemoduleplugin/data/versionNotInstalled.errors.txt
@@ -0,0 +1 @@
+1:1:module "com.nokia.AutoTestQmlVersionPluginType" version 1.1 is not installed
diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/data/versionNotInstalled.qml b/tests/auto/declarative/qdeclarativemoduleplugin/data/versionNotInstalled.qml
new file mode 100644
index 0000000000..2065c0712f
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativemoduleplugin/data/versionNotInstalled.qml
@@ -0,0 +1,6 @@
+import com.nokia.AutoTestQmlVersionPluginType 1.1
+import QtQuick 1.0
+
+QtObject {
+}
+
diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/imports/com/nokia/AutoTestQmlMixedPluginType/Foo.qml b/tests/auto/declarative/qdeclarativemoduleplugin/imports/com/nokia/AutoTestQmlMixedPluginType/Foo.qml
new file mode 100644
index 0000000000..ce51cbd2ec
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativemoduleplugin/imports/com/nokia/AutoTestQmlMixedPluginType/Foo.qml
@@ -0,0 +1,5 @@
+import QtQuick 1.0
+
+Item {
+ property int value: 89
+}
diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/imports/com/nokia/AutoTestQmlMixedPluginType/qmldir b/tests/auto/declarative/qdeclarativemoduleplugin/imports/com/nokia/AutoTestQmlMixedPluginType/qmldir
new file mode 100644
index 0000000000..065dc3b21f
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativemoduleplugin/imports/com/nokia/AutoTestQmlMixedPluginType/qmldir
@@ -0,0 +1,2 @@
+plugin pluginMixed
+Foo 1.5 Foo.qml
diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/imports/com/nokia/AutoTestQmlVersionPluginType/qmldir b/tests/auto/declarative/qdeclarativemoduleplugin/imports/com/nokia/AutoTestQmlVersionPluginType/qmldir
new file mode 100644
index 0000000000..640967fe40
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativemoduleplugin/imports/com/nokia/AutoTestQmlVersionPluginType/qmldir
@@ -0,0 +1 @@
+plugin pluginVersion
diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/pluginMixed/plugin.cpp b/tests/auto/declarative/qdeclarativemoduleplugin/pluginMixed/plugin.cpp
new file mode 100644
index 0000000000..c7796e22c3
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativemoduleplugin/pluginMixed/plugin.cpp
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite 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 <QStringList>
+#include <QtDeclarative/qdeclarativeextensionplugin.h>
+#include <QtDeclarative/qdeclarative.h>
+#include <QDebug>
+
+class BarPluginType : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(int value READ value);
+
+public:
+ int value() const { return 16; }
+};
+
+
+class MyMixedPlugin : public QDeclarativeExtensionPlugin
+{
+ Q_OBJECT
+public:
+ MyMixedPlugin()
+ {
+ }
+
+ void registerTypes(const char *uri)
+ {
+ Q_ASSERT(QLatin1String(uri) == "com.nokia.AutoTestQmlMixedPluginType");
+ qmlRegisterType<BarPluginType>(uri, 1, 0, "Bar");
+ }
+};
+
+#include "plugin.moc"
+
+Q_EXPORT_PLUGIN2(plugin, MyMixedPlugin);
diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/pluginMixed/pluginMixed.pro b/tests/auto/declarative/qdeclarativemoduleplugin/pluginMixed/pluginMixed.pro
new file mode 100644
index 0000000000..9766003e74
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativemoduleplugin/pluginMixed/pluginMixed.pro
@@ -0,0 +1,9 @@
+TEMPLATE = lib
+CONFIG += plugin
+SOURCES = plugin.cpp
+QT = core declarative
+DESTDIR = ../imports/com/nokia/AutoTestQmlMixedPluginType
+
+symbian: {
+ TARGET.EPOCALLOWDLLDATA=1
+}
diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/pluginVersion/plugin.cpp b/tests/auto/declarative/qdeclarativemoduleplugin/pluginVersion/plugin.cpp
new file mode 100644
index 0000000000..27a63419b5
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativemoduleplugin/pluginVersion/plugin.cpp
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite 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 <QStringList>
+#include <QtDeclarative/qdeclarativeextensionplugin.h>
+#include <QtDeclarative/qdeclarative.h>
+#include <QDebug>
+
+class FloorPluginType : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(int value READ value);
+
+public:
+ int value() const { return 16; }
+};
+
+
+class MyMixedPlugin : public QDeclarativeExtensionPlugin
+{
+ Q_OBJECT
+public:
+ MyMixedPlugin()
+ {
+ }
+
+ void registerTypes(const char *uri)
+ {
+ Q_ASSERT(QLatin1String(uri) == "com.nokia.AutoTestQmlVersionPluginType");
+ qmlRegisterType<FloorPluginType>(uri, 1, 4, "Floor");
+ }
+};
+
+#include "plugin.moc"
+
+Q_EXPORT_PLUGIN2(plugin, MyMixedPlugin);
diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/pluginVersion/pluginVersion.pro b/tests/auto/declarative/qdeclarativemoduleplugin/pluginVersion/pluginVersion.pro
new file mode 100644
index 0000000000..70a38b9a7d
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativemoduleplugin/pluginVersion/pluginVersion.pro
@@ -0,0 +1,9 @@
+TEMPLATE = lib
+CONFIG += plugin
+SOURCES = plugin.cpp
+QT = core declarative
+DESTDIR = ../imports/com/nokia/AutoTestQmlVersionPluginType
+
+symbian: {
+ TARGET.EPOCALLOWDLLDATA=1
+}
diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/qdeclarativemoduleplugin.pro b/tests/auto/declarative/qdeclarativemoduleplugin/qdeclarativemoduleplugin.pro
index 9d0e94e521..6e72d9833b 100644
--- a/tests/auto/declarative/qdeclarativemoduleplugin/qdeclarativemoduleplugin.pro
+++ b/tests/auto/declarative/qdeclarativemoduleplugin/qdeclarativemoduleplugin.pro
@@ -1,6 +1,6 @@
QT = core
TEMPLATE = subdirs
-SUBDIRS = plugin plugin.2 plugin.2.1 pluginWrongCase pluginWithQmlFile
+SUBDIRS = plugin plugin.2 plugin.2.1 pluginWrongCase pluginWithQmlFile pluginMixed pluginVersion
tst_qdeclarativemoduleplugin_pro.depends += plugin
SUBDIRS += tst_qdeclarativemoduleplugin.pro
diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp b/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp
index 9ec0f8472b..dc104e23e8 100644
--- a/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp
+++ b/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp
@@ -63,10 +63,13 @@ private slots:
void importsPlugin();
void importsPlugin2();
void importsPlugin21();
+ void importsMixedQmlCppPlugin();
void incorrectPluginCase();
void importPluginWithQmlFile();
void remoteImportWithQuotedUrl();
void remoteImportWithUnquotedUri();
+ void versionNotInstalled();
+ void versionNotInstalled_data();
};
#ifdef Q_OS_SYMBIAN
@@ -191,8 +194,18 @@ void tst_qdeclarativemoduleplugin::incorrectPluginCase()
void tst_qdeclarativemoduleplugin::importPluginWithQmlFile()
{
+ QString path = QLatin1String(SRCDIR) + QDir::separator() + QLatin1String("imports");
+
+ // QTBUG-16885: adding an import path with a lower-case "c:" causes assert failure
+ // (this only happens if the plugin includes pure QML files)
+ #ifdef Q_OS_WIN
+ QVERIFY(path.at(0).isUpper() && path.at(1) == QLatin1Char(':'));
+ path = path.at(0).toLower() + path.mid(1);
+ #endif
+
QDeclarativeEngine engine;
- engine.addImportPath(QLatin1String(SRCDIR) + QDir::separator() + QLatin1String("imports"));
+ engine.addImportPath(path);
+
QDeclarativeComponent component(&engine, TEST_FILE("data/pluginWithQmlFile.qml"));
foreach (QDeclarativeError err, component.errors())
qWarning() << err;
@@ -246,6 +259,55 @@ void tst_qdeclarativemoduleplugin::remoteImportWithUnquotedUri()
VERIFY_ERRORS(0);
}
+// QTBUG-17324
+void tst_qdeclarativemoduleplugin::importsMixedQmlCppPlugin()
+{
+ QDeclarativeEngine engine;
+ engine.addImportPath(QLatin1String(SRCDIR) + QDir::separator() + QLatin1String("imports"));
+
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("data/importsMixedQmlCppPlugin.qml"));
+
+ QObject *o = component.create();
+ QVERIFY(o != 0);
+ QCOMPARE(o->property("test").toBool(), true);
+ delete o;
+ }
+
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("data/importsMixedQmlCppPlugin.2.qml"));
+
+ QObject *o = component.create();
+ QVERIFY(o != 0);
+ QCOMPARE(o->property("test").toBool(), true);
+ QCOMPARE(o->property("test2").toBool(), true);
+ delete o;
+ }
+
+
+}
+
+void tst_qdeclarativemoduleplugin::versionNotInstalled_data()
+{
+ QTest::addColumn<QString>("file");
+ QTest::addColumn<QString>("errorFile");
+
+ QTest::newRow("versionNotInstalled") << "data/versionNotInstalled.qml" << "versionNotInstalled.errors.txt";
+ QTest::newRow("versionNotInstalled") << "data/versionNotInstalled.2.qml" << "versionNotInstalled.2.errors.txt";
+}
+
+void tst_qdeclarativemoduleplugin::versionNotInstalled()
+{
+ QFETCH(QString, file);
+ QFETCH(QString, errorFile);
+
+ QDeclarativeEngine engine;
+ engine.addImportPath(QLatin1String(SRCDIR) + QDir::separator() + QLatin1String("imports"));
+
+ QDeclarativeComponent component(&engine, TEST_FILE(file));
+ VERIFY_ERRORS(errorFile.toLatin1().constData());
+}
+
QTEST_MAIN(tst_qdeclarativemoduleplugin)
#include "tst_qdeclarativemoduleplugin.moc"
diff --git a/tests/auto/declarative/qdeclarativeworkerscript/data/script_error_onCall.js b/tests/auto/declarative/qdeclarativeworkerscript/data/script_error_onCall.js
new file mode 100644
index 0000000000..f589b0ef40
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeworkerscript/data/script_error_onCall.js
@@ -0,0 +1,6 @@
+WorkerScript.onMessage = function(msg) {
+ var a = 123
+ var b = 345
+ var f = getData()
+}
+
diff --git a/tests/auto/declarative/qdeclarativeworkerscript/data/script_error_onLoad.js b/tests/auto/declarative/qdeclarativeworkerscript/data/script_error_onLoad.js
new file mode 100644
index 0000000000..1d6eab2285
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeworkerscript/data/script_error_onLoad.js
@@ -0,0 +1,5 @@
+WorkerScript.onMessage = function(msg) {
+ var a = 123
+ aoij awef aljfaow eij
+}
+
diff --git a/tests/auto/declarative/qdeclarativeworkerscript/data/worker_error_onCall.qml b/tests/auto/declarative/qdeclarativeworkerscript/data/worker_error_onCall.qml
new file mode 100644
index 0000000000..90c4617f79
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeworkerscript/data/worker_error_onCall.qml
@@ -0,0 +1,6 @@
+import QtQuick 1.0
+
+BaseWorker {
+ source: "script_error_onCall.js"
+}
+
diff --git a/tests/auto/declarative/qdeclarativeworkerscript/data/worker_error_onLoad.qml b/tests/auto/declarative/qdeclarativeworkerscript/data/worker_error_onLoad.qml
new file mode 100644
index 0000000000..0b9d21dc4b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeworkerscript/data/worker_error_onLoad.qml
@@ -0,0 +1,7 @@
+import QtQuick 1.0
+
+BaseWorker {
+ source: "script_error_onLoad.js"
+}
+
+
diff --git a/tests/auto/declarative/qdeclarativeworkerscript/tst_qdeclarativeworkerscript.cpp b/tests/auto/declarative/qdeclarativeworkerscript/tst_qdeclarativeworkerscript.cpp
index aaedd8290a..4b922fb9fb 100644
--- a/tests/auto/declarative/qdeclarativeworkerscript/tst_qdeclarativeworkerscript.cpp
+++ b/tests/auto/declarative/qdeclarativeworkerscript/tst_qdeclarativeworkerscript.cpp
@@ -41,6 +41,8 @@
#include <qtest.h>
#include <QtCore/qdebug.h>
#include <QtCore/qtimer.h>
+#include <QtCore/qdir.h>
+#include <QtCore/qfileinfo.h>
#include <QtScript/qscriptengine.h>
#include <QtDeclarative/qdeclarativecomponent.h>
@@ -58,6 +60,13 @@ Q_DECLARE_METATYPE(QScriptValue)
#define SRCDIR "."
#endif
+inline QUrl TEST_FILE(const QString &filename)
+{
+ QFileInfo fileInfo(__FILE__);
+ return QUrl::fromLocalFile(fileInfo.absoluteDir().filePath(filename));
+}
+
+
class tst_QDeclarativeWorkerScript : public QObject
{
Q_OBJECT
@@ -70,6 +79,8 @@ private slots:
void messaging_sendQObjectList();
void messaging_sendJsObject();
void script_with_pragma();
+ void scriptError_onLoad();
+ void scriptError_onCall();
private:
void waitForEchoMessage(QDeclarativeWorkerScript *worker) {
@@ -215,6 +226,47 @@ void tst_QDeclarativeWorkerScript::script_with_pragma()
delete worker;
}
+static QString qdeclarativeworkerscript_lastWarning;
+static void qdeclarativeworkerscript_warningsHandler(QtMsgType type, const char *msg)
+{
+ if (type == QtWarningMsg)
+ qdeclarativeworkerscript_lastWarning = QString::fromUtf8(msg);
+}
+
+void tst_QDeclarativeWorkerScript::scriptError_onLoad()
+{
+ QDeclarativeComponent component(&m_engine, SRCDIR "/data/worker_error_onLoad.qml");
+
+ QtMsgHandler previousMsgHandler = qInstallMsgHandler(qdeclarativeworkerscript_warningsHandler);
+ QDeclarativeWorkerScript *worker = qobject_cast<QDeclarativeWorkerScript*>(component.create());
+ QVERIFY(worker != 0);
+
+ QTRY_COMPARE(qdeclarativeworkerscript_lastWarning,
+ TEST_FILE("data/script_error_onLoad.js").toString() + QLatin1String(":3: SyntaxError: Parse error"));
+
+ qInstallMsgHandler(previousMsgHandler);
+ qApp->processEvents();
+ delete worker;
+}
+
+void tst_QDeclarativeWorkerScript::scriptError_onCall()
+{
+ QDeclarativeComponent component(&m_engine, SRCDIR "/data/worker_error_onCall.qml");
+ QDeclarativeWorkerScript *worker = qobject_cast<QDeclarativeWorkerScript*>(component.create());
+ QVERIFY(worker != 0);
+
+ QtMsgHandler previousMsgHandler = qInstallMsgHandler(qdeclarativeworkerscript_warningsHandler);
+ QVariant value;
+ QVERIFY(QMetaObject::invokeMethod(worker, "testSend", Q_ARG(QVariant, value)));
+
+ QTRY_COMPARE(qdeclarativeworkerscript_lastWarning,
+ TEST_FILE("data/script_error_onCall.js").toString() + QLatin1String(":4: ReferenceError: Can't find variable: getData"));
+
+ qInstallMsgHandler(previousMsgHandler);
+ qApp->processEvents();
+ delete worker;
+}
+
QTEST_MAIN(tst_QDeclarativeWorkerScript)
diff --git a/tests/auto/qimagereader/images/corrupt-pixel-count.xpm b/tests/auto/qimagereader/images/corrupt-pixel-count.xpm
new file mode 100644
index 0000000000..3a736ff262
--- /dev/null
+++ b/tests/auto/qimagereader/images/corrupt-pixel-count.xpm
@@ -0,0 +1,11 @@
+/* XPM */
+static const char *marble_xpm[] = {
+/* width height num_colors chars_per_pixel */
+"2 2 2 -2",
+/* colors */
+"a c #adadad",
+"b c #dedede",
+/* pixels */
+"ab",
+"ba"
+};
diff --git a/tests/auto/qimagereader/tst_qimagereader.cpp b/tests/auto/qimagereader/tst_qimagereader.cpp
index 7c2aee8922..f02fd6ab04 100644
--- a/tests/auto/qimagereader/tst_qimagereader.cpp
+++ b/tests/auto/qimagereader/tst_qimagereader.cpp
@@ -1410,6 +1410,9 @@ void tst_QImageReader::readFromResources_data()
QTest::newRow("corrupt-pixels.xpm") << QString("corrupt-pixels.xpm")
<< QByteArray("xpm") << QSize(0, 0)
<< QString("QImage: XPM pixels missing on image line 3");
+ QTest::newRow("corrupt-pixel-count.xpm") << QString("corrupt-pixel-count.xpm")
+ << QByteArray("xpm") << QSize(0, 0)
+ << QString("");
QTest::newRow("marble.xpm") << QString("marble.xpm")
<< QByteArray("xpm") << QSize(240, 240)
<< QString("");
diff --git a/tests/auto/qinputcontext/tst_qinputcontext.cpp b/tests/auto/qinputcontext/tst_qinputcontext.cpp
index 800f9de6a1..6a047f2208 100644
--- a/tests/auto/qinputcontext/tst_qinputcontext.cpp
+++ b/tests/auto/qinputcontext/tst_qinputcontext.cpp
@@ -88,6 +88,7 @@ private slots:
void closeSoftwareInputPanel();
void selections();
void focusProxy();
+ void contextInheritance();
void symbianTestCoeFepInputContext_data();
void symbianTestCoeFepInputContext();
void symbianTestCoeFepAutoCommit_data();
@@ -473,6 +474,37 @@ void tst_QInputContext::focusProxy()
QCOMPARE(gic->focusWidget(), &proxy);
}
+void tst_QInputContext::contextInheritance()
+{
+ QWidget parent;
+ QWidget child(&parent);
+
+ parent.setAttribute(Qt::WA_InputMethodEnabled, true);
+ child.setAttribute(Qt::WA_InputMethodEnabled, true);
+
+ QCOMPARE(parent.inputContext(), qApp->inputContext());
+ QCOMPARE(child.inputContext(), qApp->inputContext());
+
+ QInputContext *qic = new QFilterInputContext;
+ parent.setInputContext(qic);
+ QCOMPARE(parent.inputContext(), qic);
+ QCOMPARE(child.inputContext(), qic);
+
+ parent.setAttribute(Qt::WA_InputMethodEnabled, false);
+ QVERIFY(!parent.inputContext());
+ QCOMPARE(child.inputContext(), qic);
+ parent.setAttribute(Qt::WA_InputMethodEnabled, true);
+
+ parent.setInputContext(0);
+ QCOMPARE(parent.inputContext(), qApp->inputContext());
+ QCOMPARE(child.inputContext(), qApp->inputContext());
+
+ qic = new QFilterInputContext;
+ qApp->setInputContext(qic);
+ QCOMPARE(parent.inputContext(), qic);
+ QCOMPARE(child.inputContext(), qic);
+}
+
#ifdef QT_WEBKIT_LIB
class AutoWebView : public QWebView
{
diff --git a/tests/auto/qsqltablemodel/tst_qsqltablemodel.cpp b/tests/auto/qsqltablemodel/tst_qsqltablemodel.cpp
index f7d2180318..bf68375865 100644
--- a/tests/auto/qsqltablemodel/tst_qsqltablemodel.cpp
+++ b/tests/auto/qsqltablemodel/tst_qsqltablemodel.cpp
@@ -773,6 +773,27 @@ void tst_QSqlTableModel::removeInsertedRow()
QCOMPARE(model.data(model.index(0, 1)).toString(), QString("harry"));
QCOMPARE(model.data(model.index(1, 1)).toString(), QString("trond"));
QCOMPARE(model.data(model.index(2, 1)).toString(), QString("vohi"));
+
+ // Now insert a row with a null, and check that removing it also works (QTBUG-15979 etc)
+ model.insertRow(1);
+ model.setData(model.index(1,0), 55);
+ model.setData(model.index(1,1), QString("null columns"));
+ model.setData(model.index(1,2), QVariant());
+
+ model.submitAll();
+
+ QCOMPARE(model.rowCount(), 4);
+ QCOMPARE(model.data(model.index(3, 0)).toInt(), 55);
+ QCOMPARE(model.data(model.index(3, 1)).toString(), QString("null columns"));
+ QCOMPARE(model.data(model.index(3, 2)).isNull(), true);
+
+ QVERIFY(model.removeRow(3));
+ model.submitAll();
+ QCOMPARE(model.rowCount(), 3);
+
+ QCOMPARE(model.data(model.index(0, 1)).toString(), QString("harry"));
+ QCOMPARE(model.data(model.index(1, 1)).toString(), QString("trond"));
+ QCOMPARE(model.data(model.index(2, 1)).toString(), QString("vohi"));
}
void tst_QSqlTableModel::removeInsertedRows()
diff --git a/tests/auto/qstylesheetstyle/tst_qstylesheetstyle.cpp b/tests/auto/qstylesheetstyle/tst_qstylesheetstyle.cpp
index 50002a6169..83adf49fa4 100644
--- a/tests/auto/qstylesheetstyle/tst_qstylesheetstyle.cpp
+++ b/tests/auto/qstylesheetstyle/tst_qstylesheetstyle.cpp
@@ -100,6 +100,7 @@ private slots:
void task188195_baseBackground();
void task232085_spinBoxLineEditBg();
void changeStyleInChangeEvent();
+ void QTBUG15910_crashNullWidget();
//at the end because it mess with the style.
void widgetStyle();
@@ -1657,6 +1658,23 @@ void tst_QStyleSheetStyle::QTBUG11658_cachecrash()
qApp->setStyleSheet(QString());
}
+void tst_QStyleSheetStyle::QTBUG15910_crashNullWidget()
+{
+ struct : QWidget {
+ virtual void paintEvent(QPaintEvent* ) {
+ QStyleOption opt;
+ opt.init(this);
+ QPainter p(this);
+ style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, 0);
+ style()->drawPrimitive(QStyle::PE_Frame, &opt, &p, 0);
+ style()->drawControl(QStyle::CE_PushButton, &opt, &p, 0);
+ }
+ } w;
+ w.setStyleSheet("* { background-color: white; color:black; border 3px solid yellow }");
+ w.show();
+ QTest::qWaitForWindowShown(&w);
+}
+
QTEST_MAIN(tst_QStyleSheetStyle)
#include "tst_qstylesheetstyle.moc"
diff --git a/tools/assistant/tools/assistant/helpviewer_qwv.cpp b/tools/assistant/tools/assistant/helpviewer_qwv.cpp
index 2d31ad713c..efb9b59005 100644
--- a/tools/assistant/tools/assistant/helpviewer_qwv.cpp
+++ b/tools/assistant/tools/assistant/helpviewer_qwv.cpp
@@ -379,7 +379,7 @@ bool HelpViewer::findText(const QString &text, FindFlags flags, bool incremental
bool fromSearch)
{
TRACE_OBJ
- Q_UNUSED((incremental && fromSearch))
+ Q_UNUSED(incremental); Q_UNUSED(fromSearch);
QWebPage::FindFlags options = QWebPage::FindWrapsAroundDocument;
if (flags & FindBackward)
options |= QWebPage::FindBackward;
diff --git a/tools/designer/src/components/signalsloteditor/signalslot_utils.cpp b/tools/designer/src/components/signalsloteditor/signalslot_utils.cpp
index 3ac0167204..ac1fe1cbfd 100644
--- a/tools/designer/src/components/signalsloteditor/signalslot_utils.cpp
+++ b/tools/designer/src/components/signalsloteditor/signalslot_utils.cpp
@@ -244,7 +244,12 @@ namespace qdesigner_internal {
ClassesMemberFunctions reverseClassesMemberFunctions(const QString &obj_name, MemberType member_type,
const QString &peer, QDesignerFormWindowInterface *form)
{
- QObject *object = form->mainContainer()->findChild<QObject*>(obj_name);
+ QObject *object = 0;
+ if (obj_name == form->mainContainer()->objectName()) {
+ object = form->mainContainer();
+ } else {
+ object = form->mainContainer()->findChild<QObject*>(obj_name);
+ }
if (!object)
return ClassesMemberFunctions();
QDesignerFormEditorInterface *core = form->core();
diff --git a/tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp b/tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp
index 86ce67406a..b06a66f2c1 100644
--- a/tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp
+++ b/tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp
@@ -658,8 +658,12 @@ QWidget *ConnectionDelegate::createEditor(QWidget *parent,
const qdesigner_internal::ClassesMemberFunctions class_list = qdesigner_internal::reverseClassesMemberFunctions(obj_name, type, peer, m_form);
- QObject *object = m_form->mainContainer()->findChild<QObject*>(obj_name);
-
+ QObject *object = 0;
+ if (obj_name == m_form->mainContainer()->objectName()) {
+ object = m_form->mainContainer();
+ } else {
+ object = m_form->mainContainer()->findChild<QObject*>(obj_name);
+ }
inline_editor->addText(type == qdesigner_internal::SignalMember ? tr("<signal>") : tr("<slot>"));
foreach (const qdesigner_internal::ClassMemberFunctions &class_info, class_list) {
if (class_info.m_className.isEmpty() || class_info.m_memberList.isEmpty())
diff --git a/tools/designer/src/lib/shared/grid.cpp b/tools/designer/src/lib/shared/grid.cpp
index 6add8bd2d8..ba991c782d 100644
--- a/tools/designer/src/lib/shared/grid.cpp
+++ b/tools/designer/src/lib/shared/grid.cpp
@@ -89,12 +89,20 @@ Grid::Grid() :
bool Grid::fromVariantMap(const QVariantMap& vm)
{
- *this = Grid();
- valueFromVariantMap(vm, QLatin1String(KEY_VISIBLE), m_visible);
- valueFromVariantMap(vm, QLatin1String(KEY_SNAPX), m_snapX);
- valueFromVariantMap(vm, QLatin1String(KEY_SNAPY), m_snapY);
- valueFromVariantMap(vm, QLatin1String(KEY_DELTAX), m_deltaX);
- return valueFromVariantMap(vm, QLatin1String(KEY_DELTAY), m_deltaY);
+ Grid grid;
+ bool anyData = valueFromVariantMap(vm, QLatin1String(KEY_VISIBLE), grid.m_visible);
+ anyData |= valueFromVariantMap(vm, QLatin1String(KEY_SNAPX), grid.m_snapX);
+ anyData |= valueFromVariantMap(vm, QLatin1String(KEY_SNAPY), grid.m_snapY);
+ anyData |= valueFromVariantMap(vm, QLatin1String(KEY_DELTAX), grid.m_deltaX);
+ anyData |= valueFromVariantMap(vm, QLatin1String(KEY_DELTAY), grid.m_deltaY);
+ if (!anyData)
+ return false;
+ if (grid.m_deltaX == 0 || grid.m_deltaY == 0) {
+ qWarning("Attempt to set invalid grid with a spacing of 0.");
+ return false;
+ }
+ *this = grid;
+ return true;
}
QVariantMap Grid::toVariantMap(bool forceKeys) const
diff --git a/tools/qml/qml.pro b/tools/qml/qml.pro
index 5d6192df77..b1d56ea29e 100644
--- a/tools/qml/qml.pro
+++ b/tools/qml/qml.pro
@@ -39,8 +39,8 @@ symbian {
TARGET.CAPABILITY = NetworkServices ReadUserData
# Deploy plugin for remote debugging
- qmldebuggingplugin.sources = $$QT_BUILD_TREE/plugins/qmldebugging/tcpserver$${QT_LIBINFIX}.dll
- qmldebuggingplugin.path = c:$$QT_PLUGINS_BASE_DIR/qmldebugging
+ qmldebuggingplugin.sources = $$QT_BUILD_TREE/plugins/qmltooling/tcpserver$${QT_LIBINFIX}.dll
+ qmldebuggingplugin.path = c:$$QT_PLUGINS_BASE_DIR/qmltooling
DEPLOYMENT += qmldebuggingplugin
}
mac {