summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xconfigure2
-rwxr-xr-xconfigure.exebin1172480 -> 1173504 bytes
-rw-r--r--dist/changes-4.6.0129
-rw-r--r--doc/src/examples/ftp.qdoc10
-rw-r--r--doc/src/getting-started/installation.qdoc32
-rw-r--r--doc/src/howtos/guibooks.qdoc6
-rw-r--r--doc/src/images/platformHWAcc.pngbin0 -> 11068 bytes
-rw-r--r--doc/src/modules.qdoc5
-rw-r--r--doc/src/network-programming/qtnetwork.qdoc2
-rw-r--r--doc/src/platforms/emb-HwAcc-LinuxEmbedded.qdoc71
-rw-r--r--doc/src/platforms/emb-HwAcc-WinCE.qdoc69
-rw-r--r--doc/src/platforms/emb-directfb-EmbLinux.qdoc340
-rw-r--r--doc/src/platforms/emb-hardwareacceleration.qdocinc129
-rw-r--r--doc/src/platforms/emb-opengl-EmbLinux.qdoc (renamed from doc/src/platforms/emb-opengl.qdoc)112
-rw-r--r--doc/src/platforms/emb-opengl.qdocinc85
-rw-r--r--doc/src/platforms/emb-openvg-EmbLinux.qdoc53
-rw-r--r--doc/src/platforms/emb-openvg.qdocinc288
-rw-r--r--doc/src/platforms/qt-embedded-linux.qdoc2
-rw-r--r--doc/src/platforms/qt-embedded.qdoc2
-rw-r--r--doc/src/platforms/s60-introduction.qdoc10
-rw-r--r--doc/src/platforms/wince-introduction.qdoc2
-rw-r--r--doc/src/platforms/wince-opengl.qdoc70
-rw-r--r--doc/src/platforms/wince-openvg.qdoc65
-rw-r--r--doc/src/platforms/winsystem.qdoc12
-rw-r--r--src/3rdparty/webkit/VERSION4
-rw-r--r--src/3rdparty/webkit/WebCore/ChangeLog108
-rw-r--r--src/3rdparty/webkit/WebCore/WebCore.pro1
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/WebKit.qrc11
-rw-r--r--src/3rdparty/webkit/WebCore/loader/ProgressTracker.cpp14
-rw-r--r--src/3rdparty/webkit/WebCore/platform/KURL.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.cpp10
-rw-r--r--src/3rdparty/webkit/WebCore/platform/network/qt/QNetworkReplyHandler.cpp19
-rw-r--r--src/3rdparty/webkit/WebCore/platform/network/qt/ResourceRequest.h3
-rw-r--r--src/3rdparty/webkit/WebCore/platform/network/qt/ResourceRequestQt.cpp5
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp10
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/headers.pri1
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp5
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebinspector.cpp6
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebinspector.h3
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp112
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebpage.h2
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebplugindatabase.cpp5
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebplugindatabase_p.h (renamed from src/3rdparty/webkit/WebKit/qt/Api/qwebplugindatabase.h)0
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp5
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.h2
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp87
-rw-r--r--src/3rdparty/webkit/WebKit/qt/ChangeLog129
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp10
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp1
-rw-r--r--src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdoc2
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp23
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp28
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebview/data/frame_a.html2
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebview/data/index.html4
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebview/qwebview.pro1
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebview/tst_qwebview.cpp43
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebview/tst_qwebview.qrc7
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/tests.pro2
-rw-r--r--src/corelib/global/qfeatures.h5
-rw-r--r--src/corelib/global/qfeatures.txt7
-rw-r--r--src/corelib/global/qglobal.cpp6
-rw-r--r--src/dbus/qdbusservicewatcher.cpp10
-rw-r--r--src/gui/accessible/qaccessible_mac.mm5
-rw-r--r--src/gui/dialogs/qfiledialog_mac.mm2
-rw-r--r--src/gui/effects/qgraphicseffect.cpp20
-rw-r--r--src/gui/effects/qgraphicseffect.h2
-rw-r--r--src/gui/effects/qgraphicseffect_p.h2
-rw-r--r--src/gui/graphicsview/qgraphicslinearlayout.cpp3
-rw-r--r--src/gui/image/qbitmap.cpp2
-rw-r--r--src/gui/image/qpixmapfilter.cpp3
-rw-r--r--src/gui/image/qpixmapfilter_p.h2
-rw-r--r--src/gui/kernel/qevent.cpp6
-rw-r--r--src/gui/kernel/qgesture.cpp20
-rw-r--r--src/gui/kernel/qwidget.cpp19
-rw-r--r--src/gui/kernel/qwidget.h2
-rw-r--r--src/gui/kernel/qwidget_mac.mm6
-rw-r--r--src/gui/kernel/qwidget_p.h6
-rw-r--r--src/gui/painting/qbackingstore.cpp8
-rw-r--r--src/gui/painting/qbackingstore_p.h2
-rw-r--r--src/gui/styles/qstyleoption.cpp5
-rw-r--r--src/gui/util/qdesktopservices.cpp2
-rw-r--r--src/network/access/qnetworkaccessdebugpipebackend.cpp4
-rw-r--r--src/network/socket/qabstractsocket.cpp6
-rw-r--r--src/network/ssl/qsslsocket.cpp10
-rw-r--r--src/sql/drivers/psql/qsql_psql.cpp2
-rw-r--r--src/sql/models/qsqltablemodel.cpp2
-rw-r--r--tests/auto/qsqlquery/tst_qsqlquery.cpp34
-rw-r--r--tests/auto/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp36
-rw-r--r--tools/configure/configureapp.cpp6
89 files changed, 2042 insertions, 368 deletions
diff --git a/configure b/configure
index 611f4bfad2..9c3e417b3d 100755
--- a/configure
+++ b/configure
@@ -4185,7 +4185,7 @@ fi
if [ -n "$EVALKEY" ]; then
cat > "$outpath/src/corelib/global/qconfig_eval.cpp" <<EOF
/* Evaluation license key */
-static const char qt_eval_key_data [512 + 12] = "qt_qevalkey=$EVALKEY";
+static const char qt_eval_key_data [512 + 12] = "$EVALKEY";
EOF
chmod -w "$outpath/src/corelib/global/qconfig_eval.cpp"
fi
diff --git a/configure.exe b/configure.exe
index 13d0673fd4..7fe4a93e9f 100755
--- a/configure.exe
+++ b/configure.exe
Binary files differ
diff --git a/dist/changes-4.6.0 b/dist/changes-4.6.0
index 61c3aa07c4..7596943d97 100644
--- a/dist/changes-4.6.0
+++ b/dist/changes-4.6.0
@@ -24,6 +24,11 @@ information about a particular change.
now 0.93.
+Third party components
+----------------------
+
+ - Updated FreeType to version 2.3.9
+
****************************************************************************
* Library *
****************************************************************************
@@ -34,18 +39,131 @@ information about a particular change.
* Since the 4.6 beta Qt::RenderHint has been moved to
QGraphicsBlurEffect::BlurHint.
+QtCore
+
- QVariant
* Many optimisations
* Added QVariant::toFloat() and QVariant::toReal()
* Added QVariant(float) constructor
+ * qvariant_cast<QVariant> and qVariantFromValue<QVariant> are now
+ identify functions
- Qt::escape
* now escape the double quote (&quot;)
+ - QScopedPointer
+ * New pointer class for cleaning up objects when leaving the
+ current scope
+
+ - QFile
+ * Make QFile::resize() more robust when operating on buffered files
+
+ - QObject
+ * Added the possibility to pass the flag Qt::UniqueConnection to QObject::connect
+ * Fixed race conditions that occured when moving object to threads while connecting
+
+- QTextStream
+ * [221316] Fixed crash on large input.
+
+QtGui
+
+- QGraphicsItem
+ * Fixed bug and improved accuracy of QGraphicsItem::childrenBoundingRect().
+ * Many optimizations.
+ * Introduced QGraphicsItem::ItemHasNoContents
+ * Introduced QGraphicsItem::ItemSendsGeometryChanges (see Behavioral Changes)
+ * Introduced QGraphicsItem::focusProxy(), focus proxy support
+ * Introduced QGraphicsItem::ItemNegativeZStacksBehindParent
+ * Introduced QGraphicsItem::ItemIsPanel, light-weight window support
+ * Introduced activation support.
+ * Introduced QGraphicsItem::stackBefore()
+ * Cached items are now always invalidated when update() is called.
+
+- QGraphicsObject
+ * New class; inherits QGraphicsItem and adds notification signals and property declarations.
+
+- QGraphicsProxyWidget
+ * [251407] Fixed window flag handling. Now QGraphicsProxyWidget's flags win.
+ * Fix Qt::ClickFocus policy
+
+ - QGraphicsScene
+ * [245317] Fixes to mouse grabbing behavior.
+ * Fixed delivery of double-click events after explicit grab and then ungrab.
+ * Rewrote the internal rendering to use a recursive instead of an iterative approach.
+ * Many optimizations.
+ * Ensure hover enter events are delivered when an item is pressed.
+ * Introduced activation support.
+ * Fixed bugs in initial focus support.
+
+- QGraphicsTextItem
+ * Now inherits from QGraphicsObject instead
+
+ - QGraphicsTransform
+ * New class; eases animation of transformations for QGraphicsItem.
+
+- QGraphicsView
+ * Fix mapToScene(QRect) to avoid extra unnecessary adjustments.
+ * Many optimizations.
+ * Introduced QGraphicsView::isTransformed()
+ * [QTBUG-4151] Items with parent that sets ItemClipsChildrenToShape were sometimes invisible.
+
+- QGraphicsWidget
+ * Now inherits from QGraphicsObject instead
+
+ - QTreeView
+ * [234930] Be able to use :has-children and :has-sibillings in a stylesheet
+ * [252616] Set QStyleOptionViewItemV4::OnlyOne flag when painting spanning columns
+
+ - QTableView
+ * [191545] Selections work more similarly to well-known spreadsheets
+ * [234926] Fixed sorting after changing QTableView header
+ * [244651] [245327] [250193] [QTBUG-5062] Spans get plenty of love with
+ speed-up, support for rows/columns insertion/removal, and better keyboard
+ navigation
+
+ - QTabBar
+ * [196326] Fixed having a stylesheet on a QTabBar resulted in some tab names
+ to be slightly clipped.
+ * [241383] Added ability to style the close tab button with style sheet
+
+ - QComboBox
+ * [220195] Fixed keyboard search when current index is -1
+
+- QPixmap
+ * Optimized width(), height(), isNull() and depth().
+
+- QRegion
+ * Minor optimizations.
+
+ - QSpinBox
+ * [259226] Fixed setting a stylesheet on a QSpinBox to change the arrow possition
+
+ - QStandardItemModel
+ * [255652] Fixed crash while using takeRow with a QSortFilterProxyModel
+
+ - QGraphicsItem
+ * Added a new set of properties to set a transformation on a item
+
+ - QMenu
+ * [252610] Fixed position of the shortcut text while setting a stylesheet on menu items
+
+ - QSortFilterProxyModel
+ * [251296] Fixed bugs in which filtered items could not be filtered.
+
+ - QSplitter
+ * [206494] Added ability to style pressed slided with stylesheet
+
+ - QWidget
+ * [201649] Added QWidget::previousInFocusChain
+
+
****************************************************************************
* Platform Specific Changes *
****************************************************************************
+ - Added community supported Qt ports for QNX and VxWorks. See platform
+ notes in the Qt documentation for details.
+
- Significant external contribution from Milan Burda for planned removal
of (non-unicode) Windows 9x/ME support.
@@ -65,6 +183,13 @@ information about a particular change.
- On Windows CE the link time code geration has been disabled by default to
be consistent with win32-msvc200x.
+ - Added QMAKE_LIBS_OPENGL_ES1, QMAKE_LIBS_OPENGL_ES1CL and
+ QMAKE_LIBS_OPENGL_ES2 qmake variables for specifying OpenGL ES
+ specific libraries.
+
+ - KDE Integration: Improved the integration into KDE desktop (loading of KDE
+ palette, usage of KColorDialog and KFileDialog) using the GuiPlatformPlugin
+
****************************************************************************
* Tools *
****************************************************************************
@@ -232,8 +357,8 @@ information about a particular change.
for all floating point numbers, and this can be changed using the new
function setFloatingPointPrecision(). Set Qt_4_5 as the version of the
QDataStream to get the behavior of previous versions.
-
+
- On Mac OS X, QDesktopServices::storageLocation(DataLocation) now includes
QCoreApplication::organizationName() and QCoreApplication::applicationName()
if those are set. This matches the behavior on the other platforms.
-
+
diff --git a/doc/src/examples/ftp.qdoc b/doc/src/examples/ftp.qdoc
index 782613c836..68fb0d7239 100644
--- a/doc/src/examples/ftp.qdoc
+++ b/doc/src/examples/ftp.qdoc
@@ -90,12 +90,12 @@
the FTP server, and registers whether an entry represents a
directory or a file. We use the QFile object to download files
from the FTP server.
-
+
\section1 FtpWindow Class Implementation
We skip the \c FtpWindow constructor as it only contains code for
setting up the GUI, which is explained in other examples.
-
+
We move on to the slots, starting with \c connectOrDisconnect().
\snippet examples/network/qftp/ftpwindow.cpp 0
@@ -137,7 +137,7 @@
\snippet examples/network/qftp/ftpwindow.cpp 3
\dots
\snippet examples/network/qftp/ftpwindow.cpp 4
-
+
We first fetch the name of the file, which we find in the selected
item of \c fileList. We then start the download by using
QFtp::get(). QFtp will send progress signals during the download
@@ -153,7 +153,7 @@
finished a QFtp::Command. If an error occurred during the
command, QFtp will set \c error to one of the values in
the QFtp::Error enum; otherwise, \c error is zero.
-
+
\snippet examples/network/qftp/ftpwindow.cpp 7
After login, the QFtp::list() function will list the top-level
@@ -165,7 +165,7 @@
When a \l{QFtp::}{Get} command is finished, a file has finished
downloading (or an error occurred during the download).
-
+
\snippet examples/network/qftp/ftpwindow.cpp 9
After a \l{QFtp::}{List} command is performed, we have to check if
diff --git a/doc/src/getting-started/installation.qdoc b/doc/src/getting-started/installation.qdoc
index e127429910..1eefed3e59 100644
--- a/doc/src/getting-started/installation.qdoc
+++ b/doc/src/getting-started/installation.qdoc
@@ -498,10 +498,9 @@ in the \l{Qt for Windows CE Requirements} document.
*/
/*! \page install-Symbian-installer.html
-
-\title Installing Qt on the Symbian platform using binary package
+\title Installing Qt on the Symbian Platform from a Binary Package
\ingroup qts60
-\brief How to install Qt on the Symbian platform using the binary package.
+\brief How to install Qt on the Symbian platform from a binary package.
\note Qt for Symbian platform has some requirements that are given in more detail
in the \l{Qt for Symbian platform Requirements} document.
@@ -528,9 +527,9 @@ in the \l{Qt for Symbian platform Requirements} document.
To run the demos and examples on the emulator, you need to build them first.
Open the "Qt for Symbian platform Command Prompt" from the Start menu and type:
-
+
\snippet doc/src/snippets/code/doc_src_installation.qdoc 25
-
+
To run the demos on the emulator simply navigate to the directory of the demo
you want to see and run:
@@ -538,7 +537,7 @@ in the \l{Qt for Symbian platform Requirements} document.
For more information about building and running Qt programs on the
Symbian platform,
- see \l{Symbian platform - Introduction to using Qt}.
+ see \l{Symbian platform - Introduction to Qt}.
We hope you will enjoy using Qt.
@@ -546,19 +545,18 @@ Symbian platform,
*/
/*! \page install-Symbian.html
-
-\title Installing Qt on the Symbian platform
+\title Installing Qt on the Symbian Platform
\ingroup installation
\ingroup qts60
-\brief How to install Qt for the Symbian platform
+\brief How to install Qt on the Symbian platform.
\note Qt for the Symbian platform has some requirements that are given in more detail
-in the \l{Qt for Symbian platform Requirements} document.
+in the \l{Qt for Symbian Platform Requirements} document.
\note \bold {This document describes how to install and configure Qt for
the Symbian platform from scratch.
-If you are using pre-built binaries, follow the instructions
-\l{Installing Qt on the Symbian platform using binary package}{here}.}
+If you are using pre-built binaries, follow the instructions given in the
+\l{Installing Qt on the Symbian Platform from a Binary Package} document.}
\list 1
@@ -608,7 +606,7 @@ If you are using pre-built binaries, follow the instructions
To build Qt for the device, type:
\snippet doc/src/snippets/code/doc_src_installation.qdoc 28
-
+
Congratulations, Qt is now ready to use.
\o Running Qt demos
@@ -617,7 +615,7 @@ If you are using pre-built binaries, follow the instructions
to try out. An excellent starting point is the "fluidlauncher"
demo. To run the demo on a real device, you first have to install
the Qt libraries on the device:
-
+
\snippet doc/src/snippets/code/doc_src_installation.qdoc 29
\note You will need to supply certificate that allows installation
@@ -629,14 +627,14 @@ If you are using pre-built binaries, follow the instructions
This will create a self-signed \c fluidlauncher_armv5_urel.sis and
install it to your device.
-
+
To run the demos on the emulator simply navigate to the directory of the demo
you want to see and run:
\snippet doc/src/snippets/code/doc_src_installation.qdoc 27
For more information about building and running Qt programs on the
-Symbian platform, see \l{Symbian platform - Introduction to using Qt}.
+Symbian platform, see \l{Symbian platform - Introduction to Qt}.
We hope you will enjoy using Qt.
@@ -956,7 +954,7 @@ Symbian platform, see \l{Symbian platform - Introduction to using Qt}.
/*!
\page requirements-symbian.html
- \title Qt for Symbian platform Requirements
+ \title Qt for Symbian Platform Requirements
\ingroup installation
\brief Setting up the Symbian platform environment for Qt.
\previouspage General Qt Requirements
diff --git a/doc/src/howtos/guibooks.qdoc b/doc/src/howtos/guibooks.qdoc
index c41d8fa78b..6e64c09aa3 100644
--- a/doc/src/howtos/guibooks.qdoc
+++ b/doc/src/howtos/guibooks.qdoc
@@ -52,8 +52,10 @@
GUI Programming with Qt 4, Second Edition}}
by Jasmin Blanchette and Mark
Summerfield, ISBN 0-13-235416-0. This is the official Qt book written
- by two veteran Trolls. The first edition, which is based on Qt 4.1, is available
- \l{http://www.qtrac.eu/C++-GUI-Programming-with-Qt-4-1st-ed.zip}{online}.
+ by two veteran Trolls. The first edition, which is based on Qt 4.1, is
+ \l{http://www.qtrac.eu/C++-GUI-Programming-with-Qt-4-1st-ed.zip}{available online}.
+ The second edition, based on Qt 4.3, is
+ \l{http://www.informit.com/store/product.aspx?isbn=0132354160}{also available online}.
\bold{\l{http://www.amazon.com/exec/obidos/ASIN/0385267746/trolltech/t}{The Design of Everyday Things}}
by Donald Norman, ISBN 0-38526774-6, is one of the classics of human
diff --git a/doc/src/images/platformHWAcc.png b/doc/src/images/platformHWAcc.png
new file mode 100644
index 0000000000..76a5a48de0
--- /dev/null
+++ b/doc/src/images/platformHWAcc.png
Binary files differ
diff --git a/doc/src/modules.qdoc b/doc/src/modules.qdoc
index ea5a9dccbf..3abcf7c611 100644
--- a/doc/src/modules.qdoc
+++ b/doc/src/modules.qdoc
@@ -226,10 +226,11 @@
The QtOpenGL module is part of the \l{Qt Full Framework Edition} and the
\l{Open Source Versions of Qt}. It is available on Windows, X11, and Mac OS X.
- \l{Qt for Embedded Linux} supports OpenGL ES (OpenGL for Embedded Systems).
- To be able to use the OpenGL API in \l{Qt for Embedded Linux}, it must be
+ \l{Qt for Embedded Linux and OpenGL} supports OpenGL ES (OpenGL for Embedded Systems).
+ \note To be able to use the OpenGL API in \l{Qt for Embedded Linux}, it must be
integrated with the Q Window System (QWS). See the
\l{Qt for Embedded Linux and OpenGL} documentation for details.
+
*/
/*!
diff --git a/doc/src/network-programming/qtnetwork.qdoc b/doc/src/network-programming/qtnetwork.qdoc
index b44b84f072..c20adaf50e 100644
--- a/doc/src/network-programming/qtnetwork.qdoc
+++ b/doc/src/network-programming/qtnetwork.qdoc
@@ -101,7 +101,7 @@
Each application or library can create one or more instances of
QNetworkAccessManager to handle network communication.
-
+
\section1 Writing FTP Clients with QFtp
FTP (File Transfer Protocol) is a protocol used almost exclusively
diff --git a/doc/src/platforms/emb-HwAcc-LinuxEmbedded.qdoc b/doc/src/platforms/emb-HwAcc-LinuxEmbedded.qdoc
new file mode 100644
index 0000000000..9c18d873c9
--- /dev/null
+++ b/doc/src/platforms/emb-HwAcc-LinuxEmbedded.qdoc
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+
+ \page qt-embeddedLinux-accel.html
+
+ \target Hardware Acceleration with Qt for Embedded Linux
+
+ \title Qt for Embedded Linux Hardware Accelerated Graphics
+ \ingroup qt-embedded-linux
+
+
+ \input platforms/emb-hardwareacceleration.qdocinc
+
+\section1 Supported Hardware Accelerated Graphics APIs
+
+This list shows which Hardware Accelerated Graphics APIs currently
+supported by Qt.
+
+ \table
+ \header
+ \o Supported Hardware Accelerated Graphics APIs
+ \row
+ \o \l {Qt for Embedded Linux and OpenGL}{OpenGL ES}
+ \row
+ \o \l {Qt for Embedded Linux and OpenVG}{OpenVG}
+ \row
+ \o \l {Qt for Embedded Linux and DirectFB}{DirectFB}
+ \endtable
+
+
+*/
diff --git a/doc/src/platforms/emb-HwAcc-WinCE.qdoc b/doc/src/platforms/emb-HwAcc-WinCE.qdoc
new file mode 100644
index 0000000000..66b6948d78
--- /dev/null
+++ b/doc/src/platforms/emb-HwAcc-WinCE.qdoc
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qt-embeddedWinCE-accel.html
+
+ \target Hardware Acceleration with Qt for Windows CE
+
+ \title Qt for Windows CE Hardware Accelerated Graphics
+ \ingroup qtce
+
+
+ \input platforms/emb-hardwareacceleration.qdocinc
+
+ \section1 Supported Hardware Accelerated Graphics APIs
+
+ This list shows which Hardware Accelerated Graphics APIs currently
+supported by Qt.
+
+ \table
+ \header
+ \o Supported Hardware Accelerated Graphics APIs
+ \row
+ \o \l {Qt for Windows CE and OpenGL ES}{OpenGL ES}
+ \row
+ \o \l {Qt for Windows CE and OpenVG}{OpenVG}
+ \endtable
+
+
+
+*/
diff --git a/doc/src/platforms/emb-directfb-EmbLinux.qdoc b/doc/src/platforms/emb-directfb-EmbLinux.qdoc
new file mode 100644
index 0000000000..b863951dd5
--- /dev/null
+++ b/doc/src/platforms/emb-directfb-EmbLinux.qdoc
@@ -0,0 +1,340 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+\page qt-embeddedLinux-directfb.html
+
+\title Qt for Embedded Linux and DirectFB
+
+\ingroup qt-embedded-linux
+
+\section1 Introduction
+
+DirectFB is an open source LGPL licensed project founded by Denis Oliver Kropp
+and generally chip vendors start out with the official version and
+implement their own plugins to optimize the operations their hardware
+supports.
+
+We recommend using Qt 4.6 with DirectFB. DirectFB support was introduced
+already into Qt for Embedded Linux as a labs project for Qt 4.3 and folded
+into Qt as a screen driver for Qt 4.4, but not supported fully. In Qt 4.5,
+major changes were made to make it work with the optimized raster paint
+engine. And in Qt 4.6 these have been further improved.
+
+\tableofcontents
+
+\section1 Using DirectFB with Qt
+DirectFB is centered around \l
+{http://www.directfb.org/docs/DirectFB_Reference_1_4/IDirectFBSurface.html}{Surfaces}
+which is the equivalent of a QPaintDevice. In the Qt/DirectFB plugin,
+DirectFB maps onto either a QPixmap or a QWindowSurface which essentially
+means that drawing onto QPixmap or a QWidget can be accelerated and drawing
+onto any other paint device (e.g. QImage) cannot.
+
+\section2 Configure
+
+When configuring Qt there are two options, from which you can choose:
+
+\code
+ ./configure -plugin-gfx-directfb
+ ./configure -qt-gfx-directfb
+
+\endcode
+
+With either mode, Qt will try the following to look for the DirectFB
+includes/libs.
+
+\list
+ \o Use pkg-config
+ \o Use directfb-config
+ \o Check in your qmake.conf
+\endlist
+
+Often the values returned from pkg-config/directfb-config indicates the
+locations of the libs/headers on the target rootfs, rather than their
+location on your host. The safest option is usually to explicitly populate
+these variables in your qmake.conf like this:
+
+\code
+
+QT_CFLAGS_DIRECTFB =
+/opt/toolchain/gcc4.3_mipsel_linux/usr/include/directfb -D_REENTRANT
+QT_LIBS_DIRECTFB = -L/opt/toolchain/gcc4.3_mipsel_linux/usr/lib/-ldirect
+-ldirectfb -lfusion
+
+\note While DirectFB supports a multi-process setup through a
+kernel-extension called Fusion this setup is not well tested with Qt.
+
+\section2 Supported graphics operations
+
+IDirectFBSurface supports blitting, filling, drawing lines rects etc, but
+it does not support everything Qt allows you to do. E.g. painter paths,
+polygons, complex transformations, antialiasing, gradients. Some of these
+things are handled in newer versions of DirectFB and could be supported by
+Qt. They are seemingly optional at the driver level, so you need to have
+fall back code paths for older drivers and drivers on which this is not
+implemented.
+
+The QDirectFBPaintEngine is a subclass of the QRasterPaintEngine, thus
+essentially supporting everything QRasterPaintEngine supports. This means
+that it supports all graphical operations that Qt supports, but certain
+operations will have to fall back to software rendering and that should be
+avoided due to performance issues. Instead, these operations should be
+rendered into a QPixmap once, and then reuse the pixmap.
+
+Note: Fallbacks to software rendering should be avoided. If unsupported
+operations are used, the paint engine must fallback to the
+QRasterPaintEngine engine. A good debugging tip is to make Qt warn you when
+such fall backs occur, and to disable the fall back and only return.
+Debugging options are listed below.
+
+\section2 DirectFB driver
+DirectFB also provides an abstraction for keyboard and mouse drivers. This
+simplifies the process of getting the target hardware up and running. It
+also brings us to a feature fragmentation issue between different versions
+of DirectFB.
+
+The Qt DirectFB driver currently supports DirectFB versions >= 0.9. Still,
+there are large differences in what each actual implementation handles
+correctly. It is relatively common not to properly support
+\l{http://www.directfb.org/docs/DirectFB_Reference_1_4/IDirectFBWindow}{DirectFB
+windows}, so Qt needs to handle this case with a different code path. In
+addition, certain drivers do not properly support DirectFB's cursor
+handling. This means Qt has to have a code path for rendering the cursor
+itself when this is the case. Some drivers do not let us create \l
+{http://www.directfb.org/docs/DirectFB_Reference_1_4/types.html#DFBSurfaceDescription}{preallocated
+surfaces} which means we have to have a conditional code path for that
+case.
+
+\section2 Optimize performance using define options
+
+Qt/DirectFB comes with a number of defines that can be either
+uncommented in directfb.pri or added to the QT_DEFINES_DIRECTFB variable in
+your qmake.conf.
+
+\note The defines have been moved from \i
+{src/plugins/gfxdrivers/directfb/directfb.pro} to \i
+{src/gui/embedded/directfb.pri}
+
+\code
+
+#DIRECTFB_DRAWINGOPERATIONS=DRAW_RECTS|DRAW_LINES|DRAW_IMAGE|DRAW_PIXMAP|
+ DRAW_TILED_PIXMAP|STROKE_PATH|DRAW_PATH|DRAW_POINTS|DRAW_ELLIPSE|DRAW_POLYGON|
+ DRAW_TEXT|FILL_PATH|FILL_RECT|DRAW_COLORSPANS|DRAW_ROUNDED_RECT
+
+ #DEFINES += \"QT_DIRECTFB_WARN_ON_RASTERFALLBACKS=$$DIRECTFB_DRAWINGOPERATIONS\"
+ #DEFINES += \"QT_DIRECTFB_DISABLE_RASTERFALLBACKS=$$DIRECTFB_DRAWINGOPERATIONS\"
+
+\endcode
+
+As demonstrated above, you need to Qt which drawing operations you want to
+warn/disable. Since there are varying implementations of DirectFB from
+manufacturer to manufacture, different operations will be optimized. This
+require you to define the operations you want to warn about or disable.
+These are listed above in the DIRECTFB_DRAWINGOPERATIONS variable.
+
+Following is a table showing which options you have.
+
+\table
+ \header
+ \o Define option
+ \o Description
+ \row
+ \o QT_DIRECTFB_IMAGECACHE
+ \o Defining this means that Qt will cache an IDirectFBSurface per
+QImage you draw based on its \l
+{http://doc.trolltech.com/4.5/qimage.html#cacheKey}{cacheKey}.
+Use this define if your application draws many QImages that
+remain the same. Note that if you in this situation draw an image and then
+change it, by calling bits() or opening a QPainter on it, the cache will
+not benefit you. You can control the cache size with the imageCacheSize
+connect option.
+
+ \row
+ \o QT_NO_DIRECTFB_WM
+ \o If your DirectFB implementation does not support windows, you
+have to define this to make Qt work properly. You can test this by checking
+if the \l {
+http://www.directfb.org/index.php?path=Main%2FDownloads&page=1}{df_window
+example} runs well.
+This means that all drawing operations onto a QWidget involves
+an extra blitting step since Qt essentially first has to draw into an
+off-screen buffer and then blit this buffer to the back buffer of the
+primary surface. Finally, Qt must flip the back buffer to the front buffer,
+which usually involves another blit. Still, blits are usually very fast
+with DirectFB.
+
+To work around this you can make your widget paint on screen, \l
+Qt::WA_PaintOnScreen but this comes with other limitations. This should be
+avoided if you want more than one full-screen window in your application.
+In addition, it will not work without proper DirectFB mouse support from the
+layer. Also, see QT_NO_DIRECTFB_LAYER for more.
+
+ \row
+ \o QT_NO_DIRECTFB_LAYER
+ \o If your DirectFB display layer cannot be used for e.g. drawing
+mouse cursor, creating windows you have to define this. Defining this also
+requires defining QT_NO_DIRECTFB_WM and involves making Qt render the
+cursor rather than letting DirectFB do it.
+
+ \row
+ \o QT_NO_DIRECTFB_PALETTE
+ \o Define this if your DirectFB driver does not support surfaces
+with \l
+{http://www.directfb.org/docs/DirectFB_Reference_1_4/IDirectFBPalette.html}{color
+tables}.
+The effect of defining this is that Qt will have to convert
+images with \l QImage::Format_Indexed8 format to another format before
+rendering them.
+
+ \row
+ \o QT_NO_DIRECTFB_PREALLOCATED
+ \o Define this if your DirectFB driver does not support creating a
+surface with preallocated data. This will make a more frequent use of \l
+{http://www.cplusplus.com/reference/clibrary/cstring/memcpy/}{memcpy()}
+when drawing images. If you define this, you might want to consider
+defining QT_DIRECTFB_IMAGECACHE for better image rendering performance.
+
+ \row
+ \o QT_NO_DIRECTFB_MOUSE and QT_NO_DIRECTFB_KEYBOARD
+ \o Define this if your driver does not provide keyboard/mouse
+events through \l
+{http://www.directfb.org/docs/DirectFB_Reference_1_4/IDirectFB_CreateInputEventBuffer.html}{CreateInputEventBuffer}.
+This means that Qt cannot use DirectFB to receive keyboard/mouse events and
+if you want such events in your application, you will have to provide
+another driver. For more info see \l {Qt for Embedded Linux Pointer
+Handling}{Qt for Embedded Linux Pointer Handling} and \l{Qt for Embedded
+Linux Character Input}{Qt for Embedded Linux Character Input}
+
+ \row
+ \o QT_DIRECTFB_TIMING
+ \o Define this when debugging to get output on stderr about the
+frames per second.
+
+ \row
+ \o QT_NO_DIRECTFB_OPAQUE_DETECTION
+ \o When blitting a surface Qt has to decide whether to set the \l
+{http://www.directfb.org/docs/DirectFB_Reference_1_4/types.html#DFBSurfaceBlittingFlags}{DSBLIT_BLEND_ALPHACHANNEL}
+flag. If you load an image from file or network data that has a format that
+includes an alpha channel, the image might still be completely opaque.
+Normally Qt runs through every pixel to check if there really is an alpha
+channel there. This involves some overhead but usually pays off in the end
+because blitting is cheaper than blending. If you define this Qt will
+assume that an image with a format that has alpha channel contains at least
+one pixel with an alpha value != 255.
+
+ \row
+ \o QT_DIRECTFB_SUBSURFACE
+ \o Defining this enables a mode that tries to minimize overhead from
+locking/unlocking surfaces. Note that this currently is experimental.
+
+ \row
+ \o QT_DIRECTFB_WINDOW_AS_CURSOR
+ \o Define this if your DirectFB implementation supports windows but
+can not render the cursor properly. This involves creating a small top level
+window and moving it around when the cursor moves. It does not always
+perform well.
+
+ \row
+ \o QT_NO_DIRECTFB_IMAGEPROVIDER
+ \o By default Qt will use DirectFB to load QPixmaps from disk/memory. If
+your DirectFB implementation does not support this it might make sense to
+define this.
+
+ \row
+ \o QT_DIRECTFB_IMAGEPROVIDER_KEEPALIVE
+ \o Define this to make sure Qt always keeps at least one \l
+{http://directfb.org/docs/DirectFB_Reference_1_4/IDirectFBImageProvider.html}{IDirectFBImageProvider}
+object alive. This is to avoid considerable overhead when the first
+IDirectFBImageProvider is created, the last IDirectFBImageProvider is
+removed.
+
+\endtable
+
+\section2 Unsupported graphics operations
+
+There are a number of unsupported operations causing fallbacks. DirectFB
+does not support the following functions.
+
+
+
+\table
+ \header
+ \o Functions
+ \row
+ \o QPainter::strokePath(const QPainterPath & path, const QPen & pen)
+ \row
+ \o QPainter::drawPath(const QPainterPath & path)
+ \row
+ \o QPainter::fillPath(const QPainterPath & path, const QBrush & brush)
+ \row
+ \o QPainter::drawPoints(const QPointF * points, int pointCount)
+ \row
+ \o QPainter::drawEllipse(const QRectF & rectangle)
+ \row
+ \o QPainter::drawPolygon(const QPointF * points, int pointCount,
+ Qt::FillRule fillRule = Qt::OddEvenFill)
+ \row
+ \o QPainter::drawText(const QPointF & position, const QString & text)
+ \row
+ \o QGradient
+ \endtable
+
+\section2 Avoiding fallbacks
+To avoid fallbacks make sure that the following points are true:
+
+\list
+ \o QPen::isSolid() returns true and uses a color with a one pixel
+width. (QPen::width() returns 1.
+ \o QTransform::TransformationType() <= QTransform::TxScale are not
+supported.
+ \o Clipping must be a simple rectangle or a QRegion.
+\endlist
+
+\section2 When painting images
+\note You should use QPixmap instead of QImage. QImages are drawn by
+the QRasterPaintEngine. To get a warning for every fallback to the
+QRasterPaintEngine, use QT_DIRECTFB_WARN_ON_RASTERFALLBACKS. If
+QT_DIRECTFB_DISABLE_RASTERFALLBACKS is defined, DirectFB will only return
+instead of falling back to QRasterPaintEngine. Please note that these
+defines should only be used when optimizing the application.
+
+*/
diff --git a/doc/src/platforms/emb-hardwareacceleration.qdocinc b/doc/src/platforms/emb-hardwareacceleration.qdocinc
new file mode 100644
index 0000000000..3851628155
--- /dev/null
+++ b/doc/src/platforms/emb-hardwareacceleration.qdocinc
@@ -0,0 +1,129 @@
+
+\section1 Hardware Acceleration
+
+When designing applications for embedded devices the choice often stands
+between graphics effects and performance. On most devices, you cannot have
+both simply because the hardware needed for such operations just is not
+there. Still a growing number of devices use hardware dedicated to graphics
+operations to improve performance.
+
+Using graphics acceleration hardware is more power efficient than using the
+CPU. The reason for this is that the CPU might require a clock speed that
+is up to 20 times higher than the GPU, achieving the same results. E.g. a
+typical hardware accelerated mobile graphics unit can rasterize one or two
+bilinear texture fetches in one cycle, while a software implementation
+takes easily more than 20 cycles. Graphics hardware generally have a much
+lower clock speed and memory bandwidth and different level of acceleration
+than desktop GPUs. One example is that many GPUs leave out transformation
+and lighting from the graphics pipeline and only implements rasterization.
+
+So the key to write good applications for devices is therefore to limit the
+wow factor down to what the target hardware can handle, and to take
+advantage of any graphics dedicated hardware. Qt provides several ways to
+both render advanced effects on the screen and speed up your application
+using hardware accelerated graphics.
+
+\tableofcontents
+
+\section2 Qt for Embedded Graphics pipeline
+
+Qt uses QPainter for all graphics operations. By using the same API
+regardless of platform, the code can be reused on different devices.
+QPainter use different paint engines implemented in the QPaintEngine API to
+do the actual painting.
+
+The QPaintEngine API provides paint engines for each window system and
+painting framework supported by Qt. In regards to Qt for Embedded, this
+also includes implementations for OpenGL ES versions 1.1 and 2.0, as well
+as OpenVG and DirectFB(Embedded Linux only).
+
+By using one of these paint engines, you will be able to improve the
+graphics performance of your Qt application. However, if the graphics
+operations used are not supported, this might as well be a trap, slowing
+down your application significantly. This all depends on what kind of
+graphics operations that are supported by the target devices hardware
+configuration.
+
+\image platformHWAcc.png
+
+The paint engine will direct all graphics operations supported by the
+devices hardware to the GPU, and from there they are sent to the
+framebuffer. Unsupported graphics operations falls back to the
+QRasterPaintEngine and are handled by the CPU before sent to the
+framebuffer. In the end, the operating system sends the paint updates off
+to the screen/display. The fallback operation is quite expensive in regards
+to memory consumption, and should be avoided.
+
+\section2 Hardware configuration requirements
+
+Before implementing any application using hardware acceleration, it is wise
+to get an overview of what kind of hardware accelerated graphics operations
+that are available for the target device.
+
+\note On devices with no hardware acceleration, Qt will use
+QRasterPaintEngine, which handles the acceleration using software. On
+devices supporting OpenGL ES, OpenVG or DirectFB(not supported by Windows
+CE), Qt will use the
+respective paint engines to accelerate painting. However, hardware
+configurations that only support a limited set of hardware acceleration
+features, might slow the application graphics down rather than speeding it
+up when using unsupported operations that must fall back to the raster
+engine.
+
+\section3 Different architectures
+
+Based on the architecture used in a device we can make a recommendation on
+which hardware acceleration techniques to use. There are mainly two
+different architectures on embedded devices. These are devices with a
+Unified Memory Architecture (UMA), and devices with dedicated graphics
+memory. Generally, high-end devices will have dedicated graphics memory.
+Low-end devices will just use system memory, sometimes reserving a memory
+region and sometimes not.
+
+In addition to this, we can categorize the devices into five types based on
+the different graphics operations supported by their hardware.
+
+\list 1
+ \o No support for graphics acceleration.
+ \o Support for blitter and alpha blending.
+ \o Support for path based 2D vector graphics.
+ \o Support for fixed function 3D graphics.
+ \o Support for programmable 3D graphics.
+\endlist
+
+Based on these characteristics the table below recommends which paint
+engines to use with the different types of hardware configurations.
+
+\section3 Recommended use of hardware acceleration based on hardware
+
+ \table
+ \header
+ \o Type
+ \o UMA
+ \o Non-UMA
+ \row
+ \o \bold {None}
+ \o Qt Raster Engine
+ \o Qt Raster Engine
+ \row
+ \o \bold {Blitter}
+ \o DirectFB
+ \o DirectFB
+ \row
+ \o \bold {2D Vector}
+ \o OpenVG
+ \o OpenVG
+ \row
+ \o \bold {Fixed 3D}
+ \o OpenGL (ES) 1.x
+ \o OpenGL (ES) 1.x
+ \row
+ \o \bold {Programmable 3D}
+ \o OpenGL (ES) 2.x
+ \o OpenGL (ES) 2.x
+
+ \endtable
+
+\note Since the DirectFB API is quite primitive, the raster paint engine
+handles most of the operations.
+\note Blitter and Alpha blending is currently not supported on Windows CE.
diff --git a/doc/src/platforms/emb-opengl.qdoc b/doc/src/platforms/emb-opengl-EmbLinux.qdoc
index 2ed5d041e9..bede2ca460 100644
--- a/doc/src/platforms/emb-opengl.qdoc
+++ b/doc/src/platforms/emb-opengl-EmbLinux.qdoc
@@ -40,31 +40,24 @@
****************************************************************************/
/*!
-\page qt-embedded-opengl.html
+\page qt-embeddedLinux-opengl.html
\title Qt for Embedded Linux and OpenGL
-\ingroup qt-embedded-linux
-\section1 Introduction
+\ingroup qt-embedded-linux
-\l {http://www.opengl.org}{OpenGL} is an industry standard API for
-2D/3D graphics. It provides a powerful, low-level interface between
-software and acceleration hardware, and it is operating system and
-window system independent.
+\input platforms/emb-opengl.qdocinc
-\l {http://www.khronos.org/opengles}{OpenGL ES} is a subset
-of the \l {http://www.opengl.org}{OpenGL} standard.
-Because it is meant for use in embedded systems, it has a smaller,
-more constrained API.
+\section1 Using OpenGL with Qt for Embedded Linux
+Qt for Embedded Linux provides support for integrating OpenGL ES for
+drawing into a QGLWidget. The current implementation supports OpenGL and 2D
+painting within a QGLWidget. Using OpenGL to accelerate regular widgets and
+compositing top-level windows with OpenGL are not currently supported.
-For reference, Nokia provides support for integrating \l
-{http://www.khronos.org/opengles}{OpenGL ES} with Qt for Embedded Linux
-for drawing into a QGLWidget.
+\note OpenGL rendering only works with QGLWidget under QWS. Regular
+widgets cannot currently support it.
-The current implementation supports OpenGL and 2D painting within a
-QGLWidget. Using OpenGL to accelerate regular widgets and compositing
-top-level windows with OpenGL are not currently supported. These issues
-will be addressed in future versions of Qt.
+\section2 Configure
It is recommended that Qt for Embedded Linux is configured with the
\c{-DQT_QWS_CLIENTBLIT} and \c{-DQT_NO_QWS_CURSOR} options for optimum
@@ -72,58 +65,11 @@ performance. OpenGL is rendered direct to the screen and these options
prevent Qt for Embedded Linux from trying to do its own non-OpenGL
compositing on the QGLWidget contents.
-\section2 Using OpenGL 3D Graphics in Applications
-
-The \l {QtOpenGL module} offers classes that make it easy to draw 3D
-graphics in GUI applications. The module API is cross-platform, so it
-is also available on Windows, X11, and Mac OS X.
-
-To use OpenGL-enabled widgets in a Qt for Embedded Linux application,
-all that is required is to subclass the QGLWidget and draw into instances of
-the subclass with standard OpenGL functions.
-
-Note that on most embedded hardware, the OpenGL implementation is
-actually \l{http://www.khronos.org/opengles/1_X/}{OpenGL/ES 1.1} or
-\l{http://www.khronos.org/opengles/2_X/}{OpenGL/ES 2.0}. When painting
-within a QGLWidget::paintGL() override, it is necessary to limit the
-application to only the features that are present in the OpenGL/ES
-implementation.
-
-\section2 Using OpenGL to Accelerate Normal 2D Painting
-
-Qt provides a subclass of QPaintEngine that translates QPainter operations
-into OpenGL calls (there are actually two subclasses, one for OpenGL/ES 1.1
-and another for OpenGL/ES 2.0). This specialized paint engine can be used
-to improve 2D rendering performance on appropriate hardware. It can also
-overlay controls and decorations onto 3D scenes drawn using OpenGL.
-
-As mentioned above, the OpenGL paint engine is not currently supported
-in regular widgets. However, any application that uses QGraphicsView
-can set a QGLWidget as the viewport and obtain access to the
-OpenGL paint engine that way:
-
-\code
-QGraphicsView view(&scene);
-view.setViewport(new QGLWidget);
-view.setViewportUpdateMode(QGraphicsView::FullViewportUpdate);
-view.showFullScreen();
-\endcode
-
-It is recommended that the QGraphicsView::FullViewportUpdate flag
-be set because the default double-buffered behavior of QGLWidget
-does not support partial updates. It is also recommended that the
-window be shown full-screen because that usually has the best
-performance on current OpenGL/ES implementations.
-
-Once a QGraphicsView has been initialized as above, regular widgets
-can be added to the canvas using QGraphicsProxyWidget if the
-application requires them.
-
\section2 Using OpenGL to Implement Window Compositing and Effects
-Compositing effects can be simulated by adjusting the opacity and
-other parameters of the items within a QGraphicsView canvas on a
-QGLWidget viewport.
+Compositing effects can be simulated by adjusting the opacity and other
+parameters of the items within a QGraphicsView canvas on a QGLWidget
+viewport.
While Qt for Embedded Linux does include a complete windowing system,
using OpenGL to composite regular window surfaces can be quite difficult.
@@ -135,23 +81,20 @@ which is why we do not recommend implementing that form of compositing.
We intend to address this problem in future versions of Qt.
\section1 Integrating OpenGL/ES into Qt for Embedded Linux
-
\section2 Reference Integration
-
-The reference integration for OpenGL into Qt for Embedded Linux
-is for the PowerVR chipset from \l{http://www.imgtec.com/}{Imagination
-Technologies}. It consists of two components: \c{pvreglscreen} which
-provides the Qt for Embedded Linux screen driver, and \c{QWSWSEGL}
-which implements a plug-in to the PowerVR EGL implementation to
-implement low-level OpenGL drawing surfaces.
+The reference integration for OpenGL into Qt for Embedded Linux is for the
+PowerVR chipset from \l{http://www.imgtec.com/}{Imagination Technologies}.
+It consists of two components: \c{pvreglscreen}, which provides the Qt for
+Embedded Linux screen driver, and \c{QWSWSEGL}, which implements a plug-in
+to the PowerVR EGL implementation to implement low-level OpenGL drawing
+surfaces.
\section2 Integrating Other Chipsets
-
-In this section we discuss the essential features of the reference
+In this section, we discuss the essential features of the reference
integration that need to be provided for any other chipset integration.
The QtOpenGL module assumes that a QGLWidget can be represented
-by a \c EGLNativeWindowType value in some underlying window system
+by an \c EGLNativeWindowType value in some underlying window system
implementation, and that \c{eglSwapBuffers()} is sufficient to copy
the contents of the native window to the screen when requested.
@@ -159,7 +102,7 @@ However, many EGL implementations do not have a pre-existing window system.
Usually only a single full-screen window is provided, and everything else
must be simulated some other way. This can be a problem because
of QtOpenGL's assumptions. We intend to address these assumptions in a
-future version of Qt, but for now it is the responsibility of the integrator
+future version of Qt, but for now, it is the responsibility of the integrator
to provide a rudimentary window system within the EGL implementation.
This is the purpose of \c{QWSWSEGL} in the reference integration.
@@ -218,13 +161,4 @@ In the case of PowerVR, the rudimentary window system in \c{QWSWSEGL}
provides a \c PvrQwsDrawable object to represent the \c EGLNativeWindowType
value for the widget.
-\section1 OpenVG Support
-
-\l {http://www.khronos.org/openvg} {OpenVG} is a dedicated API for 2D
-graphics on mobile devices. It is therefore more likely to be a better
-alternative for 2D acceleration than OpenGL/ES. Acceleration of
-regular widgets is supported with OpenVG, unlike with OpenGL/ES.
-See \l{OpenVG Rendering in Qt} for more information on the
-OpenVG support in Qt.
-
*/
diff --git a/doc/src/platforms/emb-opengl.qdocinc b/doc/src/platforms/emb-opengl.qdocinc
new file mode 100644
index 0000000000..dac537946e
--- /dev/null
+++ b/doc/src/platforms/emb-opengl.qdocinc
@@ -0,0 +1,85 @@
+\section1 Introduction
+
+\l {http://www.opengl.org}{OpenGL} is an industry standard API for
+2D/3D graphics. It provides a powerful, low-level interface between
+software and acceleration hardware, and it is operating system and
+window system independent. \l {http://www.khronos.org/opengles}{OpenGL ES}
+is a subset of the \l {http://www.opengl.org}{OpenGL} standard. Because it
+is designed for use with embedded systems, it has a smaller, more
+constrained API.
+
+\l {http://www.khronos.org/opengles/1_X}{OpenGL ES version 1.x} is designed for
+fixed function hardware, while its successor \l
+{http://www.khronos.org/opengles/2_X}{OpenGL ES version 2.x} is designed for
+programmable hardware. It is worth noting that there is a significant
+difference between the two, and that they are not compatible with each
+other. OpenGL ES 1.x limits processing to a pre-defined set of fixed
+options for drawing and lighting objects. OpenGL 2.x has a significantly
+shorter graphics pipeline than 1.x. Instead of using function
+transformation and a fragment pipeline, 2.x uses the \l
+{http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf}{OpenGL
+ES Shading Language (GLSL ES)}. Instead of using the pre-defined functions,
+the programmer writes small shader programs telling the hardware in detail
+how to render each object.
+
+The \l {QtOpenGL module} offers classes that make it easy to draw 3D
+graphics in GUI applications using OpenGL ES. Qt provides a plugin that
+integrates both OpenGL ES versions \l
+{http://www.khronos.org/opengles/1_X}{1.x} and \l
+{http://www.khronos.org/opengles/2_X}{2.x} with Qt for Embedded. However,
+Qt for Embedded can be adapted to a wide range of OpenGL versions.
+
+To translate QPainter operations into OpenGL ES calls (there are actually
+two subclasses, one for OpenGL/ES 1.1 and another for OpenGL/ES 2.0), Qt
+uses a subclass of QPaintEngine. This specialized paint engine can be used
+to improve 2D rendering performance on appropriate hardware. It can also
+overlay controls and decorations onto 3D scenes drawn using OpenGL.
+
+\tableofcontents
+
+\section1 Using OpenGL ES with Qt
+To use OpenGL-enabled widgets in a Qt for Embedded application, all that is
+required is to subclass QGLWidget and draw into instances of the subclass
+with standard OpenGL functions. The current implementation only
+supports OpenGL ES and 2D painting within a QGLWidget. Using OpenGL ES to
+accelerate regular widgets as well as compositing top-level windows with
+OpenGL ES are not currently supported. These issues will be addressed in
+future versions of Qt.
+
+\note The OpenGL paint engine is not currently supported in regular
+widgets. However, any application that uses QGraphicsView can set a
+QGLWidget as the viewport and obtain access to the OpenGL paint engine that
+way:
+
+\code
+ QGraphicsView view(&scene);
+ view.setViewport(new QGLWidget());
+ view.setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+ view.setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+ view.setViewportUpdateMode(QGraphicsView::FullViewportUpdate);
+ view.setFrameStyle(0);
+ view.showFullScreen();
+\endcode
+
+It is recommended that the QGraphicsView::FullViewportUpdate flag
+be set because the default double-buffered behavior of QGLWidget
+does not support partial updates. It is also recommended that the
+window be shown full-screen because that usually has the best
+performance on current OpenGL ES implementations.
+
+Once a QGraphicsView has been initialized as above, regular widgets
+can be added to the canvas using QGraphicsProxyWidget if the
+application requires them.
+
+\note OpenGL ES 2.X does not support PBuffers, so QGLPixelBuffer will not
+work. In this case, QGLFramebufferObject should be used instead. However,
+OpenGL ES 1.X does not support Framebuffer objects, with the exception of
+some OpenGL ES 1.X extensions. In this case, please use QGLPixelBuffer.
+
+\note On most embedded hardware, the OpenGL implementation is
+actually \l{http://www.khronos.org/opengles/1_X/}{OpenGL/ES 1.1} or
+\l{http://www.khronos.org/opengles/2_X/}{OpenGL/ES 2.0}. When painting
+within a QGLWidget::paintGL() override, it is necessary to limit the
+application to only the features that are present in the OpenGL/ES
+implementation.
+
diff --git a/doc/src/platforms/emb-openvg-EmbLinux.qdoc b/doc/src/platforms/emb-openvg-EmbLinux.qdoc
new file mode 100644
index 0000000000..abdb6174c1
--- /dev/null
+++ b/doc/src/platforms/emb-openvg-EmbLinux.qdoc
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+\page qt-embeddedLinux-openvg.html
+
+\title Qt for Embedded Linux and OpenVG
+
+\ingroup qt-embedded-linux
+
+\input platforms/emb-openvg.qdocinc
+
+
+
+*/
diff --git a/doc/src/platforms/emb-openvg.qdocinc b/doc/src/platforms/emb-openvg.qdocinc
new file mode 100644
index 0000000000..37ccb9c1de
--- /dev/null
+++ b/doc/src/platforms/emb-openvg.qdocinc
@@ -0,0 +1,288 @@
+\section1 Introduction
+
+\l {http://www.khronos.org/openvg}{OpenVG} is a standard API from the
+\l{http://www.khronos.org/openvg}{Khronos Group} for accelerated 2D vector
+graphics and raster graphics. It is a dedicated API for 2D graphics on
+mobile devices. It is therefore more likely to be a better alternative for
+2D acceleration than OpenGL/ES.
+
+\tableofcontents
+
+\section1 Using OpenVG with Qt
+The QtOpenVG plugin provides support for OpenVG painting. OpenVG is
+optimized for 2D vector operations, and closely matches the functionality
+in QPainter. To translate QPainter operations into OpenVG calls, Qt uses a
+subclass of QPaintEngine. Unlike with OpenGL ES, OpenVG can be used for
+acceleration of regular widgets. It can therefore be an excellent substitute
+for the default raster-based QPaintEngine on hardware that supports the
+OpenVG API.
+
+\section2 Configure
+OpenVG support can be enabled by passing the \c{-openvg} option to
+configure. It is assumed that the following qmake variables are set to
+appropriate values in the qmake.conf file for your platform:
+
+ \list
+ \o QMAKE_INCDIR_OPENVG
+ \o QMAKE_LIBDIR_OPENVG
+ \o QMAKE_LIBS_OPENVG
+ \endlist
+
+Most OpenVG implementations are based on EGL, so the following variables
+may also need to be set:
+
+ \list
+ \o QMAKE_INCDIR_EGL
+ \o QMAKE_LIBDIR_EGL
+ \o QMAKE_LIBS_EGL
+ \endlist
+
+See \l{qmake Variable Reference} for more information on these variables.
+
+\section2 Supported OpenVG Engines
+
+Two kinds of OpenVG engines are currently supported: EGL based, and engines
+built on top of OpenGL such as
+\l{http://sourceforge.net/projects/shivavg}{ShivaVG}. EGL based engines are
+preferred.
+
+It is assumed that the EGL implementation has some way to turn a
+QWidget::winId() into an EGL rendering surface with
+\c{eglCreateWindowSurface()}. If this is not the case, then modifications
+may be needed to the code under \c{src/gui/egl} and
+\c{src/plugins/graphicssystems/openvg} to accomodate the EGL
+implementation.
+
+The ShivaVG graphics system under \c{src/plugins/graphicssystems/shivavg}
+is an example of how to integrate a non-EGL implementation of OpenVG into
+Qt. It is currently only supported with Qt/X11 and being an example only,
+the resulting screen output may not be as good as with other OpenVG
+engines.
+
+\section1 Using the OpenVG graphics system
+
+Once the graphics system plugin has been built and installed, applications
+can be run as follows to use the plugin:
+
+ \code
+ app -graphicssystem OpenVG
+ \endcode
+
+If ShivaVG is being used, then substitute \c ShivaVG instead of \c OpenVG
+in the line above.
+
+If the plugin fails to load, try setting the \c QT_DEBUG_PLUGINS
+environment variable to 1 and try again. Usually the plugin cannot be
+loaded because Qt cannot locate it in the directory
+\c{plugins/graphicssystems} within the Qt installation, or the dynamic
+library path does not include the directory containing the system's \c
+libOpenVG.so library.
+
+\section2 Supported features
+
+\table
+ \header
+ \o Feature
+ \o Description
+
+ \row
+ \o Context modes
+ \o The default configuration is "single-context" mode, where a single
+EGLContext object is used for all drawing, regardless of the surface.
+Multiple EGLSurfaces are created, one for each window surface or pixmap.
+eglMakeCurrent() is called with the same EGLContext every time, but a
+different EGLSurface.
+
+Single-context mode is necessary for QPixmapData to be implemented in terms
+of a VGImage. If single-context mode is not enabled, then QPixmapData will
+use the fallback QRasterPixmapData implementation, which is less efficient
+performance-wise.
+
+Single-context mode can be disabled with the QVG_NO_SINGLE_CONTEXT
+define if the OpenVG engine does not support one context with multiple
+surfaces.
+
+ \row
+ \o Transformation matrices
+ \o All affine and projective transformation matrices are supported.
+
+QVGPaintEngine will use the engine to accelerate affine transformation
+matrices only. When a projective transformation matrix is used,
+QVGPaintEngine will transform the coordinates before passing them to the
+engine. This will probably incur a performance penalty.
+
+Pixmaps and images are always transformed by the engine, because OpenVG
+specifies that projective transformations must work for images.
+
+It is recommended that client applications should avoid using projective
+transformations for non-image elements in performance critical code.
+
+ \row
+ \o Composition modes
+ \o The following composition modes are supported:
+
+\list
+\o QPainter::CompositionMode_SourceOver
+\o QPainter::CompositionMode_DestinationOver
+\o QPainter::CompositionMode_Source
+\o QPainter::CompositionMode_SourceIn
+\o QPainter::CompositionMode_DestinationIn
+\o QPainter::CompositionMode_Plus
+\o QPainter::CompositionMode_Multiply
+\o QPainter::CompositionMode_Screen
+\o QPainter::CompositionMode_Darken
+\o QPainter::CompositionMode_Lighten
+\endlist
+
+The other members of QPainter::CompositionMode are not supported
+because OpenVG 1.1 does not have an equivalent in its \c VGBlendMode
+enumeration. Any attempt to set an unsupported mode will result in
+the actual mode being set to QPainter::CompositionMode_SourceOver.
+Client applications should avoid using unsupported modes.
+
+ \row
+ \o Pens and brushes
+ \o All pen styles are supported, including cosmetic pens.
+
+All brush styles are supported except for conical gradients, which are not
+supported by OpenVG 1.1. Conical gradients will be converted into a solid
+color brush corresponding to the first color in the gradient's color ramp.
+
+Affine matrices are supported for brush transforms, but not projective
+matrices.
+
+
+ \row
+ \o Rectangles, lines, and points
+ \o Rectangles, lines, and rounded rectangles use cached VGPath
+objects to try to accelerate drawing operations. vgModifyPathCoords() is
+used to modify the co-ordinates in the cached VGPath object each time
+fillRect(), drawRects(), drawLines(), or drawRoundedRect() is called.
+
+If the engine does not implement vgModifyPathCoords() properly, then the
+QVG_NO_MODIFY_PATH define can be set to disable path caching. This will
+incur a performance penalty.
+
+Points are implemented as lines from the point to itself. The cached line
+drawing VGPath object is used when drawing points.
+
+ \row
+ \o Polygons and Ellipses
+ \o Polygon and ellipse drawing creates a new VGPath object every
+time drawPolygon() or drawEllipse() is called. If the client application
+is making heavy use of these functions, the constant creation and
+destruction of VGPath objects could have an impact on performance.
+
+If a projective transformation is active, ellipses are converted into cubic
+curves prior to transformation, which may further impact performance.
+
+Client applications should avoid polygon and ellipse drawing in performance
+critical code if possible.
+
+ \row
+ \o Other Objects
+ \o Most other objects (arcs, pies, etc) use drawPath(), which takes
+a QPainterPath argument. The default implementation in QPainterEngineEx
+converts the QPainterPath into a QVectorPath and then calls draw(), which
+in turn converts the QVectorPath into a VGPath for drawing.
+
+To reduce the overhead, we have overridden drawPath() in QVGPaintEngine to
+convert QPainterPath's directly into VGPath's. This should help improve
+performance compared to the default implementation.
+
+Client applications should try to avoid these types of objects in
+performance critical code because of the QPainterPath to VGPath conversion
+cost.
+
+ \row
+ \o Clipping
+ \o Clipping with QRect, QRectF, and QRegion objects is supported on
+all OpenVG engines with vgMask() if the transformation matrix is the
+identity or a simple origin translation.
+
+Clipping with an arbitrary QPainterPath, or setting the clip region when
+the transformation matrix is simple, is supported only if the OpenVG engine
+has the vgRenderToMask() function (OpenVG 1.1 and higher).
+
+The QVG_NO_RENDER_TO_MASK define will disable the use of vgRenderToMask().
+
+The QVG_SCISSOR_CLIP define will disable clipping with vgMask() or
+vgRenderToMask() and instead use the scissor rectangle list to perform
+clipping. Clipping with an arbitrary QPainterPath will not be supported.
+
+The QVG_SCISSOR_CLIP define should only be used if the OpenVG engine does
+not support vgMask() or vgRenderToMask().
+
+ \row
+ \o Opacity
+ \o Opacity is supported for all drawing operations. Solid color
+pens, solid color brushes, gradient brushes, and image drawing with
+drawPixmap() and drawImage() will probably have the best performance
+compared to other kinds of pens and brushes.
+
+ \row
+ \o Text Drawing
+ \o If OpenVG 1.1 is used, the paint engine will use VG fonts to
+cache glyphs while drawing. If the engine does not support VG fonts
+correctly, QVG_NO_DRAW_GLYPHS can be defined to disable this mode. Text
+drawing performance will suffer if VG fonts are not used.
+
+By default, image-based glyphs are used. If QVG_NO_IMAGE_GLYPHS is defined,
+then path-based glyphs will be used instead. QVG_NO_IMAGE_GLYPHS is ignored
+if QVG_NO_DRAW_GLYPHS is defined.
+
+If path-based glyphs are used, then the OpenVG engine will need to support
+hinting to render text with good results. Image-based glyphs avoids the
+need for hinting and will usually give better results than path-based
+glyphs.
+
+ \row
+ \o Pixmaps
+ \o In single-context mode, pixmaps will be implemented using
+VGImage unless QVG_NO_PIXMAP_DATA is defined.
+
+QVGPixmapData will convert QImage's into VGImage's when the application
+calls drawPixmap(), and the pixmap will be kept in VGImage form for the
+lifetime of the QVGPixmapData object. When the application tries to paint
+into a QPixmap with QPainter, the data will be converted back into a QImage
+and the raster paint engine will be used to render into the QImage.
+
+This arrangement optimizes for the case of drawing the same static pixmap
+over and over (e.g. for icons), but does not optimize the case of drawing
+into pixmaps.
+
+Bitmaps must use QRasterPixmapData. They are not accelerated with VGImage
+at present.
+
+ \row
+ \o Pixmap filters
+ \o Convolution, colorize, drop shadow, and blur filters are
+accelerated using OpenVG operations.
+
+\endtable
+
+\section2 Known issues
+
+Performance of copying the contents of an OpenVG-rendered window to the
+screen needs platform-specific work in the QVGWindowSurface class.
+
+Clipping with arbitrary non-rectangular paths only works on engines that
+support vgRenderToMask(). Simple rectangular paths are supported on all
+engines that correctly implement vgMask().
+
+The paint engine is not yet thread-safe, so it is not recommended for use
+in threaded Qt applications that draw from multiple threads. Drawing should
+be limited to the main GUI thread.
+
+Performance of projective matrices for non-image drawing is not as good
+as for affine matrices.
+
+QPixmap's are implemented as VGImage objects so that they can be quickly
+rendered with drawPixmap(). Rendering into a QPixmap using QPainter will
+use the default Qt raster paint engine on a QImage copy of the QPixmap, and
+will not be accelerated. This issue may be addressed in a future version
+of the engine.
+
+ShivaVG support is highly experimental and limited to Qt/X11. It is
+provided as an example of how to integrate a non-EGL engine.
+
diff --git a/doc/src/platforms/qt-embedded-linux.qdoc b/doc/src/platforms/qt-embedded-linux.qdoc
index 21cbf3be5d..a6524d77c6 100644
--- a/doc/src/platforms/qt-embedded-linux.qdoc
+++ b/doc/src/platforms/qt-embedded-linux.qdoc
@@ -96,7 +96,7 @@
\o \l {Qt for Embedded Linux Pointer Handling}{Pointer Handling}
\o \l {Qt for Embedded Linux Character Input}{Character Input}
\o \l {Qt for Embedded Linux Display Management}{Display Management}
- \o \l {Qt for Embedded Linux and OpenGL}{OpenGL}
+ \o \l {Qt for Embedded Linux Hardware Accelerated Graphics}{Hardware Accelerated Graphics}
\o \l {Qt for Embedded Linux Fonts}{Fonts}
\endlist
diff --git a/doc/src/platforms/qt-embedded.qdoc b/doc/src/platforms/qt-embedded.qdoc
index e0c35cc8ba..b38c94f5ec 100644
--- a/doc/src/platforms/qt-embedded.qdoc
+++ b/doc/src/platforms/qt-embedded.qdoc
@@ -67,7 +67,7 @@
Applications use the appropriate style for the embedded
environment and use native features, such as menus, to conform
to the native style guidelines.
- \o \l{Symbian platform - Introduction to using Qt}{Qt for the Symbian
+ \o \l{Symbian Platform - Introduction to Qt}{Qt for the Symbian
platform} is used to create applications running in existing Symbian
platform environments. Applications use the appropriate style for the
embedded environment and use native features, such as menus, to conform
diff --git a/doc/src/platforms/s60-introduction.qdoc b/doc/src/platforms/s60-introduction.qdoc
index 5fd0cbe2bd..058198238b 100644
--- a/doc/src/platforms/s60-introduction.qdoc
+++ b/doc/src/platforms/s60-introduction.qdoc
@@ -42,7 +42,7 @@
/*!
\page symbian-with-qt-introduction.html
- \title Symbian platform - Introduction to using Qt
+ \title Symbian Platform - Introduction to Qt
\brief An introduction to Qt for Symbian platform developers.
\ingroup howto
\ingroup qts60
@@ -51,15 +51,15 @@
\section1 Required tools
- See \l{Qt for Symbian platform Requirements} to see what tools are
+ See \l{Qt for Symbian Platform Requirements} to see what tools are
required to use Qt for Symbian platform.
\section1 Installing Qt and running demos
- Follow the instructions found in \l{Installing Qt on the Symbian platform using binary package} to learn how
- to install Qt using binary package and how to build and run Qt demos.
+ Follow the instructions found in \l{Installing Qt on the Symbian platform from a Binary Package}
+ to learn how to install Qt using a binary package and how to build and run Qt demos.
- Follow the instructions found in \l{Installing Qt on the Symbian platform} to learn how to install Qt using
+ Follow the instructions found in \l{Installing Qt on the Symbian Platform} to learn how to install Qt using
using source package and how to build and run the Qt demos.
\section1 Building your own applications
diff --git a/doc/src/platforms/wince-introduction.qdoc b/doc/src/platforms/wince-introduction.qdoc
index 46ecbf666a..886b0840ba 100644
--- a/doc/src/platforms/wince-introduction.qdoc
+++ b/doc/src/platforms/wince-introduction.qdoc
@@ -65,7 +65,7 @@
\endlist
\o
\list
- \o \l {Windows CE OpenGL ES}{OpenGL ES}
+ \o \l {Qt for Windows CE Hardware Accelerated Graphics}{Hardware Accelerated Graphics}
\o \l {Qt Performance Tuning}
\o \l {Fine-Tuning Features in Qt}
\endlist
diff --git a/doc/src/platforms/wince-opengl.qdoc b/doc/src/platforms/wince-opengl.qdoc
index 4fc4d7be64..0ea2ec65e5 100644
--- a/doc/src/platforms/wince-opengl.qdoc
+++ b/doc/src/platforms/wince-opengl.qdoc
@@ -41,58 +41,48 @@
/*!
\page windowsce-opengl.html
- \title Windows CE OpenGL ES
+ \title Qt for Windows CE and OpenGL ES
\ingroup qtce
\brief Information about support for OpenGL ES with Qt for Windows CE.
- \section1 Introduction
+ \input platforms/emb-opengl.qdocinc
- \l {http://www.opengl.org}{OpenGL} is an industry standard API for 2D/3D
- graphics. It provides a powerful, low-level interface between software
- and acceleration hardware, and it is operating system and window system
- independent.
+\section1 Using OpenGL with Qt for Windows CE
+Qt for Windows CE uses EGL 1.1 to embed OpenGL ES windows within the
+Windows CE window manager.
- \l {http://www.khronos.org/opengles}{OpenGL ES} is a subset of the
- \l {http://www.opengl.org}{OpenGL} standard. It is meant for use in
- embedded systems. Hence, it has a smaller, more constrained API.
+\section2 Configure
- Qt for Windows CE uses EGL 1.1 to embed OpenGL ES windows within the
- Windows CE window manager.
+To configure Qt for Windows Mobile 5.0 and OpenGL ES Common Lite support
+you can run \c{configure} like this:
- To use OpenGL ES enabled widgets in a Qt for Windows CE application, you
- only need to subclass QGLWidget and draw on instances of the subclass with
- OpenGL ES functions.
-
- OpenGL ES includes profiles for floating-point and fixed-point arithmetic.
- The floating point profile is called OpenGL ES CM (Common) and the
- fixed-point profile is called OpenGL ES CL (Common Lite).
-
- You can run \c{configure} with the \c{-opengl-es-cm} option for the Common
- profile or \c{-opengl-es-cl} for the Common Lite profile. In both cases,
- ensure that the \c{lib} and \c{includes} paths include the OpenGL ES
- headers and libararies from your SDK. The OpenGL ES lib should be called
- either \c{libGLES_CM.lib} for the Common profile or \c{libGLES_CL.lib}
- for the Common Lite profile.
+ \snippet doc/src/snippets/code/doc_src_wince-opengl.qdoc 0
- To configure Qt for Windows Mobile 5.0 and OpenGL ES Common Lite support
- you can run \c{configure} like this:
+OpenGL ES includes profiles for floating-point and fixed-point arithmetic.
+The floating point profile is called OpenGL ES CM (Common) and the
+fixed-point profile is called OpenGL ES CL (Common Lite).
- \snippet doc/src/snippets/code/doc_src_wince-opengl.qdoc 0
+You can run \c{configure} with the \c{-opengl-es-cm} option for the Common
+profile or \c{-opengl-es-cl} for the Common Lite profile. In both cases,
+ensure that the \c{lib} and \c{includes} paths include the OpenGL ES
+headers and libararies from your SDK. The OpenGL ES lib should be called
+either \c{libGLES_CM.lib} for the Common profile or \c{libGLES_CL.lib} for
+the Common Lite profile.
- The distinction between the Common and Common Lite profiles is important,
- because the Common Lite profile has less functionality and only supports a
- fixed-point vertex format.
+The distinction between the Common and Common Lite profiles is important,
+because the Common Lite profile has less functionality and only supports a
+fixed-point vertex format.
- To start programming with Qt and OpenGL ES on Windows CE, you can start
- with the \l{Hello GL ES Example}. This example shows how to use QGLWidget
- and QGLPainter with OpenGL ES. It also provides some hints on how to port
- OpenGL code to OpenGL ES.
+To start programming with Qt and OpenGL ES on Windows CE, you can start
+with the \l{Hello GL ES Example}. This example shows how to use QGLWidget
+and QGLPainter with OpenGL ES. It also provides some hints on how to port
+OpenGL code to OpenGL ES.
- \section2 Using OpenGL to Accelerate Normal 2D Painting
+\section2 Using OpenGL to Accelerate Normal 2D Painting
- Qt provides QOpenGLPaintEngine, a subclass of QPaintEngine that translates
- QPainter operations into OpenGL calls. This is especially convenient for
- drawing text or QImage objects in an OpenGL ES context. For further
- details, refer to the \l{Hello GL ES Example}.
+Qt provides QOpenGLPaintEngine, a subclass of QPaintEngine that translates
+QPainter operations into OpenGL calls. This is especially convenient for
+drawing text or QImage objects in an OpenGL ES context. For further
+details, refer to the \l{Hello GL ES Example}.
*/
diff --git a/doc/src/platforms/wince-openvg.qdoc b/doc/src/platforms/wince-openvg.qdoc
new file mode 100644
index 0000000000..047c6553a0
--- /dev/null
+++ b/doc/src/platforms/wince-openvg.qdoc
@@ -0,0 +1,65 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page windowsce-openvg.html
+ \title Qt for Windows CE and OpenVG
+ \ingroup qtce
+ \brief Information about support for OpenVG with Qt for Windows CE.
+
+ \input platforms/emb-openvg.qdocinc
+
+\section1 Using OpenVG with Qt for Windows CE
+Qt for Windows CE uses EGL 1.1 to embed OpenVG windows within the Windows
+CE window manager.
+
+\note Make sure that your Windows CE SDK have a working EGL implementation.
+If not, OpenVG will not work.
+
+\note There is currently no support for Blitting and Alpha blending in Qt
+for Windows CE.
+
+\note To configure Qt for Windows Mobile 5.0 and OpenVG support you can run
+\c{configure} like this:
+
+ \snippet doc/src/snippets/code/doc_src_wince-opengl.qdoc 0
+
+*/
diff --git a/doc/src/platforms/winsystem.qdoc b/doc/src/platforms/winsystem.qdoc
index f427d6e99f..72e7da60b5 100644
--- a/doc/src/platforms/winsystem.qdoc
+++ b/doc/src/platforms/winsystem.qdoc
@@ -43,6 +43,7 @@
\page winsystem.html
\title Window System Specific Notes
\ingroup platform-specific
+ \brief Collections of notes about Qt implementations on different window systems.
Qt is a cross-platform GUI toolkit, so almost the entire API is the
same on all platforms and window systems. If you wish to use
@@ -95,4 +96,15 @@
When compiling for this platform, the macro \c{Q_WS_QWS} is
defined (the window system is literally the Qt Window System). See
the \l{Qt for Embedded Linux} documentation for more information.
+
+ \section1 Qt for Windows CE
+
+ When compiling for this platform, the macro \c{Q_WS_WINCE} is defined.
+ See the \l{Qt for Windows CE} documentation for more information.
+
+ \section1 Qt for Symbian Platform
+
+ When compiling for this platform, the macro \c{Q_WS_S60} is defined.
+ See the \l{Symbian Platform - Introduction to Qt} documentation for
+ more information.
*/
diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION
index 98f007c13f..810781fdc8 100644
--- a/src/3rdparty/webkit/VERSION
+++ b/src/3rdparty/webkit/VERSION
@@ -4,8 +4,8 @@ This is a snapshot of the Qt port of WebKit from
The commit imported was from the
- qtwebkit-4.6-snapshot-20091003 branch/tag
+ qtwebkit/qtwebkit-4.6 branch/tag
and has the sha1 checksum
- 8f810287200d21aded375664cc0a6ac0476dbdea
+ 16aab1b39e14195abdc2100265da2e45b96b739f
diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog
index 2b36014a14..1dfc2f97fe 100644
--- a/src/3rdparty/webkit/WebCore/ChangeLog
+++ b/src/3rdparty/webkit/WebCore/ChangeLog
@@ -1,3 +1,111 @@
+2009-11-03 Simon Hausmann <hausmann@webkit.org>
+
+ Unreviewed build fix for WebInspector with Qt build.
+
+ Simply re-generate the Qt resource file by running
+ WebKitTools/Scripts/generate-qt-inspector-resource
+
+ * inspector/front-end/WebKit.qrc:
+
+2009-11-03 Simon Hausmann <hausmann@webkit.org>
+
+ Reviewed by Tor Arne Vestbø.
+
+ Make QWebPluginDatabase private API for now.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30775
+
+ * WebCore.pro:
+
+2009-11-03 Simon Hausmann <hausmann@webkit.org>
+
+ Reviewed by Tor Arne Vestbø.
+
+ Extended the conversion of the WebCore ResourceRequest to the
+ QNetworkRequest with a mandatory originating object argument,
+ which is meant to be the QWebFrame the request belongs to.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29975
+
+ * platform/network/qt/QNetworkReplyHandler.cpp:
+ (WebCore::QNetworkReplyHandler::QNetworkReplyHandler):
+ (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
+ (WebCore::QNetworkReplyHandler::start):
+ * platform/network/qt/ResourceRequest.h:
+ * platform/network/qt/ResourceRequestQt.cpp:
+ (WebCore::ResourceRequest::toNetworkRequest):
+
+2009-11-02 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
+
+ Reviewed by Adam Barth.
+
+ QWebView crash fix.
+
+ The QWebView should not crash if the stop() method is called from
+ a function triggered by the loadProgress signal.
+
+ A null pointer protection was added in the ProgressTracker::incrementProgress.
+
+ New autotest was created.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29425
+
+ * loader/ProgressTracker.cpp:
+ (WebCore::ProgressTracker::incrementProgress):
+
+2009-11-02 Kai Koehne <kai.koehne@nokia.com>
+
+ Reviewed by Holger Freyther.
+
+ Remove implementation of ImageDecocerQt::clearFrameBufferCache.
+ The implementation was buggy, and will visually break repeating
+ animations anyway.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31009
+
+ * platform/graphics/qt/ImageDecoderQt.cpp:
+ (WebCore::ImageDecoderQt::clearFrameBufferCache):
+
+2009-11-01 Yael Aharon <yael.aharon@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ Don't add '/' to the URL path if the it does not include '/' after the protocol component
+ https://bugs.webkit.org/show_bug.cgi?id=30971
+
+ Match IE8 behaviour, that does not add '/' if there is none after the protocol component.
+
+ * platform/KURL.cpp:
+ (WebCore::KURL::parse):
+
+2009-10-30 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Reviewed by Holger Hans Peter Freyther.
+
+ If the owner widget of the page has a palette set, we
+ should use that one. This was only working when the
+ owner was a QWebView. This patch fixes that.
+
+ * platform/qt/RenderThemeQt.cpp:
+ (WebCore::RenderThemeQt::applyTheme):
+
+2009-10-29 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ [Qt] Implement DELETE HTTP method for XmlHttpRequest
+ https://bugs.webkit.org/show_bug.cgi?id=30894
+
+ No new tests as this functionality is already tested by the
+ xmlhttprequest LayoutTests. As this patch depends on an unreleased
+ version of the dependent QtNetwork library and the tests will be
+ enabled later once the dependent library is released (and the
+ buildbot is updated).
+
+ * platform/network/qt/QNetworkReplyHandler.cpp:
+ (WebCore::QNetworkReplyHandler::QNetworkReplyHandler):
+ (WebCore::QNetworkReplyHandler::start):
+
2009-11-02 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
Rubber-stamped by Antti Koivisto.
diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro
index 1379fddbcb..4e84a804f0 100644
--- a/src/3rdparty/webkit/WebCore/WebCore.pro
+++ b/src/3rdparty/webkit/WebCore/WebCore.pro
@@ -2327,6 +2327,7 @@ HEADERS += \
xml/XSLTExtensions.h \
xml/XSLTProcessor.h \
xml/XSLTUnicodeSort.h \
+ $$PWD/../WebKit/qt/Api/qwebplugindatabase_p.h \
$$PWD/../WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h \
$$PWD/platform/network/qt/DnsPrefetchHelper.h
diff --git a/src/3rdparty/webkit/WebCore/inspector/front-end/WebKit.qrc b/src/3rdparty/webkit/WebCore/inspector/front-end/WebKit.qrc
index a1d671ef2f..0347952a2a 100644
--- a/src/3rdparty/webkit/WebCore/inspector/front-end/WebKit.qrc
+++ b/src/3rdparty/webkit/WebCore/inspector/front-end/WebKit.qrc
@@ -28,6 +28,7 @@
<file>InjectedScript.js</file>
<file>InjectedScriptAccess.js</file>
<file>inspector.js</file>
+ <file>InspectorControllerStub.js</file>
<file>KeyboardShortcut.js</file>
<file>MetricsSidebarPane.js</file>
<file>Object.js</file>
@@ -161,6 +162,15 @@
<file>Images/statusbarResizerVertical.png</file>
<file>Images/storageIcon.png</file>
<file>Images/successGreenDot.png</file>
+ <file>Images/timelineBarBlue.png</file>
+ <file>Images/timelineBarGray.png</file>
+ <file>Images/timelineBarGreen.png</file>
+ <file>Images/timelineBarOrange.png</file>
+ <file>Images/timelineBarPurple.png</file>
+ <file>Images/timelineBarRed.png</file>
+ <file>Images/timelineBarYellow.png</file>
+ <file>Images/timelineCheckmarks.png</file>
+ <file>Images/timelineDots.png</file>
<file>Images/timelineHollowPillBlue.png</file>
<file>Images/timelineHollowPillGray.png</file>
<file>Images/timelineHollowPillGreen.png</file>
@@ -168,6 +178,7 @@
<file>Images/timelineHollowPillPurple.png</file>
<file>Images/timelineHollowPillRed.png</file>
<file>Images/timelineHollowPillYellow.png</file>
+ <file>Images/timelineIcon.png</file>
<file>Images/timelinePillBlue.png</file>
<file>Images/timelinePillGray.png</file>
<file>Images/timelinePillGreen.png</file>
diff --git a/src/3rdparty/webkit/WebCore/loader/ProgressTracker.cpp b/src/3rdparty/webkit/WebCore/loader/ProgressTracker.cpp
index e682b9b867..6b6ce1b773 100644
--- a/src/3rdparty/webkit/WebCore/loader/ProgressTracker.cpp
+++ b/src/3rdparty/webkit/WebCore/loader/ProgressTracker.cpp
@@ -176,8 +176,10 @@ void ProgressTracker::incrementProgress(unsigned long identifier, const char*, i
// FIXME: Can this ever happen?
if (!item)
return;
+
+ RefPtr<Frame> frame = m_originatingProgressFrame;
- m_originatingProgressFrame->loader()->client()->willChangeEstimatedProgress();
+ frame->loader()->client()->willChangeEstimatedProgress();
unsigned bytesReceived = length;
double increment, percentOfRemainingBytes;
@@ -189,7 +191,7 @@ void ProgressTracker::incrementProgress(unsigned long identifier, const char*, i
item->estimatedLength = item->bytesReceived * 2;
}
- int numPendingOrLoadingRequests = m_originatingProgressFrame->loader()->numPendingOrLoadingRequests(true);
+ int numPendingOrLoadingRequests = frame->loader()->numPendingOrLoadingRequests(true);
estimatedBytesForPendingRequests = progressItemDefaultEstimatedLength * numPendingOrLoadingRequests;
remainingBytes = ((m_totalPageAndResourceBytesToLoad + estimatedBytesForPendingRequests) - m_totalBytesReceived);
if (remainingBytes > 0) // Prevent divide by 0.
@@ -199,8 +201,8 @@ void ProgressTracker::incrementProgress(unsigned long identifier, const char*, i
// For documents that use WebCore's layout system, treat first layout as the half-way point.
// FIXME: The hasHTMLView function is a sort of roundabout way of asking "do you use WebCore's layout system".
- bool useClampedMaxProgress = m_originatingProgressFrame->loader()->client()->hasHTMLView()
- && !m_originatingProgressFrame->loader()->firstLayoutDone();
+ bool useClampedMaxProgress = frame->loader()->client()->hasHTMLView()
+ && !frame->loader()->firstLayoutDone();
double maxProgressValue = useClampedMaxProgress ? 0.5 : finalProgressValue;
increment = (maxProgressValue - m_progressValue) * percentOfRemainingBytes;
m_progressValue += increment;
@@ -221,14 +223,14 @@ void ProgressTracker::incrementProgress(unsigned long identifier, const char*, i
if (m_progressValue == 1)
m_finalProgressChangedSent = true;
- m_originatingProgressFrame->loader()->client()->postProgressEstimateChangedNotification();
+ frame->loader()->client()->postProgressEstimateChangedNotification();
m_lastNotifiedProgressValue = m_progressValue;
m_lastNotifiedProgressTime = now;
}
}
- m_originatingProgressFrame->loader()->client()->didChangeEstimatedProgress();
+ frame->loader()->client()->didChangeEstimatedProgress();
}
void ProgressTracker::completeProgress(unsigned long identifier)
diff --git a/src/3rdparty/webkit/WebCore/platform/KURL.cpp b/src/3rdparty/webkit/WebCore/platform/KURL.cpp
index ffacc19bf3..c5829d2352 100644
--- a/src/3rdparty/webkit/WebCore/platform/KURL.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/KURL.cpp
@@ -1269,8 +1269,8 @@ void KURL::parse(const char* url, const String* originalString)
m_userStart = m_userEnd = m_passwordEnd = m_hostEnd = m_portEnd = p - buffer.data();
// For canonicalization, ensure we have a '/' for no path.
- // Only do this for http and https.
- if (m_protocolInHTTPFamily && pathEnd - pathStart == 0)
+ // Do this only for hierarchical URL with protocol http or https.
+ if (m_protocolInHTTPFamily && hierarchical && pathEnd == pathStart)
*p++ = '/';
// add path, escaping bad characters
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.cpp
index f8403b7375..b6823dd253 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.cpp
@@ -145,16 +145,8 @@ RGBA32Buffer* ImageDecoderQt::frameBufferAtIndex(size_t index)
return &frame;
}
-void ImageDecoderQt::clearFrameBufferCache(size_t index)
+void ImageDecoderQt::clearFrameBufferCache(size_t /*index*/)
{
- // Currently QImageReader will be asked to read everything. This
- // might change when we read gif images on demand. For now we
- // can have a rather simple implementation.
- if (index > m_frameBufferCache.size())
- return;
-
- for (size_t i = 0; i < index; ++index)
- m_frameBufferCache[index].clear();
}
void ImageDecoderQt::internalDecodeSize()
diff --git a/src/3rdparty/webkit/WebCore/platform/network/qt/QNetworkReplyHandler.cpp b/src/3rdparty/webkit/WebCore/platform/network/qt/QNetworkReplyHandler.cpp
index ed5e024582..bbf5525a70 100644
--- a/src/3rdparty/webkit/WebCore/platform/network/qt/QNetworkReplyHandler.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/network/qt/QNetworkReplyHandler.cpp
@@ -140,10 +140,14 @@ QNetworkReplyHandler::QNetworkReplyHandler(ResourceHandle* handle, LoadMode load
m_method = QNetworkAccessManager::PostOperation;
else if (r.httpMethod() == "PUT")
m_method = QNetworkAccessManager::PutOperation;
+#if QT_VERSION >= 0x040600
+ else if (r.httpMethod() == "DELETE")
+ m_method = QNetworkAccessManager::DeleteOperation;
+#endif
else
m_method = QNetworkAccessManager::UnknownOperation;
- m_request = r.toNetworkRequest();
+ m_request = r.toNetworkRequest(m_resourceHandle->getInternal()->m_frame);
if (m_loadMode == LoadNormal)
start();
@@ -323,10 +327,7 @@ void QNetworkReplyHandler::sendResponseIfNeeded()
client->willSendRequest(m_resourceHandle, newRequest, response);
m_redirected = true;
- m_request = newRequest.toNetworkRequest();
-
- ResourceHandleInternal* d = m_resourceHandle->getInternal();
- emit d->m_frame->page()->networkRequestStarted(d->m_frame, &m_request);
+ m_request = newRequest.toNetworkRequest(m_resourceHandle->getInternal()->m_frame);
return;
}
@@ -368,8 +369,6 @@ void QNetworkReplyHandler::start()
QNetworkAccessManager* manager = d->m_frame->page()->networkAccessManager();
- emit d->m_frame->page()->networkRequestStarted(d->m_frame, &m_request);
-
const QUrl url = m_request.url();
const QString scheme = url.scheme();
// Post requests on files and data don't really make sense, but for
@@ -398,6 +397,12 @@ void QNetworkReplyHandler::start()
putDevice->setParent(m_reply);
break;
}
+#if QT_VERSION >= 0x040600
+ case QNetworkAccessManager::DeleteOperation: {
+ m_reply = manager->deleteResource(m_request);
+ break;
+ }
+#endif
case QNetworkAccessManager::UnknownOperation: {
m_reply = 0;
ResourceHandleClient* client = m_resourceHandle->client();
diff --git a/src/3rdparty/webkit/WebCore/platform/network/qt/ResourceRequest.h b/src/3rdparty/webkit/WebCore/platform/network/qt/ResourceRequest.h
index 93dacf3d45..60d32dd0a4 100644
--- a/src/3rdparty/webkit/WebCore/platform/network/qt/ResourceRequest.h
+++ b/src/3rdparty/webkit/WebCore/platform/network/qt/ResourceRequest.h
@@ -31,6 +31,7 @@
QT_BEGIN_NAMESPACE
class QNetworkRequest;
+class QObject;
QT_END_NAMESPACE
namespace WebCore {
@@ -59,7 +60,7 @@ namespace WebCore {
}
#if QT_VERSION >= 0x040400
- QNetworkRequest toNetworkRequest() const;
+ QNetworkRequest toNetworkRequest(QObject* originatingObject) const;
#endif
private:
diff --git a/src/3rdparty/webkit/WebCore/platform/network/qt/ResourceRequestQt.cpp b/src/3rdparty/webkit/WebCore/platform/network/qt/ResourceRequestQt.cpp
index c8f6ad5984..c866a54606 100644
--- a/src/3rdparty/webkit/WebCore/platform/network/qt/ResourceRequestQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/network/qt/ResourceRequestQt.cpp
@@ -28,10 +28,13 @@
namespace WebCore {
-QNetworkRequest ResourceRequest::toNetworkRequest() const
+QNetworkRequest ResourceRequest::toNetworkRequest(QObject* originatingFrame) const
{
QNetworkRequest request;
request.setUrl(url());
+#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
+ request.setOriginatingObject(originatingFrame);
+#endif
const HTTPHeaderMap &headers = httpHeaderFields();
for (HTTPHeaderMap::const_iterator it = headers.begin(), end = headers.end();
diff --git a/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp
index b61d356032..501a28b9a7 100644
--- a/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp
@@ -45,6 +45,7 @@
#include "RenderBox.h"
#include "RenderTheme.h"
#include "UserAgentStyleSheets.h"
+#include "QWebPageClient.h"
#include "qwebpage.h"
#include <QApplication>
@@ -757,12 +758,13 @@ ControlPart RenderThemeQt::applyTheme(QStyleOption& option, RenderObject* o) con
if (result == RadioPart || result == CheckboxPart)
option.state |= (isChecked(o) ? QStyle::State_On : QStyle::State_Off);
- // If the webview has a custom palette, use it
+ // If the owner widget has a custom palette, use it
Page* page = o->document()->page();
if (page) {
- QWidget* view = static_cast<ChromeClientQt*>(page->chrome()->client())->m_webPage->view();
- if (view)
- option.palette = view->palette();
+ ChromeClient* client = page->chrome()->client();
+ QWebPageClient* pageClient = client->platformPageClient();
+ if (pageClient)
+ option.palette = pageClient->palette();
}
return result;
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/headers.pri b/src/3rdparty/webkit/WebKit/qt/Api/headers.pri
index 5a95c67670..1a42597332 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/headers.pri
+++ b/src/3rdparty/webkit/WebKit/qt/Api/headers.pri
@@ -8,7 +8,6 @@ WEBKIT_API_HEADERS = $$PWD/qwebframe.h \
$$PWD/qwebdatabase.h \
$$PWD/qwebsecurityorigin.h \
$$PWD/qwebelement.h \
- $$PWD/qwebplugindatabase.h \
$$PWD/qwebpluginfactory.h \
$$PWD/qwebhistory.h \
$$PWD/qwebinspector.h \
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp
index 606dae48bf..17a01184af 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp
@@ -734,6 +734,11 @@ void QWebFrame::load(const QNetworkRequest &req,
case QNetworkAccessManager::PostOperation:
request.setHTTPMethod("POST");
break;
+#if QT_VERSION >= 0x040600
+ case QNetworkAccessManager::DeleteOperation:
+ request.setHTTPMethod("DELETE");
+ break;
+#endif
case QNetworkAccessManager::UnknownOperation:
// eh?
break;
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebinspector.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebinspector.cpp
index 4578dc9a9d..409e1a07b3 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebinspector.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebinspector.cpp
@@ -188,9 +188,3 @@ void QWebInspectorPrivate::adjustFrontendSize(const QSize& size)
frontend->resize(size);
}
-/*!
- \fn void QWebInspector::windowTitleChanged(const QString& newTitle);
-
- This is emitted to signal that this widget's title changed to \a newTitle.
-*/
-
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebinspector.h b/src/3rdparty/webkit/WebKit/qt/Api/qwebinspector.h
index bb5bd64a48..a5c1ed5b4a 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebinspector.h
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebinspector.h
@@ -39,9 +39,6 @@ public:
QSize sizeHint() const;
bool event(QEvent*);
-Q_SIGNALS:
- void windowTitleChanged(const QString& newTitle);
-
protected:
void resizeEvent(QResizeEvent* event);
void showEvent(QShowEvent* event);
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
index 6f1347cf8d..a1e131a8f4 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
@@ -78,6 +78,7 @@
#include "Cache.h"
#include "runtime/InitializeThreading.h"
#include "PageGroup.h"
+#include "QWebPageClient.h"
#include <QApplication>
#include <QBasicTimer>
@@ -107,6 +108,9 @@
#else
#include "qwebnetworkinterface.h"
#endif
+#if defined(Q_WS_X11)
+#include <QX11Info>
+#endif
using namespace WebCore;
@@ -138,6 +142,95 @@ QString QWEBKIT_EXPORT qt_webpage_groupName(QWebPage* page)
return page->handle()->page->groupName();
}
+class QWebPageWidgetClient : public QWebPageClient {
+public:
+ QWebPageWidgetClient(QWidget* view)
+ : view(view)
+ {
+ Q_ASSERT(view);
+ }
+
+ virtual void scroll(int dx, int dy, const QRect&);
+ virtual void update(const QRect& dirtyRect);
+ virtual void setInputMethodEnabled(bool enable);
+#if QT_VERSION >= 0x040600
+ virtual void setInputMethodHint(Qt::InputMethodHint hint, bool enable);
+#endif
+
+#ifndef QT_NO_CURSOR
+ virtual QCursor cursor() const;
+ virtual void updateCursor(const QCursor& cursor);
+#endif
+
+ virtual QPalette palette() const;
+ virtual int screenNumber() const;
+ virtual QWidget* ownerWidget() const;
+
+ virtual QObject* pluginParent() const;
+
+ QWidget* view;
+};
+
+void QWebPageWidgetClient::scroll(int dx, int dy, const QRect& rectToScroll)
+{
+ view->scroll(qreal(dx), qreal(dy), rectToScroll);
+}
+
+void QWebPageWidgetClient::update(const QRect & dirtyRect)
+{
+ view->update(dirtyRect);
+}
+
+void QWebPageWidgetClient::setInputMethodEnabled(bool enable)
+{
+ view->setAttribute(Qt::WA_InputMethodEnabled, enable);
+}
+#if QT_VERSION >= 0x040600
+void QWebPageWidgetClient::setInputMethodHint(Qt::InputMethodHint hint, bool enable)
+{
+ if (enable)
+ view->setInputMethodHints(view->inputMethodHints() | hint);
+ else
+ view->setInputMethodHints(view->inputMethodHints() & ~hint);
+}
+#endif
+#ifndef QT_NO_CURSOR
+QCursor QWebPageWidgetClient::cursor() const
+{
+ return view->cursor();
+}
+
+void QWebPageWidgetClient::updateCursor(const QCursor& cursor)
+{
+ view->setCursor(cursor);
+}
+#endif
+
+QPalette QWebPageWidgetClient::palette() const
+{
+ return view->palette();
+}
+
+int QWebPageWidgetClient::screenNumber() const
+{
+#if defined(Q_WS_X11)
+ if (view)
+ return view->x11Info().screen();
+#endif
+
+ return 0;
+}
+
+QWidget* QWebPageWidgetClient::ownerWidget() const
+{
+ return view;
+}
+
+QObject* QWebPageWidgetClient::pluginParent() const
+{
+ return view;
+}
+
// Lookup table mapping QWebPage::WebActions to the associated Editor commands
static const char* editorCommandWebActions[] =
{
@@ -1672,6 +1765,15 @@ void QWebPage::setView(QWidget *view)
{
if (this->view() != view) {
d->view = view;
+ if (!view) {
+ delete d->client;
+ d->client = 0;
+ } else {
+ if (!d->client)
+ d->client = new QWebPageWidgetClient(view);
+ else
+ static_cast<QWebPageWidgetClient*>(d->client)->view = view;
+ }
setViewportSize(view ? view->size() : QSize(0, 0));
}
}
@@ -3406,16 +3508,6 @@ quint64 QWebPage::bytesReceived() const
*/
/*!
- \since 4.6
- \fn void QWebPage::networkRequestStarted(QWebFrame* frame, QNetworkRequest* request);
- \preliminary
-
- This signal is emitted when a \a frame of the current page requests a web resource. The application
- may want to associate the \a request with the \a frame that initiated it by storing the \a frame
- as an attribute of the \a request.
-*/
-
-/*!
\fn QWebPagePrivate* QWebPage::handle() const
\internal
*/
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.h b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.h
index f2bbde0ae2..f39209c50f 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.h
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.h
@@ -347,8 +347,6 @@ Q_SIGNALS:
void saveFrameStateRequested(QWebFrame* frame, QWebHistoryItem* item);
void restoreFrameStateRequested(QWebFrame* frame);
- void networkRequestStarted(QWebFrame* frame, QNetworkRequest* request);
-
protected:
virtual QWebPage *createWindow(WebWindowType type);
virtual QObject *createPlugin(const QString &classid, const QUrl &url, const QStringList &paramNames, const QStringList &paramValues);
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebplugindatabase.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebplugindatabase.cpp
index 623895f388..758e2573df 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebplugindatabase.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebplugindatabase.cpp
@@ -18,7 +18,7 @@
*/
#include "config.h"
-#include "qwebplugindatabase.h"
+#include "qwebplugindatabase_p.h"
#include "PluginDatabase.h"
#include "PluginPackage.h"
@@ -26,6 +26,7 @@
using namespace WebCore;
/*!
+ \internal
\typedef QWebPluginInfo::MimeType
\since 4.6
\brief Represents a single MIME type supported by a plugin.
@@ -33,6 +34,7 @@ using namespace WebCore;
/*!
\class QWebPluginInfo
+ \internal
\since 4.6
\brief The QWebPluginInfo class represents a single Netscape plugin.
@@ -232,6 +234,7 @@ QWebPluginInfo &QWebPluginInfo::operator=(const QWebPluginInfo& other)
/*!
\class QWebPluginDatabase
+ \internal
\since 4.6
\brief The QWebPluginDatabase class provides an interface for managing
Netscape plugins used by WebKit in QWebPages.
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebplugindatabase.h b/src/3rdparty/webkit/WebKit/qt/Api/qwebplugindatabase_p.h
index b22c3de59e..b22c3de59e 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebplugindatabase.h
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebplugindatabase_p.h
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp
index ffa21e4fad..30520569fd 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp
@@ -22,7 +22,7 @@
#include "qwebpage.h"
#include "qwebpage_p.h"
-#include "qwebplugindatabase.h"
+#include "qwebplugindatabase_p.h"
#include "Cache.h"
#include "CrossOriginPreflightResultCache.h"
@@ -627,7 +627,7 @@ QIcon QWebSettings::iconForUrl(const QUrl& url)
/*!
Returns the plugin database object.
-*/
+
QWebPluginDatabase *QWebSettings::pluginDatabase()
{
static QWebPluginDatabase* database = 0;
@@ -635,6 +635,7 @@ QWebPluginDatabase *QWebSettings::pluginDatabase()
database = new QWebPluginDatabase();
return database;
}
+*/
/*!
Sets \a graphic to be drawn when QtWebKit needs to draw an image of the
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.h b/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.h
index e68ea535d7..c958ae7b15 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.h
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.h
@@ -114,7 +114,7 @@ public:
static void clearIconDatabase();
static QIcon iconForUrl(const QUrl &url);
- static QWebPluginDatabase *pluginDatabase();
+ //static QWebPluginDatabase *pluginDatabase();
static void setWebGraphic(WebGraphic type, const QPixmap &graphic);
static QPixmap webGraphic(WebGraphic type);
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp
index b9c2f7475f..55ce1f795b 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp
@@ -32,11 +32,8 @@
#include "qprinter.h"
#include "qdir.h"
#include "qfile.h"
-#if defined(Q_WS_X11)
-#include <QX11Info>
-#endif
-class QWebViewPrivate : public QWebPageClient {
+class QWebViewPrivate {
public:
QWebViewPrivate(QWebView *view)
: view(view)
@@ -46,24 +43,6 @@ public:
Q_ASSERT(view);
}
- virtual void scroll(int dx, int dy, const QRect&);
- virtual void update(const QRect& dirtyRect);
- virtual void setInputMethodEnabled(bool enable);
-#if QT_VERSION >= 0x040600
- virtual void setInputMethodHint(Qt::InputMethodHint hint, bool enable);
-#endif
-
-#ifndef QT_NO_CURSOR
- virtual QCursor cursor() const;
- virtual void updateCursor(const QCursor& cursor);
-#endif
-
- virtual QPalette palette() const;
- virtual int screenNumber() const;
- virtual QWidget* ownerWidget() const;
-
- virtual QObject* pluginParent() const;
-
void _q_pageDestroyed();
QWebView *view;
@@ -72,66 +51,6 @@ public:
QPainter::RenderHints renderHints;
};
-void QWebViewPrivate::scroll(int dx, int dy, const QRect& rectToScroll)
-{
- view->scroll(qreal(dx), qreal(dy), rectToScroll);
-}
-
-void QWebViewPrivate::update(const QRect & dirtyRect)
-{
- view->update(dirtyRect);
-}
-
-void QWebViewPrivate::setInputMethodEnabled(bool enable)
-{
- view->setAttribute(Qt::WA_InputMethodEnabled, enable);
-}
-#if QT_VERSION >= 0x040600
-void QWebViewPrivate::setInputMethodHint(Qt::InputMethodHint hint, bool enable)
-{
- if (enable)
- view->setInputMethodHints(view->inputMethodHints() | hint);
- else
- view->setInputMethodHints(view->inputMethodHints() & ~hint);
-}
-#endif
-#ifndef QT_NO_CURSOR
-QCursor QWebViewPrivate::cursor() const
-{
- return view->cursor();
-}
-
-void QWebViewPrivate::updateCursor(const QCursor& cursor)
-{
- view->setCursor(cursor);
-}
-#endif
-
-QPalette QWebViewPrivate::palette() const
-{
- return view->palette();
-}
-
-int QWebViewPrivate::screenNumber() const
-{
-#if defined(Q_WS_X11)
- if (view)
- return view->x11Info().screen();
-#endif
-
- return 0;
-}
-
-QWidget* QWebViewPrivate::ownerWidget() const
-{
- return view;
-}
-
-QObject* QWebViewPrivate::pluginParent() const
-{
- return view;
-}
-
void QWebViewPrivate::_q_pageDestroyed()
{
page = 0;
@@ -251,6 +170,7 @@ QWebView::~QWebView()
#else
d->page->d->view = 0;
#endif
+ delete d->page->d->client;
d->page->d->client = 0;
}
@@ -296,7 +216,6 @@ void QWebView::setPage(QWebPage* page)
d->page = page;
if (d->page) {
d->page->setView(this);
- d->page->d->client = d; // set the page client
d->page->setPalette(palette());
// #### connect signals
QWebFrame *mainFrame = d->page->mainFrame();
@@ -728,7 +647,7 @@ bool QWebView::event(QEvent *e)
// WebCore.
// FIXME: Add a QEvent::CursorUnset or similar to Qt.
if (cursor().shape() == Qt::ArrowCursor)
- d->resetCursor();
+ d->page->d->client->resetCursor();
#endif
#endif
} else if (e->type() == QEvent::Leave)
diff --git a/src/3rdparty/webkit/WebKit/qt/ChangeLog b/src/3rdparty/webkit/WebKit/qt/ChangeLog
index b19a1d02ee..84c5d43bc0 100644
--- a/src/3rdparty/webkit/WebKit/qt/ChangeLog
+++ b/src/3rdparty/webkit/WebKit/qt/ChangeLog
@@ -1,3 +1,132 @@
+2009-11-04 Yael Aharon <yael.aharon@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] REGRESSION: Allow applications to use their own QWidget bypassing QWebView.
+ https://bugs.webkit.org/show_bug.cgi?id=30979
+
+ Decouple QWebViewPrivate from QWebPageClient, and automatically create
+ QWebPageWidgetClient whenever the view is QWidget based.
+
+ * Api/qwebpage.cpp:
+ (QWebPageWidgetClient::QWebPageWidgetClient):
+ (QWebPageWidgetClient::scroll):
+ (QWebPageWidgetClient::update):
+ (QWebPageWidgetClient::setInputMethodEnabled):
+ (QWebPageWidgetClient::setInputMethodHint):
+ (QWebPageWidgetClient::cursor):
+ (QWebPageWidgetClient::updateCursor):
+ (QWebPageWidgetClient::palette):
+ (QWebPageWidgetClient::screenNumber):
+ (QWebPageWidgetClient::ownerWidget):
+ (QWebPageWidgetClient::pluginParent):
+ (QWebPage::setView):
+ * Api/qwebview.cpp:
+ (QWebView::~QWebView):
+ (QWebView::setPage):
+ (QWebView::event):
+
+2009-11-03 Andras Becsi <becsi.andras@stud.u-szeged.hu>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Fix build of unit-test after r50454.
+
+ * tests/qwebpage/tst_qwebpage.cpp:
+
+2009-11-03 Simon Hausmann <hausmann@webkit.org>
+
+ Reviewed by Tor Arne Vestbø.
+
+ Make QWebPluginDatabase private API for now.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30775
+
+ * Api/headers.pri:
+ * Api/qwebplugindatabase.cpp:
+ * Api/qwebplugindatabase_p.h: Renamed from WebKit/qt/Api/qwebplugindatabase.h.
+ * Api/qwebsettings.cpp:
+ * Api/qwebsettings.h:
+ * QtLauncher/main.cpp:
+ (MainWindow::setupUI):
+ * tests/tests.pro:
+
+2009-11-03 Simon Hausmann <hausmann@webkit.org>
+
+ Rubber-stamped by Tor Arne Vestbø.
+
+ Oops, also remove the API docs of the removed networkRequestStarted() signal.
+
+ * Api/qwebpage.cpp:
+
+2009-11-03 Simon Hausmann <hausmann@webkit.org>
+
+ Reviewed by Tor Arne Vestbø.
+
+ Replace the QWebPage::networkRequestStarted() signal with the originatingObject
+ property set to the QWebFrame that belongs to the request.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29975
+
+ * Api/qwebpage.h:
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::FrameLoaderClientQt::dispatchDecidePolicyForNewWindowAction):
+ (WebCore::FrameLoaderClientQt::dispatchDecidePolicyForNavigationAction):
+ (WebCore::FrameLoaderClientQt::startDownload):
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (tst_QWebPage::loadFinished):
+ (TestNetworkManager::createRequest):
+ (tst_QWebPage::originatingObjectInNetworkRequests):
+
+2009-11-02 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
+
+ Reviewed by Adam Barth.
+
+ QWebView crash fix.
+
+ The QWebView should not crash if the stop() method is called from
+ a function triggered by the loadProgress signal.
+
+ A null pointer protection was added in the ProgressTracker::incrementProgress.
+
+ New autotest was created.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29425
+
+ * tests/qwebview/tst_qwebview.cpp:
+ (WebViewCrashTest::WebViewCrashTest):
+ (WebViewCrashTest::loading):
+ (tst_QWebView::crashTests):
+
+2009-10-30 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ [Qt] Remove the QWebInspector::windowTitleChanged signal,
+ QEvent::WindowTitleChange can be used to achieve the same.
+ https://bugs.webkit.org/show_bug.cgi?id=30927
+
+ * Api/qwebinspector.cpp:
+ * Api/qwebinspector.h:
+ * WebCoreSupport/InspectorClientQt.cpp:
+ (WebCore::InspectorClientQt::updateWindowTitle):
+
+2009-10-29 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ [Qt] Implement DELETE HTTP method for XmlHttpRequest
+ https://bugs.webkit.org/show_bug.cgi?id=30894
+
+ No new tests as this functionality is already tested by the
+ xmlhttprequest LayoutTests. As this patch depends on an unreleased
+ version of the dependent QtNetwork library and the tests will be
+ enabled later once the dependent library is released (and the
+ buildbot is updated).
+
+ * Api/qwebframe.cpp:
+ (QWebFrame::load):
+
2009-10-29 Kenneth Rohde Christiansen <kenneth@webkit.org>
Reviewed by Tor Arne Vestbø.
diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
index 1ed9b212f5..f706d772c0 100644
--- a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
@@ -708,7 +708,7 @@ void FrameLoaderClientQt::committedLoad(WebCore::DocumentLoader* loader, const c
WebCore::ResourceError FrameLoaderClientQt::cancelledError(const WebCore::ResourceRequest& request)
{
ResourceError error = ResourceError("QtNetwork", QNetworkReply::OperationCanceledError, request.url().prettyURL(),
- QCoreApplication::translate("QWebFrame", "Request canceled", 0, QCoreApplication::UnicodeUTF8));
+ QCoreApplication::translate("QWebFrame", "Request cancelled", 0, QCoreApplication::UnicodeUTF8));
error.setIsCancellation(true);
return error;
}
@@ -746,7 +746,7 @@ WebCore::ResourceError FrameLoaderClientQt::interruptForPolicyChangeError(const
WebCore::ResourceError FrameLoaderClientQt::cannotShowMIMETypeError(const WebCore::ResourceResponse& response)
{
return ResourceError("WebKit", WebKitErrorCannotShowMIMEType, response.url().string(),
- QCoreApplication::translate("QWebFrame", "Cannot show MIME type", 0, QCoreApplication::UnicodeUTF8));
+ QCoreApplication::translate("QWebFrame", "Cannot show mimetype", 0, QCoreApplication::UnicodeUTF8));
}
WebCore::ResourceError FrameLoaderClientQt::fileDoesNotExistError(const WebCore::ResourceResponse& response)
@@ -946,7 +946,7 @@ void FrameLoaderClientQt::dispatchDecidePolicyForNewWindowAction(FramePolicyFunc
#if QT_VERSION < 0x040400
QWebNetworkRequest r(request);
#else
- QNetworkRequest r(request.toNetworkRequest());
+ QNetworkRequest r(request.toNetworkRequest(m_webFrame));
#endif
QWebPage* page = m_webFrame->page();
@@ -971,7 +971,7 @@ void FrameLoaderClientQt::dispatchDecidePolicyForNavigationAction(FramePolicyFun
#if QT_VERSION < 0x040400
QWebNetworkRequest r(request);
#else
- QNetworkRequest r(request.toNetworkRequest());
+ QNetworkRequest r(request.toNetworkRequest(m_webFrame));
#endif
QWebPage*page = m_webFrame->page();
@@ -1001,7 +1001,7 @@ void FrameLoaderClientQt::startDownload(const WebCore::ResourceRequest& request)
if (!m_webFrame)
return;
- emit m_webFrame->page()->downloadRequested(request.toNetworkRequest());
+ emit m_webFrame->page()->downloadRequested(request.toNetworkRequest(m_webFrame));
#endif
}
diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp
index 12f405c53c..7a1bfd579e 100644
--- a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp
@@ -166,7 +166,6 @@ void InspectorClientQt::updateWindowTitle()
if (m_inspectedWebPage->d->inspector) {
QString caption = QCoreApplication::translate("QWebPage", "Web Inspector - %2").arg(m_inspectedURL);
m_inspectedWebPage->d->inspector->setWindowTitle(caption);
- emit m_inspectedWebPage->d->inspector->windowTitleChanged(caption);
}
}
diff --git a/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdoc b/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdoc
index 408478c84f..09dfae5195 100644
--- a/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdoc
+++ b/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdoc
@@ -31,7 +31,7 @@
the module under the appropriate version of the GNU LGPL; version 2.1
for applications and libraries licensed under the GNU GPL version 2,
or version 3 for applications and libraries licensed under the GNU
- GPL version 3.
+ GPL version 2.
\legalese
WebKit is licensed under the GNU Library General Public License.
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 d304d3ef80..6f07e90d58 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
@@ -590,6 +590,7 @@ private slots:
void javaScriptWindowObjectClearedOnEvaluate();
void setHtml();
void setHtmlWithResource();
+ void setHtmlWithBaseURL();
void ipv6HostEncoding();
void metaData();
void popupFocus();
@@ -2375,6 +2376,28 @@ void tst_QWebFrame::setHtmlWithResource()
QCOMPARE(p.styleProperty("color", QWebElement::CascadedStyle), QLatin1String("red"));
}
+void tst_QWebFrame::setHtmlWithBaseURL()
+{
+ QString html("<html><body><p>hello world</p><img src='resources/image2.png'/></body></html>");
+
+ QWebPage page;
+ QWebFrame* frame = page.mainFrame();
+
+ // in few seconds, the image should be completey loaded
+ QSignalSpy spy(&page, SIGNAL(loadFinished(bool)));
+
+ frame->setHtml(html, QUrl::fromLocalFile(QDir::currentPath()));
+ QTest::qWait(200);
+ QCOMPARE(spy.count(), 1);
+
+ QCOMPARE(frame->evaluateJavaScript("document.images.length").toInt(), 1);
+ QCOMPARE(frame->evaluateJavaScript("document.images[0].width").toInt(), 128);
+ QCOMPARE(frame->evaluateJavaScript("document.images[0].height").toInt(), 128);
+
+ // no history item has to be added.
+ QCOMPARE(m_view->page()->history()->count(), 0);
+}
+
class TestNetworkManager : public QNetworkAccessManager
{
public:
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 8373e045b8..3eead9274a 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
@@ -133,6 +133,8 @@ private slots:
void screenshot_data();
void screenshot();
+ void originatingObjectInNetworkRequests();
+
private:
QWebView* m_view;
QWebPage* m_page;
@@ -238,7 +240,6 @@ void tst_QWebPage::loadFinished()
{
qRegisterMetaType<QWebFrame*>("QWebFrame*");
qRegisterMetaType<QNetworkRequest*>("QNetworkRequest*");
- QSignalSpy spyNetworkRequestStarted(m_page, SIGNAL(networkRequestStarted(QWebFrame*, QNetworkRequest*)));
QSignalSpy spyLoadStarted(m_view, SIGNAL(loadStarted()));
QSignalSpy spyLoadFinished(m_view, SIGNAL(loadFinished(bool)));
@@ -249,7 +250,6 @@ void tst_QWebPage::loadFinished()
QTest::qWait(3000);
- QVERIFY(spyNetworkRequestStarted.count() > 1);
QVERIFY(spyLoadStarted.count() > 1);
QVERIFY(spyLoadFinished.count() > 1);
@@ -350,9 +350,11 @@ public:
TestNetworkManager(QObject* parent) : QNetworkAccessManager(parent) {}
QList<QUrl> requestedUrls;
+ QList<QNetworkRequest> requests;
protected:
virtual QNetworkReply* createRequest(Operation op, const QNetworkRequest &request, QIODevice* outgoingData) {
+ requests.append(request);
requestedUrls.append(request.url());
return QNetworkAccessManager::createRequest(op, request, outgoingData);
}
@@ -1613,5 +1615,27 @@ void tst_QWebPage::screenshot()
QDir::setCurrent(QApplication::applicationDirPath());
}
+void tst_QWebPage::originatingObjectInNetworkRequests()
+{
+ TestNetworkManager* networkManager = new TestNetworkManager(m_page);
+ m_page->setNetworkAccessManager(networkManager);
+ networkManager->requests.clear();
+
+ m_view->setHtml(QString("data:text/html,<frameset cols=\"25%,75%\"><frame src=\"data:text/html,"
+ "<head><meta http-equiv='refresh' content='1'></head>foo \">"
+ "<frame src=\"data:text/html,bar\"></frameset>"), QUrl());
+ QVERIFY(::waitForSignal(m_view, SIGNAL(loadFinished(bool))));
+
+ QCOMPARE(networkManager->requests.count(), 2);
+
+ QList<QWebFrame*> childFrames = m_page->mainFrame()->childFrames();
+ QCOMPARE(childFrames.count(), 2);
+
+#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
+ for (int i = 0; i < 2; ++i)
+ QVERIFY(qobject_cast<QWebFrame*>(networkManager->requests.at(i).originatingObject()) == childFrames.at(i));
+#endif
+}
+
QTEST_MAIN(tst_QWebPage)
#include "tst_qwebpage.moc"
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebview/data/frame_a.html b/src/3rdparty/webkit/WebKit/qt/tests/qwebview/data/frame_a.html
new file mode 100644
index 0000000000..9ff68f13a4
--- /dev/null
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebview/data/frame_a.html
@@ -0,0 +1,2 @@
+<a href="http://google.com" target="frame_b"><img src="" width=100 height=100 alt="Google"></a>
+<a href="http://yahoo.com" target="frame_b"><img src="" width=100 height=100 alt="Yahoo"></a>
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebview/data/index.html b/src/3rdparty/webkit/WebKit/qt/tests/qwebview/data/index.html
new file mode 100644
index 0000000000..c53ad09a7a
--- /dev/null
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebview/data/index.html
@@ -0,0 +1,4 @@
+<frameset cols="25%,75%">
+ <frame src="frame_a.html" name="frame_a">
+ <frame src="frame_b.html" name="frame_b">
+</frameset>
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebview/qwebview.pro b/src/3rdparty/webkit/WebKit/qt/tests/qwebview/qwebview.pro
index e67bb7ad4d..735537ba2c 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebview/qwebview.pro
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebview/qwebview.pro
@@ -4,6 +4,7 @@ include(../../../../WebKit.pri)
SOURCES += tst_qwebview.cpp
QT += testlib network
QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR
+RESOURCES += tst_qwebview.qrc
DEFINES += SRCDIR=\\\"$$PWD/\\\"
symbian {
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebview/tst_qwebview.cpp b/src/3rdparty/webkit/WebKit/qt/tests/qwebview/tst_qwebview.cpp
index fda979ef50..27daf38417 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebview/tst_qwebview.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebview/tst_qwebview.cpp
@@ -20,6 +20,7 @@
*/
#include <qtest.h>
+#include "../util.h"
#include <qpainter.h>
#include <qwebview.h>
@@ -45,6 +46,8 @@ private slots:
void reusePage_data();
void reusePage();
+
+ void crashTests();
};
// This will be called before the first test function is executed.
@@ -148,6 +151,46 @@ void tst_QWebView::reusePage()
QDir::setCurrent(QApplication::applicationDirPath());
}
+// Class used in crashTests
+class WebViewCrashTest : public QObject {
+ Q_OBJECT
+ QWebView* m_view;
+public:
+ bool m_executed;
+
+
+ WebViewCrashTest(QWebView* view)
+ : m_view(view)
+ , m_executed(false)
+ {
+ view->connect(view, SIGNAL(loadProgress(int)), this, SLOT(loading(int)));
+ }
+
+private slots:
+ void loading(int progress)
+ {
+ if (progress >= 20 && progress < 90) {
+ QVERIFY(!m_executed);
+ m_view->stop();
+ m_executed = true;
+ }
+ }
+};
+
+
+// Should not crash.
+void tst_QWebView::crashTests()
+{
+ // Test if loading can be stopped in loadProgress handler without crash.
+ // Test page should have frames.
+ QWebView view;
+ WebViewCrashTest tester(&view);
+ QUrl url("qrc:///data/index.html");
+ view.load(url);
+ QTRY_VERIFY(tester.m_executed); // If fail it means that the test wasn't executed.
+}
+
+
QTEST_MAIN(tst_QWebView)
#include "tst_qwebview.moc"
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebview/tst_qwebview.qrc b/src/3rdparty/webkit/WebKit/qt/tests/qwebview/tst_qwebview.qrc
new file mode 100644
index 0000000000..ede34a9831
--- /dev/null
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebview/tst_qwebview.qrc
@@ -0,0 +1,7 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>data/index.html</file>
+ <file>data/frame_a.html</file>
+</qresource>
+</RCC>
+
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/tests.pro b/src/3rdparty/webkit/WebKit/qt/tests/tests.pro
index 81cc8f347b..939cd224ab 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/tests.pro
+++ b/src/3rdparty/webkit/WebKit/qt/tests/tests.pro
@@ -1,4 +1,4 @@
TEMPLATE = subdirs
-SUBDIRS = qwebframe qwebpage qwebelement qgraphicswebview qwebhistoryinterface qwebplugindatabase qwebview qwebhistory
+SUBDIRS = qwebframe qwebpage qwebelement qgraphicswebview qwebhistoryinterface qwebview qwebhistory
greaterThan(QT_MINOR_VERSION, 4): SUBDIRS += benchmarks/painting/tst_painting.pro benchmarks/loading/tst_loading.pro
diff --git a/src/corelib/global/qfeatures.h b/src/corelib/global/qfeatures.h
index 9b3e817ac3..77785e8d9e 100644
--- a/src/corelib/global/qfeatures.h
+++ b/src/corelib/global/qfeatures.h
@@ -632,6 +632,11 @@
#define QT_NO_COLORDIALOG
#endif
+// QGraphicsEffect
+#if !defined(QT_NO_GRAPHICSEFFECT) && (defined(QT_NO_GRAPHICSVIEW))
+#define QT_NO_GRAPHICSEFFECT
+#endif
+
// The Model/View Framework
#if !defined(QT_NO_ITEMVIEWS) && (defined(QT_NO_RUBBERBAND) || defined(QT_NO_SCROLLAREA))
#define QT_NO_ITEMVIEWS
diff --git a/src/corelib/global/qfeatures.txt b/src/corelib/global/qfeatures.txt
index ff340065c3..ec4945fa0d 100644
--- a/src/corelib/global/qfeatures.txt
+++ b/src/corelib/global/qfeatures.txt
@@ -491,6 +491,13 @@ Requires: SCROLLAREA
Name: QGraphicsView
SeeAlso: ???
+Feature: GRAPHICSEFFECT
+Description: Supports the graphicseffect classes.
+Section: Widgets
+Requires: GRAPHICSVIEW
+Name: QGraphicsEffect
+SeeAlso: ???
+
Feature: SPINWIDGET
Description: Supports spinbox control widgets.
Section: Widgets
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index 5578091936..62b5409eef 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -1191,6 +1191,10 @@ bool qSharedBuild()
\value SV_9_2 Symbian OS v9.2
\value SV_9_3 Symbian OS v9.3
\value SV_9_4 Symbian OS v9.4
+ \value SV_SF_1 Symbian^1
+ \value SV_SF_2 Symbian^2
+ \value SV_SF_3 Symbian^3
+ \value SV_SF_4 Symbian^4
\value SV_Unknown An unknown and currently unsupported platform
\sa S60Version, WinVersion, MacVersion
@@ -1207,6 +1211,8 @@ bool qSharedBuild()
\value SV_S60_3_1 S60 3rd Edition Feature Pack 1
\value SV_S60_3_2 S60 3rd Edition Feature Pack 2
\value SV_S60_5_0 S60 5th Edition
+ \value SV_S60_5_1 S60 5th Edition Feature Pack 1
+ \value SV_S60_5_2 S60 5th Edition Feature Pack 2
\value SV_S60_Unknown An unknown and currently unsupported platform
\omitvalue SV_S60_None
diff --git a/src/dbus/qdbusservicewatcher.cpp b/src/dbus/qdbusservicewatcher.cpp
index 4872732406..115fe3eb3d 100644
--- a/src/dbus/qdbusservicewatcher.cpp
+++ b/src/dbus/qdbusservicewatcher.cpp
@@ -150,14 +150,14 @@ void QDBusServiceWatcherPrivate::removeService(const QString &service)
modes:
\list
- \o watching for service registration only
- \o watching for service unregistration only
- \o watching for any kind of service ownership change (the default mode)
+ \o Watching for service registration only.
+ \o Watching for service unregistration only.
+ \o Watching for any kind of service ownership change (the default mode).
\endlist
Besides being created or deleted, services may change owners without a
- unregister/register operation happening. So the \ref serviceRegistered()
- and \ref serviceUnregistered() signals may not be emitted if that
+ unregister/register operation happening. So the serviceRegistered()
+ and serviceUnregistered() signals may not be emitted if that
happens.
This class is more efficient than using the
diff --git a/src/gui/accessible/qaccessible_mac.mm b/src/gui/accessible/qaccessible_mac.mm
index 9575ad8a8c..030c1a982b 100644
--- a/src/gui/accessible/qaccessible_mac.mm
+++ b/src/gui/accessible/qaccessible_mac.mm
@@ -504,11 +504,6 @@ QAElement::QAElement(const QAElement &element)
}
QAElement::QAElement(HIObjectRef object, int child)
- :elementRef(
-#ifndef QT_MAC_USE_COCOA
- AXUIElementCreateWithHIObjectAndIdentifier(object, child)
-#endif
-)
{
#ifndef QT_MAC_USE_COCOA
if (object == 0) {
diff --git a/src/gui/dialogs/qfiledialog_mac.mm b/src/gui/dialogs/qfiledialog_mac.mm
index 4af5688d5b..b0e6575766 100644
--- a/src/gui/dialogs/qfiledialog_mac.mm
+++ b/src/gui/dialogs/qfiledialog_mac.mm
@@ -830,8 +830,8 @@ void QFileDialogPrivate::qt_mac_filedialog_event_proc(const NavEventCallbackMess
|| mode == QFileDialog::ExistingFiles){
// When changing directory, the current selection is cleared if
// we are supposed to be selecting files only:
- fileDialogPrivate->mCurrentSelectionList.clear();
if (!fileDialogPrivate->mCurrentSelection.isEmpty()){
+ fileDialogPrivate->mCurrentSelectionList.clear();
fileDialogPrivate->mCurrentSelection.clear();
emit fileDialogPrivate->q_func()->currentChanged(fileDialogPrivate->mCurrentSelection);
}
diff --git a/src/gui/effects/qgraphicseffect.cpp b/src/gui/effects/qgraphicseffect.cpp
index 83f4f792ee..7f830631ca 100644
--- a/src/gui/effects/qgraphicseffect.cpp
+++ b/src/gui/effects/qgraphicseffect.cpp
@@ -108,6 +108,7 @@
#include <QtCore/qdebug.h>
#include <private/qdrawhelper_p.h>
+#ifndef QT_NO_GRAPHICSEFFECT
QT_BEGIN_NAMESPACE
/*!
@@ -127,6 +128,19 @@ QT_BEGIN_NAMESPACE
*/
/*!
+ \enum QGraphicsEffectSource::PixmapPadMode
+
+ This enum describes how much of the effect will be rendered to a pixmap
+ created using the pixmap() function.
+
+ \value NoExpandPadMode The pixmap is the size of the widget or graphics item.
+ \value ExpandToTransparentBorderPadMode The pixmap is expanded to include
+ the widget or graphics item plus a transparent border.
+ \value ExpandToEffectRectPadMode The pixmap is expanded to include the widget
+ or graphics item and the effect.
+*/
+
+/*!
\internal
*/
QGraphicsEffectSource::QGraphicsEffectSource(QGraphicsEffectSourcePrivate &dd, QObject *parent)
@@ -263,6 +277,9 @@ bool QGraphicsEffectSource::isPixmap() const
The optional \a offset parameter returns the offset where the pixmap should
be painted at using the current painter.
+ The \a mode determines how much of the effect the pixmap will contain.
+ By default, the pixmap will contain the whole effect.
+
The returned pixmap is bound to the current painter's device rectangle when
\a system is Qt::DeviceCoordinates.
@@ -734,7 +751,7 @@ void QGraphicsBlurEffect::setBlurHint(QGraphicsBlurEffect::BlurHint hint)
}
/*!
- \fn void QGraphicsBlurEffect::blurHintChanged(Qt::BlurHint hint)
+ \fn void QGraphicsBlurEffect::blurHintChanged(QGraphicsBlurEffect::BlurHint hint)
This signal is emitted whenever the effect's blur hint changes.
The \a hint parameter holds the effect's new blur hint.
@@ -1128,3 +1145,4 @@ void QGraphicsOpacityEffect::draw(QPainter *painter, QGraphicsEffectSource *sour
QT_END_NAMESPACE
+#endif //QT_NO_GRAPHICSEFFECT
diff --git a/src/gui/effects/qgraphicseffect.h b/src/gui/effects/qgraphicseffect.h
index 7335a254f2..5c73f4bb3d 100644
--- a/src/gui/effects/qgraphicseffect.h
+++ b/src/gui/effects/qgraphicseffect.h
@@ -48,6 +48,7 @@
#include <QtGui/qcolor.h>
#include <QtGui/qbrush.h>
+#ifndef QT_NO_GRAPHICSEFFECT
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
@@ -302,6 +303,7 @@ private:
QT_END_NAMESPACE
QT_END_HEADER
+#endif //QT_NO_GRAPHICSEFFECT
#endif // QGRAPHICSEFFECT_H
diff --git a/src/gui/effects/qgraphicseffect_p.h b/src/gui/effects/qgraphicseffect_p.h
index 0ff5794802..9a46a243c9 100644
--- a/src/gui/effects/qgraphicseffect_p.h
+++ b/src/gui/effects/qgraphicseffect_p.h
@@ -60,6 +60,7 @@
#include <private/qobject_p.h>
#include <private/qpixmapfilter_p.h>
+#ifndef QT_NO_GRAPHICSEFFECT
QT_BEGIN_NAMESPACE
class QGraphicsEffectSourcePrivate : public QObjectPrivate
@@ -179,5 +180,6 @@ public:
QT_END_NAMESPACE
+#endif //QT_NO_GRAPHICSEFFECT
#endif // QGRAPHICSEFFECT_P_H
diff --git a/src/gui/graphicsview/qgraphicslinearlayout.cpp b/src/gui/graphicsview/qgraphicslinearlayout.cpp
index 5684f0edea..cb68741ebd 100644
--- a/src/gui/graphicsview/qgraphicslinearlayout.cpp
+++ b/src/gui/graphicsview/qgraphicslinearlayout.cpp
@@ -542,6 +542,9 @@ void QGraphicsLinearLayout::invalidate()
QGraphicsLayout::invalidate();
}
+/*!
+ \internal
+*/
void QGraphicsLinearLayout::dump(int indent) const
{
#ifdef QT_DEBUG
diff --git a/src/gui/image/qbitmap.cpp b/src/gui/image/qbitmap.cpp
index e081735b69..4b8d4b889d 100644
--- a/src/gui/image/qbitmap.cpp
+++ b/src/gui/image/qbitmap.cpp
@@ -86,7 +86,7 @@ QT_BEGIN_NAMESPACE
object.
Just like the QPixmap class, QBitmap is optimized by the use of
- implicit data sharing. For more information, see the {Implicit
+ implicit data sharing. For more information, see the \l {Implicit
Data Sharing} documentation.
\sa QPixmap, QImage, QImageReader, QImageWriter
diff --git a/src/gui/image/qpixmapfilter.cpp b/src/gui/image/qpixmapfilter.cpp
index e50cc8b788..d83ef2c9b2 100644
--- a/src/gui/image/qpixmapfilter.cpp
+++ b/src/gui/image/qpixmapfilter.cpp
@@ -53,6 +53,7 @@
#include "private/qpaintengineex_p.h"
#include "private/qpaintengine_raster_p.h"
+#ifndef QT_NO_GRAPHICSEFFECT
QT_BEGIN_NAMESPACE
class QPixmapFilterPrivate : public QObjectPrivate
@@ -1107,3 +1108,5 @@ void QPixmapDropShadowFilter::draw(QPainter *p,
}
QT_END_NAMESPACE
+
+#endif //QT_NO_GRAPHICSEFFECT
diff --git a/src/gui/image/qpixmapfilter_p.h b/src/gui/image/qpixmapfilter_p.h
index 6a96676c6d..2573fc7bde 100644
--- a/src/gui/image/qpixmapfilter_p.h
+++ b/src/gui/image/qpixmapfilter_p.h
@@ -57,6 +57,7 @@
#include <QtGui/qpixmap.h>
#include <QtGui/qgraphicseffect.h>
+#ifndef QT_NO_GRAPHICSEFFECT
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
@@ -191,4 +192,5 @@ QT_END_NAMESPACE
QT_END_HEADER
+#endif //QT_NO_GRAPHICSEFFECT
#endif // QPIXMAPFILTER_H
diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp
index bcebe06ca1..ad68aea420 100644
--- a/src/gui/kernel/qevent.cpp
+++ b/src/gui/kernel/qevent.cpp
@@ -4345,9 +4345,9 @@ bool QGestureEvent::isAccepted(QGesture *gesture) const
Sets the accept flag of the given \a gestureType object to the specified
\a value.
- Setting the accept flag indicates that the event receiver wants the gesture
- of type \a gestureType. Unwanted gestures may be propagated to the parent
- widget.
+ Setting the accept flag indicates that the event receiver wants to receive
+ gestures of the specified type, \a gestureType. Unwanted gestures may be
+ propagated to the parent widget.
By default, gestures in events of type QEvent::Gesture are accepted, and
gestures in QEvent::GestureOverride events are ignored.
diff --git a/src/gui/kernel/qgesture.cpp b/src/gui/kernel/qgesture.cpp
index e322af25f3..dcec9d37bc 100644
--- a/src/gui/kernel/qgesture.cpp
+++ b/src/gui/kernel/qgesture.cpp
@@ -174,6 +174,16 @@ void QGesture::unsetHotSpot()
}
/*!
+ \property QGesture::gestureCancelPolicy
+ \brief the policy for deciding what happens on accepting a gesture
+
+ On accepting one gesture Qt can automatically cancel other gestures
+ that belong to other targets. The policy is normally set to not cancel
+ any other gestures and can be set to cancel all active gestures in the
+ context. For example for all child widgets.
+*/
+
+/*!
\enum QGesture::GestureCancelPolicy
This enum describes how accepting a gesture can cancel other gestures
@@ -210,16 +220,6 @@ QGesture::GestureCancelPolicy QGesture::gestureCancelPolicy() const
*/
/*!
- \property QGesture::gestureCancelPolicy
- \brief the policy for deciding what happens on accepting a gesture
-
- On accepting one gesture Qt can automatically cancel other gestures
- that belong to other targets. The policy is normally set to not cancel
- any other gestures and can be set to cancel all active gestures in the
- context. For example for all child widgets.
-*/
-
-/*!
\property QPanGesture::lastOffset
\brief the last offset recorded for this gesture
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index 6a72cfa689..386bf71559 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -230,7 +230,9 @@ QWidgetPrivate::~QWidgetPrivate()
if (extra)
deleteExtra();
+#ifndef QT_NO_GRAPHICSEFFECT
delete graphicsEffect;
+#endif //QT_NO_GRAPHICSEFFECT
}
QWindowSurface *QWidgetPrivate::createDefaultWindowSurface()
@@ -1793,6 +1795,7 @@ QRegion QWidgetPrivate::clipRegion() const
return r;
}
+#ifndef QT_NO_GRAPHICSEFFECT
void QWidgetPrivate::invalidateGraphicsEffectsRecursively()
{
Q_Q(QWidget);
@@ -1807,6 +1810,7 @@ void QWidgetPrivate::invalidateGraphicsEffectsRecursively()
w = w->parentWidget();
} while (w);
}
+#endif //QT_NO_GRAPHICSEFFECT
void QWidgetPrivate::setDirtyOpaqueRegion()
{
@@ -1814,7 +1818,9 @@ void QWidgetPrivate::setDirtyOpaqueRegion()
dirtyOpaqueChildren = true;
+#ifndef QT_NO_GRAPHICSEFFECT
invalidateGraphicsEffectsRecursively();
+#endif //QT_NO_GRAPHICSEFFECT
if (q->isWindow())
return;
@@ -1963,10 +1969,12 @@ void QWidgetPrivate::clipToEffectiveMask(QRegion &region) const
const QWidget *w = q;
QPoint offset;
+#ifndef QT_NO_GRAPHICSEFFECT
if (graphicsEffect) {
w = q->parentWidget();
offset -= data.crect.topLeft();
}
+#endif //QT_NO_GRAPHICSEFFECT
while (w) {
const QWidgetPrivate *wd = w->d_func();
@@ -2001,11 +2009,13 @@ void QWidgetPrivate::updateIsOpaque()
// hw: todo: only needed if opacity actually changed
setDirtyOpaqueRegion();
+#ifndef QT_NO_GRAPHICSEFFECT
if (graphicsEffect) {
// ### We should probably add QGraphicsEffect::isOpaque at some point.
setOpaque(false);
return;
}
+#endif //QT_NO_GRAPHICSEFFECT
Q_Q(QWidget);
#ifdef Q_WS_X11
@@ -5013,11 +5023,13 @@ void QWidget::render(QPainter *painter, const QPoint &targetOffset,
\sa setGraphicsEffect()
*/
+#ifndef QT_NO_GRAPHICSEFFECT
QGraphicsEffect *QWidget::graphicsEffect() const
{
Q_D(const QWidget);
return d->graphicsEffect;
}
+#endif //QT_NO_GRAPHICSEFFECT
/*!
@@ -5036,6 +5048,7 @@ QGraphicsEffect *QWidget::graphicsEffect() const
\sa graphicsEffect()
*/
+#ifndef QT_NO_GRAPHICSEFFECT
void QWidget::setGraphicsEffect(QGraphicsEffect *effect)
{
Q_D(QWidget);
@@ -5065,6 +5078,7 @@ void QWidget::setGraphicsEffect(QGraphicsEffect *effect)
d->updateIsOpaque();
update();
}
+#endif //QT_NO_GRAPHICSEFFECT
bool QWidgetPrivate::isAboutToShow() const
{
@@ -5211,6 +5225,7 @@ void QWidgetPrivate::drawWidget(QPaintDevice *pdev, const QRegion &rgn, const QP
return;
Q_Q(QWidget);
+#ifndef QT_NO_GRAPHICSEFFECT
if (graphicsEffect && graphicsEffect->isEnabled()) {
QGraphicsEffectSource *source = graphicsEffect->d_func()->source;
QWidgetEffectSourcePrivate *sourced = static_cast<QWidgetEffectSourcePrivate *>
@@ -5241,6 +5256,7 @@ void QWidgetPrivate::drawWidget(QPaintDevice *pdev, const QRegion &rgn, const QP
return;
}
}
+#endif //QT_NO_GRAFFICSEFFECT
const bool asRoot = flags & DrawAsRoot;
const bool alsoOnScreen = flags & DrawPaintOnScreen;
@@ -5395,7 +5411,6 @@ void QWidgetPrivate::paintSiblingsRecursive(QPaintDevice *pdev, const QObjectLis
QWidgetPrivate *wd = w->d_func();
const QPoint widgetPos(w->data->crect.topLeft());
const bool hasMask = wd->extra && wd->extra->hasMask && !wd->graphicsEffect;
-
if (index > 0) {
QRegion wr(rgn);
if (wd->isOpaque)
@@ -5421,6 +5436,7 @@ void QWidgetPrivate::paintSiblingsRecursive(QPaintDevice *pdev, const QObjectLis
}
}
+#ifndef QT_NO_GRAPHICSEFFECT
QRectF QWidgetEffectSourcePrivate::boundingRect(Qt::CoordinateSystem system) const
{
if (system != Qt::DeviceCoordinates)
@@ -5521,6 +5537,7 @@ QPixmap QWidgetEffectSourcePrivate::pixmap(Qt::CoordinateSystem system, QPoint *
m_widget->render(&pixmap, pixmapOffset);
return pixmap;
}
+#endif //QT_NO_GRAPHICSEFFECT
#ifndef QT_NO_GRAPHICSVIEW
/*!
diff --git a/src/gui/kernel/qwidget.h b/src/gui/kernel/qwidget.h
index 05f0069e07..b7c55f9796 100644
--- a/src/gui/kernel/qwidget.h
+++ b/src/gui/kernel/qwidget.h
@@ -351,8 +351,10 @@ public:
const QRegion &sourceRegion = QRegion(),
RenderFlags renderFlags = RenderFlags(DrawWindowBackground | DrawChildren));
+#ifndef QT_NO_GRAPHICSEFFECT
QGraphicsEffect *graphicsEffect() const;
void setGraphicsEffect(QGraphicsEffect *effect);
+#endif //QT_NO_GRAPHICSEFFECT
void grabGesture(Qt::GestureType type, Qt::GestureFlags flags = Qt::GestureFlags());
void ungrabGesture(Qt::GestureType type);
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm
index 9270220d31..278bd800aa 100644
--- a/src/gui/kernel/qwidget_mac.mm
+++ b/src/gui/kernel/qwidget_mac.mm
@@ -3787,7 +3787,7 @@ void QWidgetPrivate::stackUnder_sys(QWidget *w)
/*
Modifies the bounds for a widgets backing HIView during moves and resizes. Also updates the
widget, either by scrolling its contents or repainting, depending on the WA_StaticContents
- and QWidgetPrivate::isOpaque flags.
+ flag
*/
static void qt_mac_update_widget_posisiton(QWidget *q, QRect oldRect, QRect newRect)
{
@@ -3804,8 +3804,8 @@ static void qt_mac_update_widget_posisiton(QWidget *q, QRect oldRect, QRect newR
// Perform a normal (complete repaint) update in some cases:
if (
- // move-by-scroll requires QWidgetPrivate::isOpaque set
- (isMove && q->testAttribute(Qt::WA_OpaquePaintEvent) == false) ||
+ // always repaint on move.
+ (isMove) ||
// limited update on resize requires WA_StaticContents.
(isResize && q->testAttribute(Qt::WA_StaticContents) == false) ||
diff --git a/src/gui/kernel/qwidget_p.h b/src/gui/kernel/qwidget_p.h
index 8b03a85afa..151b90a2d5 100644
--- a/src/gui/kernel/qwidget_p.h
+++ b/src/gui/kernel/qwidget_p.h
@@ -384,7 +384,9 @@ public:
void setOpaque(bool opaque);
void updateIsTranslucent();
bool paintOnScreen() const;
+#ifndef QT_NO_GRAPHICSEFFECT
void invalidateGraphicsEffectsRecursively();
+#endif //QT_NO_GRAPHICSEFFECT
const QRegion &getOpaqueChildren() const;
void setDirtyOpaqueRegion();
@@ -530,8 +532,10 @@ public:
inline QRect effectiveRectFor(const QRect &rect) const
{
+#ifndef QT_NO_GRAPHICSEFFECT
if (graphicsEffect && graphicsEffect->isEnabled())
return graphicsEffect->boundingRectFor(rect).toAlignedRect();
+#endif //QT_NO_GRAPHICSEFFECT
return rect;
}
@@ -774,6 +778,7 @@ struct QWidgetPaintContext
QPainter *painter;
};
+#ifndef QT_NO_GRAPHICSEFFECT
class QWidgetEffectSourcePrivate : public QGraphicsEffectSourcePrivate
{
public:
@@ -826,6 +831,7 @@ public:
QTransform lastEffectTransform;
bool updateDueToGraphicsEffect;
};
+#endif //QT_NO_GRAPHICSEFFECT
inline QWExtra *QWidgetPrivate::extraData() const
{
diff --git a/src/gui/painting/qbackingstore.cpp b/src/gui/painting/qbackingstore.cpp
index f36470ae3d..8226797cff 100644
--- a/src/gui/painting/qbackingstore.cpp
+++ b/src/gui/painting/qbackingstore.cpp
@@ -529,7 +529,9 @@ void QWidgetBackingStore::markDirty(const QRegion &rgn, QWidget *widget, bool up
Q_ASSERT(widget->window() == tlw);
Q_ASSERT(!rgn.isEmpty());
+#ifndef QT_NO_GRAPHICSEFFECT
widget->d_func()->invalidateGraphicsEffectsRecursively();
+#endif //QT_NO_GRAPHICSEFFECT
if (widget->d_func()->paintOnScreen()) {
if (widget->d_func()->dirty.isEmpty()) {
@@ -559,9 +561,11 @@ void QWidgetBackingStore::markDirty(const QRegion &rgn, QWidget *widget, bool up
if (invalidateBuffer) {
const bool eventAlreadyPosted = !dirty.isEmpty();
+#ifndef QT_NO_GRAPHICSEFFECT
if (widget->d_func()->graphicsEffect)
dirty += widget->d_func()->effectiveRectFor(rgn.boundingRect()).translated(offset);
else
+#endif //QT_NO_GRAPHICSEFFECT
dirty += rgn.translated(offset);
if (!eventAlreadyPosted || updateImmediately)
sendUpdateRequest(tlw, updateImmediately);
@@ -576,9 +580,11 @@ void QWidgetBackingStore::markDirty(const QRegion &rgn, QWidget *widget, bool up
if (widget->d_func()->inDirtyList) {
if (!qt_region_strictContains(widget->d_func()->dirty, widgetRect)) {
+#ifndef QT_NO_GRAPHICSEFFECT
if (widget->d_func()->graphicsEffect)
widget->d_func()->dirty += widget->d_func()->effectiveRectFor(rgn.boundingRect());
else
+#endif //QT_NO_GRAPHICSEFFECT
widget->d_func()->dirty += rgn;
}
} else {
@@ -606,7 +612,9 @@ void QWidgetBackingStore::markDirty(const QRect &rect, QWidget *widget, bool upd
Q_ASSERT(widget->window() == tlw);
Q_ASSERT(!rect.isEmpty());
+#ifndef QT_NO_GRAPHICSEFFECT
widget->d_func()->invalidateGraphicsEffectsRecursively();
+#endif //QT_NO_GRAPHICSEFFECT
if (widget->d_func()->paintOnScreen()) {
if (widget->d_func()->dirty.isEmpty()) {
diff --git a/src/gui/painting/qbackingstore_p.h b/src/gui/painting/qbackingstore_p.h
index 3288daee2c..fbef9801a5 100644
--- a/src/gui/painting/qbackingstore_p.h
+++ b/src/gui/painting/qbackingstore_p.h
@@ -146,9 +146,11 @@ private:
{
if (widget && !widget->d_func()->inDirtyList && !widget->data->in_destructor) {
QWidgetPrivate *widgetPrivate = widget->d_func();
+#ifndef QT_NO_GRAPHICSEFFECT
if (widgetPrivate->graphicsEffect)
widgetPrivate->dirty = widgetPrivate->effectiveRectFor(rgn.boundingRect());
else
+#endif //QT_NO_GRAPHICSEFFECT
widgetPrivate->dirty = rgn;
dirtyWidgets.append(widget);
widgetPrivate->inDirtyList = true;
diff --git a/src/gui/styles/qstyleoption.cpp b/src/gui/styles/qstyleoption.cpp
index f5a2b945cb..d73a563f17 100644
--- a/src/gui/styles/qstyleoption.cpp
+++ b/src/gui/styles/qstyleoption.cpp
@@ -4736,8 +4736,9 @@ QStyleOptionTabWidgetFrameV2::QStyleOptionTabWidgetFrameV2(const QStyleOptionTab
QStyleOptionFrame types.
If the \a{other} style option's version is 1, this style option's
- \l FrameFeature value is set to \l QStyleOptionFrameV2::None. If
- its version is 2, its \l FrameFeature value is simply copied to
+ QStyleOptionFrameV2::FrameFeature value is set to
+ QStyleOptionFrameV2::None. If its version is 2, its
+ \l{QStyleOptionFrameV2::}{FrameFeature} value is simply copied to
this style option.
*/
QStyleOptionTabWidgetFrameV2 &QStyleOptionTabWidgetFrameV2::operator=(const QStyleOptionTabWidgetFrame &other)
diff --git a/src/gui/util/qdesktopservices.cpp b/src/gui/util/qdesktopservices.cpp
index 85b539f20d..fd84949a63 100644
--- a/src/gui/util/qdesktopservices.cpp
+++ b/src/gui/util/qdesktopservices.cpp
@@ -293,8 +293,6 @@ void QDesktopServices::unsetUrlHandler(const QString &scheme)
have desktop concept, DesktopLocation returns same path as DocumentsLocation.
Rest of the standard locations point to folder on same drive with executable, except
that if executable is in ROM the folder from C drive is returned.
-
- \endcode
*/
/*!
diff --git a/src/network/access/qnetworkaccessdebugpipebackend.cpp b/src/network/access/qnetworkaccessdebugpipebackend.cpp
index 4f7f15cb31..fecbe832a9 100644
--- a/src/network/access/qnetworkaccessdebugpipebackend.cpp
+++ b/src/network/access/qnetworkaccessdebugpipebackend.cpp
@@ -229,7 +229,7 @@ void QNetworkAccessDebugPipeBackend::possiblyFinish()
void QNetworkAccessDebugPipeBackend::closeDownstreamChannel()
{
- qWarning("QNetworkAccessDebugPipeBackend::closeDownstreamChannel()",operation());;
+ qWarning("QNetworkAccessDebugPipeBackend::closeDownstreamChannel() %d",operation());;
//if (operation() == QNetworkAccessManager::GetOperation)
// socket.disconnectFromHost();
}
@@ -237,7 +237,7 @@ void QNetworkAccessDebugPipeBackend::closeDownstreamChannel()
void QNetworkAccessDebugPipeBackend::socketError()
{
- qWarning("QNetworkAccessDebugPipeBackend::socketError()", socket.error());
+ qWarning("QNetworkAccessDebugPipeBackend::socketError() %d",socket.error());
QNetworkReply::NetworkError code;
switch (socket.error()) {
case QAbstractSocket::RemoteHostClosedError:
diff --git a/src/network/socket/qabstractsocket.cpp b/src/network/socket/qabstractsocket.cpp
index 89a6e91c6d..8b4f364cb3 100644
--- a/src/network/socket/qabstractsocket.cpp
+++ b/src/network/socket/qabstractsocket.cpp
@@ -1589,10 +1589,10 @@ bool QAbstractSocket::setSocketDescriptor(int socketDescriptor, SocketState sock
}
/*!
- Sets the option \a option to the value described by \a value.
+ \since 4.6
+ Sets the given \a option to the value described by \a value.
\sa socketOption()
- \since 4.6
*/
void QAbstractSocket::setSocketOption(QAbstractSocket::SocketOption option, const QVariant &value)
{
@@ -1618,10 +1618,10 @@ void QAbstractSocket::setSocketOption(QAbstractSocket::SocketOption option, cons
}
/*!
+ \since 4.6
Returns the value of the \a option option.
\sa setSocketOption()
- \since 4.6
*/
QVariant QAbstractSocket::socketOption(QAbstractSocket::SocketOption option)
{
diff --git a/src/network/ssl/qsslsocket.cpp b/src/network/ssl/qsslsocket.cpp
index cfa99c8dfe..e53d8a42ee 100644
--- a/src/network/ssl/qsslsocket.cpp
+++ b/src/network/ssl/qsslsocket.cpp
@@ -468,7 +468,10 @@ bool QSslSocket::setSocketDescriptor(int socketDescriptor, SocketState state, Op
}
/*!
- \reimp
+ \since 4.6
+ Sets the given \a option to the value described by \a value.
+
+ \sa socketOption()
*/
void QSslSocket::setSocketOption(QAbstractSocket::SocketOption option, const QVariant &value)
{
@@ -478,7 +481,10 @@ void QSslSocket::setSocketOption(QAbstractSocket::SocketOption option, const QVa
}
/*!
- \reimp
+ \since 4.6
+ Returns the value of the \a option option.
+
+ \sa setSocketOption()
*/
QVariant QSslSocket::socketOption(QAbstractSocket::SocketOption option)
{
diff --git a/src/sql/drivers/psql/qsql_psql.cpp b/src/sql/drivers/psql/qsql_psql.cpp
index 1e41571db8..981b750975 100644
--- a/src/sql/drivers/psql/qsql_psql.cpp
+++ b/src/sql/drivers/psql/qsql_psql.cpp
@@ -1150,7 +1150,7 @@ QString QPSQLDriver::formatValue(const QSqlField &field, bool trimStrings) const
case QVariant::Time:
#ifndef QT_NO_DATESTRING
if (field.value().toTime().isValid()) {
- r = QLatin1Char('\'') + field.value().toTime().toString(Qt::ISODate) + QLatin1Char('\'');
+ r = QLatin1Char('\'') + field.value().toTime().toString(QLatin1String("hh:mm:ss.zzz")) + QLatin1Char('\'');
} else
#endif
{
diff --git a/src/sql/models/qsqltablemodel.cpp b/src/sql/models/qsqltablemodel.cpp
index df94080e26..e5c6550f3f 100644
--- a/src/sql/models/qsqltablemodel.cpp
+++ b/src/sql/models/qsqltablemodel.cpp
@@ -406,7 +406,7 @@ bool QSqlTableModel::select()
QSqlQuery qu(query, d->db);
setQuery(qu);
- if (!qu.isActive()) {
+ if (!qu.isActive() || lastError().isValid()) {
// something went wrong - revert to non-select state
d->initRecordAndPrimaryIndex();
return false;
diff --git a/tests/auto/qsqlquery/tst_qsqlquery.cpp b/tests/auto/qsqlquery/tst_qsqlquery.cpp
index 4d9e50fab4..4264a70283 100644
--- a/tests/auto/qsqlquery/tst_qsqlquery.cpp
+++ b/tests/auto/qsqlquery/tst_qsqlquery.cpp
@@ -193,9 +193,13 @@ private slots:
void sqlServerReturn0_data() { generic_data(); }
void sqlServerReturn0();
+
void QTBUG_551_data() { generic_data("QOCI"); }
void QTBUG_551();
+ void QTBUG_5251_data() { generic_data("QPSQL"); }
+ void QTBUG_5251();
+
private:
// returns all database connections
void generic_data(const QString &engine=QString());
@@ -2901,5 +2905,35 @@ void tst_QSqlQuery::QTBUG_551()
QCOMPARE(res_outLst[2].toString(), QLatin1String("3. Value is 2"));
}
+void tst_QSqlQuery::QTBUG_5251()
+{
+ QFETCH( QString, dbName );
+ QSqlDatabase db = QSqlDatabase::database( dbName );
+ CHECK_DATABASE( db );
+
+ if (!db.driverName().startsWith( "QPSQL" )) return;
+
+ QSqlQuery q(db);
+ q.exec("DROP TABLE " + qTableName("timetest"));
+ QVERIFY_SQL(q, exec("CREATE TABLE " + qTableName("timetest") + " (t TIME)"));
+ QVERIFY_SQL(q, exec("INSERT INTO " + qTableName("timetest") + " VALUES ('1:2:3.666')"));
+
+ QSqlTableModel timetestModel(0,db);
+ timetestModel.setEditStrategy(QSqlTableModel::OnManualSubmit);
+ timetestModel.setTable(qTableName("timetest"));
+ QVERIFY_SQL(timetestModel, select());
+
+ QCOMPARE(timetestModel.record(0).field(0).value().toTime().toString("HH:mm:ss.zzz"), QString("01:02:03.666"));
+ QVERIFY_SQL(timetestModel,setData(timetestModel.index(0, 0), QTime(0,12,34,500)));
+ QCOMPARE(timetestModel.record(0).field(0).value().toTime().toString("HH:mm:ss.zzz"), QString("00:12:34.500"));
+ QVERIFY_SQL(timetestModel, submitAll());
+ QCOMPARE(timetestModel.record(0).field(0).value().toTime().toString("HH:mm:ss.zzz"), QString("00:12:34.500"));
+
+ QVERIFY_SQL(q, exec("UPDATE " + qTableName("timetest") + " SET t = '0:11:22.33'"));
+ QVERIFY_SQL(timetestModel, select());
+ QCOMPARE(timetestModel.record(0).field(0).value().toTime().toString("HH:mm:ss.zzz"), QString("00:11:22.330"));
+
+}
+
QTEST_MAIN( tst_QSqlQuery )
#include "tst_qsqlquery.moc"
diff --git a/tests/auto/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp b/tests/auto/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp
index cb24a9f36a..8c840cd1d5 100644
--- a/tests/auto/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp
+++ b/tests/auto/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp
@@ -86,6 +86,7 @@ private slots:
void escapedRelations();
void escapedTableName();
void whiteSpaceInIdentifiers();
+ void psqlSchemaTest();
private:
void dropTestTables( QSqlDatabase db );
@@ -150,10 +151,11 @@ void tst_QSqlRelationalTableModel::initTestCase()
if (db.driverName().startsWith("QIBASE"))
db.exec("SET DIALECT 3");
else if (tst_Databases::isSqlServer(db)) {
- QSqlQuery q(db);
- QVERIFY_SQL(q, exec("SET ANSI_DEFAULTS ON"));
- QVERIFY_SQL(q, exec("SET IMPLICIT_TRANSACTIONS OFF"));
+ db.exec("SET ANSI_DEFAULTS ON");
+ db.exec("SET IMPLICIT_TRANSACTIONS OFF");
}
+ else if(tst_Databases::isPostgreSQL(db))
+ db.exec("set client_min_messages='warning'");
recreateTestTables(db);
}
}
@@ -181,6 +183,9 @@ void tst_QSqlRelationalTableModel::dropTestTables( QSqlDatabase db )
<< qTableName("CASETEST1" )
<< qTableName("casetest1" );
tst_Databases::safeDropTables( db, tableNames );
+
+ db.exec("DROP SCHEMA "+qTableName("QTBUG_5373")+" CASCADE");
+ db.exec("DROP SCHEMA "+qTableName("QTBUG_5373_s2")+" CASCADE");
}
void tst_QSqlRelationalTableModel::init()
@@ -1118,8 +1123,8 @@ void tst_QSqlRelationalTableModel::escapedTableName()
}
}
-void tst_QSqlRelationalTableModel::whiteSpaceInIdentifiers() {
-
+void tst_QSqlRelationalTableModel::whiteSpaceInIdentifiers()
+{
QFETCH_GLOBAL(QString, dbName);
QSqlDatabase db = QSqlDatabase::database(dbName);
CHECK_DATABASE(db);
@@ -1193,5 +1198,26 @@ void tst_QSqlRelationalTableModel::whiteSpaceInIdentifiers() {
QCOMPARE(model.data(model.index(0, 2)).toInt(), 6);
}
+void tst_QSqlRelationalTableModel::psqlSchemaTest()
+{
+ QFETCH_GLOBAL(QString, dbName);
+ QSqlDatabase db = QSqlDatabase::database(dbName);
+ CHECK_DATABASE(db);
+
+ if(!tst_Databases::isPostgreSQL(db)) {
+ QSKIP("Postgresql specific test", SkipSingle);
+ return;
+ }
+ QSqlRelationalTableModel model(0, db);
+ QSqlQuery q(db);
+ QVERIFY_SQL(q, exec("create schema "+qTableName("QTBUG_5373")));
+ QVERIFY_SQL(q, exec("create schema "+qTableName("QTBUG_5373_s2")));
+ QVERIFY_SQL(q, exec("create table "+qTableName("QTBUG_5373")+"."+qTableName("user")+"(userid int primary key, relatingid int)"));
+ QVERIFY_SQL(q, exec("create table "+qTableName("QTBUG_5373_s2")+"."+qTableName("user2")+"(userid2 int primary key, username2 char(40))"));
+ model.setTable(qTableName("QTBUG_5373")+"."+qTableName("user"));
+ model.setRelation(1, QSqlRelation(qTableName("QTBUG_5373_s2")+"."+qTableName("user2"), "userid2", "username2"));
+ QVERIFY_SQL(model, select());
+}
+
QTEST_MAIN(tst_QSqlRelationalTableModel)
#include "tst_qsqlrelationaltablemodel.moc"
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index 95f271defd..d8c2abd4f3 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -249,7 +249,7 @@ Configure::Configure( int& argc, char** argv )
dictionary[ "MULTIMEDIA" ] = "yes";
dictionary[ "DIRECTSHOW" ] = "no";
dictionary[ "WEBKIT" ] = "auto";
- dictionary[ "DECLARATIVE" ] = "no";
+ dictionary[ "DECLARATIVE" ] = "auto";
dictionary[ "PLUGIN_MANIFESTS" ] = "yes";
QString version;
@@ -2038,6 +2038,8 @@ bool Configure::checkAvailability(const QString &part)
available = true;
} else if (part == "WEBKIT") {
available = (dictionary.value("QMAKESPEC") == "win32-msvc2005") || (dictionary.value("QMAKESPEC") == "win32-msvc2008") || (dictionary.value("QMAKESPEC") == "win32-g++");
+ } else if (part == "DECLARATIVE") {
+ available = QFile::exists(sourcePath + "/src/declarative/qml/qmlcomponent.h");
}
return available;
@@ -2124,6 +2126,8 @@ void Configure::autoDetection()
dictionary["PHONON"] = checkAvailability("PHONON") ? "yes" : "no";
if (dictionary["WEBKIT"] == "auto")
dictionary["WEBKIT"] = checkAvailability("WEBKIT") ? "yes" : "no";
+ if (dictionary["DECLARATIVE"] == "auto")
+ dictionary["DECLARATIVE"] = checkAvailability("DECLARATIVE") ? "yes" : "no";
// Qt/WinCE remote test application
if (dictionary["CETEST"] == "auto")