summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--demos/symbianpkgrules.pri3
-rw-r--r--doc/src/frameworks-technologies/activeqt.qdoc17
-rw-r--r--examples/declarative/animations/property-animation.qml4
-rw-r--r--examples/declarative/behaviors/SideRect.qml (renamed from examples/declarative/behaviours/SideRect.qml)7
-rw-r--r--examples/declarative/behaviors/behavior-example.qml (renamed from examples/declarative/behaviours/behavior-example.qml)45
-rw-r--r--examples/declarative/declarative.pro2
-rw-r--r--examples/symbianpkgrules.pri3
-rw-r--r--mkspecs/common/symbian/symbian.conf7
-rw-r--r--qmake/generators/symbian/symbiancommon.cpp45
-rw-r--r--qmake/generators/symbian/symmake.cpp10
-rw-r--r--src/3rdparty/phonon/mmf/videoplayer_dsa.cpp8
-rw-r--r--src/3rdparty/webkit/VERSION2
-rw-r--r--src/3rdparty/webkit/WebCore/ChangeLog213
-rw-r--r--src/3rdparty/webkit/WebCore/WebCore.pro2
-rw-r--r--src/3rdparty/webkit/WebCore/config.h2
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSParser.cpp8
-rw-r--r--src/3rdparty/webkit/WebCore/dom/XMLTokenizer.cpp3
-rw-r--r--src/3rdparty/webkit/WebCore/dom/XMLTokenizer.h20
-rw-r--r--src/3rdparty/webkit/WebCore/dom/XMLTokenizerLibxml2.cpp59
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLFormElement.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLImageElement.cpp24
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLImageElement.h7
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLInputElement.cpp7
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLParser.cpp3
-rw-r--r--src/3rdparty/webkit/WebCore/loader/FrameLoader.cpp8
-rw-r--r--src/3rdparty/webkit/WebCore/platform/MIMETypeRegistry.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp10
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.h4
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/symbian/PluginContainerSymbian.cpp8
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/symbian/PluginContainerSymbian.h7
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/symbian/PluginViewSymbian.cpp24
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderText.cpp11
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp9
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.h1
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp36
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp4
-rw-r--r--src/3rdparty/webkit/WebKit/qt/ChangeLog84
-rw-r--r--src/3rdparty/webkit/WebKit/qt/symbian/eabi/QtWebKitu.def4
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/benchmarks/painting/tst_painting.cpp27
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp67
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp20
-rw-r--r--src/corelib/kernel/qeventdispatcher_symbian.cpp13
-rw-r--r--src/corelib/tools/qchar.cpp8
-rw-r--r--src/declarative/graphicsitems/qdeclarativemousearea.cpp1
-rw-r--r--src/gui/dialogs/qmessagebox.cpp14
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp3
-rw-r--r--src/gui/graphicsview/qgraphicsscene.cpp13
-rw-r--r--src/gui/graphicsview/qgraphicswidget.cpp10
-rw-r--r--src/gui/inputmethod/inputmethod.pri2
-rw-r--r--src/gui/inputmethod/qinputcontextfactory.cpp47
-rw-r--r--src/gui/kernel/qwidget_p.h20
-rw-r--r--src/gui/styles/qgtkstyle.cpp3
-rw-r--r--src/gui/styles/qs60style.cpp69
-rw-r--r--src/gui/styles/qs60style.h3
-rw-r--r--src/gui/styles/qs60style_p.h6
-rw-r--r--src/gui/styles/qs60style_s60.cpp18
-rw-r--r--src/gui/text/qfontdatabase_s60.cpp5
-rw-r--r--src/gui/text/qfontengine_win.cpp5
-rw-r--r--src/network/access/qhttpnetworkconnectionchannel.cpp32
-rw-r--r--src/network/access/qhttpnetworkconnectionchannel_p.h20
-rw-r--r--src/opengl/qgl_p.h2
-rw-r--r--src/openvg/qpaintengine_vg.cpp2
-rw-r--r--src/openvg/qpixmapdata_vg.cpp2
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp25
-rw-r--r--src/s60installs/bwins/QtGuiu.def128
-rw-r--r--src/s60installs/eabi/QtGuiu.def128
-rw-r--r--src/sql/drivers/odbc/qsql_odbc.cpp157
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/compiled.qml38
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp37
-rw-r--r--tests/auto/declarative/qdeclarativemousearea/data/updateMousePosOnClick.qml20
-rw-r--r--tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp36
-rw-r--r--tests/auto/q3sqlcursor/tst_q3sqlcursor.cpp178
-rw-r--r--tests/auto/qfiledialog/tst_qfiledialog.cpp3
-rw-r--r--tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp91
-rw-r--r--tests/auto/qnetworkreply/tst_qnetworkreply.cpp13
-rw-r--r--tests/auto/qsqlquery/tst_qsqlquery.cpp9
-rw-r--r--util/s60pixelmetrics/pixel_metrics.cpp11
-rw-r--r--util/s60pixelmetrics/pixel_metrics.h4
-rw-r--r--util/s60pixelmetrics/pm_mapperapp.cpp9
79 files changed, 1319 insertions, 695 deletions
diff --git a/demos/symbianpkgrules.pri b/demos/symbianpkgrules.pri
index c511836..68a82cd 100644
--- a/demos/symbianpkgrules.pri
+++ b/demos/symbianpkgrules.pri
@@ -10,6 +10,7 @@ vendorinfo = \
":\"Nokia, Qt\"" \
" "
-default_deployment.pkg_prerules += vendorinfo
+demos_deployment.pkg_prerules += vendorinfo
+DEPLOYMENT += demos_deployment
isEmpty(ICON):ICON = $$QT_SOURCE_TREE/src/s60installs/qt.svg
diff --git a/doc/src/frameworks-technologies/activeqt.qdoc b/doc/src/frameworks-technologies/activeqt.qdoc
index e24959d..a79430d 100644
--- a/doc/src/frameworks-technologies/activeqt.qdoc
+++ b/doc/src/frameworks-technologies/activeqt.qdoc
@@ -57,6 +57,7 @@
\brief An overview of Qt's ActiveX and COM integration on Windows.
\ingroup platform-specific
+ \ingroup frameworks-technologies
\keyword ActiveQt
Qt's ActiveX and COM support allows Qt for Windows developers to:
@@ -69,19 +70,23 @@
controls.
\endlist
- The ActiveQt framework consists of two modules:
+ The ActiveQt framework consists of two frameworks:
\list
- \o The \l QAxContainer module is a static
- library implementing QObject and QWidget subclasses, QAxObject and
- QAxWidget, that act as containers for COM objects and ActiveX
- controls.
- \o The \l QAxServer module is a static library that implements
+ \o The \l{Using ActiveX controls and COM objects in Qt}{QAxContainer}
+ module is a static library implementing QObject and QWidget subclasses,
+ QAxObject and QAxWidget, that act as containers for COM objects and
+ ActiveX controls.
+ \o The \l{Building ActiveX servers and controls with Qt}{QAxServer}
+ module is a static library that implements
functionality for in-process and executable COM servers. This
module provides the QAxAggregated, QAxBindable and QAxFactory
classes.
\endlist
+ A set of \l{Tools for ActiveQt}{tools} is provided to simplify the
+ developing and building of Qt projects that use ActiveX.
+
To build the static libraries, change into the \c activeqt directory
(usually \c QTDIR/src/activeqt), and run \c qmake and your make
tool in both the \c container and the \c control subdirectory.
diff --git a/examples/declarative/animations/property-animation.qml b/examples/declarative/animations/property-animation.qml
index 401feb5..fd5eb3c 100644
--- a/examples/declarative/animations/property-animation.qml
+++ b/examples/declarative/animations/property-animation.qml
@@ -40,7 +40,7 @@ Item {
anchors.horizontalCenter: parent.horizontalCenter
source: "images/face-smile.png"; y: minHeight
- // Animate the y property. Setting repeat to true makes the
+ // Animate the y property. Setting loops to Animation.Infinite makes the
// animation repeat indefinitely, otherwise it would only run once.
SequentialAnimation on y {
loops: Animation.Infinite
@@ -50,7 +50,7 @@ Item {
from: smiley.minHeight; to: smiley.maxHeight
easing.type: "OutExpo"; duration: 300
}
-
+
// Then move back to minHeight in 1 second, using the OutBounce easing function
NumberAnimation {
from: smiley.maxHeight; to: smiley.minHeight
diff --git a/examples/declarative/behaviours/SideRect.qml b/examples/declarative/behaviors/SideRect.qml
index 63b7db2..7caac45 100644
--- a/examples/declarative/behaviours/SideRect.qml
+++ b/examples/declarative/behaviors/SideRect.qml
@@ -5,10 +5,9 @@ Rectangle {
property string text
- color: "black"
- width: 75; height: 50
- radius: 5
- border.width: 10; border.color: "white";
+ width: 75; height: 50; radius: 6
+ color: "#646464"; border.width: 4; border.color: "white"
+
MouseArea {
anchors.fill: parent
hoverEnabled: true
diff --git a/examples/declarative/behaviours/behavior-example.qml b/examples/declarative/behaviors/behavior-example.qml
index c84bf62..8da1ada 100644
--- a/examples/declarative/behaviours/behavior-example.qml
+++ b/examples/declarative/behaviors/behavior-example.qml
@@ -1,15 +1,14 @@
import Qt 4.6
Rectangle {
- color: "black"
- width: 400; height: 400
+ color: "#343434"
+ width: 600; height: 400
Rectangle {
- color: "transparent"
anchors.centerIn: parent
- width: 200; height: 200
- radius: 30
- border.width: 10; border.color: "white";
+ width: 200; height: 200; radius: 30
+ color: "transparent"; border.width: 4; border.color: "white"
+
SideRect {
id: leftRect
@@ -45,27 +44,35 @@ Rectangle {
property string text
- color: "red"
- width: 75; height: 50
- radius: 5
- border.width: 10; border.color: "white";
- x: 100-37; y: 100-25
- Behavior on x { NumberAnimation { duration: 300 } }
- Behavior on y { NumberAnimation { duration: 300 } }
+ color: "firebrick"
+ x: 62.5; y: 75; width: 75; height: 50
+ radius: 6; border.width: 4; border.color: "white"
+
+ // Setting an 'elastic' behavior on the focusRect's x property.
+ Behavior on x {
+ NumberAnimation { easing.type: "OutElastic"; easing.amplitude: 3.0; easing.period: 2.0; duration: 300 }
+ }
+
+ // Setting an 'elastic' behavior on the focusRect's y property.
+ Behavior on y {
+ NumberAnimation { easing.type: "OutElastic"; easing.amplitude: 3.0; easing.period: 2.0; duration: 300 }
+ }
+
Text {
id: focusText
- text: focusRect.text;
+ text: focusRect.text
+ anchors.centerIn: parent
+ color: "white"; font.pixelSize: 16; font.bold: true
+
+ // Setting a behavior on the focusText's x property:
+ // Set the opacity to 0, set the new text value, then set the opacity back to 1.
Behavior on text {
SequentialAnimation {
NumberAnimation { target: focusText; property: "opacity"; to: 0; duration: 150 }
- PropertyAction {}
+ PropertyAction { }
NumberAnimation { target: focusText; property: "opacity"; to: 1; duration: 150 }
}
}
- anchors.centerIn: parent;
- color: "white";
- font.pixelSize: 16
- font.bold: true
}
}
}
diff --git a/examples/declarative/declarative.pro b/examples/declarative/declarative.pro
index 0f58738..5fc1cf0 100644
--- a/examples/declarative/declarative.pro
+++ b/examples/declarative/declarative.pro
@@ -12,7 +12,7 @@ SUBDIRS = \
sources.files = \
animations \
aspectratio \
- behaviours \
+ behaviors \
border-image \
clocks \
connections \
diff --git a/examples/symbianpkgrules.pri b/examples/symbianpkgrules.pri
index 35edbfb..a1b6634 100644
--- a/examples/symbianpkgrules.pri
+++ b/examples/symbianpkgrules.pri
@@ -10,6 +10,7 @@ vendorinfo = \
":\"Nokia, Qt\"" \
" "
-default_deployment.pkg_prerules += vendorinfo
+examples_deployment.pkg_prerules += vendorinfo
+DEPLOYMENT += examples_deployment
isEmpty(ICON):ICON = $$QT_SOURCE_TREE/src/s60installs/qt.svg
diff --git a/mkspecs/common/symbian/symbian.conf b/mkspecs/common/symbian/symbian.conf
index a9d7dca..bd5768b 100644
--- a/mkspecs/common/symbian/symbian.conf
+++ b/mkspecs/common/symbian/symbian.conf
@@ -26,6 +26,8 @@ QMAKE_CFLAGS_RELEASE =
QMAKE_CFLAGS_DEBUG =
QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
+
+VERSION_FLAGS.ARMCC = ARMCC_4_0
QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
# Symbian build system applies -cwd source on the MWCC command line.
# this causes problems with include paths, -cwd include uses the same
@@ -33,7 +35,8 @@ QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
# This should really be fixed in raptor, as using CXXFLAGS means we pass
# both on the command line and rely on the compiler using the last specified
QMAKE_CXXFLAGS.CW = -cwd include
-QMAKE_CXXFLAGS.ARMCC = --visibility_inlines_hidden
+QMAKE_CXXFLAGS.ARMCC = --visibility_inlines_hidden
+QMAKE_CXXFLAGS.ARMCC_4_0 = --import_all_vtbl
QMAKE_CXXFLAGS.GCCE = -fvisibility-inlines-hidden
QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
@@ -107,7 +110,5 @@ QMAKE_TAR = tar -cf
QMAKE_GZIP = gzip -9f
QT_ARCH = symbian
-
load(qt_config)
load(symbian/platform_paths)
-
diff --git a/qmake/generators/symbian/symbiancommon.cpp b/qmake/generators/symbian/symbiancommon.cpp
index 1de4b65..54b60be 100644
--- a/qmake/generators/symbian/symbiancommon.cpp
+++ b/qmake/generators/symbian/symbiancommon.cpp
@@ -180,17 +180,36 @@ void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, Deployment
tw << headerComment.arg(wrapperPkgFilename).arg(dateStr);
// Construct QStringList from pkg_prerules since we need search it before printed to file
+ // Note: Though there can't be more than one language or header line, use stringlists
+ // in case user wants comments to go with the rules.
QStringList rawPkgPreRules;
+ QStringList languageRules;
+ QStringList headerRules;
foreach(QString deploymentItem, project->values("DEPLOYMENT")) {
foreach(QString pkgrulesItem, project->values(deploymentItem + ".pkg_prerules")) {
QStringList pkgrulesValue = project->values(pkgrulesItem);
// If there is no stringlist defined for a rule, use rule name directly
// This is convenience for defining single line mmp statements
if (pkgrulesValue.isEmpty()) {
- rawPkgPreRules << pkgrulesItem;
+ if (pkgrulesItem.startsWith("&"))
+ languageRules << pkgrulesItem;
+ else if (pkgrulesItem.startsWith("#"))
+ headerRules << pkgrulesItem;
+ else
+ rawPkgPreRules << pkgrulesItem;
} else {
- foreach(QString pkgrule, pkgrulesValue) {
- rawPkgPreRules << pkgrule;
+ if (containsStartWithItem('&', pkgrulesValue)) {
+ foreach(QString pkgrule, pkgrulesValue) {
+ languageRules << pkgrule;
+ }
+ } else if (containsStartWithItem('#', pkgrulesValue)) {
+ foreach(QString pkgrule, pkgrulesValue) {
+ headerRules << pkgrule;
+ }
+ } else {
+ foreach(QString pkgrule, pkgrulesValue) {
+ rawPkgPreRules << pkgrule;
+ }
}
}
}
@@ -198,17 +217,17 @@ void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, Deployment
// Apply some defaults if specific data does not exist in PKG pre-rules
- if (!containsStartWithItem('&', rawPkgPreRules)) {
+ if (languageRules.isEmpty()) {
// language, (*** hardcoded to english atm, should be parsed from TRANSLATIONS)
- QString languageCode = "; Language\n&EN\n\n";
- t << languageCode;
- tw << languageCode;
- } else {
+ languageRules << "; Language\n&EN\n\n";
+ } else if (headerRules.isEmpty()) {
// In case user defines langs, he must take care also about SIS header
- if (!containsStartWithItem('#', rawPkgPreRules))
- fprintf(stderr, "Warning: If language is defined with DEPLOYMENT pkg_prerules, also the SIS header must be defined\n");
+ fprintf(stderr, "Warning: If language is defined with DEPLOYMENT pkg_prerules, also the SIS header must be defined\n");
}
+ t << languageRules.join("\n") << endl;
+ tw << languageRules.join("\n") << endl;
+
// name of application, UID and version
QString applicationVersion = project->first("VERSION").isEmpty() ? "1,0,0" : project->first("VERSION").replace('.', ',');
QString sisHeader = "; SIS header: name, uid, version\n#{\"%1\"},(%2),%3\n\n";
@@ -222,9 +241,11 @@ void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, Deployment
} else {
tw << installerSisHeader << endl;
}
- if (!containsStartWithItem('#', rawPkgPreRules)) {
+
+ if (headerRules.isEmpty())
t << sisHeader.arg(visualTarget).arg(uid3).arg(applicationVersion);
- }
+ else
+ t << headerRules.join("\n") << endl;
// Localized vendor name
QString vendorName;
diff --git a/qmake/generators/symbian/symmake.cpp b/qmake/generators/symbian/symmake.cpp
index af85a2a..0fcd26d 100644
--- a/qmake/generators/symbian/symmake.cpp
+++ b/qmake/generators/symbian/symmake.cpp
@@ -873,6 +873,16 @@ void SymbianMakefileGenerator::writeMmpFileCompilerOptionPart(QTextStream& t)
t << MMP_OPTION_CW " " << cw << endl;
if (!armcc.isEmpty())
t << MMP_OPTION_ARMCC " " << armcc << endl;
+
+ foreach(QString armccVersion, project->values("VERSION_FLAGS.ARMCC")) {
+ QStringList currentValues = project->values("QMAKE_CXXFLAGS." + armccVersion);
+ if (currentValues.size()) {
+ t << "#if defined(" << armccVersion << ")" << endl;
+ t << MMP_OPTION_ARMCC " " << currentValues.join(" ") << endl;
+ t << "#endif" << endl;
+ }
+ }
+
if (!gcce.isEmpty())
t << MMP_OPTION_GCCE " " << gcce << endl;
diff --git a/src/3rdparty/phonon/mmf/videoplayer_dsa.cpp b/src/3rdparty/phonon/mmf/videoplayer_dsa.cpp
index 21cdb16..732d2d9 100644
--- a/src/3rdparty/phonon/mmf/videoplayer_dsa.cpp
+++ b/src/3rdparty/phonon/mmf/videoplayer_dsa.cpp
@@ -162,7 +162,10 @@ void MMF::DsaVideoPlayer::prepareCompleted()
void MMF::DsaVideoPlayer::handleVideoWindowChanged()
{
if (!m_window) {
- m_window = QApplication::activeWindow()->effectiveWinId()->DrawableWindow();
+ if (QWidget *window = QApplication::activeWindow())
+ m_window = window->effectiveWinId()->DrawableWindow();
+ else
+ m_window = 0;
m_videoScreenRect = TRect();
}
@@ -213,6 +216,9 @@ void MMF::DsaVideoPlayer::handleParametersChanged(VideoParameters parameters)
TRACE_CONTEXT(DsaVideoPlayer::handleParametersChanged, EVideoInternal);
TRACE_ENTRY_0();
+ if (!m_window)
+ return;
+
#ifndef QT_NO_DEBUG
getDsaRegion(m_wsSession, *m_window);
#endif
diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION
index 9dac2f8..a8889b3 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
- aa40cdb9595eb15a68e7be03322f973aa613a8f9
+ e9151b11e974f0aa47fd40c225f88f35ced91496
diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog
index 0a444bc..2bd506b 100644
--- a/src/3rdparty/webkit/WebCore/ChangeLog
+++ b/src/3rdparty/webkit/WebCore/ChangeLog
@@ -1,3 +1,216 @@
+2010-03-25 yael aharon <yael.aharon@nokia.com>
+
+ Reviewed by Laszlo Gombos.
+
+ [Qt] Windowed netscape plugins don't work with QGraphicsWebView on Symbian
+ https://bugs.webkit.org/show_bug.cgi?id=35112
+
+ Add a proxy widget when loading a QWidget based plugin in a QGraphicsWebView.
+
+ * plugins/symbian/PluginContainerSymbian.cpp:
+ (PluginContainerSymbian::PluginContainerSymbian):
+ (PluginContainerSymbian::focusInEvent):
+ * plugins/symbian/PluginContainerSymbian.h:
+ (WebCore::PluginContainerSymbian::proxy):
+ * plugins/symbian/PluginViewSymbian.cpp:
+ (WebCore::PluginView::updatePluginWidget):
+ (WebCore::PluginView::platformStart):
+ (WebCore::PluginView::platformDestroy):
+
+2010-03-29 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed for the Qt 4.6 branch by Simon Hausmann.
+
+ Accept XHTML-MP content type as XHTML content
+ https://bugs.webkit.org/show_bug.cgi?id=34262
+
+ Enable processing XHTML-MP mime type as an XHTML document
+ even if XHTML-MP support is not enabled.
+
+ * platform/MIMETypeRegistry.cpp:
+ (WebCore::initializeSupportedNonImageMimeTypes):
+
+2010-03-22 Jakub Wieczorek <jwieczorek@webkit.org>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Don't construct a QLineEdit every time when painting a text field
+ https://bugs.webkit.org/show_bug.cgi?id=36373
+
+ Instead, keep one instance per RenderTheme around.
+
+ * platform/qt/RenderThemeQt.cpp:
+ (WebCore::findFrameLineWidth):
+
+2010-03-26 Janne Koskinen <janne.p.koskinen@digia.com>
+
+ Reviewed by Laszlo Gombos.
+
+ Don't undefine SKIP_STATIC_CONSTRUCTORS_ON_GCC for Symbian HW targets.
+ https://bugs.webkit.org/show_bug.cgi?id=34081
+
+ Defining StringImpl instances as globals will cause a crash on process exit as
+ StringImpl::Remove expects TLS which was already deleted at time of exiting main and ends up
+ constructing one exiting thread.
+
+ * config.h:
+
+2010-02-02 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34076
+ <rdar://problem/7594601> Crash in mangleme in WebCore::Element::getAttribute
+
+ Test: fast/forms/misplaced-img-form-registration.html
+
+ * html/HTMLFormElement.cpp:
+ (WebCore::HTMLFormElement::registerImgElement): Assert that the same image isn't added
+ to vector again.
+ (WebCore::HTMLFormElement::removeImgElement): Similarly, assert that we're removing something
+ that's actually registered.
+
+ * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::~HTMLImageElement): If parser fails
+ to insert the image element, then there will be no removed from tree notification either,
+ need to unregister right away.
+
+2010-01-25 Alexey Proskuryakov <ap@apple.com>
+
+ Rubber-stamped by Geoffrey Garen.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34076
+ An image remains accessible via form.property syntax after being removed from document.
+
+ Fix crashing regression tests (tables/mozilla/bugs/bug4527.html et al.)
+
+ * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::insertedIntoTree): Remove incorrect
+ assertions added in the previous patch - it's mot true that m_for is always a parent; table
+ parsing can reparent the image element, but m_form still needs to be set.
+
+2010-01-25 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Geoffrey Garen.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34076
+ An image remains accessible via form.property syntax after being removed from document.
+
+ Tests: fast/forms/removed-image-as-property.html
+ fast/forms/reparented-image-as-property.html
+
+ * html/HTMLImageElement.cpp:
+ (WebCore::HTMLImageElement::~HTMLImageElement): This is called during GC - not a good time
+ to make observable changes to DOM.
+ (WebCore::HTMLImageElement::insertedIntoTree): This is the right place to do any work that
+ depends on connectedness to some ancestor. We still allow for m_form to be set via constructor,
+ which happens during parsing.
+ (WebCore::HTMLImageElement::removedFromTree): Ditto.
+
+ * html/HTMLImageElement.h: Added removedFromTree/insertedIntoTree, moved removedFromDocument
+ and insertedIntoDocument to private section, as they shouldn't be called directly.
+
+2009-12-08 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Navigating to a cached page can result in accessing a destroyed HTMLInputElement.
+ <rdar://problem/6856662> and https://webkit.org/b/32293
+
+ Test: fast/loader/input-element-page-cache-crash.html
+
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::parseMappedAttribute): Make sure to unregister for the activation
+ callback after the new m_autocomplete setting has been stored so the unregistration actually
+ takes place.
+
+2009-12-13 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ <rdar://problem/7341364> Crash at HTMLParser::popOneBlockCommon() after
+ handling misnested residual style tags
+
+ Test: fast/parser/residual-style-close-ref-clone.html
+
+ * html/HTMLParser.cpp:
+ (WebCore::HTMLParser::handleResidualStyleCloseTagAcrossBlocks): Gave the
+ block stack a strong reference to the cloned residual style element.
+
+2009-12-23 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/7487164> First line of text cannot be selected
+ https://bugs.webkit.org/show_bug.cgi?id=32749
+
+ Test: fast/text/remove-zero-length-run.html
+
+ * rendering/RenderText.cpp:
+ (WebCore::RenderText::positionLineBox): Changed code that assumed that if a box was being
+ removed, it was the only box in the RenderText. Instead, correctly preserve the list of
+ text boxes.
+ (WebCore::RenderText::checkConsistency): Updated for earlier rename.
+
+2009-12-10 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Crash in XMLTokenizer::popCurrentNode if window.close() is called during parsing
+ https://bugs.webkit.org/show_bug.cgi?id=31576
+
+ Add a RefCounted wrapper object around xmlParserCtxtPtr so we can
+ maintain it's lifetime more effectively.
+
+ Test: fast/parser/xhtml-close-while-parsing.xhtml
+
+ * dom/XMLTokenizer.cpp:
+ (WebCore::XMLTokenizer::popCurrentNode):
+ * dom/XMLTokenizer.h:
+ (WebCore::XMLParserContext::context):
+ (WebCore::XMLParserContext::XMLParserContext):
+ (WebCore::XMLTokenizer::context):
+ * dom/XMLTokenizerLibxml2.cpp:
+ (WebCore::XMLParserContext::createStringParser):
+ (WebCore::XMLParserContext::createMemoryParser):
+ (WebCore::XMLParserContext::~XMLParserContext):
+ (WebCore::XMLTokenizer::~XMLTokenizer):
+ (WebCore::XMLTokenizer::doWrite):
+ (WebCore::XMLTokenizer::initializeParserContext):
+ (WebCore::XMLTokenizer::doEnd):
+ (WebCore::XMLTokenizer::lineNumber):
+ (WebCore::XMLTokenizer::columnNumber):
+ (WebCore::XMLTokenizer::stopParsing):
+ (WebCore::parseXMLDocumentFragment):
+ (WebCore::parseAttributes):
+
+2009-11-09 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler and Dan Bernstein.
+
+ <rdar://problem/7328395>
+ https://bugs.webkit.org/show_bug.cgi?id=31277
+
+ When an object tag's style changes (for example when child nodes are added/removed),
+ reuse its Frame (if it has one) instead of creating multiple Frames.
+
+ Test: fast/dom/HTMLObjectElement/children-changed.html
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::requestObject):
+
+2009-12-05 Adam Langley <agl@google.com>
+
+ Reviewed by Adam Barth.
+
+ Check that a CSS format() argument is of a valid type.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31815
+ http://code.google.com/p/chromium/issues/detail?id=28582
+
+ Test: fast/css/url-format-non-string.html
+
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::parseFontFaceSrc):
+
2010-03-19 Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed by Simon Hausmann.
diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro
index e24e9e2..5fe9703 100644
--- a/src/3rdparty/webkit/WebCore/WebCore.pro
+++ b/src/3rdparty/webkit/WebCore/WebCore.pro
@@ -11,7 +11,7 @@ symbian: {
} else {
TARGET.UID3 = 0xE00267C2
}
- webkitlibs.sources = QtWebKit$${QT_LIBINFIX}.dll
+ webkitlibs.sources = $$QMAKE_LIBDIR_QT/QtWebKit$${QT_LIBINFIX}.dll
webkitlibs.path = /sys/bin
vendorinfo = \
"; Localised Vendor name" \
diff --git a/src/3rdparty/webkit/WebCore/config.h b/src/3rdparty/webkit/WebCore/config.h
index 62a7f60a..003acbe 100644
--- a/src/3rdparty/webkit/WebCore/config.h
+++ b/src/3rdparty/webkit/WebCore/config.h
@@ -144,7 +144,9 @@
#if PLATFORM(SYMBIAN)
#undef WIN32
#undef _WIN32
+#if COMPILER(WINSCW)
#undef SKIP_STATIC_CONSTRUCTORS_ON_GCC
+#endif
#define USE_SYSTEM_MALLOC 1
#define U_HAVE_INT8_T 0
#define U_HAVE_INT16_T 0
diff --git a/src/3rdparty/webkit/WebCore/css/CSSParser.cpp b/src/3rdparty/webkit/WebCore/css/CSSParser.cpp
index 6024a5b..7750a80 100644
--- a/src/3rdparty/webkit/WebCore/css/CSSParser.cpp
+++ b/src/3rdparty/webkit/WebCore/css/CSSParser.cpp
@@ -3328,6 +3328,12 @@ bool CSSParser::parseFontWeight(bool important)
return false;
}
+static bool isValidFormatFunction(CSSParserValue* val)
+{
+ CSSParserValueList* args = val->function->args;
+ return equalIgnoringCase(val->function->name, "format(") && (args->current()->unit == CSSPrimitiveValue::CSS_STRING || args->current()->unit == CSSPrimitiveValue::CSS_IDENT);
+}
+
bool CSSParser::parseFontFaceSrc()
{
RefPtr<CSSValueList> values(CSSValueList::createCommaSeparated());
@@ -3355,7 +3361,7 @@ bool CSSParser::parseFontFaceSrc()
CSSParserValue* a = args->current();
uriValue.clear();
parsedValue = CSSFontFaceSrcValue::createLocal(a->string);
- } else if (equalIgnoringCase(val->function->name, "format(") && allowFormat && uriValue) {
+ } else if (allowFormat && uriValue && isValidFormatFunction(val)) {
expectComma = true;
allowFormat = false;
uriValue->setFormat(args->current()->string);
diff --git a/src/3rdparty/webkit/WebCore/dom/XMLTokenizer.cpp b/src/3rdparty/webkit/WebCore/dom/XMLTokenizer.cpp
index 30d39e0..56f8ff4 100644
--- a/src/3rdparty/webkit/WebCore/dom/XMLTokenizer.cpp
+++ b/src/3rdparty/webkit/WebCore/dom/XMLTokenizer.cpp
@@ -91,7 +91,8 @@ void XMLTokenizer::pushCurrentNode(Node* n)
void XMLTokenizer::popCurrentNode()
{
- ASSERT(m_currentNode);
+ if (!m_currentNode)
+ return;
ASSERT(m_currentNodeStack.size());
if (m_currentNode != m_doc)
diff --git a/src/3rdparty/webkit/WebCore/dom/XMLTokenizer.h b/src/3rdparty/webkit/WebCore/dom/XMLTokenizer.h
index a83e73a..3bd15c8 100644
--- a/src/3rdparty/webkit/WebCore/dom/XMLTokenizer.h
+++ b/src/3rdparty/webkit/WebCore/dom/XMLTokenizer.h
@@ -52,6 +52,23 @@ namespace WebCore {
class PendingCallbacks;
class ScriptElement;
+#if !USE(QXMLSTREAM)
+ class XMLParserContext : public RefCounted<XMLParserContext> {
+ public:
+ static PassRefPtr<XMLParserContext> createMemoryParser(xmlSAXHandlerPtr, void*, const char*);
+ static PassRefPtr<XMLParserContext> createStringParser(xmlSAXHandlerPtr, void*);
+ ~XMLParserContext();
+ xmlParserCtxtPtr context() const { return m_context; }
+
+ private:
+ XMLParserContext(xmlParserCtxtPtr context)
+ : m_context(context)
+ {
+ }
+ xmlParserCtxtPtr m_context;
+ };
+#endif
+
class XMLTokenizer : public Tokenizer, public CachedResourceClient {
public:
XMLTokenizer(Document*, FrameView* = 0);
@@ -146,7 +163,8 @@ public:
QXmlStreamReader m_stream;
bool m_wroteText;
#else
- xmlParserCtxtPtr m_context;
+ xmlParserCtxtPtr context() const { return m_context ? m_context->context() : 0; };
+ RefPtr<XMLParserContext> m_context;
OwnPtr<PendingCallbacks> m_pendingCallbacks;
Vector<xmlChar> m_bufferedText;
#endif
diff --git a/src/3rdparty/webkit/WebCore/dom/XMLTokenizerLibxml2.cpp b/src/3rdparty/webkit/WebCore/dom/XMLTokenizerLibxml2.cpp
index 9aa0961..42c8b9b 100644
--- a/src/3rdparty/webkit/WebCore/dom/XMLTokenizerLibxml2.cpp
+++ b/src/3rdparty/webkit/WebCore/dom/XMLTokenizerLibxml2.cpp
@@ -465,7 +465,7 @@ static void errorFunc(void*, const char*, ...)
static bool didInit = false;
-static xmlParserCtxtPtr createStringParser(xmlSAXHandlerPtr handlers, void* userData)
+PassRefPtr<XMLParserContext> XMLParserContext::createStringParser(xmlSAXHandlerPtr handlers, void* userData)
{
if (!didInit) {
xmlInitParser();
@@ -482,12 +482,12 @@ static xmlParserCtxtPtr createStringParser(xmlSAXHandlerPtr handlers, void* user
const unsigned char BOMHighByte = *reinterpret_cast<const unsigned char*>(&BOM);
xmlSwitchEncoding(parser, BOMHighByte == 0xFF ? XML_CHAR_ENCODING_UTF16LE : XML_CHAR_ENCODING_UTF16BE);
- return parser;
+ return adoptRef(new XMLParserContext(parser));
}
// Chunk should be encoded in UTF-8
-static xmlParserCtxtPtr createMemoryParser(xmlSAXHandlerPtr handlers, void* userData, const char* chunk)
+PassRefPtr<XMLParserContext> XMLParserContext::createMemoryParser(xmlSAXHandlerPtr handlers, void* userData, const char* chunk)
{
if (!didInit) {
xmlInitParser();
@@ -518,8 +518,8 @@ static xmlParserCtxtPtr createMemoryParser(xmlSAXHandlerPtr handlers, void* user
parser->str_xmlns = xmlDictLookup(parser->dict, BAD_CAST "xmlns", 5);
parser->str_xml_ns = xmlDictLookup(parser->dict, XML_XML_NAMESPACE, 36);
parser->_private = userData;
-
- return parser;
+
+ return adoptRef(new XMLParserContext(parser));
}
// --------------------------------
@@ -609,6 +609,13 @@ XMLTokenizer::XMLTokenizer(DocumentFragment* fragment, Element* parentElement)
m_defaultNamespaceURI = parentElement->namespaceURI();
}
+XMLParserContext::~XMLParserContext()
+{
+ if (m_context->myDoc)
+ xmlFreeDoc(m_context->myDoc);
+ xmlFreeParserCtxt(m_context);
+}
+
XMLTokenizer::~XMLTokenizer()
{
clearCurrentNodeStack();
@@ -616,15 +623,16 @@ XMLTokenizer::~XMLTokenizer()
m_doc->deref();
if (m_pendingScript)
m_pendingScript->removeClient(this);
- if (m_context)
- xmlFreeParserCtxt(m_context);
}
void XMLTokenizer::doWrite(const String& parseString)
{
if (!m_context)
initializeParserContext();
-
+
+ // Protect the libxml context from deletion during a callback
+ RefPtr<XMLParserContext> context = m_context;
+
// libXML throws an error if you try to switch the encoding for an empty string.
if (parseString.length()) {
// Hack around libxml2's lack of encoding overide support by manually
@@ -633,15 +641,15 @@ void XMLTokenizer::doWrite(const String& parseString)
// and switch encodings, causing the parse to fail.
const UChar BOM = 0xFEFF;
const unsigned char BOMHighByte = *reinterpret_cast<const unsigned char*>(&BOM);
- xmlSwitchEncoding(m_context, BOMHighByte == 0xFF ? XML_CHAR_ENCODING_UTF16LE : XML_CHAR_ENCODING_UTF16BE);
+ xmlSwitchEncoding(context->context(), BOMHighByte == 0xFF ? XML_CHAR_ENCODING_UTF16LE : XML_CHAR_ENCODING_UTF16BE);
XMLTokenizerScope scope(m_doc->docLoader());
- xmlParseChunk(m_context, reinterpret_cast<const char*>(parseString.characters()), sizeof(UChar) * parseString.length(), 0);
+ xmlParseChunk(context->context(), reinterpret_cast<const char*>(parseString.characters()), sizeof(UChar) * parseString.length(), 0);
}
if (m_doc->decoder() && m_doc->decoder()->sawError()) {
// If the decoder saw an error, report it as fatal (stops parsing)
- handleError(fatal, "Encoding error", lineNumber(), columnNumber());
+ handleError(fatal, "Encoding error", context->context()->input->line, context->context()->input->col);
}
return;
@@ -1277,9 +1285,9 @@ void XMLTokenizer::initializeParserContext(const char* chunk)
XMLTokenizerScope scope(m_doc->docLoader());
if (m_parsingFragment)
- m_context = createMemoryParser(&sax, this, chunk);
+ m_context = XMLParserContext::createMemoryParser(&sax, this, chunk);
else
- m_context = createStringParser(&sax, this);
+ m_context = XMLParserContext::createStringParser(&sax, this);
}
void XMLTokenizer::doEnd()
@@ -1300,12 +1308,9 @@ void XMLTokenizer::doEnd()
// Tell libxml we're done.
{
XMLTokenizerScope scope(m_doc->docLoader());
- xmlParseChunk(m_context, 0, 0, 1);
+ xmlParseChunk(context(), 0, 0, 1);
}
- if (m_context->myDoc)
- xmlFreeDoc(m_context->myDoc);
- xmlFreeParserCtxt(m_context);
m_context = 0;
}
}
@@ -1334,18 +1339,19 @@ void* xmlDocPtrForString(DocLoader* docLoader, const String& source, const Strin
int XMLTokenizer::lineNumber() const
{
- return m_context ? m_context->input->line : 1;
+ return context() ? context()->input->line : 1;
}
int XMLTokenizer::columnNumber() const
{
- return m_context ? m_context->input->col : 1;
+ return context() ? context()->input->col : 1;
}
void XMLTokenizer::stopParsing()
{
Tokenizer::stopParsing();
- xmlStopParser(m_context);
+ if (context())
+ xmlStopParser(context());
}
void XMLTokenizer::resumeParsing()
@@ -1384,17 +1390,17 @@ bool parseXMLDocumentFragment(const String& chunk, DocumentFragment* fragment, E
CString chunkAsUtf8 = chunk.utf8();
tokenizer.initializeParserContext(chunkAsUtf8.data());
- xmlParseContent(tokenizer.m_context);
+ xmlParseContent(tokenizer.context());
tokenizer.endDocument();
// Check if all the chunk has been processed.
- long bytesProcessed = xmlByteConsumed(tokenizer.m_context);
+ long bytesProcessed = xmlByteConsumed(tokenizer.context());
if (bytesProcessed == -1 || ((unsigned long)bytesProcessed) != chunkAsUtf8.length())
return false;
// No error if the chunk is well formed or it is not but we have no error.
- return tokenizer.m_context->wellFormed || xmlCtxtGetLastError(tokenizer.m_context) == 0;
+ return tokenizer.context()->wellFormed || xmlCtxtGetLastError(tokenizer.context()) == 0;
}
// --------------------------------
@@ -1437,12 +1443,9 @@ HashMap<String, String> parseAttributes(const String& string, bool& attrsOK)
memset(&sax, 0, sizeof(sax));
sax.startElementNs = attributesStartElementNsHandler;
sax.initialized = XML_SAX2_MAGIC;
- xmlParserCtxtPtr parser = createStringParser(&sax, &state);
+ RefPtr<XMLParserContext> parser = XMLParserContext::createStringParser(&sax, &state);
String parseString = "<?xml version=\"1.0\"?><attrs " + string + " />";
- xmlParseChunk(parser, reinterpret_cast<const char*>(parseString.characters()), parseString.length() * sizeof(UChar), 1);
- if (parser->myDoc)
- xmlFreeDoc(parser->myDoc);
- xmlFreeParserCtxt(parser);
+ xmlParseChunk(parser->context(), reinterpret_cast<const char*>(parseString.characters()), parseString.length() * sizeof(UChar), 1);
attrsOK = state.gotAttributes;
return state.attributes;
}
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLFormElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLFormElement.cpp
index ace0f2f..a74ff83 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLFormElement.cpp
+++ b/src/3rdparty/webkit/WebCore/html/HTMLFormElement.cpp
@@ -515,11 +515,13 @@ bool HTMLFormElement::isURLAttribute(Attribute* attr) const
void HTMLFormElement::registerImgElement(HTMLImageElement* e)
{
+ ASSERT(imgElements.find(e) == notFound);
imgElements.append(e);
}
void HTMLFormElement::removeImgElement(HTMLImageElement* e)
{
+ ASSERT(imgElements.find(e) != notFound);
removeFromVector(imgElements, e);
}
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLImageElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLImageElement.cpp
index d353073..3db6811 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLImageElement.cpp
+++ b/src/3rdparty/webkit/WebCore/html/HTMLImageElement.cpp
@@ -209,6 +209,30 @@ void HTMLImageElement::removedFromDocument()
HTMLElement::removedFromDocument();
}
+void HTMLImageElement::insertedIntoTree(bool deep)
+{
+ if (!m_form) {
+ // m_form can be non-null if it was set in constructor.
+ for (Node* ancestor = parentNode(); ancestor; ancestor = ancestor->parentNode()) {
+ if (ancestor->hasTagName(formTag)) {
+ m_form = static_cast<HTMLFormElement*>(ancestor);
+ m_form->registerImgElement(this);
+ break;
+ }
+ }
+ }
+
+ HTMLElement::insertedIntoTree(deep);
+}
+
+void HTMLImageElement::removedFromTree(bool deep)
+{
+ if (m_form)
+ m_form->removeImgElement(this);
+ m_form = 0;
+ HTMLElement::removedFromTree(deep);
+}
+
int HTMLImageElement::width(bool ignorePendingStylesheets) const
{
if (!renderer()) {
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLImageElement.h b/src/3rdparty/webkit/WebCore/html/HTMLImageElement.h
index f58574d..14e5fa3 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLImageElement.h
+++ b/src/3rdparty/webkit/WebCore/html/HTMLImageElement.h
@@ -45,8 +45,6 @@ public:
virtual void attach();
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
- virtual void insertedIntoDocument();
- virtual void removedFromDocument();
virtual bool canStartSelection() const { return false; }
@@ -105,6 +103,11 @@ public:
virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const;
private:
+ virtual void insertedIntoDocument();
+ virtual void removedFromDocument();
+ virtual void insertedIntoTree(bool deep);
+ virtual void removedFromTree(bool deep);
+
HTMLImageLoader m_imageLoader;
String usemap;
bool ismap;
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLInputElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLInputElement.cpp
index f25c908..652bc40 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLInputElement.cpp
+++ b/src/3rdparty/webkit/WebCore/html/HTMLInputElement.cpp
@@ -701,12 +701,15 @@ void HTMLInputElement::parseMappedAttribute(MappedAttribute *attr)
m_autocomplete = Off;
registerForActivationCallbackIfNeeded();
} else {
- if (m_autocomplete == Off)
- unregisterForActivationCallbackIfNeeded();
+ bool needsToUnregister = m_autocomplete == Off;
+
if (attr->isEmpty())
m_autocomplete = Uninitialized;
else
m_autocomplete = On;
+
+ if (needsToUnregister)
+ unregisterForActivationCallbackIfNeeded();
}
} else if (attr->name() == typeAttr) {
setInputType(attr->value());
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLParser.cpp b/src/3rdparty/webkit/WebCore/html/HTMLParser.cpp
index 1cb47ae..99c66de 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLParser.cpp
+++ b/src/3rdparty/webkit/WebCore/html/HTMLParser.cpp
@@ -1275,7 +1275,8 @@ void HTMLParser::handleResidualStyleCloseTagAcrossBlocks(HTMLStackElem* elem)
prevMaxElem->next = elem;
ASSERT(newNodePtr);
prevMaxElem->node = newNodePtr;
- prevMaxElem->didRefNode = false;
+ newNodePtr->ref();
+ prevMaxElem->didRefNode = true;
} else
delete elem;
}
diff --git a/src/3rdparty/webkit/WebCore/loader/FrameLoader.cpp b/src/3rdparty/webkit/WebCore/loader/FrameLoader.cpp
index a85dcf5..7d857d4 100644
--- a/src/3rdparty/webkit/WebCore/loader/FrameLoader.cpp
+++ b/src/3rdparty/webkit/WebCore/loader/FrameLoader.cpp
@@ -1260,9 +1260,11 @@ bool FrameLoader::requestObject(RenderPart* renderer, const String& url, const A
ASSERT(renderer->node()->hasTagName(objectTag) || renderer->node()->hasTagName(embedTag));
HTMLPlugInElement* element = static_cast<HTMLPlugInElement*>(renderer->node());
-
- // FIXME: OK to always make a new frame? When does the old frame get removed?
- return loadSubframe(element, completedURL, frameName, m_outgoingReferrer);
+
+ // If the plug-in element already contains a subframe, requestFrame will re-use it. Otherwise,
+ // it will create a new frame and set it as the RenderPart's widget, causing what was previously
+ // in the widget to be torn down.
+ return requestFrame(element, completedURL, frameName);
}
bool FrameLoader::shouldUsePlugin(const KURL& url, const String& mimeType, bool hasFallback, bool& useFallback)
diff --git a/src/3rdparty/webkit/WebCore/platform/MIMETypeRegistry.cpp b/src/3rdparty/webkit/WebCore/platform/MIMETypeRegistry.cpp
index 609a1b0..758863c 100644
--- a/src/3rdparty/webkit/WebCore/platform/MIMETypeRegistry.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/MIMETypeRegistry.cpp
@@ -200,9 +200,7 @@ static void initializeSupportedNonImageMimeTypes()
"text/",
"application/xml",
"application/xhtml+xml",
-#if ENABLE(XHTMLMP)
"application/vnd.wap.xhtml+xml",
-#endif
"application/rss+xml",
"application/atom+xml",
#if ENABLE(SVG)
diff --git a/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp
index 37a6408..298d840 100644
--- a/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp
@@ -126,6 +126,7 @@ PassRefPtr<RenderTheme> RenderTheme::themeForPage(Page* page)
RenderThemeQt::RenderThemeQt(Page* page)
: RenderTheme()
, m_page(page)
+ , m_lineEdit(0)
{
QPushButton button;
button.setAttribute(Qt::WA_MacSmallSize);
@@ -142,6 +143,7 @@ RenderThemeQt::RenderThemeQt(Page* page)
RenderThemeQt::~RenderThemeQt()
{
delete m_fallbackStyle;
+ delete m_lineEdit;
}
// for some widget painting, we need to fallback to Windows style
@@ -207,11 +209,13 @@ bool RenderThemeQt::supportsControlTints() const
return true;
}
-static int findFrameLineWidth(QStyle* style)
+int RenderThemeQt::findFrameLineWidth(QStyle* style) const
{
- QLineEdit lineEdit;
+ if (!m_lineEdit)
+ m_lineEdit = new QLineEdit();
+
QStyleOptionFrameV2 opt;
- return style->pixelMetric(QStyle::PM_DefaultFrameWidth, &opt, &lineEdit);
+ return style->pixelMetric(QStyle::PM_DefaultFrameWidth, &opt, m_lineEdit);
}
static QRect inflateButtonRect(const QRect& originalRect, QStyle* style)
diff --git a/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.h b/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.h
index 13fb42f..64921b1 100644
--- a/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.h
+++ b/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.h
@@ -27,6 +27,7 @@
#include <QStyle>
QT_BEGIN_NAMESPACE
+class QLineEdit;
class QPainter;
class QWidget;
QT_END_NAMESPACE
@@ -140,6 +141,8 @@ private:
void setButtonPadding(RenderStyle*) const;
void setPopupPadding(RenderStyle*) const;
+ int findFrameLineWidth(QStyle* style) const;
+
QStyle* fallbackStyle() const;
Page* m_page;
@@ -150,6 +153,7 @@ private:
QString m_buttonFontFamily;
QStyle* m_fallbackStyle;
+ mutable QLineEdit* m_lineEdit;
};
class StylePainter {
diff --git a/src/3rdparty/webkit/WebCore/plugins/symbian/PluginContainerSymbian.cpp b/src/3rdparty/webkit/WebCore/plugins/symbian/PluginContainerSymbian.cpp
index aece0e4..b839870 100644
--- a/src/3rdparty/webkit/WebCore/plugins/symbian/PluginContainerSymbian.cpp
+++ b/src/3rdparty/webkit/WebCore/plugins/symbian/PluginContainerSymbian.cpp
@@ -32,12 +32,12 @@
using namespace WebCore;
-PluginContainerSymbian::PluginContainerSymbian(PluginView* view, QWidget* parent)
- : m_parent(parent)
+PluginContainerSymbian::PluginContainerSymbian(PluginView* view, QWidget* parent, QGraphicsProxyWidget* proxy)
+ : QWidget(parent)
, m_pluginView(view)
+ , m_proxy(proxy)
, m_hasPendingGeometryChange(false)
{
- setParent(m_parent);
}
PluginContainerSymbian::~PluginContainerSymbian()
@@ -62,7 +62,7 @@ void PluginContainerSymbian::adjustGeometry()
}
}
-void PluginContainerSymbian::focusInEvent(QFocusEvent* event)
+void PluginContainerSymbian::focusInEvent(QFocusEvent*)
{
if (Page* page = m_pluginView->parentFrame()->page())
page->focusController()->setActive(true);
diff --git a/src/3rdparty/webkit/WebCore/plugins/symbian/PluginContainerSymbian.h b/src/3rdparty/webkit/WebCore/plugins/symbian/PluginContainerSymbian.h
index fce4a71..fead872 100644
--- a/src/3rdparty/webkit/WebCore/plugins/symbian/PluginContainerSymbian.h
+++ b/src/3rdparty/webkit/WebCore/plugins/symbian/PluginContainerSymbian.h
@@ -22,6 +22,8 @@
#include <QWidget>
+class QGraphicsProxyWidget;
+
namespace WebCore {
class PluginView;
@@ -29,18 +31,19 @@ namespace WebCore {
class PluginContainerSymbian : public QWidget {
Q_OBJECT
public:
- PluginContainerSymbian(PluginView*, QWidget* parent);
+ PluginContainerSymbian(PluginView*, QWidget* parent, QGraphicsProxyWidget* proxy = 0);
~PluginContainerSymbian();
void requestGeometry(const QRect&, const QRegion& clip = QRegion());
void adjustGeometry();
+ QGraphicsProxyWidget* proxy() { return m_proxy; }
protected:
virtual void focusInEvent(QFocusEvent*);
virtual void focusOutEvent(QFocusEvent*);
private:
PluginView* m_pluginView;
- QWidget* m_parent;
+ QGraphicsProxyWidget* m_proxy;
QRect m_windowRect;
QRegion m_clipRegion;
bool m_hasPendingGeometryChange;
diff --git a/src/3rdparty/webkit/WebCore/plugins/symbian/PluginViewSymbian.cpp b/src/3rdparty/webkit/WebCore/plugins/symbian/PluginViewSymbian.cpp
index fd604a0..9e107cd 100644
--- a/src/3rdparty/webkit/WebCore/plugins/symbian/PluginViewSymbian.cpp
+++ b/src/3rdparty/webkit/WebCore/plugins/symbian/PluginViewSymbian.cpp
@@ -52,6 +52,8 @@
#include "runtime.h"
#include "runtime_root.h"
#include "QWebPageClient.h"
+#include "qgraphicswebview.h"
+#include <QGraphicsProxyWidget>
#include <QKeyEvent>
#include <QPixmap>
#include <QRegion>
@@ -84,6 +86,7 @@ void PluginView::updatePluginWidget()
IntRect oldClipRect = m_clipRect;
m_windowRect = IntRect(frameView->contentsToWindow(frameRect().location()), frameRect().size());
+
m_clipRect = windowClipRect();
m_clipRect.move(-m_windowRect.x(), -m_windowRect.y());
if (m_windowRect == oldWindowRect && m_clipRect == oldClipRect)
@@ -425,12 +428,15 @@ bool PluginView::platformStart()
if (m_isWindowed) {
QWebPageClient* client = m_parentFrame->view()->hostWindow()->platformPageClient();
- // FIXME this will not work for QGraphicsView.
- // But we cannot use winId because it will create a window and on S60,
- // QWidgets should not create a window.
- Q_ASSERT(qobject_cast<QWidget*>(client->pluginParent()));
- setPlatformWidget(new PluginContainerSymbian(this,
- qobject_cast<QWidget*>(client->pluginParent())));
+ QGraphicsProxyWidget* proxy = 0;
+ if (QGraphicsWebView *webView = qobject_cast<QGraphicsWebView*>(client->pluginParent()))
+ proxy = new QGraphicsProxyWidget(webView);
+
+ PluginContainerSymbian* container = new PluginContainerSymbian(this, proxy ? 0 : client->ownerWidget(), proxy);
+ setPlatformWidget(container);
+ if (proxy)
+ proxy->setWidget(container);
+
m_npWindow.type = NPWindowTypeWindow;
m_npWindow.window = (void*)platformPluginWidget();
@@ -446,7 +452,11 @@ bool PluginView::platformStart()
void PluginView::platformDestroy()
{
- delete platformPluginWidget();
+ QWebPageClient* client = m_parentFrame->view()->hostWindow()->platformPageClient();
+ if (QGraphicsWebView *webView = qobject_cast<QGraphicsWebView*>(client->pluginParent()))
+ delete static_cast<PluginContainerSymbian*>(platformPluginWidget())->proxy();
+ else
+ delete platformPluginWidget();
}
void PluginView::halt()
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderText.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderText.cpp
index 40c3d75..88a05e5 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderText.cpp
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderText.cpp
@@ -1047,8 +1047,15 @@ void RenderText::positionLineBox(InlineBox* box)
if (!s->len()) {
// We want the box to be destroyed.
s->remove();
+ if (m_firstTextBox == s)
+ m_firstTextBox = s->nextTextBox();
+ else
+ s->prevTextBox()->setNextLineBox(s->nextTextBox());
+ if (m_lastTextBox == s)
+ m_lastTextBox = s->prevTextBox();
+ else
+ s->nextTextBox()->setPreviousLineBox(s->prevTextBox());
s->destroy(renderArena());
- m_firstTextBox = m_lastTextBox = 0;
return;
}
@@ -1349,7 +1356,7 @@ void RenderText::checkConsistency() const
#ifdef CHECK_CONSISTENCY
const InlineTextBox* prev = 0;
for (const InlineTextBox* child = m_firstTextBox; child != 0; child = child->nextTextBox()) {
- ASSERT(child->object() == this);
+ ASSERT(child->renderer() == this);
ASSERT(child->prevTextBox() == prev);
prev = child;
}
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp
index a80c5d3..490ada1 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp
@@ -65,6 +65,7 @@ public:
void _q_doLoadFinished(bool success);
void _q_updateMicroFocus();
+ void _q_pageDestroyed();
QGraphicsWebView* q;
QWebPage* page;
@@ -97,6 +98,12 @@ void QGraphicsWebViewPrivate::_q_updateMicroFocus()
#endif
}
+void QGraphicsWebViewPrivate::_q_pageDestroyed()
+{
+ page = 0;
+ q->setPage(0);
+}
+
void QGraphicsWebViewPrivate::scroll(int dx, int dy, const QRect& rectToScroll)
{
q->scroll(qreal(dx), qreal(dy), QRectF(rectToScroll));
@@ -454,6 +461,8 @@ void QGraphicsWebView::setPage(QWebPage* page)
this, SIGNAL(linkClicked(QUrl)));
connect(d->page, SIGNAL(microFocusChanged()),
this, SLOT(_q_updateMicroFocus()));
+ connect(d->page, SIGNAL(destroyed()),
+ this, SLOT(_q_pageDestroyed()));
}
/*!
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.h b/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.h
index f983ae4..1b02f35 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.h
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.h
@@ -135,6 +135,7 @@ protected:
private:
Q_PRIVATE_SLOT(d, void _q_doLoadFinished(bool success))
Q_PRIVATE_SLOT(d, void _q_updateMicroFocus())
+ Q_PRIVATE_SLOT(d, void _q_pageDestroyed())
QGraphicsWebViewPrivate* const d;
friend class QGraphicsWebViewPrivate;
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp
index e4c2afc..710e11b 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp
@@ -324,15 +324,12 @@ void QWebFramePrivate::renderPrivate(QPainter *painter, QWebFrame::RenderLayer l
}
}
-static bool webframe_scrollOverflow(WebCore::Frame* frame, int dx, int dy)
+static bool webframe_scrollOverflow(WebCore::Frame* frame, int dx, int dy, const QPoint& pos)
{
if (!frame || !frame->document() || !frame->eventHandler())
return false;
- Node* node = frame->document()->focusedNode();
- if (!node)
- node = frame->document()->elementFromPoint(frame->eventHandler()->currentMousePosition().x(),
- frame->eventHandler()->currentMousePosition().y());
+ Node* node = frame->document()->elementFromPoint(pos.x(), pos.y());
if (!node)
return false;
@@ -363,6 +360,10 @@ static bool webframe_scrollOverflow(WebCore::Frame* frame, int dx, int dy)
return (scrolledHorizontal || scrolledVertical);
}
+
+
+
+
/*!
\class QWebFrame
\since 4.4
@@ -1047,27 +1048,24 @@ void QWebFrame::scroll(int dx, int dy)
}
/*!
- \since 4.7
\internal
Scrolls nested frames starting at this frame, \a dx pixels to the right
and \a dy pixels downward. Both \a dx and \a dy may be negative. First attempts
- to scroll elements with CSS overflow followed by this frame. If this
+ to scroll elements with CSS overflow at position pos, followed by this frame. If this
frame doesn't scroll, attempts to scroll the parent
-
- \sa QWebFrame::scroll
*/
-bool QWEBKIT_EXPORT qtwebkit_webframe_scrollRecursively(QWebFrame* qFrame, int dx, int dy)
+void QWEBKIT_EXPORT qtwebkit_webframe_scrollRecursively(QWebFrame* qFrame, int dx, int dy, const QPoint& pos)
{
Frame* frame = QWebFramePrivate::core(qFrame);
- bool scrolledHorizontal = false;
- bool scrolledVertical = false;
- bool scrolledOverflow = webframe_scrollOverflow(frame, dx, dy);
-
- if (!scrolledOverflow) {
- if (!frame || !frame->view())
- return false;
+ if (!frame || !frame->view())
+ return;
+
+ if (!webframe_scrollOverflow(frame, dx, dy, pos)) {
do {
+ bool scrolledHorizontal = false;
+ bool scrolledVertical = false;
+
IntSize scrollOffset = frame->view()->scrollOffset();
IntPoint maxScrollOffset = frame->view()->maximumScrollPosition();
@@ -1083,12 +1081,12 @@ bool QWEBKIT_EXPORT qtwebkit_webframe_scrollRecursively(QWebFrame* qFrame, int d
if (scrolledHorizontal || scrolledVertical) {
frame->view()->scrollBy(IntSize(dx, dy));
- return true;
+ return;
}
+
frame = frame->tree()->parent();
} while (frame && frame->view());
}
- return (scrolledHorizontal || scrolledVertical || scrolledOverflow);
}
/*!
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
index a289ec0..97a4e4e 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
@@ -1248,8 +1248,8 @@ void QWebPagePrivate::inputMethodEvent(QInputMethodEvent *ev)
#if QT_VERSION >= 0x040600
case QInputMethodEvent::Selection: {
if (renderTextControl) {
- renderTextControl->setSelectionStart(a.start);
- renderTextControl->setSelectionEnd(a.start + a.length);
+ renderTextControl->setSelectionStart(qMin(a.start, (a.start + a.length)));
+ renderTextControl->setSelectionEnd(qMax(a.start, (a.start + a.length)));
}
break;
}
diff --git a/src/3rdparty/webkit/WebKit/qt/ChangeLog b/src/3rdparty/webkit/WebKit/qt/ChangeLog
index a5441cd..64726c2 100644
--- a/src/3rdparty/webkit/WebKit/qt/ChangeLog
+++ b/src/3rdparty/webkit/WebKit/qt/ChangeLog
@@ -1,3 +1,87 @@
+2010-03-22 Jakub Wieczorek <jwieczorek@webkit.org>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Don't construct a QLineEdit every time when painting a text field
+ https://bugs.webkit.org/show_bug.cgi?id=36373
+
+ Add a simple benchmark covering this area.
+
+ * tests/benchmarks/painting/tst_painting.cpp:
+ (tst_Painting::textAreas):
+
+2010-03-22 Yi Shen <shenyi2006@gmail.com>
+
+ Reviewed by Simon Hausmann.
+
+ https://bugs.webkit.org/show_bug.cgi?id=35933
+ [Qt] [Symbian] Can not backward select (highlight) text using virtual keyboard
+ Make sure the selection start index is smaller than the selection end index.
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::inputMethodEvent):
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (tst_QWebPage::inputMethods):
+
+2010-03-25 Yael Aharon <yael.aharon@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] QtLauncher crashes on Mac OS and Linux when exiting with QGraphicsView mode enabled
+ https://bugs.webkit.org/show_bug.cgi?id=35251
+
+ Followed the way QWebView registers for the signal QWebPage::destroyed(), to prevent
+ QGraphicsWebView from referencing QWebPage after it was deleted.
+
+ * Api/qgraphicswebview.cpp:
+ (QGraphicsWebViewPrivate::_q_pageDestroyed):
+ (QGraphicsWebView::setPage):
+ * Api/qgraphicswebview.h:
+
+2010-03-23 David Leong <david.leong@nokia.com>
+
+ Reviewed by Laszlo Gombos.
+
+ Build fix for Symbian Def file.
+
+ * symbian/eabi/QtWebKitu.def:
+
+2010-03-18 Joe Ligman <joseph.ligman@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] New API scrollRecursively has several problems.
+ https://bugs.webkit.org/show_bug.cgi?id=35873
+
+ Remove scrollRecursively from the Qt 4.7 API
+ Update the internal API to accept a hit test position
+ for nested scrolling
+
+ * Api/qwebframe.cpp:
+ (webframe_scrollOverflow):
+ (qtwebkit_webframe_scrollRecursively):
+ * Api/qwebframe.h:
+ * Api/qwebframe_p.h:
+ * tests/qwebframe/tst_qwebframe.cpp:
+
+2009-12-18 Joe Ligman <joseph.ligman@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Add new API to QWebFrame to scrollRecursively starting with any css overflow
+ then checking current frame and then ancestors
+ https://bugs.webkit.org/show_bug.cgi?id=32668
+
+ * Api/qwebframe.cpp:
+ (QWebFramePrivate::scrollOverflow):
+ (QWebFrame::scrollRecursively):
+ * Api/qwebframe.h:
+ * Api/qwebframe_p.h:
+ * tests/qwebframe/qwebframe.qrc:
+ * tests/qwebframe/testiframe.html: Added.
+ * tests/qwebframe/testiframe2.html: Added.
+ * tests/qwebframe/tst_qwebframe.cpp:
+
2010-03-21 Kristian Amlie <kristian.amlie@nokia.com>
Reviewed by Simon Hausmann.
diff --git a/src/3rdparty/webkit/WebKit/qt/symbian/eabi/QtWebKitu.def b/src/3rdparty/webkit/WebKit/qt/symbian/eabi/QtWebKitu.def
index 5dd2e20..cfa8f7f 100644
--- a/src/3rdparty/webkit/WebKit/qt/symbian/eabi/QtWebKitu.def
+++ b/src/3rdparty/webkit/WebKit/qt/symbian/eabi/QtWebKitu.def
@@ -693,5 +693,5 @@ EXPORTS
_Z23qt_networkAccessAllowedb @ 692 NONAME
_Z25qt_resumeActiveDOMObjectsP9QWebFrame @ 693 NONAME
_Z26qt_suspendActiveDOMObjectsP9QWebFrame @ 694 NONAME
- _Z35qtwebkit_webframe_scrollRecursivelyP9QWebFrameii @ 695 NONAME
-
+ _Z35qtwebkit_webframe_scrollRecursivelyP9QWebFrameii @ 695 NONAME ABSENT
+ _Z35qtwebkit_webframe_scrollRecursivelyP9QWebFrameiiRK6QPoint @ 715 NONAME
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/benchmarks/painting/tst_painting.cpp b/src/3rdparty/webkit/WebKit/qt/tests/benchmarks/painting/tst_painting.cpp
index f4531fd..fc5b8e3 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/benchmarks/painting/tst_painting.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/tests/benchmarks/painting/tst_painting.cpp
@@ -19,6 +19,7 @@
#include <QtTest/QtTest>
+#include <qwebelement.h>
#include <qwebframe.h>
#include <qwebview.h>
#include <qpainter.h>
@@ -59,6 +60,7 @@ public Q_SLOTS:
private Q_SLOTS:
void paint_data();
void paint();
+ void textAreas();
private:
QWebView* m_view;
@@ -105,5 +107,30 @@ void tst_Painting::paint()
}
}
+void tst_Painting::textAreas()
+{
+ m_view->load(QUrl("data:text/html;<html><body></body></html>"));
+ ::waitForSignal(m_view, SIGNAL(loadFinished(bool)));
+
+ QWebElement bodyElement = m_page->mainFrame()->findFirstElement("body");
+
+ int count = 100;
+ while (count--) {
+ QString markup("<textarea cols='1' rows='1'></textarea>");
+ bodyElement.appendInside(markup);
+ }
+
+ /* force a layout */
+ QWebFrame* mainFrame = m_page->mainFrame();
+ mainFrame->toPlainText();
+
+ QPixmap pixmap(mainFrame->contentsSize());
+ QBENCHMARK {
+ QPainter painter(&pixmap);
+ mainFrame->render(&painter, QRect(QPoint(0, 0), mainFrame->contentsSize()));
+ painter.end();
+ }
+}
+
QTEST_MAIN(tst_Painting)
#include "tst_painting.moc"
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp b/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
index 609f8b4..8cc7953 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
@@ -606,7 +606,6 @@ private slots:
void scrollPosition();
void evaluateWillCauseRepaint();
void qObjectWrapperWithSameIdentity();
- void scrollRecursively();
private:
QString evalJS(const QString&s) {
@@ -2825,71 +2824,5 @@ void tst_QWebFrame::qObjectWrapperWithSameIdentity()
QCOMPARE(mainFrame->toPlainText(), QString("test2"));
}
-bool QWEBKIT_EXPORT qtwebkit_webframe_scrollRecursively(QWebFrame* qFrame, int dx, int dy);
-
-void tst_QWebFrame::scrollRecursively()
-{
- // The test content is
- // a nested frame set
- // The main frame scrolls
- // and has two children
- // an iframe and a div overflow
- // both scroll
- QWebView webView;
- QWebPage* webPage = webView.page();
- QSignalSpy loadSpy(webPage, SIGNAL(loadFinished(bool)));
- QUrl url = QUrl("qrc:///testiframe.html");
- webPage->mainFrame()->load(url);
- QTRY_COMPARE(loadSpy.count(), 1);
-
- QList<QWebFrame*> children = webPage->mainFrame()->childFrames();
- QVERIFY(children.count() == 1);
-
- // 1st test
- // call scrollRecursively over mainframe
- // verify scrolled
- // verify scroll postion changed
- QPoint scrollPosition(webPage->mainFrame()->scrollPosition());
- QVERIFY(qtwebkit_webframe_scrollRecursively(webPage->mainFrame(), 10, 10));
- QVERIFY(scrollPosition != webPage->mainFrame()->scrollPosition());
-
- // 2nd test
- // call scrollRecursively over child iframe
- // verify scrolled
- // verify child scroll position changed
- // verify parent's scroll position did not change
- scrollPosition = webPage->mainFrame()->scrollPosition();
- QPoint childScrollPosition = children.at(0)->scrollPosition();
- QVERIFY(qtwebkit_webframe_scrollRecursively(children.at(0), 10, 10));
- QVERIFY(scrollPosition == webPage->mainFrame()->scrollPosition());
- QVERIFY(childScrollPosition != children.at(0)->scrollPosition());
-
- // 3rd test
- // call scrollRecursively over div overflow
- // verify scrolled == true
- // verify parent and child frame's scroll postion did not change
- QWebElement div = webPage->mainFrame()->documentElement().findFirst("#content1");
- QMouseEvent evpres(QEvent::MouseMove, div.geometry().center(), Qt::NoButton, Qt::NoButton, Qt::NoModifier);
- webPage->event(&evpres);
- scrollPosition = webPage->mainFrame()->scrollPosition();
- childScrollPosition = children.at(0)->scrollPosition();
- QVERIFY(qtwebkit_webframe_scrollRecursively(webPage->mainFrame(), 5, 5));
- QVERIFY(childScrollPosition == children.at(0)->scrollPosition());
- QVERIFY(scrollPosition == webPage->mainFrame()->scrollPosition());
-
- // 4th test
- // call scrollRecursively twice over childs iframe
- // verify scrolled == true first time
- // verify parent's scroll == true second time
- // verify parent and childs scroll position changed
- childScrollPosition = children.at(0)->scrollPosition();
- QVERIFY(qtwebkit_webframe_scrollRecursively(children.at(0), -10, -10));
- QVERIFY(childScrollPosition != children.at(0)->scrollPosition());
- scrollPosition = webPage->mainFrame()->scrollPosition();
- QVERIFY(qtwebkit_webframe_scrollRecursively(children.at(0), -10, -10));
- QVERIFY(scrollPosition != webPage->mainFrame()->scrollPosition());
-
-}
-
QTEST_MAIN(tst_QWebFrame)
#include "tst_qwebframe.moc"
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
index 0e04acc..55ee42a 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
@@ -1451,6 +1451,26 @@ void tst_QWebPage::inputMethods()
variant = page->inputMethodQuery(Qt::ImCurrentSelection);
QString selectionValue = variant.value<QString>();
QCOMPARE(selectionValue, QString("eb"));
+
+ //Set selection with negative length
+ inputAttributes << QInputMethodEvent::Attribute(QInputMethodEvent::Selection, 6, -5, QVariant());
+ QInputMethodEvent eventSelection2("",inputAttributes);
+ page->event(&eventSelection2);
+
+ //ImAnchorPosition
+ variant = page->inputMethodQuery(Qt::ImAnchorPosition);
+ anchorPosition = variant.toInt();
+ QCOMPARE(anchorPosition, 1);
+
+ //ImCursorPosition
+ variant = page->inputMethodQuery(Qt::ImCursorPosition);
+ cursorPosition = variant.toInt();
+ QCOMPARE(cursorPosition, 6);
+
+ //ImCurrentSelection
+ variant = page->inputMethodQuery(Qt::ImCurrentSelection);
+ selectionValue = variant.value<QString>();
+ QCOMPARE(selectionValue, QString("tWebK"));
#endif
//ImSurroundingText
diff --git a/src/corelib/kernel/qeventdispatcher_symbian.cpp b/src/corelib/kernel/qeventdispatcher_symbian.cpp
index 191be6c..ca44264 100644
--- a/src/corelib/kernel/qeventdispatcher_symbian.cpp
+++ b/src/corelib/kernel/qeventdispatcher_symbian.cpp
@@ -50,6 +50,13 @@
QT_BEGIN_NAMESPACE
+#ifdef SYMBIAN_GRAPHICS_WSERV_QT_EFFECTS
+// when the system UI is Qt based, priority drop is not needed as CPU starved processes will not be killed.
+#undef QT_SYMBIAN_PRIORITY_DROP
+#else
+#define QT_SYMBIAN_PRIORITY_DROP
+#endif
+
#define WAKE_UP_PRIORITY CActive::EPriorityStandard
#define TIMER_PRIORITY CActive::EPriorityHigh
#define NULLTIMER_PRIORITY CActive::EPriorityLow
@@ -697,6 +704,7 @@ bool QEventDispatcherSymbian::processEvents ( QEventLoop::ProcessEventsFlags fla
bool handledSymbianEvent = false;
m_interrupt = false;
+#ifdef QT_SYMBIAN_PRIORITY_DROP
/*
* This QTime variable is used to measure the time it takes to finish
* the event loop. If we take too long in the loop, other processes
@@ -714,6 +722,7 @@ bool QEventDispatcherSymbian::processEvents ( QEventLoop::ProcessEventsFlags fla
} timeState = FirstRun;
TProcessPriority priority;
+#endif
while (1) {
if (block) {
@@ -727,10 +736,12 @@ bool QEventDispatcherSymbian::processEvents ( QEventLoop::ProcessEventsFlags fla
CActiveScheduler::Current()->WaitForAnyRequest();
}
+#ifdef QT_SYMBIAN_PRIORITY_DROP
if (timeState == SubsequentRun) {
time.start();
timeState = TimeStarted;
}
+#endif
TInt error;
handledSymbianEvent = CActiveScheduler::RunIfReady(error, KMinTInt);
@@ -747,6 +758,7 @@ bool QEventDispatcherSymbian::processEvents ( QEventLoop::ProcessEventsFlags fla
break;
}
block = false;
+#ifdef QT_SYMBIAN_PRIORITY_DROP
if (timeState == TimeStarted && time.elapsed() > 100) {
priority = m_processHandle.Priority();
m_processHandle.SetPriority(EPriorityBackground);
@@ -759,6 +771,7 @@ bool QEventDispatcherSymbian::processEvents ( QEventLoop::ProcessEventsFlags fla
}
if (timeState == FirstRun)
timeState = SubsequentRun;
+#endif
};
emit awake();
diff --git a/src/corelib/tools/qchar.cpp b/src/corelib/tools/qchar.cpp
index 2bc5347..67ea00d 100644
--- a/src/corelib/tools/qchar.cpp
+++ b/src/corelib/tools/qchar.cpp
@@ -380,8 +380,12 @@ QT_BEGIN_NAMESPACE
\value Null A QChar with this value isNull().
\value Nbsp Non-breaking space.
- \value ReplacementCharacter
- \value ObjectReplacementCharacter The character shown when a font has no glyph for a certain codepoint. The square character is normally used.
+ \value ReplacementCharacter The character shown when a font has no glyph
+ for a certain codepoint. A special question mark character is often
+ used. Codecs use this codepoint when input data cannot be
+ represented in Unicode.
+ \value ObjectReplacementCharacter Used to represent an object such as an
+ image when such objects cannot be presented.
\value ByteOrderMark
\value ByteOrderSwapped
\value ParagraphSeparator
diff --git a/src/declarative/graphicsitems/qdeclarativemousearea.cpp b/src/declarative/graphicsitems/qdeclarativemousearea.cpp
index dde3366..6126a6f 100644
--- a/src/declarative/graphicsitems/qdeclarativemousearea.cpp
+++ b/src/declarative/graphicsitems/qdeclarativemousearea.cpp
@@ -640,6 +640,7 @@ bool QDeclarativeMouseArea::setPressed(bool p)
QDeclarativeMouseEvent me(d->lastPos.x(), d->lastPos.y(), d->lastButton, d->lastButtons, d->lastModifiers, isclick, d->longPress);
if (d->pressed) {
emit pressed(&me);
+ emit positionChanged(&me);
} else {
emit released(&me);
if (isclick)
diff --git a/src/gui/dialogs/qmessagebox.cpp b/src/gui/dialogs/qmessagebox.cpp
index df8b525..fe25b0f 100644
--- a/src/gui/dialogs/qmessagebox.cpp
+++ b/src/gui/dialogs/qmessagebox.cpp
@@ -65,6 +65,10 @@
#include <QtGui/qfontmetrics.h>
#include <QtGui/qclipboard.h>
+#ifndef QT_NO_STYLE_S60
+#include <qs60style.h>
+#endif
+
#ifdef Q_WS_WINCE
extern bool qt_wince_is_mobile(); //defined in qguifunctions_wince.cpp
extern bool qt_wince_is_smartphone();//defined in qguifunctions_wince.cpp
@@ -383,6 +387,16 @@ void QMessageBoxPrivate::updateSize()
int height = (layout->hasHeightForWidth())
? layout->totalHeightForWidth(width)
: layout->totalMinimumSize().height();
+
+#ifndef QT_NO_STYLE_S60
+ QS60Style *s60Style = 0;
+ s60Style = qobject_cast<QS60Style *>(QApplication::style());
+
+ //use custom pixel metric to deduce the minimum height of the messagebox
+ if (s60Style)
+ height = qMax(height, s60Style->pixelMetric((QStyle::PixelMetric)PM_MessageBoxHeight));
+#endif
+
q->setFixedSize(width, height);
QCoreApplication::removePostedEvents(q, QEvent::LayoutRequest);
}
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index 36203de..e5471b0 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -1884,7 +1884,8 @@ void QGraphicsItem::setCacheMode(CacheMode mode, const QSize &logicalCacheSize)
d_ptr->cacheMode = mode;
bool noVisualChange = (mode == NoCache && lastMode == NoCache)
|| (mode == NoCache && lastMode == DeviceCoordinateCache)
- || (mode == DeviceCoordinateCache && lastMode == NoCache);
+ || (mode == DeviceCoordinateCache && lastMode == NoCache)
+ || (mode == DeviceCoordinateCache && lastMode == DeviceCoordinateCache);
if (mode == NoCache) {
d_ptr->removeExtraItemCache();
} else {
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp
index 29a4be8..4b612f4 100644
--- a/src/gui/graphicsview/qgraphicsscene.cpp
+++ b/src/gui/graphicsview/qgraphicsscene.cpp
@@ -4301,12 +4301,7 @@ static void _q_paintIntoCache(QPixmap *pix, QGraphicsItem *item, const QRegion &
if (!subPix.isNull()) {
// Blit the subpixmap into the main pixmap.
pixmapPainter.begin(pix);
- if (item->cacheMode() == QGraphicsItem::DeviceCoordinateCache
- && itemToPixmap.type() > QTransform::TxTranslate) {
- pixmapPainter.setCompositionMode(QPainter::CompositionMode_SourceAtop);
- } else {
- pixmapPainter.setCompositionMode(QPainter::CompositionMode_Source);
- }
+ pixmapPainter.setCompositionMode(QPainter::CompositionMode_Source);
pixmapPainter.setClipRegion(pixmapExposed);
pixmapPainter.drawPixmap(br.topLeft(), subPix);
pixmapPainter.end();
@@ -4472,6 +4467,8 @@ void QGraphicsScenePrivate::drawItemHelper(QGraphicsItem *item, QPainter *painte
}
// Create or reuse offscreen pixmap, possibly scroll/blit from the old one.
+ // If the world transform is rotated we always recreate the cache to avoid
+ // wrong blending.
bool pixModified = false;
QGraphicsItemCache::DeviceData *deviceData = &itemCache->deviceData[widget];
bool invertable = true;
@@ -4479,7 +4476,9 @@ void QGraphicsScenePrivate::drawItemHelper(QGraphicsItem *item, QPainter *painte
if (invertable)
diff *= painter->worldTransform();
deviceData->lastTransform = painter->worldTransform();
- if (!invertable || diff.type() > QTransform::TxTranslate) {
+ if (!invertable
+ || diff.type() > QTransform::TxTranslate
+ || painter->worldTransform().type() > QTransform::TxScale) {
pixModified = true;
itemCache->allExposed = true;
itemCache->exposed.clear();
diff --git a/src/gui/graphicsview/qgraphicswidget.cpp b/src/gui/graphicsview/qgraphicswidget.cpp
index a94e103..c5ec01c 100644
--- a/src/gui/graphicsview/qgraphicswidget.cpp
+++ b/src/gui/graphicsview/qgraphicswidget.cpp
@@ -342,7 +342,7 @@ void QGraphicsWidget::resize(const QSizeF &size)
A side effect of calling this function is that the widget will receive
a move event and a resize event. Also, if the widget has a layout
assigned, the layout will activate.
-
+
\sa geometry(), resize()
*/
void QGraphicsWidget::setGeometry(const QRectF &rect)
@@ -580,7 +580,7 @@ void QGraphicsWidget::getWindowFrameMargins(qreal *left, qreal *top, qreal *righ
void QGraphicsWidget::unsetWindowFrameMargins()
{
Q_D(QGraphicsWidget);
- if ((d->windowFlags & Qt::Window) && (d->windowFlags & Qt::WindowType_Mask) != Qt::Popup &&
+ if ((d->windowFlags & Qt::Window) && (d->windowFlags & Qt::WindowType_Mask) != Qt::Popup &&
(d->windowFlags & Qt::WindowType_Mask) != Qt::ToolTip && !(d->windowFlags & Qt::FramelessWindowHint)) {
QStyleOptionTitleBar bar;
d->initStyleOptionTitleBar(&bar);
@@ -1187,7 +1187,7 @@ bool QGraphicsWidget::sceneEvent(QEvent *event)
Returns true if \a event has been recognized and processed; otherwise,
returns false.
-
+
\sa event()
*/
bool QGraphicsWidget::windowFrameEvent(QEvent *event)
@@ -1244,7 +1244,7 @@ Qt::WindowFrameSection QGraphicsWidget::windowFrameSectionAt(const QPointF &pos)
const QRectF r = windowFrameRect();
if (!r.contains(pos))
return Qt::NoSection;
-
+
const qreal left = r.left();
const qreal top = r.top();
const qreal right = r.right();
@@ -2371,6 +2371,4 @@ void QGraphicsWidget::dumpFocusChain()
QT_END_NAMESPACE
-#include "moc_qgraphicswidget.cpp"
-
#endif //QT_NO_GRAPHICSVIEW
diff --git a/src/gui/inputmethod/inputmethod.pri b/src/gui/inputmethod/inputmethod.pri
index 6d9f748..02e3e57 100644
--- a/src/gui/inputmethod/inputmethod.pri
+++ b/src/gui/inputmethod/inputmethod.pri
@@ -26,6 +26,6 @@ mac:!embedded {
symbian:contains(QT_CONFIG, s60) {
HEADERS += inputmethod/qcoefepinputcontext_p.h
SOURCES += inputmethod/qcoefepinputcontext_s60.cpp
- LIBS += -lfepbase
+ LIBS += -lfepbase -lakninputlanguage
}
diff --git a/src/gui/inputmethod/qinputcontextfactory.cpp b/src/gui/inputmethod/qinputcontextfactory.cpp
index 501a36e..d47e343 100644
--- a/src/gui/inputmethod/qinputcontextfactory.cpp
+++ b/src/gui/inputmethod/qinputcontextfactory.cpp
@@ -73,6 +73,7 @@
#endif
#ifdef Q_WS_S60
#include "qcoefepinputcontext_p.h"
+#include "akninputlanguageinfo.h"
#endif
#include "private/qfactoryloader_p.h"
@@ -198,6 +199,42 @@ QStringList QInputContextFactory::keys()
return result;
}
+#if defined(Q_WS_S60)
+/*!
+ \internal
+
+ This function contains pure Symbian exception handling code for
+ getting S60 language list.
+ Returned object ownership is transfered to caller.
+*/
+static CAknInputLanguageList* s60LangListL()
+{
+ CAknInputLanguageInfo *langInfo = AknInputLanguageInfoFactory::CreateInputLanguageInfoL();
+ CleanupStack::PushL(langInfo);
+ // In rare phone there is more than 7 languages installed -> use 7 as an array granularity
+ CAknInputLanguageList *langList = new (ELeave) CAknInputLanguageList(7);
+ CleanupStack::PushL(langList);
+ langInfo->AppendAvailableLanguagesL(langList);
+ CleanupStack::Pop(langList);
+ CleanupStack::PopAndDestroy(langInfo);
+ return langList;
+}
+
+/*!
+ \internal
+
+ This function utility function return S60 language list.
+ Returned object ownership is transfered to caller.
+*/
+static CAknInputLanguageList* s60LangList()
+{
+ CAknInputLanguageList *langList = NULL;
+ TRAP_IGNORE(langList = s60LangListL());
+ q_check_ptr(langList);
+ return langList;
+}
+#endif
+
/*!
Returns the languages supported by the QInputContext object
specified by \a key.
@@ -229,7 +266,15 @@ QStringList QInputContextFactory::languages( const QString &key )
#endif
#if defined(Q_WS_S60)
if (key == QLatin1String("coefep"))
- return QStringList(QString());
+ {
+ CAknInputLanguageList *langList = s60LangList();
+ int count = langList->Count();
+ for (int i = 0; i < count; ++i)
+ {
+ result.append(QString(qt_symbianLocaleName(langList->At(i)->LanguageCode())));
+ }
+ delete langList;
+ }
#endif
#if defined(QT_NO_LIBRARY) || defined(QT_NO_SETTINGS)
Q_UNUSED(key);
diff --git a/src/gui/kernel/qwidget_p.h b/src/gui/kernel/qwidget_p.h
index ef7ac1f..89ea256 100644
--- a/src/gui/kernel/qwidget_p.h
+++ b/src/gui/kernel/qwidget_p.h
@@ -234,6 +234,15 @@ struct QWExtra {
uint activated : 1; // RWindowBase::Activated has been called
/**
+ * If this bit is set, each native widget receives the signals from the
+ * Symbian control immediately before and immediately after draw ops are
+ * sent to the window server for this control:
+ * void beginNativePaintEvent(const QRect &paintRect);
+ * void endNativePaintEvent(const QRect &paintRect);
+ */
+ uint receiveNativePaintEvents : 1;
+
+ /**
* Defines the behaviour of QSymbianControl::Draw.
*/
enum NativePaintMode {
@@ -258,16 +267,7 @@ struct QWExtra {
Default = Blit
};
- NativePaintMode nativePaintMode : 2;
-
- /**
- * If this bit is set, each native widget receives the signals from the
- * Symbian control immediately before and immediately after draw ops are
- * sent to the window server for this control:
- * void beginNativePaintEvent(const QRect &paintRect);
- * void endNativePaintEvent(const QRect &paintRect);
- */
- uint receiveNativePaintEvents : 1;
+ NativePaintMode nativePaintMode;
#endif
};
diff --git a/src/gui/styles/qgtkstyle.cpp b/src/gui/styles/qgtkstyle.cpp
index bd87ca4..9c61023 100644
--- a/src/gui/styles/qgtkstyle.cpp
+++ b/src/gui/styles/qgtkstyle.cpp
@@ -3423,6 +3423,9 @@ QRect QGtkStyle::subElementRect(SubElement element, const QStyleOption *option,
Q_D(const QGtkStyle);
QRect r = QCleanlooksStyle::subElementRect(element, option, widget);
+ if (!d->isThemeAvailable())
+ return r;
+
switch (element) {
case SE_ProgressBarLabel:
case SE_ProgressBarContents:
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp
index af37e6e..000696c 100644
--- a/src/gui/styles/qs60style.cpp
+++ b/src/gui/styles/qs60style.cpp
@@ -50,6 +50,7 @@
#include "qcalendarwidget.h"
#include "qdial.h"
#include "qdialog.h"
+#include "qmessagebox.h"
#include "qgroupbox.h"
#include "qheaderview.h"
#include "qlist.h"
@@ -91,10 +92,10 @@ static const qreal goldenRatio = 1.618;
const layoutHeader QS60StylePrivate::m_layoutHeaders[] = {
// *** generated layout data ***
-{240,320,1,16,"QVGA Landscape"},
-{320,240,1,16,"QVGA Portrait"},
-{360,640,1,16,"NHD Landscape"},
-{640,360,1,16,"NHD Portrait"},
+{240,320,1,17,"QVGA Landscape"},
+{320,240,1,17,"QVGA Portrait"},
+{360,640,1,17,"NHD Landscape"},
+{640,360,1,17,"NHD Portrait"},
{352,800,1,12,"E90 Landscape"}
// *** End of generated data ***
};
@@ -103,11 +104,11 @@ const int QS60StylePrivate::m_numberOfLayouts =
const short QS60StylePrivate::data[][MAX_PIXELMETRICS] = {
// *** generated pixel metrics ***
-{5,0,-909,0,0,2,0,0,-1,7,12,19,13,13,6,200,-909,-909,-909,20,13,2,0,0,21,7,18,0,3,3,1,-909,-909,0,1,0,0,12,20,15,15,18,18,1,115,18,0,-909,-909,-909,-909,0,0,16,2,-909,0,0,-909,16,-909,-909,-909,-909,32,18,55,24,55,4,4,4,9,13,-909,5,51,11,5,0,3,3,6,8,3,3,-909,2,-909,-909,-909,-909,5,5,3,1},
-{5,0,-909,0,0,1,0,0,-1,8,14,22,15,15,7,164,-909,-909,-909,19,15,2,0,0,21,8,27,0,4,4,1,-909,-909,0,7,6,0,13,23,17,17,21,21,7,115,21,0,-909,-909,-909,-909,0,0,15,1,-909,0,0,-909,15,-909,-909,-909,-909,32,21,65,27,65,3,3,5,10,15,-909,5,58,13,5,0,4,4,7,9,4,4,-909,2,-909,-909,-909,-909,6,6,3,1},
-{7,0,-909,0,0,2,0,0,-1,25,69,28,19,19,9,258,-909,-909,-909,23,19,26,0,0,32,25,72,0,5,5,2,-909,-909,0,7,21,0,17,29,22,22,27,27,7,173,29,0,-909,-909,-909,-909,0,0,25,2,-909,0,0,-909,25,-909,-909,-909,-909,87,27,77,35,77,13,13,6,8,19,-909,7,74,19,7,0,5,5,8,12,5,5,-909,3,-909,-909,-909,-909,7,7,3,1},
-{7,0,-909,0,0,2,0,0,-1,25,68,28,19,19,9,258,-909,-909,-909,31,19,6,0,0,32,25,60,0,5,5,2,-909,-909,0,7,32,0,17,29,22,22,27,27,7,173,29,0,-909,-909,-909,-909,0,0,26,2,-909,0,0,-909,26,-909,-909,-909,-909,87,27,96,35,96,12,12,6,8,19,-909,7,74,22,7,0,5,5,8,12,5,5,-909,3,-909,-909,-909,-909,7,7,3,1},
-{7,0,-909,0,0,2,0,0,-1,10,20,27,18,18,9,301,-909,-909,-909,29,18,5,0,0,35,7,32,0,5,5,2,-909,-909,0,2,8,0,16,28,21,21,26,26,2,170,26,0,-909,-909,-909,-909,0,0,21,6,-909,0,0,-909,-909,-909,-909,-909,-909,54,26,265,34,265,5,5,6,3,18,-909,7,72,19,7,0,5,6,8,11,6,5,-909,2,-909,-909,-909,-909,5,5,3,1}
+{5,0,-909,0,0,2,0,0,-1,7,12,19,13,13,6,200,-909,-909,-909,20,13,2,0,0,21,7,18,0,3,3,1,-909,-909,0,1,0,0,12,20,15,15,18,18,1,115,18,0,-909,-909,-909,-909,0,0,16,2,-909,0,0,-909,16,-909,-909,-909,-909,32,18,55,24,55,4,4,4,9,13,-909,5,51,11,5,0,3,3,6,8,3,3,-909,2,-909,-909,-909,-909,5,5,3,1, 106},
+{5,0,-909,0,0,1,0,0,-1,8,14,22,15,15,7,164,-909,-909,-909,19,15,2,0,0,21,8,27,0,4,4,1,-909,-909,0,7,6,0,13,23,17,17,21,21,7,115,21,0,-909,-909,-909,-909,0,0,15,1,-909,0,0,-909,15,-909,-909,-909,-909,32,21,65,27,65,3,3,5,10,15,-909,5,58,13,5,0,4,4,7,9,4,4,-909,2,-909,-909,-909,-909,6,6,3,1, 106},
+{7,0,-909,0,0,2,0,0,-1,25,69,28,19,19,9,258,-909,-909,-909,23,19,26,0,0,32,25,72,0,5,5,2,-909,-909,0,7,21,0,17,29,22,22,27,27,7,173,29,0,-909,-909,-909,-909,0,0,25,2,-909,0,0,-909,25,-909,-909,-909,-909,87,27,77,35,77,13,13,6,8,19,-909,7,74,19,7,0,5,5,8,12,5,5,-909,3,-909,-909,-909,-909,7,7,3,1, 135},
+{7,0,-909,0,0,2,0,0,-1,25,68,28,19,19,9,258,-909,-909,-909,31,19,6,0,0,32,25,60,0,5,5,2,-909,-909,0,7,32,0,17,29,22,22,27,27,7,173,29,0,-909,-909,-909,-909,0,0,26,2,-909,0,0,-909,26,-909,-909,-909,-909,87,27,96,35,96,12,12,6,8,19,-909,7,74,22,7,0,5,5,8,12,5,5,-909,3,-909,-909,-909,-909,7,7,3,1, 135},
+{7,0,-909,0,0,2,0,0,-1,10,20,27,18,18,9,301,-909,-909,-909,29,18,5,0,0,35,7,32,0,5,5,2,-909,-909,0,2,8,0,16,28,21,21,26,26,2,170,26,0,-909,-909,-909,-909,0,0,21,6,-909,0,0,-909,-909,-909,-909,-909,-909,54,26,265,34,265,5,5,6,3,18,-909,7,72,19,7,0,5,6,8,11,6,5,-909,2,-909,-909,-909,-909,5,5,3,1, 106}
// *** End of generated data ***
};
@@ -126,7 +127,7 @@ const struct QS60StylePrivate::frameElementCenter QS60StylePrivate::m_frameEleme
{SE_ButtonPressed, QS60StyleEnums::SP_QsnFrButtonTbCenterPressed},
{SE_FrameLineEdit, QS60StyleEnums::SP_QsnFrInputCenter},
{SE_ListHighlight, QS60StyleEnums::SP_QsnFrListCenter},
- {SE_OptionsMenu, QS60StyleEnums::SP_QsnFrPopupCenter},
+ {SE_PopupBackground, QS60StyleEnums::SP_QsnFrPopupCenter},
{SE_SettingsList, QS60StyleEnums::SP_QsnFrSetOptCenter},
{SE_TableItem, QS60StyleEnums::SP_QsnFrCaleCenter},
{SE_TableHeaderItem, QS60StyleEnums::SP_QsnFrCaleHeadingCenter},
@@ -249,8 +250,8 @@ void QS60StylePrivate::drawSkinElement(SkinElements element, QPainter *painter,
case SE_ListHighlight:
drawFrame(SF_ListHighlight, painter, rect, flags | SF_PointNorth);
break;
- case SE_OptionsMenu:
- drawFrame(SF_OptionsMenu, painter, rect, flags | SF_PointNorth);
+ case SE_PopupBackground:
+ drawFrame(SF_PopupBackground, painter, rect, flags | SF_PointNorth);
break;
case SE_SettingsList:
drawFrame(SF_SettingsList, painter, rect, flags | SF_PointNorth);
@@ -636,6 +637,8 @@ void QS60StylePrivate::setFont(QWidget *widget) const
fontCategory = QS60StyleEnums::FC_Secondary;
} else if (qobject_cast<QGroupBox *>(widget)){
fontCategory = QS60StyleEnums::FC_Title;
+ } else if (qobject_cast<QMessageBox *>(widget)){
+ fontCategory = QS60StyleEnums::FC_Primary;
}
if (fontCategory != QS60StyleEnums::FC_Undefined) {
const bool resolveFontSize = widget->testAttribute(Qt::WA_SetFont)
@@ -2215,7 +2218,7 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti
if (QS60StylePrivate::canDrawThemeBackground(option->palette.base(), widget) &&
option->palette.window().texture().cacheKey() ==
QS60StylePrivate::m_themePalette->window().texture().cacheKey())
- QS60StylePrivate::drawSkinElement(QS60StylePrivate::SE_OptionsMenu, painter, option->rect, flags);
+ QS60StylePrivate::drawSkinElement(QS60StylePrivate::SE_PopupBackground, painter, option->rect, flags);
else
commonStyleDraws = true;
}
@@ -2386,13 +2389,6 @@ int QS60Style::pixelMetric(PixelMetric metric, const QStyleOption *option, const
if (metricValue == KNotFound)
metricValue = QCommonStyle::pixelMetric(metric, option, widget);
- if (metric == PM_SubMenuOverlap && widget) {
- const QMenu *menu = qobject_cast<const QMenu *>(widget);
- if (menu && menu->activeAction() && menu->activeAction()->menu()) {
- const int menuWidth = menu->activeAction()->menu()->sizeHint().width();
- metricValue = -menuWidth;
- }
- }
//if layout direction is mirrored, switch left and right border margins
if (option && option->direction == Qt::RightToLeft) {
if (metric == PM_LayoutLeftMargin)
@@ -2400,6 +2396,12 @@ int QS60Style::pixelMetric(PixelMetric metric, const QStyleOption *option, const
else if (metric == PM_LayoutRightMargin)
metricValue = QS60StylePrivate::pixelMetric(PM_LayoutLeftMargin);
}
+
+ if (widget && (metric == PM_LayoutTopMargin))
+ if (widget->windowType() == Qt::Dialog)
+ //double the top layout margin for dialogs, it is very close to real value
+ //without having to define custom pixel metric
+ metricValue *= 2;
return metricValue;
}
@@ -2624,14 +2626,22 @@ QRect QS60Style::subControlRect(ComplexControl control, const QStyleOptionComple
const int frameThickness = spinbox->frame ? pixelMetric(PM_SpinBoxFrameWidth, spinbox, widget) : 0;
const int buttonMargin = spinbox->frame ? 2 : 0;
const int buttonContentWidth = QS60StylePrivate::pixelMetric(PM_ButtonIconSize) + 2 * buttonMargin;
+ // Spinbox buttons should be no larger than one fourth of total width.
+ // Thus, side-by-side buttons would take half of the total width.
+ const int maxSize = qMax(spinbox->rect.width() / 4, buttonContentWidth);
QSize buttonSize;
- buttonSize.setHeight(qMax(8, spinbox->rect.height() - frameThickness));
+ buttonSize.setHeight(qMin(maxSize, qMax(8, spinbox->rect.height() - frameThickness)));
//width should at least be equal to height
buttonSize.setWidth(qMax(buttonSize.height(), buttonContentWidth));
buttonSize = buttonSize.expandedTo(QApplication::globalStrut());
- const int y = frameThickness + spinbox->rect.y();
- const int x = spinbox->rect.x() + spinbox->rect.width() - frameThickness - 2 * buttonSize.width();
+ // Normally spinbuttons should be side-by-side, but if spinbox grows very big
+ // and spinbuttons reach their maximum size, they can be deployed one top of the other.
+ const bool sideBySide = (buttonSize.height() * 2 < spinbox->rect.height()) ? false : true;
+ const int y = frameThickness + spinbox->rect.y() +
+ (spinbox->rect.height() - (sideBySide ? 1 : 2) * buttonSize.height()) / 2;
+ const int x = spinbox->rect.x() +
+ spinbox->rect.width() - frameThickness - (sideBySide ? 2 : 1) * buttonSize.width();
switch (scontrol) {
case SC_SpinBoxUp:
@@ -2642,7 +2652,9 @@ QRect QS60Style::subControlRect(ComplexControl control, const QStyleOptionComple
case SC_SpinBoxDown:
if (spinbox->buttonSymbols == QAbstractSpinBox::NoButtons)
return QRect();
- ret = QRect(x + buttonSize.width(), y, buttonSize.width(), buttonSize.height());
+ ret = QRect(x + (sideBySide ? buttonSize.width() : 0),
+ y + (sideBySide ? 0 : buttonSize.height()),
+ buttonSize.width(), buttonSize.height());
break;
case SC_SpinBoxEditField:
if (spinbox->buttonSymbols == QAbstractSpinBox::NoButtons)
@@ -2785,11 +2797,10 @@ QRect QS60Style::subElementRect(SubElement element, const QStyleOption *opt, con
break;
case SE_LineEditContents: {
// in S60 the input text box doesn't start from line Edit's TL, but
- // a bit indented.
- QRect lineEditRect = opt->rect;
- const int adjustment = opt->rect.height() >> 2;
- lineEditRect.adjust(adjustment, 0, 0, 0);
- ret = lineEditRect;
+ // a bit indented (8 pixels).
+ const int KLineEditDefaultIndention = 8;
+ ret = visualRect(
+ opt->direction, opt->rect, opt->rect.adjusted(KLineEditDefaultIndention, 0, 0, 0));
}
break;
case SE_TabBarTearIndicator:
diff --git a/src/gui/styles/qs60style.h b/src/gui/styles/qs60style.h
index af17843..c878538 100644
--- a/src/gui/styles/qs60style.h
+++ b/src/gui/styles/qs60style.h
@@ -58,7 +58,8 @@ enum {
PM_FrameCornerWidth = QStyle::PM_CustomBase + 1,
PM_FrameCornerHeight,
PM_BoldLineWidth,
- PM_ThinLineWidth
+ PM_ThinLineWidth,
+ PM_MessageBoxHeight
};
class QS60StylePrivate;
diff --git a/src/gui/styles/qs60style_p.h b/src/gui/styles/qs60style_p.h
index 8bb2f7b..6ce4960 100644
--- a/src/gui/styles/qs60style_p.h
+++ b/src/gui/styles/qs60style_p.h
@@ -60,7 +60,7 @@
QT_BEGIN_NAMESPACE
const int MAX_NON_CUSTOM_PIXELMETRICS = 92;
-const int CUSTOMVALUESCOUNT = 4;
+const int CUSTOMVALUESCOUNT = 5;
const int MAX_PIXELMETRICS = MAX_NON_CUSTOM_PIXELMETRICS + CUSTOMVALUESCOUNT;
@@ -411,7 +411,7 @@ public:
SE_TabBarTabWestActive,
SE_TabBarTabWestInactive,
SE_ListHighlight,
- SE_OptionsMenu,
+ SE_PopupBackground,
SE_SettingsList,
SE_TableItem,
SE_TableHeaderItem,
@@ -432,7 +432,7 @@ public:
SF_ButtonPressed,
SF_FrameLineEdit,
SF_ListHighlight,
- SF_OptionsMenu,
+ SF_PopupBackground,
SF_SettingsList,
SF_TableItem,
SF_TableHeaderItem,
diff --git a/src/gui/styles/qs60style_s60.cpp b/src/gui/styles/qs60style_s60.cpp
index 2ea0ccd..6a552e0 100644
--- a/src/gui/styles/qs60style_s60.cpp
+++ b/src/gui/styles/qs60style_s60.cpp
@@ -859,11 +859,9 @@ QPixmap QS60StyleModeSpecifics::createSkinnedGraphicsLX(QS60StylePrivate::SkinFr
User::LeaveIfError(bitmapDev->CreateContext(bitmapGc));
CleanupStack::PushL(bitmapGc);
-#ifndef Q_SYMBIAN_HAS_EXTENDED_BITMAP_TYPE
frame->LockHeap();
memset(frame->DataAddress(), 0, frame->SizeInPixels().iWidth * frame->SizeInPixels().iHeight * 4); // 4: argb bytes
frame->UnlockHeap();
-#endif
const TRect outerRect(TPoint(0, 0), targetSize);
const TRect innerRect = innerRectFromElement(frameElement, outerRect);
@@ -983,16 +981,20 @@ TRect QS60StyleModeSpecifics::innerRectFromElement(QS60StylePrivate::SkinFrameEl
switch(frameElement) {
case QS60StylePrivate::SF_PanelBackground:
// panel should have slightly slimmer border to enable thin line of background graphics between closest component
- widthShrink = widthShrink-2;
- heightShrink = heightShrink-2;
+ widthShrink = widthShrink - 2;
+ heightShrink = heightShrink - 2;
break;
case QS60StylePrivate::SF_ToolTip:
- widthShrink = widthShrink>>1;
- heightShrink = heightShrink>>1;
+ widthShrink = widthShrink >> 1;
+ heightShrink = heightShrink >> 1;
break;
case QS60StylePrivate::SF_ListHighlight:
- widthShrink = widthShrink-2;
- heightShrink = heightShrink-2;
+ widthShrink = widthShrink - 2;
+ heightShrink = heightShrink - 2;
+ break;
+ case QS60StylePrivate::SF_PopupBackground:
+ widthShrink = widthShrink + 5;
+ heightShrink = heightShrink + 5;
break;
default:
break;
diff --git a/src/gui/text/qfontdatabase_s60.cpp b/src/gui/text/qfontdatabase_s60.cpp
index 621f666..ef5e0c4 100644
--- a/src/gui/text/qfontdatabase_s60.cpp
+++ b/src/gui/text/qfontdatabase_s60.cpp
@@ -332,6 +332,11 @@ bool QFontDatabase::removeApplicationFont(int handle)
return false;
}
+bool QFontDatabase::removeAllApplicationFonts()
+{
+ return false;
+}
+
bool QFontDatabase::supportsThreadedFontRendering()
{
return false;
diff --git a/src/gui/text/qfontengine_win.cpp b/src/gui/text/qfontengine_win.cpp
index 3e79d79..93a7c75 100644
--- a/src/gui/text/qfontengine_win.cpp
+++ b/src/gui/text/qfontengine_win.cpp
@@ -39,6 +39,11 @@
**
****************************************************************************/
+#if _WIN32_WINNT < 0x0500
+#undef _WIN32_WINNT
+#define _WIN32_WINNT 0x0500
+#endif
+
#include "qfontengine_p.h"
#include "qtextengine_p.h"
#include <qglobal.h>
diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp
index 82bc14f..bc7684a 100644
--- a/src/network/access/qhttpnetworkconnectionchannel.cpp
+++ b/src/network/access/qhttpnetworkconnectionchannel.cpp
@@ -58,6 +58,28 @@ QT_BEGIN_NAMESPACE
// TODO: Put channel specific stuff here so it does not polute qhttpnetworkconnection.cpp
+QHttpNetworkConnectionChannel::QHttpNetworkConnectionChannel()
+ : socket(0)
+ , state(IdleState)
+ , reply(0)
+ , written(0)
+ , bytesTotal(0)
+ , resendCurrent(false)
+ , lastStatus(0)
+ , pendingEncrypt(false)
+ , reconnectAttempts(2)
+ , authMehtod(QAuthenticatorPrivate::None)
+ , proxyAuthMehtod(QAuthenticatorPrivate::None)
+#ifndef QT_NO_OPENSSL
+ , ignoreAllSslErrors(false)
+#endif
+ , pipeliningSupported(PipeliningSupportUnknown)
+ , connection(0)
+{
+ // Inlining this function in the header leads to compiler error on
+ // release-armv5, on at least timebox 9.2 and 10.1.
+}
+
void QHttpNetworkConnectionChannel::init()
{
#ifndef QT_NO_OPENSSL
@@ -939,7 +961,7 @@ void QHttpNetworkConnectionChannel::_q_error(QAbstractSocket::SocketError socket
errorCode = QNetworkReply::UnknownNetworkError;
break;
}
- QPointer<QObject> that = connection;
+ QPointer<QHttpNetworkConnection> that = connection;
QString errorString = connection->d_func()->errorDetail(errorCode, socket, socket->errorString());
if (send2Reply) {
if (reply) {
@@ -994,8 +1016,16 @@ void QHttpNetworkConnectionChannel::_q_encryptedBytesWritten(qint64 bytes)
sendRequest();
// otherwise we do nothing
}
+
#endif
+void QHttpNetworkConnectionChannel::setConnection(QHttpNetworkConnection *c)
+{
+ // Inlining this function in the header leads to compiler error on
+ // release-armv5, on at least timebox 9.2 and 10.1.
+ connection = c;
+}
+
QT_END_NAMESPACE
#include "moc_qhttpnetworkconnectionchannel_p.cpp"
diff --git a/src/network/access/qhttpnetworkconnectionchannel_p.h b/src/network/access/qhttpnetworkconnectionchannel_p.h
index 5032d2b..51cb5e8 100644
--- a/src/network/access/qhttpnetworkconnectionchannel_p.h
+++ b/src/network/access/qhttpnetworkconnectionchannel_p.h
@@ -65,6 +65,7 @@
#include <private/qhttpnetworkrequest_p.h>
#include <private/qhttpnetworkreply_p.h>
+#include "qhttpnetworkconnection_p.h"
#ifndef QT_NO_HTTP
@@ -80,7 +81,6 @@ QT_BEGIN_NAMESPACE
class QHttpNetworkRequest;
class QHttpNetworkReply;
class QByteArray;
-class QHttpNetworkConnection;
#ifndef HttpMessagePair
typedef QPair<QHttpNetworkRequest, QHttpNetworkReply*> HttpMessagePair;
@@ -127,18 +127,10 @@ public:
QList<HttpMessagePair> alreadyPipelinedRequests;
- QHttpNetworkConnectionChannel() : socket(0), state(IdleState), reply(0), written(0), bytesTotal(0), resendCurrent(false),
- lastStatus(0), pendingEncrypt(false), reconnectAttempts(2),
- authMehtod(QAuthenticatorPrivate::None), proxyAuthMehtod(QAuthenticatorPrivate::None)
-#ifndef QT_NO_OPENSSL
- , ignoreAllSslErrors(false)
-#endif
- , pipeliningSupported(PipeliningSupportUnknown)
- , connection(0)
- {}
-
- void setConnection(QHttpNetworkConnection *c) {connection = c;}
- QHttpNetworkConnection *connection;
+ QHttpNetworkConnectionChannel();
+
+ void setConnection(QHttpNetworkConnection *c);
+ QPointer<QHttpNetworkConnection> connection;
void init();
void close();
@@ -187,8 +179,6 @@ public:
#endif
};
-
-
QT_END_NAMESPACE
#endif // QT_NO_HTTP
diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h
index 45f8f30..dc1e26e 100644
--- a/src/opengl/qgl_p.h
+++ b/src/opengl/qgl_p.h
@@ -593,7 +593,7 @@ inline GLenum qt_gl_preferredTextureTarget()
}
// One resource per group of shared contexts.
-class Q_AUTOTEST_EXPORT QGLContextResource
+class Q_OPENGL_EXPORT QGLContextResource
{
public:
typedef void (*FreeFunc)(void *);
diff --git a/src/openvg/qpaintengine_vg.cpp b/src/openvg/qpaintengine_vg.cpp
index 4902cbd..b3b923d 100644
--- a/src/openvg/qpaintengine_vg.cpp
+++ b/src/openvg/qpaintengine_vg.cpp
@@ -537,7 +537,7 @@ void QVGPaintEnginePrivate::updateTransform(QPaintDevice *pdev)
// adds 0.5 to each co-ordinate.
QTransform viewport2(1.0f, 0.0f, 0.0f,
0.0f, -1.0f, 0.0f,
- 0.0f, devh, 1.0f);
+ 0.0f, devh + 1, 1.0f);
imageTransform = transform * viewport2;
// Calculate the scaling factor to use for turning cosmetic pens
diff --git a/src/openvg/qpixmapdata_vg.cpp b/src/openvg/qpixmapdata_vg.cpp
index 4cdbfdc..ab8f26d 100644
--- a/src/openvg/qpixmapdata_vg.cpp
+++ b/src/openvg/qpixmapdata_vg.cpp
@@ -45,8 +45,10 @@
#include "qvg_p.h"
#include "qvgimagepool_p.h"
+#if defined(Q_OS_SYMBIAN)
#include <private/qt_s60_p.h>
#include <fbs.h>
+#endif
#ifdef QT_SYMBIAN_SUPPORTS_SGIMAGE
#include <sgresource/sgimage.h>
typedef EGLImageKHR (*pfnEglCreateImageKHR)(EGLDisplay, EGLContext, EGLenum, EGLClientBuffer, EGLint*);
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
index 4219f6f..80366d1 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
@@ -290,27 +290,22 @@ bool QDirectFBPixmapData::fromDataBufferDescription(const DFBDataBufferDescripti
void QDirectFBPixmapData::fromImage(const QImage &img,
Qt::ImageConversionFlags flags)
{
- if (img.depth() == 1 || img.format() == QImage::Format_RGB32) {
- fromImage(img.convertToFormat(screen->alphaPixmapFormat()), flags);
- return;
- }
-
- if (img.hasAlphaChannel()
+ if (img.depth() == 1) {
+ alpha = true;
#ifndef QT_NO_DIRECTFB_OPAQUE_DETECTION
- && (flags & Qt::NoOpaqueDetection || QDirectFBPixmapData::hasAlphaChannel(img))
-#endif
- ) {
+ } else if (flags & Qt::NoOpaqueDetection || QDirectFBPixmapData::hasAlphaChannel(img)) {
alpha = true;
- imageFormat = screen->alphaPixmapFormat();
- } else {
- alpha = false;
- imageFormat = screen->pixelFormat();
+#else
+ } else if (img.hasAlphaChannel()) {
+ alpha = true;
+#endif
}
+ imageFormat = alpha ? screen->alphaPixmapFormat() : screen->pixelFormat();
QImage image;
- if (flags != Qt::AutoColor) {
+ if ((flags & ~Qt::NoOpaqueDetection) != Qt::AutoColor) {
image = img.convertToFormat(imageFormat, flags);
flags = Qt::AutoColor;
- } else if (img.format() == QImage::Format_RGB32) {
+ } else if (img.format() == QImage::Format_RGB32 || img.depth() == 1) {
image = img.convertToFormat(imageFormat, flags);
} else {
image = img;
diff --git a/src/s60installs/bwins/QtGuiu.def b/src/s60installs/bwins/QtGuiu.def
index 2feaffd..6a4f07b 100644
--- a/src/s60installs/bwins/QtGuiu.def
+++ b/src/s60installs/bwins/QtGuiu.def
@@ -3961,7 +3961,7 @@ EXPORTS
?drawPixmap@QPainter@@QAEXHHABVQPixmap@@HHHH@Z @ 3960 NONAME ; void QPainter::drawPixmap(int, int, class QPixmap const &, int, int, int, int)
?drawPixmap@QPainter@@QAEXHHHHABVQPixmap@@@Z @ 3961 NONAME ; void QPainter::drawPixmap(int, int, int, int, class QPixmap const &)
?drawPixmap@QPainter@@QAEXHHHHABVQPixmap@@HHHH@Z @ 3962 NONAME ; void QPainter::drawPixmap(int, int, int, int, class QPixmap const &, int, int, int, int)
- ?drawPixmaps@QPaintEngineEx@@UAEXPBUData@QDrawPixmaps@@HABVQPixmap@@V?$QFlags@W4DrawingHint@QDrawPixmaps@@@@@Z @ 3963 NONAME ABSENT ; void QPaintEngineEx::drawPixmaps(struct QDrawPixmaps::Data const *, int, class QPixmap const &, class QFlags<enum QDrawPixmaps::DrawingHint>)
+ ?drawPixmaps@QPaintEngineEx@@UAEXPBUData@QDrawPixmaps@@HABVQPixmap@@V?$QFlags@W4DrawingHint@QDrawPixmaps@@@@@Z @ 3963 NONAME ; void QPaintEngineEx::drawPixmaps(struct QDrawPixmaps::Data const *, int, class QPixmap const &, class QFlags<enum QDrawPixmaps::DrawingHint>)
?drawPoint@QPainter@@QAEXABVQPoint@@@Z @ 3964 NONAME ; void QPainter::drawPoint(class QPoint const &)
?drawPoint@QPainter@@QAEXABVQPointF@@@Z @ 3965 NONAME ; void QPainter::drawPoint(class QPointF const &)
?drawPoint@QPainter@@QAEXHH@Z @ 3966 NONAME ; void QPainter::drawPoint(int, int)
@@ -7291,7 +7291,7 @@ EXPORTS
?polishEvent@QGraphicsWidget@@MAEXXZ @ 7290 NONAME ; void QGraphicsWidget::polishEvent(void)
?polygon@QGraphicsPolygonItem@@QBE?AVQPolygonF@@XZ @ 7291 NONAME ; class QPolygonF QGraphicsPolygonItem::polygon(void) const
?polygonFlags@QVectorPath@@SAIW4PolygonDrawMode@QPaintEngine@@@Z @ 7292 NONAME ; unsigned int QVectorPath::polygonFlags(enum QPaintEngine::PolygonDrawMode)
- ?populate@QTextureGlyphCache@@QAEXABVQTextItemInt@@ABV?$QVarLengthArray@I$0BAA@@@ABV?$QVarLengthArray@UQFixedPoint@@$0BAA@@@@Z @ 7293 NONAME ABSENT ; void QTextureGlyphCache::populate(class QTextItemInt const &, class QVarLengthArray<unsigned int, 256> const &, class QVarLengthArray<struct QFixedPoint, 256> const &)
+ ?populate@QTextureGlyphCache@@QAEXABVQTextItemInt@@ABV?$QVarLengthArray@I$0BAA@@@ABV?$QVarLengthArray@UQFixedPoint@@$0BAA@@@@Z @ 7293 NONAME ; void QTextureGlyphCache::populate(class QTextItemInt const &, class QVarLengthArray<unsigned int, 256> const &, class QVarLengthArray<struct QFixedPoint, 256> const &)
?popup@QCompleter@@QBEPAVQAbstractItemView@@XZ @ 7294 NONAME ; class QAbstractItemView * QCompleter::popup(void) const
?popup@QMenu@@QAEXABVQPoint@@PAVQAction@@@Z @ 7295 NONAME ; void QMenu::popup(class QPoint const &, class QAction *)
?popupMode@QToolButton@@QBE?AW4ToolButtonPopupMode@1@XZ @ 7296 NONAME ; enum QToolButton::ToolButtonPopupMode QToolButton::popupMode(void) const
@@ -7389,7 +7389,7 @@ EXPORTS
?qAlpha@@YAHI@Z @ 7388 NONAME ; int qAlpha(unsigned int)
?qBlue@@YAHI@Z @ 7389 NONAME ; int qBlue(unsigned int)
?qDrawBorderPixmap@@YAXPAVQPainter@@ABVQRect@@ABVQMargins@@ABVQPixmap@@12ABUQTileRules@@V?$QFlags@W4DrawingHint@QDrawBorderPixmap@@@@@Z @ 7390 NONAME ; void qDrawBorderPixmap(class QPainter *, class QRect const &, class QMargins const &, class QPixmap const &, class QRect const &, class QMargins const &, struct QTileRules const &, class QFlags<enum QDrawBorderPixmap::DrawingHint>)
- ?qDrawPixmaps@@YAXPAVQPainter@@PBUData@QDrawPixmaps@@HABVQPixmap@@V?$QFlags@W4DrawingHint@QDrawPixmaps@@@@@Z @ 7391 NONAME ABSENT ; void qDrawPixmaps(class QPainter *, struct QDrawPixmaps::Data const *, int, class QPixmap const &, class QFlags<enum QDrawPixmaps::DrawingHint>)
+ ?qDrawPixmaps@@YAXPAVQPainter@@PBUData@QDrawPixmaps@@HABVQPixmap@@V?$QFlags@W4DrawingHint@QDrawPixmaps@@@@@Z @ 7391 NONAME ; void qDrawPixmaps(class QPainter *, struct QDrawPixmaps::Data const *, int, class QPixmap const &, class QFlags<enum QDrawPixmaps::DrawingHint>)
?qDrawPlainRect@@YAXPAVQPainter@@ABVQRect@@ABVQColor@@HPBVQBrush@@@Z @ 7392 NONAME ; void qDrawPlainRect(class QPainter *, class QRect const &, class QColor const &, int, class QBrush const *)
?qDrawPlainRect@@YAXPAVQPainter@@HHHHABVQColor@@HPBVQBrush@@@Z @ 7393 NONAME ; void qDrawPlainRect(class QPainter *, int, int, int, int, class QColor const &, int, class QBrush const *)
?qDrawShadeLine@@YAXPAVQPainter@@ABVQPoint@@1ABVQPalette@@_NHH@Z @ 7394 NONAME ; void qDrawShadeLine(class QPainter *, class QPoint const &, class QPoint const &, class QPalette const &, bool, int, int)
@@ -12601,125 +12601,5 @@ EXPORTS
?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)
- ??0FileInfo@QZipReader@@QAE@ABU01@@Z @ 12603 NONAME ; QZipReader::FileInfo::FileInfo(struct QZipReader::FileInfo const &)
- ??0FileInfo@QZipReader@@QAE@XZ @ 12604 NONAME ; QZipReader::FileInfo::FileInfo(void)
- ??0QAbstractScrollAreaPrivate@@QAE@XZ @ 12605 NONAME ; QAbstractScrollAreaPrivate::QAbstractScrollAreaPrivate(void)
- ??0QGraphicsViewPrivate@@QAE@XZ @ 12606 NONAME ; QGraphicsViewPrivate::QGraphicsViewPrivate(void)
- ??0QKeySequence@@QAE@ABVQString@@W4SequenceFormat@0@@Z @ 12607 NONAME ; QKeySequence::QKeySequence(class QString const &, enum QKeySequence::SequenceFormat)
- ??0QStaticText@@QAE@ABV0@@Z @ 12608 NONAME ; QStaticText::QStaticText(class QStaticText const &)
- ??0QStaticText@@QAE@ABVQString@@ABVQSizeF@@@Z @ 12609 NONAME ; QStaticText::QStaticText(class QString const &, class QSizeF const &)
- ??0QStaticText@@QAE@XZ @ 12610 NONAME ; QStaticText::QStaticText(void)
- ??0QStaticTextItem@@QAE@XZ @ 12611 NONAME ; QStaticTextItem::QStaticTextItem(void)
- ??0QZipReader@@QAE@ABVQString@@V?$QFlags@W4OpenModeFlag@QIODevice@@@@@Z @ 12612 NONAME ; QZipReader::QZipReader(class QString const &, class QFlags<enum QIODevice::OpenModeFlag>)
- ??0QZipReader@@QAE@PAVQIODevice@@@Z @ 12613 NONAME ; QZipReader::QZipReader(class QIODevice *)
- ??1FileInfo@QZipReader@@QAE@XZ @ 12614 NONAME ; QZipReader::FileInfo::~FileInfo(void)
- ??1QAbstractScrollAreaPrivate@@UAE@XZ @ 12615 NONAME ; QAbstractScrollAreaPrivate::~QAbstractScrollAreaPrivate(void)
- ??1QGraphicsViewPrivate@@UAE@XZ @ 12616 NONAME ; QGraphicsViewPrivate::~QGraphicsViewPrivate(void)
- ??1QStaticText@@QAE@XZ @ 12617 NONAME ; QStaticText::~QStaticText(void)
- ??1QStaticTextItem@@QAE@XZ @ 12618 NONAME ; QStaticTextItem::~QStaticTextItem(void)
- ??1QZipReader@@QAE@XZ @ 12619 NONAME ; QZipReader::~QZipReader(void)
- ??4FileInfo@QZipReader@@QAEAAU01@ABU01@@Z @ 12620 NONAME ; struct QZipReader::FileInfo & QZipReader::FileInfo::operator=(struct QZipReader::FileInfo const &)
- ??4QStaticText@@QAEAAV0@ABV0@@Z @ 12621 NONAME ; class QStaticText & QStaticText::operator=(class QStaticText const &)
- ??8QStaticText@@QBE_NABV0@@Z @ 12622 NONAME ; bool QStaticText::operator==(class QStaticText const &) const
- ??9QStaticText@@QBE_NABV0@@Z @ 12623 NONAME ; bool QStaticText::operator!=(class QStaticText const &) const
- ??_EQAbstractScrollAreaPrivate@@UAE@I@Z @ 12624 NONAME ; QAbstractScrollAreaPrivate::~QAbstractScrollAreaPrivate(unsigned int)
- ??_EQGraphicsViewPrivate@@UAE@I@Z @ 12625 NONAME ; QGraphicsViewPrivate::~QGraphicsViewPrivate(unsigned int)
- ?_q_hslide@QAbstractScrollAreaPrivate@@QAEXH@Z @ 12626 NONAME ; void QAbstractScrollAreaPrivate::_q_hslide(int)
- ?_q_setViewportCursor@QGraphicsViewPrivate@@QAEXABVQCursor@@@Z @ 12627 NONAME ; void QGraphicsViewPrivate::_q_setViewportCursor(class QCursor const &)
- ?_q_showOrHideScrollBars@QAbstractScrollAreaPrivate@@QAEXXZ @ 12628 NONAME ; void QAbstractScrollAreaPrivate::_q_showOrHideScrollBars(void)
- ?_q_unsetViewportCursor@QGraphicsViewPrivate@@QAEXXZ @ 12629 NONAME ; void QGraphicsViewPrivate::_q_unsetViewportCursor(void)
- ?_q_vslide@QAbstractScrollAreaPrivate@@QAEXH@Z @ 12630 NONAME ; void QAbstractScrollAreaPrivate::_q_vslide(int)
- ?allocStyleOptionsArray@QGraphicsViewPrivate@@QAEPAVQStyleOptionGraphicsItem@@H@Z @ 12631 NONAME ; class QStyleOptionGraphicsItem * QGraphicsViewPrivate::allocStyleOptionsArray(int)
- ?anchorAt@QPlainTextEdit@@QBE?AVQString@@ABVQPoint@@@Z @ 12632 NONAME ; class QString QPlainTextEdit::anchorAt(class QPoint const &) const
- ?assign@QKeySequence@@AAEHABVQString@@W4SequenceFormat@1@@Z @ 12633 NONAME ; int QKeySequence::assign(class QString const &, enum QKeySequence::SequenceFormat)
- ?autoFillBackground@QGraphicsWidget@@QBE_NXZ @ 12634 NONAME ; bool QGraphicsWidget::autoFillBackground(void) const
- ?canKeypadNavigate@QWidgetPrivate@@SA_NW4Orientation@Qt@@@Z @ 12635 NONAME ; bool QWidgetPrivate::canKeypadNavigate(enum Qt::Orientation)
- ?centerView@QGraphicsViewPrivate@@QAEXW4ViewportAnchor@QGraphicsView@@@Z @ 12636 NONAME ; void QGraphicsViewPrivate::centerView(enum QGraphicsView::ViewportAnchor)
- ?clearUndoRedoStacks@QTextDocument@@QAEXW4Stacks@1@@Z @ 12637 NONAME ; void QTextDocument::clearUndoRedoStacks(enum QTextDocument::Stacks)
- ?close@QZipReader@@QAEXXZ @ 12638 NONAME ; void QZipReader::close(void)
- ?constBits@QImage@@QBEPBEXZ @ 12639 NONAME ; unsigned char const * QImage::constBits(void) const
- ?constScanLine@QImage@@QBEPBEH@Z @ 12640 NONAME ; unsigned char const * QImage::constScanLine(int) const
- ?contentsOffset@QAbstractScrollAreaPrivate@@UBE?AVQPoint@@XZ @ 12641 NONAME ; class QPoint QAbstractScrollAreaPrivate::contentsOffset(void) const
- ?convertFromImage@QPixmap@@QAE_NABVQImage@@V?$QFlags@W4ImageConversionFlag@Qt@@@@@Z @ 12642 NONAME ; bool QPixmap::convertFromImage(class QImage const &, class QFlags<enum Qt::ImageConversionFlag>)
- ?count@QZipReader@@QBEHXZ @ 12643 NONAME ; int QZipReader::count(void) const
- ?create@Fragment@QPainter@@SA?AV12@ABVQPointF@@ABVQRectF@@MMMM@Z @ 12644 NONAME ; class QPainter::Fragment QPainter::Fragment::create(class QPointF const &, class QRectF const &, float, float, float, float)
- ?detach@QStaticText@@AAEXXZ @ 12645 NONAME ; void QStaticText::detach(void)
- ?directoryLoaded@QFileSystemModel@@IAEXABVQString@@@Z @ 12646 NONAME ; void QFileSystemModel::directoryLoaded(class QString const &)
- ?dispatchPendingUpdateRequests@QGraphicsViewPrivate@@QAEXXZ @ 12647 NONAME ; void QGraphicsViewPrivate::dispatchPendingUpdateRequests(void)
- ?drawPixmapFragments@QPaintEngineEx@@UAEXPBVFragment@QPainter@@HABVQPixmap@@V?$QFlags@W4FragmentHint@QPainter@@@@@Z @ 12648 NONAME ; void QPaintEngineEx::drawPixmapFragments(class QPainter::Fragment const *, int, class QPixmap const &, class QFlags<enum QPainter::FragmentHint>)
- ?drawPixmapFragments@QPainter@@QAEXPBVFragment@1@HABVQPixmap@@V?$QFlags@W4FragmentHint@QPainter@@@@@Z @ 12649 NONAME ; void QPainter::drawPixmapFragments(class QPainter::Fragment const *, int, class QPixmap const &, class QFlags<enum QPainter::FragmentHint>)
- ?drawStaticText@QPainter@@QAEXABVQPoint@@ABVQStaticText@@@Z @ 12650 NONAME ; void QPainter::drawStaticText(class QPoint const &, class QStaticText const &)
- ?drawStaticText@QPainter@@QAEXABVQPointF@@ABVQStaticText@@@Z @ 12651 NONAME ; void QPainter::drawStaticText(class QPointF const &, class QStaticText const &)
- ?drawStaticText@QPainter@@QAEXHHABVQStaticText@@@Z @ 12652 NONAME ; void QPainter::drawStaticText(int, int, class QStaticText const &)
- ?entryInfoAt@QZipReader@@QBE?AUFileInfo@1@H@Z @ 12653 NONAME ; struct QZipReader::FileInfo QZipReader::entryInfoAt(int) const
- ?exists@QZipReader@@QBE_NXZ @ 12654 NONAME ; bool QZipReader::exists(void) const
- ?extractAll@QZipReader@@QBE_NABVQString@@@Z @ 12655 NONAME ; bool QZipReader::extractAll(class QString const &) const
- ?fileData@QZipReader@@QBE?AVQByteArray@@ABVQString@@@Z @ 12656 NONAME ; class QByteArray QZipReader::fileData(class QString const &) const
- ?fileInfoList@QZipReader@@QBE?AV?$QList@UFileInfo@QZipReader@@@@XZ @ 12657 NONAME ; class QList<struct QZipReader::FileInfo> QZipReader::fileInfoList(void) const
- ?findItems@QGraphicsViewPrivate@@QBE?AV?$QList@PAVQGraphicsItem@@@@ABVQRegion@@PA_NABVQTransform@@@Z @ 12658 NONAME ; class QList<class QGraphicsItem *> QGraphicsViewPrivate::findItems(class QRegion const &, bool *, class QTransform const &) const
- ?fixup@QIntValidator@@UBEXAAVQString@@@Z @ 12659 NONAME ; void QIntValidator::fixup(class QString &) const
- ?freeStyleOptionsArray@QGraphicsViewPrivate@@QAEXPAVQStyleOptionGraphicsItem@@@Z @ 12660 NONAME ; void QGraphicsViewPrivate::freeStyleOptionsArray(class QStyleOptionGraphicsItem *)
- ?getPixmapCursor@QApplicationPrivate@@QAE?AVQPixmap@@W4CursorShape@Qt@@@Z @ 12661 NONAME ; class QPixmap QApplicationPrivate::getPixmapCursor(enum Qt::CursorShape)
- ?getSubRange@QBezier@@QBE?AV1@MM@Z @ 12662 NONAME ; class QBezier QBezier::getSubRange(float, float) const
- ?hasSelectedText@QLabel@@QBE_NXZ @ 12663 NONAME ; bool QLabel::hasSelectedText(void) const
- ?horizontalScroll@QGraphicsViewPrivate@@QBE_JXZ @ 12664 NONAME ; long long QGraphicsViewPrivate::horizontalScroll(void) const
- ?inTabWidget@QWidgetPrivate@@SA_NPAVQWidget@@@Z @ 12665 NONAME ; bool QWidgetPrivate::inTabWidget(class QWidget *)
- ?init@QAbstractScrollAreaPrivate@@QAEXXZ @ 12666 NONAME ; void QAbstractScrollAreaPrivate::init(void)
- ?isImageCached@QImagePixmapCleanupHooks@@SA_NABVQImage@@@Z @ 12667 NONAME ; bool QImagePixmapCleanupHooks::isImageCached(class QImage const &)
- ?isPixmapCached@QImagePixmapCleanupHooks@@SA_NABVQPixmap@@@Z @ 12668 NONAME ; bool QImagePixmapCleanupHooks::isPixmapCached(class QPixmap const &)
- ?isReadable@QZipReader@@QBE_NXZ @ 12669 NONAME ; bool QZipReader::isReadable(void) const
- ?isValidColor@QColor@@SA_NABVQString@@@Z @ 12670 NONAME ; bool QColor::isValidColor(class QString const &)
- ?layoutChildren@QAbstractScrollAreaPrivate@@QAEXXZ @ 12671 NONAME ; void QAbstractScrollAreaPrivate::layoutChildren(void)
- ?mapBy@QBezier@@QBE?AV1@ABVQTransform@@@Z @ 12672 NONAME ; class QBezier QBezier::mapBy(class QTransform const &) const
- ?mapRectFromScene@QGraphicsViewPrivate@@QBE?AVQRectF@@ABV2@@Z @ 12673 NONAME ; class QRectF QGraphicsViewPrivate::mapRectFromScene(class QRectF const &) const
- ?mapRectToScene@QGraphicsViewPrivate@@QBE?AVQRectF@@ABVQRect@@@Z @ 12674 NONAME ; class QRectF QGraphicsViewPrivate::mapRectToScene(class QRect const &) const
- ?mapToScene@QGraphicsViewPrivate@@QBE?AVQPointF@@ABV2@@Z @ 12675 NONAME ; class QPointF QGraphicsViewPrivate::mapToScene(class QPointF const &) const
- ?mapToScene@QGraphicsViewPrivate@@QBE?AVQRectF@@ABV2@@Z @ 12676 NONAME ; class QRectF QGraphicsViewPrivate::mapToScene(class QRectF const &) const
- ?mapToViewRect@QGraphicsViewPrivate@@QBE?AVQRect@@PBVQGraphicsItem@@ABVQRectF@@@Z @ 12677 NONAME ; class QRect QGraphicsViewPrivate::mapToViewRect(class QGraphicsItem const *, class QRectF const &) const
- ?mapToViewRegion@QGraphicsViewPrivate@@QBE?AVQRegion@@PBVQGraphicsItem@@ABVQRectF@@@Z @ 12678 NONAME ; class QRegion QGraphicsViewPrivate::mapToViewRegion(class QGraphicsItem const *, class QRectF const &) const
- ?maximumSize@QStaticText@@QBE?AVQSizeF@@XZ @ 12679 NONAME ; class QSizeF QStaticText::maximumSize(void) const
- ?mouseMoveEventHandler@QGraphicsViewPrivate@@QAEXPAVQMouseEvent@@@Z @ 12680 NONAME ; void QGraphicsViewPrivate::mouseMoveEventHandler(class QMouseEvent *)
- ?performanceHint@QStaticText@@QBE?AW4PerformanceHint@1@XZ @ 12681 NONAME ; enum QStaticText::PerformanceHint QStaticText::performanceHint(void) const
- ?populate@QTextureGlyphCache@@QAEXPAVQFontEngine@@HPBIPBUQFixedPoint@@@Z @ 12682 NONAME ; void QTextureGlyphCache::populate(class QFontEngine *, int, unsigned int const *, struct QFixedPoint const *)
- ?populateSceneDragDropEvent@QGraphicsViewPrivate@@QAEXPAVQGraphicsSceneDragDropEvent@@PAVQDropEvent@@@Z @ 12683 NONAME ; void QGraphicsViewPrivate::populateSceneDragDropEvent(class QGraphicsSceneDragDropEvent *, class QDropEvent *)
- ?positionInBlock@QTextCursor@@QBEHXZ @ 12684 NONAME ; int QTextCursor::positionInBlock(void) const
- ?prepare@QStaticText@@QAEXABVQTransform@@ABVQFont@@@Z @ 12685 NONAME ; void QStaticText::prepare(class QTransform const &, class QFont const &)
- ?processPendingUpdates@QGraphicsViewPrivate@@QAEXXZ @ 12686 NONAME ; void QGraphicsViewPrivate::processPendingUpdates(void)
- ?q_func@QAbstractScrollAreaPrivate@@AAEPAVQAbstractScrollArea@@XZ @ 12687 NONAME ; class QAbstractScrollArea * QAbstractScrollAreaPrivate::q_func(void)
- ?q_func@QAbstractScrollAreaPrivate@@ABEPBVQAbstractScrollArea@@XZ @ 12688 NONAME ; class QAbstractScrollArea const * QAbstractScrollAreaPrivate::q_func(void) const
- ?q_func@QGraphicsViewPrivate@@AAEPAVQGraphicsView@@XZ @ 12689 NONAME ; class QGraphicsView * QGraphicsViewPrivate::q_func(void)
- ?q_func@QGraphicsViewPrivate@@ABEPBVQGraphicsView@@XZ @ 12690 NONAME ; class QGraphicsView const * QGraphicsViewPrivate::q_func(void) const
- ?qt_draw_glyphs@@YAXPAVQPainter@@PBIPBVQPointF@@H@Z @ 12691 NONAME ; void qt_draw_glyphs(class QPainter *, unsigned int const *, class QPointF const *, int)
- ?recalculateContentSize@QGraphicsViewPrivate@@QAEXXZ @ 12692 NONAME ; void QGraphicsViewPrivate::recalculateContentSize(void)
- ?render@QWidgetPrivate@@QAEXPAVQPaintDevice@@ABVQPoint@@ABVQRegion@@V?$QFlags@W4RenderFlag@QWidget@@@@_N@Z @ 12693 NONAME ; void QWidgetPrivate::render(class QPaintDevice *, class QPoint const &, class QRegion const &, class QFlags<enum QWidget::RenderFlag>, bool)
- ?replaceScrollBar@QAbstractScrollAreaPrivate@@QAEXPAVQScrollBar@@W4Orientation@Qt@@@Z @ 12694 NONAME ; void QAbstractScrollAreaPrivate::replaceScrollBar(class QScrollBar *, enum Qt::Orientation)
- ?replayLastMouseEvent@QGraphicsViewPrivate@@QAEXXZ @ 12695 NONAME ; void QGraphicsViewPrivate::replayLastMouseEvent(void)
- ?rubberBandRegion@QGraphicsViewPrivate@@QBE?AVQRegion@@PBVQWidget@@ABVQRect@@@Z @ 12696 NONAME ; class QRegion QGraphicsViewPrivate::rubberBandRegion(class QWidget const *, class QRect const &) const
- ?scrollBarPolicyChanged@QAbstractScrollAreaPrivate@@UAEXW4Orientation@Qt@@W4ScrollBarPolicy@3@@Z @ 12697 NONAME ; void QAbstractScrollAreaPrivate::scrollBarPolicyChanged(enum Qt::Orientation, enum Qt::ScrollBarPolicy)
- ?selectedText@QLabel@@QBE?AVQString@@XZ @ 12698 NONAME ; class QString QLabel::selectedText(void) const
- ?selectionStart@QLabel@@QBEHXZ @ 12699 NONAME ; int QLabel::selectionStart(void) const
- ?setAutoFillBackground@QGraphicsWidget@@QAEX_N@Z @ 12700 NONAME ; void QGraphicsWidget::setAutoFillBackground(bool)
- ?setColorFromString@QColor@@AAE_NABVQString@@@Z @ 12701 NONAME ; bool QColor::setColorFromString(class QString const &)
- ?setMaximumSize@QStaticText@@QAEXABVQSizeF@@@Z @ 12702 NONAME ; void QStaticText::setMaximumSize(class QSizeF const &)
- ?setPerformanceHint@QStaticText@@QAEXW4PerformanceHint@1@@Z @ 12703 NONAME ; void QStaticText::setPerformanceHint(enum QStaticText::PerformanceHint)
- ?setSelection@QLabel@@QAEXHH@Z @ 12704 NONAME ; void QLabel::setSelection(int, int)
- ?setText@QStaticText@@QAEXABVQString@@@Z @ 12705 NONAME ; void QStaticText::setText(class QString const &)
- ?setTextFormat@QStaticText@@QAEXW4TextFormat@Qt@@@Z @ 12706 NONAME ; void QStaticText::setTextFormat(enum Qt::TextFormat)
- ?setUserData@QStaticTextItem@@QAEXPAVQStaticTextUserData@@@Z @ 12707 NONAME ; void QStaticTextItem::setUserData(class QStaticTextUserData *)
- ?size@QStaticText@@QBE?AVQSizeF@@XZ @ 12708 NONAME ; class QSizeF QStaticText::size(void) const
- ?status@QZipReader@@QBE?AW4Status@1@XZ @ 12709 NONAME ; enum QZipReader::Status QZipReader::status(void) const
- ?storeDragDropEvent@QGraphicsViewPrivate@@QAEXPBVQGraphicsSceneDragDropEvent@@@Z @ 12710 NONAME ; void QGraphicsViewPrivate::storeDragDropEvent(class QGraphicsSceneDragDropEvent const *)
- ?storeMouseEvent@QGraphicsViewPrivate@@QAEXPAVQMouseEvent@@@Z @ 12711 NONAME ; void QGraphicsViewPrivate::storeMouseEvent(class QMouseEvent *)
- ?text@QStaticText@@QBE?AVQString@@XZ @ 12712 NONAME ; class QString QStaticText::text(void) const
- ?textFormat@QStaticText@@QBE?AW4TextFormat@Qt@@XZ @ 12713 NONAME ; enum Qt::TextFormat QStaticText::textFormat(void) const
- ?translateTouchEvent@QGraphicsViewPrivate@@SAXPAV1@PAVQTouchEvent@@@Z @ 12714 NONAME ; void QGraphicsViewPrivate::translateTouchEvent(class QGraphicsViewPrivate *, class QTouchEvent *)
- ?updateAll@QGraphicsViewPrivate@@QAEXXZ @ 12715 NONAME ; void QGraphicsViewPrivate::updateAll(void)
- ?updateInputMethodSensitivity@QGraphicsViewPrivate@@QAEXXZ @ 12716 NONAME ; void QGraphicsViewPrivate::updateInputMethodSensitivity(void)
- ?updateLastCenterPoint@QGraphicsViewPrivate@@QAEXXZ @ 12717 NONAME ; void QGraphicsViewPrivate::updateLastCenterPoint(void)
- ?updateRect@QGraphicsViewPrivate@@QAE_NABVQRect@@@Z @ 12718 NONAME ; bool QGraphicsViewPrivate::updateRect(class QRect const &)
- ?updateRegion@QGraphicsViewPrivate@@QAE_NABVQRegion@@@Z @ 12719 NONAME ; bool QGraphicsViewPrivate::updateRegion(class QRegion const &)
- ?updateScroll@QGraphicsViewPrivate@@QAEXXZ @ 12720 NONAME ; void QGraphicsViewPrivate::updateScroll(void)
- ?verticalScroll@QGraphicsViewPrivate@@QBE_JXZ @ 12721 NONAME ; long long QGraphicsViewPrivate::verticalScroll(void) const
- ?viewportEvent@QAbstractScrollAreaPrivate@@QAE_NPAVQEvent@@@Z @ 12722 NONAME ; bool QAbstractScrollAreaPrivate::viewportEvent(class QEvent *)
- ?visibilityChanged@QToolBar@@IAEX_N@Z @ 12723 NONAME ; void QToolBar::visibilityChanged(bool)
+ ?removeAllApplicationFonts@QFontDatabase@@SA_NXZ @12603 ; NONAME ; bool QFontDatabase::removeAllApplicationFonts()
diff --git a/src/s60installs/eabi/QtGuiu.def b/src/s60installs/eabi/QtGuiu.def
index 7c91264..a3fc452 100644
--- a/src/s60installs/eabi/QtGuiu.def
+++ b/src/s60installs/eabi/QtGuiu.def
@@ -1,7 +1,7 @@
EXPORTS
_Z11qFadeEffectP7QWidgeti @ 1 NONAME
_Z11qt_image_idRK6QImage @ 2 NONAME
- _Z12qDrawPixmapsP8QPainterPKN12QDrawPixmaps4DataEiRK7QPixmap6QFlagsINS1_11DrawingHintEE @ 3 NONAME ABSENT
+ _Z12qDrawPixmapsP8QPainterPKN12QDrawPixmaps4DataEiRK7QPixmap6QFlagsINS1_11DrawingHintEE @ 3 NONAME
_Z12qt_pixmap_idRK7QPixmap @ 4 NONAME
_Z13qDrawWinPanelP8QPainterRK5QRectRK8QPalettebPK6QBrush @ 5 NONAME
_Z13qDrawWinPanelP8QPainteriiiiRK8QPalettebPK6QBrush @ 6 NONAME
@@ -2906,7 +2906,7 @@ EXPORTS
_ZN14QPaintEngineEx10drawPointsEPK7QPointFi @ 2905 NONAME
_ZN14QPaintEngineEx11drawEllipseERK5QRect @ 2906 NONAME
_ZN14QPaintEngineEx11drawEllipseERK6QRectF @ 2907 NONAME
- _ZN14QPaintEngineEx11drawPixmapsEPKN12QDrawPixmaps4DataEiRK7QPixmap6QFlagsINS0_11DrawingHintEE @ 2908 NONAME ABSENT
+ _ZN14QPaintEngineEx11drawPixmapsEPKN12QDrawPixmaps4DataEiRK7QPixmap6QFlagsINS0_11DrawingHintEE @ 2908 NONAME
_ZN14QPaintEngineEx11drawPolygonEPK6QPointiN12QPaintEngine15PolygonDrawModeE @ 2909 NONAME
_ZN14QPaintEngineEx11drawPolygonEPK7QPointFiN12QPaintEngine15PolygonDrawModeE @ 2910 NONAME
_ZN14QPaintEngineEx11updateStateERK17QPaintEngineState @ 2911 NONAME
@@ -4223,7 +4223,7 @@ EXPORTS
_ZN18QTextBlockUserDataD0Ev @ 4222 NONAME
_ZN18QTextBlockUserDataD1Ev @ 4223 NONAME
_ZN18QTextBlockUserDataD2Ev @ 4224 NONAME
- _ZN18QTextureGlyphCache8populateERK12QTextItemIntRK15QVarLengthArrayIjLi256EERKS3_I11QFixedPointLi256EE @ 4225 NONAME ABSENT
+ _ZN18QTextureGlyphCache8populateERK12QTextItemIntRK15QVarLengthArrayIjLi256EERKS3_I11QFixedPointLi256EE @ 4225 NONAME
_ZN19QAbstractProxyModel11qt_metacallEN11QMetaObject4CallEiPPv @ 4226 NONAME
_ZN19QAbstractProxyModel11qt_metacastEPKc @ 4227 NONAME
_ZN19QAbstractProxyModel13setHeaderDataEiN2Qt11OrientationERK8QVarianti @ 4228 NONAME
@@ -11805,125 +11805,5 @@ EXPORTS
_ZN24QImagePixmapCleanupHooks34executePixmapDataModificationHooksEP11QPixmapData @ 11804 NONAME
_ZN9QS60Style10timerEventEP11QTimerEvent @ 11805 NONAME
_ZN9QS60Style11eventFilterEP7QObjectP6QEvent @ 11806 NONAME
- _Z14qt_draw_glyphsP8QPainterPKjPK7QPointFi @ 11807 NONAME
- _ZN10QZipReader5closeEv @ 11808 NONAME
- _ZN10QZipReader8FileInfoC1ERKS0_ @ 11809 NONAME
- _ZN10QZipReader8FileInfoC1Ev @ 11810 NONAME
- _ZN10QZipReader8FileInfoC2ERKS0_ @ 11811 NONAME
- _ZN10QZipReader8FileInfoC2Ev @ 11812 NONAME
- _ZN10QZipReader8FileInfoD1Ev @ 11813 NONAME
- _ZN10QZipReader8FileInfoD2Ev @ 11814 NONAME
- _ZN10QZipReader8FileInfoaSERKS0_ @ 11815 NONAME
- _ZN10QZipReaderC1EP9QIODevice @ 11816 NONAME
- _ZN10QZipReaderC1ERK7QString6QFlagsIN9QIODevice12OpenModeFlagEE @ 11817 NONAME
- _ZN10QZipReaderC2EP9QIODevice @ 11818 NONAME
- _ZN10QZipReaderC2ERK7QString6QFlagsIN9QIODevice12OpenModeFlagEE @ 11819 NONAME
- _ZN10QZipReaderD1Ev @ 11820 NONAME
- _ZN10QZipReaderD2Ev @ 11821 NONAME
- _ZN11QStaticText13setTextFormatEN2Qt10TextFormatE @ 11822 NONAME
- _ZN11QStaticText14setMaximumSizeERK6QSizeF @ 11823 NONAME
- _ZN11QStaticText18setPerformanceHintENS_15PerformanceHintE @ 11824 NONAME
- _ZN11QStaticText6detachEv @ 11825 NONAME
- _ZN11QStaticText7prepareERK10QTransformRK5QFont @ 11826 NONAME
- _ZN11QStaticText7setTextERK7QString @ 11827 NONAME
- _ZN11QStaticTextC1ERK7QStringRK6QSizeF @ 11828 NONAME
- _ZN11QStaticTextC1ERKS_ @ 11829 NONAME
- _ZN11QStaticTextC1Ev @ 11830 NONAME
- _ZN11QStaticTextC2ERK7QStringRK6QSizeF @ 11831 NONAME
- _ZN11QStaticTextC2ERKS_ @ 11832 NONAME
- _ZN11QStaticTextC2Ev @ 11833 NONAME
- _ZN11QStaticTextD1Ev @ 11834 NONAME
- _ZN11QStaticTextD2Ev @ 11835 NONAME
- _ZN11QStaticTextaSERKS_ @ 11836 NONAME
- _ZN12QKeySequence6assignERK7QStringNS_14SequenceFormatE @ 11837 NONAME
- _ZN12QKeySequenceC1ERK7QStringNS_14SequenceFormatE @ 11838 NONAME
- _ZN12QKeySequenceC2ERK7QStringNS_14SequenceFormatE @ 11839 NONAME
- _ZN13QTextDocument19clearUndoRedoStacksENS_6StacksE @ 11840 NONAME
- _ZN14QPaintEngineEx19drawPixmapFragmentsEPKN8QPainter8FragmentEiRK7QPixmap6QFlagsINS0_12FragmentHintEE @ 11841 NONAME
- _ZN14QWidgetPrivate11inTabWidgetEP7QWidget @ 11842 NONAME
- _ZN14QWidgetPrivate17canKeypadNavigateEN2Qt11OrientationE @ 11843 NONAME
- _ZN14QWidgetPrivate6renderEP12QPaintDeviceRK6QPointRK7QRegion6QFlagsIN7QWidget10RenderFlagEEb @ 11844 NONAME
- _ZN15QGraphicsWidget21setAutoFillBackgroundEb @ 11845 NONAME
- _ZN16QFileSystemModel15directoryLoadedERK7QString @ 11846 NONAME
- _ZN18QTextureGlyphCache8populateEP11QFontEngineiPKjPK11QFixedPoint @ 11847 NONAME
- _ZN19QApplicationPrivate15getPixmapCursorEN2Qt11CursorShapeE @ 11848 NONAME
- _ZN20QGraphicsViewPrivate10centerViewEN13QGraphicsView14ViewportAnchorE @ 11849 NONAME
- _ZN20QGraphicsViewPrivate10updateRectERK5QRect @ 11850 NONAME
- _ZN20QGraphicsViewPrivate12updateRegionERK7QRegion @ 11851 NONAME
- _ZN20QGraphicsViewPrivate12updateScrollEv @ 11852 NONAME
- _ZN20QGraphicsViewPrivate15storeMouseEventEP11QMouseEvent @ 11853 NONAME
- _ZN20QGraphicsViewPrivate18storeDragDropEventEPK27QGraphicsSceneDragDropEvent @ 11854 NONAME
- _ZN20QGraphicsViewPrivate19translateTouchEventEPS_P11QTouchEvent @ 11855 NONAME
- _ZN20QGraphicsViewPrivate20_q_setViewportCursorERK7QCursor @ 11856 NONAME
- _ZN20QGraphicsViewPrivate20replayLastMouseEventEv @ 11857 NONAME
- _ZN20QGraphicsViewPrivate21freeStyleOptionsArrayEP24QStyleOptionGraphicsItem @ 11858 NONAME
- _ZN20QGraphicsViewPrivate21mouseMoveEventHandlerEP11QMouseEvent @ 11859 NONAME
- _ZN20QGraphicsViewPrivate21processPendingUpdatesEv @ 11860 NONAME
- _ZN20QGraphicsViewPrivate21updateLastCenterPointEv @ 11861 NONAME
- _ZN20QGraphicsViewPrivate22_q_unsetViewportCursorEv @ 11862 NONAME
- _ZN20QGraphicsViewPrivate22allocStyleOptionsArrayEi @ 11863 NONAME
- _ZN20QGraphicsViewPrivate22recalculateContentSizeEv @ 11864 NONAME
- _ZN20QGraphicsViewPrivate26populateSceneDragDropEventEP27QGraphicsSceneDragDropEventP10QDropEvent @ 11865 NONAME
- _ZN20QGraphicsViewPrivate28updateInputMethodSensitivityEv @ 11866 NONAME
- _ZN20QGraphicsViewPrivateC1Ev @ 11867 NONAME
- _ZN20QGraphicsViewPrivateC2Ev @ 11868 NONAME
- _ZN24QImagePixmapCleanupHooks13isImageCachedERK6QImage @ 11869 NONAME
- _ZN24QImagePixmapCleanupHooks14isPixmapCachedERK7QPixmap @ 11870 NONAME
- _ZN26QAbstractScrollAreaPrivate14layoutChildrenEv @ 11871 NONAME
- _ZN26QAbstractScrollAreaPrivate16replaceScrollBarEP10QScrollBarN2Qt11OrientationE @ 11872 NONAME
- _ZN26QAbstractScrollAreaPrivate23_q_showOrHideScrollBarsEv @ 11873 NONAME
- _ZN26QAbstractScrollAreaPrivate4initEv @ 11874 NONAME
- _ZN26QAbstractScrollAreaPrivate9_q_hslideEi @ 11875 NONAME
- _ZN26QAbstractScrollAreaPrivate9_q_vslideEi @ 11876 NONAME
- _ZN26QAbstractScrollAreaPrivateC1Ev @ 11877 NONAME
- _ZN26QAbstractScrollAreaPrivateC2Ev @ 11878 NONAME
- _ZN6QColor12isValidColorERK7QString @ 11879 NONAME
- _ZN6QColor18setColorFromStringERK7QString @ 11880 NONAME
- _ZN6QLabel12setSelectionEii @ 11881 NONAME
- _ZN7QPixmap16convertFromImageERK6QImage6QFlagsIN2Qt19ImageConversionFlagEE @ 11882 NONAME
- _ZN8QPainter14drawStaticTextERK7QPointFRK11QStaticText @ 11883 NONAME
- _ZN8QPainter19drawPixmapFragmentsEPKNS_8FragmentEiRK7QPixmap6QFlagsINS_12FragmentHintEE @ 11884 NONAME
- _ZN8QPainter8Fragment6createERK7QPointFRK6QRectFffff @ 11885 NONAME
- _ZN8QToolBar17visibilityChangedEb @ 11886 NONAME
- _ZNK10QZipReader10extractAllERK7QString @ 11887 NONAME
- _ZNK10QZipReader10isReadableEv @ 11888 NONAME
- _ZNK10QZipReader11entryInfoAtEi @ 11889 NONAME
- _ZNK10QZipReader12fileInfoListEv @ 11890 NONAME
- _ZNK10QZipReader5countEv @ 11891 NONAME
- _ZNK10QZipReader6existsEv @ 11892 NONAME
- _ZNK10QZipReader6statusEv @ 11893 NONAME
- _ZNK10QZipReader8fileDataERK7QString @ 11894 NONAME
- _ZNK11QStaticText10textFormatEv @ 11895 NONAME
- _ZNK11QStaticText11maximumSizeEv @ 11896 NONAME
- _ZNK11QStaticText15performanceHintEv @ 11897 NONAME
- _ZNK11QStaticText4sizeEv @ 11898 NONAME
- _ZNK11QStaticText4textEv @ 11899 NONAME
- _ZNK11QStaticTexteqERKS_ @ 11900 NONAME
- _ZNK11QStaticTextneERKS_ @ 11901 NONAME
- _ZNK11QTextCursor15positionInBlockEv @ 11902 NONAME
- _ZNK13QIntValidator5fixupER7QString @ 11903 NONAME
- _ZNK14QPlainTextEdit8anchorAtERK6QPoint @ 11904 NONAME
- _ZNK15QGraphicsWidget18autoFillBackgroundEv @ 11905 NONAME
- _ZNK20QGraphicsViewPrivate10mapToSceneERK6QRectF @ 11906 NONAME
- _ZNK20QGraphicsViewPrivate10mapToSceneERK7QPointF @ 11907 NONAME
- _ZNK20QGraphicsViewPrivate13mapToViewRectEPK13QGraphicsItemRK6QRectF @ 11908 NONAME
- _ZNK20QGraphicsViewPrivate14mapRectToSceneERK5QRect @ 11909 NONAME
- _ZNK20QGraphicsViewPrivate14verticalScrollEv @ 11910 NONAME
- _ZNK20QGraphicsViewPrivate15mapToViewRegionEPK13QGraphicsItemRK6QRectF @ 11911 NONAME
- _ZNK20QGraphicsViewPrivate16horizontalScrollEv @ 11912 NONAME
- _ZNK20QGraphicsViewPrivate16mapRectFromSceneERK6QRectF @ 11913 NONAME
- _ZNK20QGraphicsViewPrivate16rubberBandRegionEPK7QWidgetRK5QRect @ 11914 NONAME
- _ZNK20QGraphicsViewPrivate9findItemsERK7QRegionPbRK10QTransform @ 11915 NONAME
- _ZNK26QAbstractScrollAreaPrivate14contentsOffsetEv @ 11916 NONAME
- _ZNK6QImage13constScanLineEi @ 11917 NONAME
- _ZNK6QImage9constBitsEv @ 11918 NONAME
- _ZNK6QLabel12selectedTextEv @ 11919 NONAME
- _ZNK6QLabel14selectionStartEv @ 11920 NONAME
- _ZNK6QLabel15hasSelectedTextEv @ 11921 NONAME
- _ZNK7QBezier11getSubRangeEff @ 11922 NONAME
- _ZNK7QBezier5mapByERK10QTransform @ 11923 NONAME
- _ZTI20QGraphicsViewPrivate @ 11924 NONAME
- _ZTI26QAbstractScrollAreaPrivate @ 11925 NONAME
- _ZTV20QGraphicsViewPrivate @ 11926 NONAME
- _ZTV26QAbstractScrollAreaPrivate @ 11927 NONAME
+ _ZN13QFontDatabase25removeAllApplicationFontsEv @ 11807 NONAME
diff --git a/src/sql/drivers/odbc/qsql_odbc.cpp b/src/sql/drivers/odbc/qsql_odbc.cpp
index ee22bc3..6fd1725 100644
--- a/src/sql/drivers/odbc/qsql_odbc.cpp
+++ b/src/sql/drivers/odbc/qsql_odbc.cpp
@@ -124,11 +124,10 @@ class QODBCDriverPrivate
public:
enum DefaultCase{Lower, Mixed, Upper, Sensitive};
QODBCDriverPrivate()
- : hEnv(0), hDbc(0), useSchema(false), disconnectCount(0), isMySqlServer(false),
- isMSSqlServer(false), hasSQLFetchScroll(true), hasMultiResultSets(false),
- isQuoteInitialized(false), quote(QLatin1Char('"'))
+ : hEnv(0), hDbc(0), unicode(false), useSchema(false), disconnectCount(0), isMySqlServer(false),
+ isMSSqlServer(false), isFreeTDSDriver(false), hasSQLFetchScroll(true),
+ hasMultiResultSets(false), isQuoteInitialized(false), quote(QLatin1Char('"'))
{
- unicode = false;
}
SQLHANDLE hEnv;
@@ -139,6 +138,7 @@ public:
int disconnectCount;
bool isMySqlServer;
bool isMSSqlServer;
+ bool isFreeTDSDriver;
bool hasSQLFetchScroll;
bool hasMultiResultSets;
@@ -165,7 +165,10 @@ public:
QODBCPrivate(QODBCDriverPrivate *dpp)
: hStmt(0), useSchema(false), hasSQLFetchScroll(true), driverPrivate(dpp), userForwardOnly(false)
{
- unicode = false;
+ unicode = dpp->unicode;
+ useSchema = dpp->useSchema;
+ disconnectCount = dpp->disconnectCount;
+ hasSQLFetchScroll = dpp->hasSQLFetchScroll;
}
inline void clearValues()
@@ -340,7 +343,9 @@ static QVariant::Type qDecodeODBCType(SQLSMALLINT sqltype, const T* p, bool isSi
break;
case SQL_CHAR:
case SQL_VARCHAR:
+#if (ODBCVER >= 0x0350)
case SQL_GUID:
+#endif
case SQL_LONGVARCHAR:
type = QVariant::String;
break;
@@ -365,44 +370,88 @@ static QString qGetStringData(SQLHANDLE hStmt, int column, int colSize, bool uni
} else {
colSize++; // make sure there is room for more than the 0 termination
}
- r = SQLGetData(hStmt,
- column+1,
- SQL_C_TCHAR,
- NULL,
- 0,
- &lengthIndicator);
- if ((r == SQL_SUCCESS || r == SQL_SUCCESS_WITH_INFO) && lengthIndicator > 0)
- colSize = lengthIndicator/sizeof(SQLTCHAR) + 1;
- QVarLengthArray<SQLTCHAR> buf(colSize);
- while (true) {
+ if(unicode) {
r = SQLGetData(hStmt,
column+1,
SQL_C_TCHAR,
- (SQLPOINTER)buf.data(),
- colSize*sizeof(SQLTCHAR),
+ NULL,
+ 0,
&lengthIndicator);
- if (r == SQL_SUCCESS || r == SQL_SUCCESS_WITH_INFO) {
- if (lengthIndicator == SQL_NULL_DATA || lengthIndicator == SQL_NO_TOTAL) {
+ if ((r == SQL_SUCCESS || r == SQL_SUCCESS_WITH_INFO) && lengthIndicator > 0)
+ colSize = lengthIndicator/sizeof(SQLTCHAR) + 1;
+ QVarLengthArray<SQLTCHAR> buf(colSize);
+ memset(buf.data(), 0, colSize*sizeof(SQLTCHAR));
+ while (true) {
+ r = SQLGetData(hStmt,
+ column+1,
+ SQL_C_TCHAR,
+ (SQLPOINTER)buf.data(),
+ colSize*sizeof(SQLTCHAR),
+ &lengthIndicator);
+ if (r == SQL_SUCCESS || r == SQL_SUCCESS_WITH_INFO) {
+ if (lengthIndicator == SQL_NULL_DATA || lengthIndicator == SQL_NO_TOTAL) {
+ fieldVal.clear();
+ break;
+ }
+ // if SQL_SUCCESS_WITH_INFO is returned, indicating that
+ // more data can be fetched, the length indicator does NOT
+ // contain the number of bytes returned - it contains the
+ // total number of bytes that CAN be fetched
+ // colSize-1: remove 0 termination when there is more data to fetch
+ int rSize = (r == SQL_SUCCESS_WITH_INFO) ? colSize : lengthIndicator/sizeof(SQLTCHAR);
+ fieldVal += fromSQLTCHAR(buf, rSize);
+ if (lengthIndicator < (unsigned int)colSize*sizeof(SQLTCHAR)) {
+ // workaround for Drivermanagers that don't return SQL_NO_DATA
+ break;
+ }
+ } else if (r == SQL_NO_DATA) {
+ break;
+ } else {
+ qWarning() << "qGetStringData: Error while fetching data (" << qWarnODBCHandle(SQL_HANDLE_STMT, hStmt) << ')';
fieldVal.clear();
break;
}
- // if SQL_SUCCESS_WITH_INFO is returned, indicating that
- // more data can be fetched, the length indicator does NOT
- // contain the number of bytes returned - it contains the
- // total number of bytes that CAN be fetched
- // colSize-1: remove 0 termination when there is more data to fetch
- int rSize = (r == SQL_SUCCESS_WITH_INFO) ? colSize : lengthIndicator/sizeof(SQLTCHAR);
- fieldVal += fromSQLTCHAR(buf, rSize);
- if (lengthIndicator < (unsigned int)colSize*sizeof(SQLTCHAR)) {
- // workaround for Drivermanagers that don't return SQL_NO_DATA
+ }
+ } else {
+ r = SQLGetData(hStmt,
+ column+1,
+ SQL_C_CHAR,
+ NULL,
+ 0,
+ &lengthIndicator);
+ if ((r == SQL_SUCCESS || r == SQL_SUCCESS_WITH_INFO) && lengthIndicator > 0)
+ colSize = lengthIndicator + 1;
+ QVarLengthArray<SQLCHAR> buf(colSize);
+ while (true) {
+ r = SQLGetData(hStmt,
+ column+1,
+ SQL_C_CHAR,
+ (SQLPOINTER)buf.data(),
+ colSize,
+ &lengthIndicator);
+ if (r == SQL_SUCCESS || r == SQL_SUCCESS_WITH_INFO) {
+ if (lengthIndicator == SQL_NULL_DATA || lengthIndicator == SQL_NO_TOTAL) {
+ fieldVal.clear();
+ break;
+ }
+ // if SQL_SUCCESS_WITH_INFO is returned, indicating that
+ // more data can be fetched, the length indicator does NOT
+ // contain the number of bytes returned - it contains the
+ // total number of bytes that CAN be fetched
+ // colSize-1: remove 0 termination when there is more data to fetch
+ int rSize = (r == SQL_SUCCESS_WITH_INFO) ? colSize : lengthIndicator;
+ fieldVal += QString::fromUtf8((const char *)buf.constData(), rSize);
+ if (lengthIndicator < (unsigned int)colSize) {
+ // workaround for Drivermanagers that don't return SQL_NO_DATA
+ break;
+ }
+ } else if (r == SQL_NO_DATA) {
+ break;
+ } else {
+ qWarning() << "qGetStringData: Error while fetching data (" << qWarnODBCHandle(SQL_HANDLE_STMT, hStmt) << ')';
+ fieldVal.clear();
break;
}
- } else if (r == SQL_NO_DATA) {
- break;
- } else {
- qWarning() << "qGetStringData: Error while fetching data (" << qWarnODBCHandle(SQL_HANDLE_STMT, hStmt) << ')';
- fieldVal.clear();
- break;
}
}
return fieldVal;
@@ -847,10 +896,6 @@ QODBCResult::QODBCResult(const QODBCDriver * db, QODBCDriverPrivate* p)
: QSqlResult(db)
{
d = new QODBCPrivate(p);
- d->unicode = p->unicode;
- d->useSchema = p->useSchema;
- d->disconnectCount = p->disconnectCount;
- d->hasSQLFetchScroll = p->hasSQLFetchScroll;
}
QODBCResult::~QODBCResult()
@@ -1825,6 +1870,7 @@ bool QODBCDriver::open(const QString & db,
SQLSMALLINT cb;
QVarLengthArray<SQLTCHAR> connOut(1024);
+ memset(connOut.data(), 0, connOut.size() * sizeof(SQLTCHAR));
r = SQLDriverConnect(d->hDbc,
NULL,
#ifdef UNICODE
@@ -1917,6 +1963,7 @@ void QODBCDriverPrivate::checkUnicode()
NULL);
if ((r == SQL_SUCCESS || r == SQL_SUCCESS_WITH_INFO) && (fFunc & SQL_CVT_WCHAR)) {
unicode = true;
+ return;
}
r = SQLGetInfo(hDbc,
@@ -1926,6 +1973,7 @@ void QODBCDriverPrivate::checkUnicode()
NULL);
if ((r == SQL_SUCCESS || r == SQL_SUCCESS_WITH_INFO) && (fFunc & SQL_CVT_WVARCHAR)) {
unicode = true;
+ return;
}
r = SQLGetInfo(hDbc,
@@ -1935,7 +1983,25 @@ void QODBCDriverPrivate::checkUnicode()
NULL);
if ((r == SQL_SUCCESS || r == SQL_SUCCESS_WITH_INFO) && (fFunc & SQL_CVT_WLONGVARCHAR)) {
unicode = true;
+ return;
+ }
+ SQLHANDLE hStmt;
+ r = SQLAllocHandle(SQL_HANDLE_STMT,
+ hDbc,
+ &hStmt);
+
+ r = SQLExecDirect(hStmt, toSQLTCHAR(QLatin1String("select 'test'")).data(), SQL_NTS);
+ if(r == SQL_SUCCESS) {
+ r = SQLFetch(hStmt);
+ if(r == SQL_SUCCESS) {
+ QVarLengthArray<SQLWCHAR> buffer(10);
+ r = SQLGetData(hStmt, 1, SQL_C_WCHAR, buffer.data(), buffer.size() * sizeof(SQLWCHAR), NULL);
+ if(r == SQL_SUCCESS && fromSQLTCHAR(buffer) == QLatin1String("test")) {
+ unicode = true;
+ }
+ }
}
+ r = SQLFreeHandle(SQL_HANDLE_STMT, hStmt);
}
bool QODBCDriverPrivate::checkDriver() const
@@ -2027,6 +2093,21 @@ void QODBCDriverPrivate::checkSqlServer()
isMySqlServer = serverType.contains(QLatin1String("mysql"), Qt::CaseInsensitive);
isMSSqlServer = serverType.contains(QLatin1String("Microsoft SQL Server"), Qt::CaseInsensitive);
}
+ r = SQLGetInfo(hDbc,
+ SQL_DRIVER_NAME,
+ serverString.data(),
+ serverString.size() * sizeof(SQLTCHAR),
+ &t);
+ if (r == SQL_SUCCESS || r == SQL_SUCCESS_WITH_INFO) {
+ QString serverType;
+#ifdef UNICODE
+ serverType = fromSQLTCHAR(serverString, t/sizeof(SQLTCHAR));
+#else
+ serverType = QString::fromUtf8((const char *)serverString.constData(), t);
+#endif
+ isFreeTDSDriver = serverType.contains(QLatin1String("tdsodbc"), Qt::CaseInsensitive);
+ unicode = isFreeTDSDriver == false;
+ }
}
void QODBCDriverPrivate::checkHasSQLFetchScroll()
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/compiled.qml b/tests/auto/declarative/qdeclarativeecmascript/data/compiled.qml
new file mode 100644
index 0000000..4207a1f
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/compiled.qml
@@ -0,0 +1,38 @@
+import Qt 4.6
+
+QtObject {
+ property real test1: a + b
+ property real test2: a - b
+ property bool test3: (a < b)
+ property bool test4: (a > b)
+ property bool test5: (a == b)
+ property bool test6: (a != b)
+
+ property int test7: c + d
+ property int test8: d - c
+ property bool test9: (c < d)
+ property bool test10: (c > d)
+ property bool test11: (c == d)
+ property bool test12: (c != d)
+
+ property string test13: e + f
+ property string test14: e + " " + f
+ property bool test15: (e == f)
+ property bool test16: (e != f)
+
+ property int test17: a
+ property real test18: d
+ property int test19: g
+ property real test20: g
+ property string test21: g
+ property string test22: h
+
+ property real a: 4.5
+ property real b: 11.2
+ property int c: 9
+ property int d: 176
+ property string e: "Hello"
+ property string f: "World"
+ property var g: 6.7
+ property var h: "!"
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
index b218d30..09e77a3 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
+++ b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
@@ -129,6 +129,7 @@ private slots:
void ownership();
void qlistqobjectMethods();
void strictlyEquals();
+ void compiled();
void bug1();
void dynamicCreationCrash();
@@ -2026,6 +2027,42 @@ void tst_qdeclarativeecmascript::strictlyEquals()
delete object;
}
+void tst_qdeclarativeecmascript::compiled()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("compiled.qml"));
+
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("test1").toReal(), qreal(15.7));
+ QCOMPARE(object->property("test2").toReal(), qreal(-6.7));
+ QCOMPARE(object->property("test3").toBool(), true);
+ QCOMPARE(object->property("test4").toBool(), false);
+ QCOMPARE(object->property("test5").toBool(), false);
+ QCOMPARE(object->property("test6").toBool(), true);
+
+ QCOMPARE(object->property("test7").toInt(), 185);
+ QCOMPARE(object->property("test8").toInt(), 167);
+ QCOMPARE(object->property("test9").toBool(), true);
+ QCOMPARE(object->property("test10").toBool(), false);
+ QCOMPARE(object->property("test11").toBool(), false);
+ QCOMPARE(object->property("test12").toBool(), true);
+
+ QCOMPARE(object->property("test13").toString(), QLatin1String("HelloWorld"));
+ QCOMPARE(object->property("test14").toString(), QLatin1String("Hello World"));
+ QCOMPARE(object->property("test15").toBool(), false);
+ QCOMPARE(object->property("test16").toBool(), true);
+
+ QCOMPARE(object->property("test17").toInt(), 4);
+ QCOMPARE(object->property("test18").toReal(), qreal(176));
+ //QCOMPARE(object->property("test19").toInt(), 6);
+ QCOMPARE(object->property("test20").toReal(), qreal(6.7));
+ QCOMPARE(object->property("test21").toString(), QLatin1String("6.7"));
+ QCOMPARE(object->property("test22").toString(), QLatin1String("!"));
+
+ delete object;
+}
+
QTEST_MAIN(tst_qdeclarativeecmascript)
#include "tst_qdeclarativeecmascript.moc"
diff --git a/tests/auto/declarative/qdeclarativemousearea/data/updateMousePosOnClick.qml b/tests/auto/declarative/qdeclarativemousearea/data/updateMousePosOnClick.qml
new file mode 100644
index 0000000..0da7c45
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativemousearea/data/updateMousePosOnClick.qml
@@ -0,0 +1,20 @@
+import Qt 4.6
+
+Rectangle {
+ color: "#ffffff"
+ width: 320; height: 240
+ MouseArea {
+ id: mouseRegion
+ objectName: "mouseregion"
+ anchors.fill: parent
+ Rectangle {
+ id: ball
+ objectName: "ball"
+ width: 20; height: 20
+ radius: 10
+ color: "#0000ff"
+ x: { mouseRegion.mouseX }
+ y: mouseRegion.mouseY
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp b/tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp
index 769cf32..9b664e5 100644
--- a/tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp
+++ b/tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp
@@ -42,6 +42,7 @@
#include <QtTest/QtTest>
#include <QtTest/QSignalSpy>
#include <private/qdeclarativemousearea_p.h>
+#include <private/qdeclarativerectangle_p.h>
#include <QtDeclarative/qdeclarativeview.h>
class tst_QDeclarativeMouseArea: public QObject
@@ -49,6 +50,7 @@ class tst_QDeclarativeMouseArea: public QObject
Q_OBJECT
private slots:
void dragProperties();
+ void updateMouseAreaPosOnClick();
private:
QDeclarativeView *createView(const QString &filename);
};
@@ -121,6 +123,8 @@ void tst_QDeclarativeMouseArea::dragProperties()
QCOMPARE(xmaxSpy.count(),1);
QCOMPARE(yminSpy.count(),1);
QCOMPARE(ymaxSpy.count(),1);
+
+ delete canvas;
}
QDeclarativeView *tst_QDeclarativeMouseArea::createView(const QString &filename)
@@ -133,6 +137,38 @@ QDeclarativeView *tst_QDeclarativeMouseArea::createView(const QString &filename)
return canvas;
}
+void tst_QDeclarativeMouseArea::updateMouseAreaPosOnClick()
+{
+ QDeclarativeView *canvas = createView(SRCDIR "/data/updateMousePosOnClick.qml");
+ canvas->show();
+ canvas->setFocus();
+ QVERIFY(canvas->rootObject() != 0);
+
+ QDeclarativeMouseArea *mouseRegion = canvas->rootObject()->findChild<QDeclarativeMouseArea*>("mouseregion");
+ QVERIFY(mouseRegion != 0);
+
+ QDeclarativeRectangle *rect = canvas->rootObject()->findChild<QDeclarativeRectangle*>("ball");
+ QVERIFY(rect != 0);
+
+ QCOMPARE(mouseRegion->mouseX(), rect->x());
+ QCOMPARE(mouseRegion->mouseY(), rect->y());
+
+ QGraphicsScene *scene = canvas->scene();
+ QGraphicsSceneMouseEvent event(QEvent::GraphicsSceneMousePress);
+ event.setScenePos(QPointF(100, 100));
+ event.setButton(Qt::LeftButton);
+ event.setButtons(Qt::LeftButton);
+ QApplication::sendEvent(scene, &event);
+
+ QCOMPARE(mouseRegion->mouseX(), 100.0);
+ QCOMPARE(mouseRegion->mouseY(), 100.0);
+
+ QCOMPARE(mouseRegion->mouseX(), rect->x());
+ QCOMPARE(mouseRegion->mouseY(), rect->y());
+
+ delete canvas;
+}
+
QTEST_MAIN(tst_QDeclarativeMouseArea)
#include "tst_qdeclarativemousearea.moc"
diff --git a/tests/auto/q3sqlcursor/tst_q3sqlcursor.cpp b/tests/auto/q3sqlcursor/tst_q3sqlcursor.cpp
index f837564..f3c2c09 100644
--- a/tests/auto/q3sqlcursor/tst_q3sqlcursor.cpp
+++ b/tests/auto/q3sqlcursor/tst_q3sqlcursor.cpp
@@ -44,7 +44,7 @@
#include <q3sqlcursor.h>
#include <qsqlfield.h>
#include <qsqldriver.h>
-
+#include <QSet>
#include "../qsqldatabase/tst_databases.h"
@@ -122,7 +122,7 @@ void tst_Q3SqlCursor::generic_data(const QString &engine)
{
if ( dbs.fillTestTable(engine) == 0 ) {
if(engine.isEmpty())
- QSKIP( "No database drivers are available in this Qt configuration", SkipAll );
+ QSKIP( "No database drivers are available in this Qt configuration", SkipAll );
else
QSKIP( (QString("No database drivers of type %1 are available in this Qt configuration").arg(engine)).toLocal8Bit(), SkipAll );
}
@@ -131,7 +131,7 @@ void tst_Q3SqlCursor::generic_data(const QString &engine)
void tst_Q3SqlCursor::createTestTables( QSqlDatabase db )
{
if ( !db.isValid() )
- return;
+ return;
QSqlQuery q( db );
if (tst_Databases::isSqlServer(db)) {
@@ -143,20 +143,20 @@ void tst_Q3SqlCursor::createTestTables( QSqlDatabase db )
// please never ever change this table; otherwise fix all tests ;)
if ( tst_Databases::isMSAccess( db ) ) {
- QVERIFY_SQL(q, exec( "create table " + qtest + " ( id int not null, t_varchar varchar(40) not null,"
- "t_char char(40), t_numeric number, primary key (id, t_varchar) )" ));
+ QVERIFY_SQL(q, exec( "create table " + qtest + " ( id int not null, t_varchar varchar(40) not null,"
+ "t_char char(40), t_numeric number, primary key (id, t_varchar) )" ));
} else {
- QVERIFY_SQL(q, exec( "create table " + qtest + " ( id int not null, t_varchar varchar(40) not null,"
- "t_char char(40), t_numeric numeric(6, 3), primary key (id, t_varchar) )" ));
+ QVERIFY_SQL(q, exec( "create table " + qtest + " ( id int not null, t_varchar varchar(40) not null,"
+ "t_char char(40), t_numeric numeric(6, 3), primary key (id, t_varchar) )" ));
}
if ( tst_Databases::isSqlServer( db ) ) {
- //workaround for SQL SERVER since he can store unicode only in nvarchar fields
- QVERIFY_SQL(q, exec("create table " + qTableName("qtest_unicode", __FILE__) + " (id int not null, "
- "t_varchar nvarchar(80) not null, t_char nchar(80) )" ));
+ //workaround for SQL SERVER since he can store unicode only in nvarchar fields
+ QVERIFY_SQL(q, exec("create table " + qTableName("qtest_unicode", __FILE__) + " (id int not null, "
+ "t_varchar nvarchar(80) not null, t_char nchar(80) )" ));
} else {
- QVERIFY_SQL(q, exec("create table " + qTableName("qtest_unicode", __FILE__) + " (id int not null, "
- "t_varchar varchar(100) not null," "t_char char(100))" ));
+ QVERIFY_SQL(q, exec("create table " + qTableName("qtest_unicode", __FILE__) + " (id int not null, "
+ "t_varchar varchar(100) not null," "t_char char(100))" ));
}
if (tst_Databases::isMSAccess(db)) {
@@ -169,7 +169,7 @@ void tst_Q3SqlCursor::createTestTables( QSqlDatabase db )
void tst_Q3SqlCursor::dropTestTables( QSqlDatabase db )
{
if ( !db.isValid() )
- return;
+ return;
QStringList tableNames;
tableNames << qtest
<< qTableName( "qtest_unicode", __FILE__ )
@@ -183,7 +183,7 @@ void tst_Q3SqlCursor::dropTestTables( QSqlDatabase db )
void tst_Q3SqlCursor::populateTestTables( QSqlDatabase db )
{
if (!db.isValid())
- return;
+ return;
QSqlQuery q( db );
q.exec( "delete from " + qtest ); //not fatal
@@ -200,21 +200,21 @@ void tst_Q3SqlCursor::initTestCase()
dbs.open();
for ( QStringList::ConstIterator it = dbs.dbNames.begin(); it != dbs.dbNames.end(); ++it ) {
- QSqlDatabase db = QSqlDatabase::database( (*it) );
- CHECK_DATABASE( db );
+ QSqlDatabase db = QSqlDatabase::database( (*it) );
+ CHECK_DATABASE( db );
- dropTestTables( db ); //in case of leftovers
- createTestTables( db );
- populateTestTables( db );
+ dropTestTables( db ); //in case of leftovers
+ createTestTables( db );
+ populateTestTables( db );
}
}
void tst_Q3SqlCursor::cleanupTestCase()
{
for ( QStringList::ConstIterator it = dbs.dbNames.begin(); it != dbs.dbNames.end(); ++it ) {
- QSqlDatabase db = QSqlDatabase::database( (*it) );
- CHECK_DATABASE( db );
- dropTestTables( db );
+ QSqlDatabase db = QSqlDatabase::database( (*it) );
+ CHECK_DATABASE( db );
+ dropTestTables( db );
}
dbs.close();
@@ -230,9 +230,9 @@ void tst_Q3SqlCursor::cleanup()
QSqlDatabase db = QSqlDatabase::database( dbName );
CHECK_DATABASE( db );
if ( QTest::currentTestFailed() ) {
- //since Oracle ODBC totally craps out on error, we init again
- db.close();
- db.open();
+ //since Oracle ODBC totally craps out on error, we init again
+ db.close();
+ db.open();
}
}
@@ -244,10 +244,10 @@ void tst_Q3SqlCursor::copyConstructor()
Q3SqlCursor cur2;
{
- Q3SqlCursor cur( qtest, true, db );
- QVERIFY_SQL(cur, select( cur.index( QString("id") ) ));
- cur2 = Q3SqlCursor( cur );
- // let "cur" run out of scope...
+ Q3SqlCursor cur( qtest, true, db );
+ QVERIFY_SQL(cur, select( cur.index( QString("id") ) ));
+ cur2 = Q3SqlCursor( cur );
+ // let "cur" run out of scope...
}
QSqlRecord* rec = cur2.primeUpdate();
@@ -256,8 +256,8 @@ void tst_Q3SqlCursor::copyConstructor()
int i = 0;
while ( cur2.next() ) {
- QVERIFY( cur2.value("id").toInt() == i );
- i++;
+ QVERIFY( cur2.value("id").toInt() == i );
+ i++;
}
}
@@ -271,8 +271,8 @@ void tst_Q3SqlCursor::value()
QVERIFY_SQL(cur, select( cur.index( QString("id") ) ));
int i = 0;
while ( cur.next() ) {
- QCOMPARE(cur.value("id").toInt(), i);
- i++;
+ QCOMPARE(cur.value("id").toInt(), i);
+ i++;
}
}
@@ -285,11 +285,11 @@ void tst_Q3SqlCursor::primaryIndex()
Q3SqlCursor cur( qtest, true, db );
QSqlIndex index = cur.primaryIndex();
if ( tst_Databases::isMSAccess( db ) ) {
- QCOMPARE( index.fieldName(1).upper(), QString( "ID" ) );
- QCOMPARE( index.fieldName(0).upper(), QString( "T_VARCHAR" ) );
+ QCOMPARE( index.fieldName(1).upper(), QString( "ID" ) );
+ QCOMPARE( index.fieldName(0).upper(), QString( "T_VARCHAR" ) );
} else {
- QCOMPARE( index.fieldName(0).upper(), QString( "ID" ) );
- QCOMPARE( index.fieldName(1).upper(), QString( "T_VARCHAR" ) );
+ QCOMPARE( index.fieldName(0).upper(), QString( "ID" ) );
+ QCOMPARE( index.fieldName(1).upper(), QString( "T_VARCHAR" ) );
}
QVERIFY(!index.isDescending(0));
QVERIFY(!index.isDescending(1));
@@ -308,10 +308,10 @@ void tst_Q3SqlCursor::insert()
// check that primeInsert returns a valid QSqlRecord
QCOMPARE( (int)irec->count(), 4 );
if ( ( irec->field( 0 ).type() != QVariant::Int ) &&
- ( irec->field( 0 ).type() != QVariant::String ) &&
+ ( irec->field( 0 ).type() != QVariant::String ) &&
( irec->field( 0 ).type() != QVariant::Double ) ) {
- QFAIL( QString( "Wrong datatype %1 for field 'ID'"
- " (expected Int or String)" ).arg( QVariant::typeToName( irec->field( 0 ).type() ) ) );
+ QFAIL( QString( "Wrong datatype %1 for field 'ID'"
+ " (expected Int or String)" ).arg( QVariant::typeToName( irec->field( 0 ).type() ) ) );
}
QCOMPARE( QVariant::typeToName( irec->field( 1 ).type() ), QVariant::typeToName( QVariant::String ) );
QCOMPARE( QVariant::typeToName( irec->field( 2 ).type() ), QVariant::typeToName( QVariant::String ) );
@@ -327,7 +327,9 @@ void tst_Q3SqlCursor::insert()
irec->setValue( "t_char", "SomeChar" );
irec->setValue( "t_numeric", 400.400 );
- QCOMPARE( cur.insert(), 1 );
+ QSet<int> validReturns(QSet<int>() << -1 << 1);
+
+ QVERIFY( validReturns.contains(cur.insert()) );
// restore old test-tables
populateTestTables( db );
@@ -338,6 +340,7 @@ void tst_Q3SqlCursor::insertSpecial()
QFETCH( QString, dbName );
QSqlDatabase db = QSqlDatabase::database( dbName );
CHECK_DATABASE( db );
+ QSet<int> validReturns(QSet<int>() << -1 << 1);
Q3SqlCursor cur( qtest, true, db );
QSqlRecord* irec = cur.primeInsert();
@@ -355,25 +358,25 @@ void tst_Q3SqlCursor::insertSpecial()
// INSERT the strings
QStringList::Iterator it;
for ( it = strings.begin(); it != strings.end(); ++it ) {
- QSqlRecord* irec = cur.primeInsert();
- QVERIFY( irec != 0 );
- irec->setValue( "id", i );
- irec->setValue( "t_varchar", (*it) );
- irec->setValue( "t_char", (*it) );
- irec->setValue( "t_numeric", (double)i );
- ++i;
- QCOMPARE( cur.insert(), 1 );
+ QSqlRecord* irec = cur.primeInsert();
+ QVERIFY( irec != 0 );
+ irec->setValue( "id", i );
+ irec->setValue( "t_varchar", (*it) );
+ irec->setValue( "t_char", (*it) );
+ irec->setValue( "t_numeric", (double)i );
+ ++i;
+ QVERIFY( validReturns.contains(cur.insert()) );
}
QVERIFY( cur.select( "id >= 800 and id < 900" ) );
int i2 = 800;
while( cur.next() ) {
- QCOMPARE( cur.value( "id" ).toInt(), i2 );
- QCOMPARE( cur.value( "t_varchar" ).toString().stripWhiteSpace(), strings.at( i2 - 800 ) );
- QCOMPARE( cur.value( "t_char" ).toString().stripWhiteSpace(), strings.at( i2 - 800 ) );
- QCOMPARE( cur.value( "t_numeric" ).toDouble(), (double)i2 );
- ++i2;
+ QCOMPARE( cur.value( "id" ).toInt(), i2 );
+ QCOMPARE( cur.value( "t_varchar" ).toString().stripWhiteSpace(), strings.at( i2 - 800 ) );
+ QCOMPARE( cur.value( "t_char" ).toString().stripWhiteSpace(), strings.at( i2 - 800 ) );
+ QCOMPARE( cur.value( "t_numeric" ).toDouble(), (double)i2 );
+ ++i2;
}
QCOMPARE( i, i2 );
@@ -385,6 +388,7 @@ void tst_Q3SqlCursor::batchInsert()
QFETCH( QString, dbName );
QSqlDatabase db = QSqlDatabase::database( dbName );
CHECK_DATABASE( db );
+ QSet<int> validReturns(QSet<int>() << -1 << 1);
QSqlQuery q( db );
q.exec( "delete from " + qtest );
@@ -393,16 +397,16 @@ void tst_Q3SqlCursor::batchInsert()
int i = 0;
for ( ; i < 100; ++i ) {
- QSqlRecord* irec = cur.primeInsert();
- Q_ASSERT( irec );
- irec->setValue( "id", i );
- irec->setValue( "t_varchar", "blah" );
- irec->setValue( "t_char", "blah" );
- irec->setValue( "t_numeric", 1.1 );
- if ( db.driverName().startsWith( "QSQLITE" ) ) {
- QVERIFY( cur.insert( true ) );
- } else {
- QCOMPARE( cur.insert( true ), 1 );
+ QSqlRecord* irec = cur.primeInsert();
+ Q_ASSERT( irec );
+ irec->setValue( "id", i );
+ irec->setValue( "t_varchar", "blah" );
+ irec->setValue( "t_char", "blah" );
+ irec->setValue( "t_numeric", 1.1 );
+ if ( db.driverName().startsWith( "QSQLITE" ) ) {
+ QVERIFY( cur.insert( true ) );
+ } else {
+ QVERIFY( validReturns.contains(cur.insert( true )) );
}
}
@@ -413,18 +417,18 @@ void tst_Q3SqlCursor::batchInsert()
irec->setValue( "t_varchar", "blah" );
irec->setValue( "t_char", "blah" );
irec->setValue( "t_numeric", 1.1 );
- if ( db.driverName().startsWith( "QSQLITE" ) ) {
- QVERIFY( cur.insert( false ) );
- } else {
- QCOMPARE( cur.insert( false ), 1 );
+ if ( db.driverName().startsWith( "QSQLITE" ) ) {
+ QVERIFY( cur.insert( false ) );
+ } else {
+ QVERIFY( validReturns.contains(cur.insert( false )) );
}
}
i = 0;
QVERIFY_SQL(q, exec( "select * from " + qtest + " order by id" ));
while ( q.next() ) {
- QCOMPARE( q.value( 0 ).toInt(), i );
- i++;
+ QCOMPARE( q.value( 0 ).toInt(), i );
+ i++;
}
QCOMPARE( i, 200 );
@@ -436,7 +440,7 @@ static QString dumpUtf8( const QString& str )
{
QString res;
for ( int i = 0; i < (int)str.length(); ++i ) {
- res += "0x" + QString::number( str[ i ].unicode(), 16 ) + ' ';
+ res += "0x" + QString::number( str[ i ].unicode(), 16 ) + ' ';
}
return res;
}
@@ -448,7 +452,7 @@ void tst_Q3SqlCursor::insertORA()
CHECK_DATABASE( db );
if (tst_Databases::getOraVersion(db) < 9)
- QSKIP("Need Oracle >= 9", SkipSingle);
+ QSKIP("Need Oracle >= 9", SkipSingle);
/****** CHARSET TEST ******/
@@ -466,8 +470,8 @@ void tst_Q3SqlCursor::insertORA()
QVERIFY_SQL(cur, select());
QVERIFY( cur.next() );
if ( cur.value( "t_char" ).toString() != val1 )
- qDebug( QString( "Wrong value for t_char: expected '%1', got '%2'" ).arg( val1 ).arg(
- cur.value( "t_char" ).toString() ) );
+ qDebug( QString( "Wrong value for t_char: expected '%1', got '%2'" ).arg( val1 ).arg(
+ cur.value( "t_char" ).toString() ) );
static const unsigned short utf8arr[] = { 0xd792,0xd79c,0xd792,0xd79c,0xd799,0x00 };
static const QString utf8str = QString::fromUcs2( utf8arr );
@@ -524,7 +528,7 @@ void tst_Q3SqlCursor::unicode()
static const QString utf8str = QString::fromUtf8( "ὕαλον ϕαγεῖν δύναμαι· τοῦτο οὔ με βλάπτει." );
if ( !db.driver()->hasFeature( QSqlDriver::Unicode ) ) {
- QSKIP( "DBMS not Unicode capable", SkipSingle );
+ QSKIP( "DBMS not Unicode capable", SkipSingle );
}
// ascii in the data storage, can't transliterate properly. invalid test.
if(db.driverName().startsWith("QIBASE") && (db.databaseName() == "silence.nokia.troll.no:c:\\ibase\\testdb_ascii" || db.databaseName() == "/opt/interbase/qttest.gdb"))
@@ -640,11 +644,11 @@ void tst_Q3SqlCursor::select()
QSqlIndex idx = cur4.primaryIndex( false );
QCOMPARE( (int)idx.count(), 2 );
if ( tst_Databases::isMSAccess( db ) ) {
- QCOMPARE( idx.field( 1 ).name().upper(), QString("ID") );
- QCOMPARE( idx.field( 0 ).name().upper(), QString("T_VARCHAR") );
+ QCOMPARE( idx.field( 1 ).name().upper(), QString("ID") );
+ QCOMPARE( idx.field( 0 ).name().upper(), QString("T_VARCHAR") );
} else {
- QCOMPARE( idx.field( 0 ).name().upper(), QString("ID") );
- QCOMPARE( idx.field( 1 ).name().upper(), QString("T_VARCHAR") );
+ QCOMPARE( idx.field( 0 ).name().upper(), QString("ID") );
+ QCOMPARE( idx.field( 1 ).name().upper(), QString("T_VARCHAR") );
}
#ifdef QT_DEBUG
@@ -688,17 +692,18 @@ void tst_Q3SqlCursor::updateNoPK()
QFETCH( QString, dbName );
QSqlDatabase db = QSqlDatabase::database( dbName );
CHECK_DATABASE( db );
-
+ QSet<int> validReturns(QSet<int>() << -1 << 1);
+
QSqlQuery q(db);
QVERIFY_SQL(q, exec("create table " + qTableName( "qtestPK", __FILE__ ) + " (id int, name varchar(20), num numeric)"));
-
+
Q3SqlCursor cur(qTableName("qtestPK", __FILE__), true, db);
QSqlRecord* rec = cur.primeInsert();
Q_ASSERT(rec);
rec->setNull(0);
rec->setNull(1);
rec->setNull(2);
- QVERIFY_SQL(cur, insert() == 1);
+ QVERIFY(validReturns.contains(cur.insert()));
if (!db.driver()->hasFeature(QSqlDriver::PreparedQueries)) {
// Only QPSQL, QMYSQL, QODBC and QOCI drivers currently use escape identifiers for column names
@@ -713,8 +718,8 @@ void tst_Q3SqlCursor::updateNoPK()
+ " values (NULL,NULL,NULL)");
QCOMPARE(cur.lastQuery(), query);
} else {
- QCOMPARE(cur.lastQuery(), QString::fromLatin1("insert into " + qTableName("qtestPK", __FILE__) +
- " (\"id\",\"name\",\"num\") values (NULL,NULL,NULL)"));
+ QCOMPARE(cur.lastQuery(), QString::fromLatin1("insert into " + qTableName("qtestPK", __FILE__) +
+ " (\"id\",\"name\",\"num\") values (NULL,NULL,NULL)"));
}
}
@@ -733,7 +738,7 @@ void tst_Q3SqlCursor::updateNoPK()
qTableName("qtestPK", __FILE__) + ".num IS NULL";
if (!db.driver()->hasFeature(QSqlDriver::PreparedQueries)) {
if (!db.driverName().startsWith("QSQLITE")) {
- QCOMPARE(cur.lastQuery(), expect);
+ QCOMPARE(cur.lastQuery(), expect);
}
}
QVERIFY(cur.select(cur.index(QString("id"))));
@@ -750,6 +755,7 @@ void tst_Q3SqlCursor::insertFieldNameContainsWS() {
QFETCH( QString, dbName );
QSqlDatabase db = QSqlDatabase::database( dbName );
CHECK_DATABASE( db );
+ QSet<int> validReturns(QSet<int>() << -1 << 1);
// The bugfix (and this test) depends on QSqlDriver::escapeIdentifier(...)
// to be implemented, which is currently only the case for the
@@ -778,7 +784,7 @@ void tst_Q3SqlCursor::insertFieldNameContainsWS() {
r->setValue("firsT NaMe", "Kong");
r->setValue("lastNaMe", "Harald");
- QVERIFY(cur.insert() == 1);
+ QVERIFY(validReturns.contains(cur.insert()));
cur.select();
cur.next();
diff --git a/tests/auto/qfiledialog/tst_qfiledialog.cpp b/tests/auto/qfiledialog/tst_qfiledialog.cpp
index f246750..9adb4fc 100644
--- a/tests/auto/qfiledialog/tst_qfiledialog.cpp
+++ b/tests/auto/qfiledialog/tst_qfiledialog.cpp
@@ -547,6 +547,9 @@ void tst_QFiledialog::completer()
// ### FIXME: This will fail on Symbian on some tests and some environments until the file engine and QFileSystemModel
// are fixed to properly capitalize paths, so that some folders are not duplicated in QFileSystemModel.
+#if defined(Q_OS_SYMBIAN)
+ QSKIP("This will fail on Symbian on some tests and some environments until the file engine and QFileSystemModel are fixed to properly capitalize paths")
+#endif
QTRY_COMPARE(cModel->rowCount(), expected);
} QT_CATCH(...) {
qDeleteAll(files);
diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
index f4fdacc..01ef9a2 100644
--- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
+++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
@@ -384,6 +384,7 @@ private slots:
void tabChangesFocus();
void tabChangesFocus_data();
void cacheMode();
+ void cacheMode2();
void updateCachedItemAfterMove();
void deviceTransform_data();
void deviceTransform();
@@ -6824,6 +6825,9 @@ void tst_QGraphicsItem::cacheMode()
QTRY_COMPARE(tester->repaints, 4);
QCOMPARE(testerChild->repaints, 4);
QCOMPARE(testerChild2->repaints, 3);
+ tester->resetTransform();
+ testerChild->resetTransform();
+ testerChild2->resetTransform();
// Explicit update causes a repaint.
tester->update(0, 0, 5, 5);
@@ -6897,23 +6901,24 @@ void tst_QGraphicsItem::cacheMode()
// because the parent is rotated with a perspective.
testerChild->setPos(1, 1);
QTest::qWait(25);
- QTRY_COMPARE(tester->repaints, 10);
+ QTRY_COMPARE(tester->repaints, 11);
QCOMPARE(testerChild->repaints, 10);
QCOMPARE(testerChild2->repaints, 5);
+ tester->resetTransform();
// Make a huge item
tester->setGeometry(QRectF(-4000, -4000, 8000, 8000));
QTest::qWait(25);
- QTRY_COMPARE(tester->repaints, 11);
- QCOMPARE(testerChild->repaints, 10);
+ QTRY_COMPARE(tester->repaints, 12);
+ QCOMPARE(testerChild->repaints, 11);
QCOMPARE(testerChild2->repaints, 5);
// Move the large item - will cause a repaint as the
// cache is clipped.
tester->setPos(5, 0);
QTest::qWait(25);
- QTRY_COMPARE(tester->repaints, 12);
- QCOMPARE(testerChild->repaints, 10);
+ QTRY_COMPARE(tester->repaints, 13);
+ QCOMPARE(testerChild->repaints, 11);
QCOMPARE(testerChild2->repaints, 5);
// Hiding and showing should invalidate the cache
@@ -6921,11 +6926,83 @@ void tst_QGraphicsItem::cacheMode()
QTest::qWait(25);
tester->show();
QTest::qWait(25);
- QTRY_COMPARE(tester->repaints, 13);
- QCOMPARE(testerChild->repaints, 11);
+ QTRY_COMPARE(tester->repaints, 14);
+ QCOMPARE(testerChild->repaints, 12);
QCOMPARE(testerChild2->repaints, 6);
}
+void tst_QGraphicsItem::cacheMode2()
+{
+ QGraphicsScene scene(0, 0, 100, 100);
+ QGraphicsView view(&scene);
+ view.resize(150, 150);
+ view.show();
+ QApplication::setActiveWindow(&view);
+ QTest::qWaitForWindowShown(&view);
+
+ // Increase the probability of window activation
+ // not causing another repaint of test items.
+ QTest::qWait(50);
+
+ EventTester *tester = new EventTester;
+ scene.addItem(tester);
+ QTest::qWait(10);
+ QTRY_COMPARE(tester->repaints, 1);
+
+ // Switching from NoCache to NoCache (no repaint)
+ tester->setCacheMode(QGraphicsItem::NoCache);
+ QTest::qWait(50);
+ QTRY_COMPARE(tester->repaints, 1);
+
+ // Switching from NoCache to DeviceCoordinateCache (no repaint)
+ tester->setCacheMode(QGraphicsItem::DeviceCoordinateCache);
+ QTest::qWait(50);
+ QTRY_COMPARE(tester->repaints, 1);
+
+ // Switching from DeviceCoordinateCache to DeviceCoordinateCache (no repaint)
+ tester->setCacheMode(QGraphicsItem::DeviceCoordinateCache);
+ QTest::qWait(50);
+ QTRY_COMPARE(tester->repaints, 1);
+
+ // Switching from DeviceCoordinateCache to NoCache (no repaint)
+ tester->setCacheMode(QGraphicsItem::NoCache);
+ QTest::qWait(50);
+ QTRY_COMPARE(tester->repaints, 1);
+
+ // Switching from NoCache to ItemCoordinateCache (repaint)
+ tester->setCacheMode(QGraphicsItem::ItemCoordinateCache);
+ QTest::qWait(50);
+ QTRY_COMPARE(tester->repaints, 2);
+
+ // Switching from ItemCoordinateCache to ItemCoordinateCache (no repaint)
+ tester->setCacheMode(QGraphicsItem::ItemCoordinateCache);
+ QTest::qWait(50);
+ QTRY_COMPARE(tester->repaints, 2);
+
+ // Switching from ItemCoordinateCache to ItemCoordinateCache with different size (repaint)
+ tester->setCacheMode(QGraphicsItem::ItemCoordinateCache, QSize(100, 100));
+ QTest::qWait(50);
+ QTRY_COMPARE(tester->repaints, 3);
+
+ // Switching from ItemCoordinateCache to NoCache (repaint)
+ tester->setCacheMode(QGraphicsItem::NoCache);
+ QTest::qWait(50);
+ QTRY_COMPARE(tester->repaints, 4);
+
+ // Switching from DeviceCoordinateCache to ItemCoordinateCache (repaint)
+ tester->setCacheMode(QGraphicsItem::DeviceCoordinateCache);
+ QTest::qWait(50);
+ QTRY_COMPARE(tester->repaints, 4);
+ tester->setCacheMode(QGraphicsItem::ItemCoordinateCache);
+ QTest::qWait(50);
+ QTRY_COMPARE(tester->repaints, 5);
+
+ // Switching from ItemCoordinateCache to DeviceCoordinateCache (repaint)
+ tester->setCacheMode(QGraphicsItem::DeviceCoordinateCache);
+ QTest::qWait(50);
+ QTRY_COMPARE(tester->repaints, 6);
+}
+
void tst_QGraphicsItem::updateCachedItemAfterMove()
{
// A simple item that uses ItemCoordinateCache
diff --git a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
index 4922a89..e269092 100644
--- a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
+++ b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
@@ -283,6 +283,9 @@ private Q_SLOTS:
void ignoreSslErrorsListWithSlot_data();
void ignoreSslErrorsListWithSlot();
#endif
+
+ // NOTE: This test must be last!
+ void parentingRepliesToTheApp();
};
QT_BEGIN_NAMESPACE
@@ -3931,7 +3934,7 @@ void tst_QNetworkReply::httpConnectionCount()
for (int i = 0; i < 10; i++) {
QNetworkRequest request (QUrl("http://127.0.0.1:" + QString::number(server.serverPort()) + "/" + QString::number(i)));
QNetworkReply* reply = manager.get(request);
- reply->setParent(this);
+ reply->setParent(&server);
}
int pendingConnectionCount = 0;
@@ -4205,5 +4208,13 @@ void tst_QNetworkReply::ignoreSslErrorsListWithSlot()
#endif // QT_NO_OPENSSL
+// NOTE: This test must be last testcase in tst_qnetworkreply!
+void tst_QNetworkReply::parentingRepliesToTheApp()
+{
+ QNetworkRequest request (QUrl("http://" + QtNetworkSettings::serverName()));
+ manager.get(request)->setParent(this); // parent to this object
+ manager.get(request)->setParent(qApp); // parent to the app
+}
+
QTEST_MAIN(tst_QNetworkReply)
#include "tst_qnetworkreply.moc"
diff --git a/tests/auto/qsqlquery/tst_qsqlquery.cpp b/tests/auto/qsqlquery/tst_qsqlquery.cpp
index b9ab73f..db3a929 100644
--- a/tests/auto/qsqlquery/tst_qsqlquery.cpp
+++ b/tests/auto/qsqlquery/tst_qsqlquery.cpp
@@ -1137,17 +1137,14 @@ void tst_QSqlQuery::last()
QVERIFY( q.last() );
- if ( !tst_Databases::isMSAccess( db ) )
- // Access doesn't return the correct position
- QCOMPARE( q.at(), ( i-1 ) );
+ QSet<int> validReturns(QSet<int>() << -1 << i-1);
+ QVERIFY( validReturns.contains(q.at()) );
QSqlQuery q2( "select * from " + qtest, db );
QVERIFY( q2.last() );
- if ( !tst_Databases::isMSAccess( db ) )
- // Access doesn't return the correct position
- QCOMPARE( q.at(), ( i-1 ) );
+ QVERIFY( validReturns.contains(q.at()) );
}
void tst_QSqlQuery::seek()
diff --git a/util/s60pixelmetrics/pixel_metrics.cpp b/util/s60pixelmetrics/pixel_metrics.cpp
index beb785e..814e185 100644
--- a/util/s60pixelmetrics/pixel_metrics.cpp
+++ b/util/s60pixelmetrics/pixel_metrics.cpp
@@ -50,7 +50,7 @@
// so that we can keep dynamic and static values inline.
// Please adjust version data if correcting dynamic PM calculations.
const TInt KPMMajorVersion = 1;
-const TInt KPMMinorVersion = 16;
+const TInt KPMMinorVersion = 17;
TPixelMetricsVersion PixelMetrics::Version()
{
@@ -869,7 +869,7 @@ TInt PixelMetrics::PixelMetricValue(QStyle::PixelMetric metric)
// The difference of center piece from border tell the frame width.
if ( value == QStyle::PM_FocusFrameHMargin)
{
- //use topleft for horizontal as S60 uses different values for right and left borders
+ //use topleft for horizontal as S60 uses different values for right and left borders
value = listSinglePaneText.TextRect().iTl.iX - highlightRect.Rect().iTl.iX;
}
else
@@ -1003,6 +1003,13 @@ TInt PixelMetrics::PixelMetricValue(QStyle::PixelMetric metric)
case QStyle::PM_Custom_ThinLineWidth:
value = 1;
break;
+ case QStyle::PM_Custom_MessageBoxHeight:
+ {
+ TAknLayoutRect popupRect;
+ popupRect.LayoutRect(mainPaneRect, AknLayoutScalable_Avkon::popup_window_general(0));
+ value = popupRect.Rect().Height();
+ }
+ break;
case QStyle::PM_ButtonShiftHorizontal:
case QStyle::PM_ButtonShiftVertical:
value = 0;
diff --git a/util/s60pixelmetrics/pixel_metrics.h b/util/s60pixelmetrics/pixel_metrics.h
index 3536c0e..4b0f57e 100644
--- a/util/s60pixelmetrics/pixel_metrics.h
+++ b/util/s60pixelmetrics/pixel_metrics.h
@@ -185,7 +185,9 @@ NONSHARABLE_CLASS( QStyle )
// Bold line width
PM_Custom_BoldLineWidth,
// Thin line width
- PM_Custom_ThinLineWidth
+ PM_Custom_ThinLineWidth,
+ // Height of a popup info messagebox
+ PM_Custom_MessageBoxHeight
};
};
diff --git a/util/s60pixelmetrics/pm_mapperapp.cpp b/util/s60pixelmetrics/pm_mapperapp.cpp
index acc6137..a88499d 100644
--- a/util/s60pixelmetrics/pm_mapperapp.cpp
+++ b/util/s60pixelmetrics/pm_mapperapp.cpp
@@ -155,7 +155,7 @@ void CPixelMetricsMapperAppUi::HandleCommandL( TInt aCommand )
Exit();
break;
case ECmdSwitchOutput:
- {
+ {
HBufC* buffer = HBufC::NewLC( 100 );
TPtr bufferPtr = buffer->Des();
TBool last = ETrue;
@@ -166,7 +166,7 @@ void CPixelMetricsMapperAppUi::HandleCommandL( TInt aCommand )
else
bufferPtr.Append(_L("screen."));
ShowL( *buffer, last );
- }
+ }
break;
case ECmdStatus:
{
@@ -323,7 +323,7 @@ void CPixelMetricsMapperAppUi::HandleCommandL( TInt aCommand )
TInt myValue = KErrNotFound;
for (;;)
{
- if (index==QStyle::PM_Custom_ThinLineWidth)
+ if (index==QStyle::PM_Custom_MessageBoxHeight)
{
last = ETrue;
}
@@ -656,6 +656,9 @@ void CPixelMetricsMapperAppUi::ShowSingleValueL(TInt& aPixelMetric, TInt& aValue
case QStyle::PM_Custom_BoldLineWidth:
bufferPtr.Append(_L("C_BoldLineWidth: "));
break;
+ case QStyle::PM_Custom_MessageBoxHeight:
+ bufferPtr.Append(_L("C_MsgBoxHeight: "));
+ break;
default:
bufferPtr.Append(_L("Default: "));
break;