summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/src/classes/phonon-api.qdoc24
-rw-r--r--doc/src/declarative/anchor-layout.qdoc7
-rw-r--r--doc/src/declarative/declarativeui.qdoc2
-rw-r--r--doc/src/declarative/qtquick-intro.qdoc2
-rw-r--r--doc/src/deployment/deployment.qdoc14
-rw-r--r--doc/src/development/qmake-manual.qdoc23
-rw-r--r--doc/src/examples/addressbook.qdoc2
-rw-r--r--doc/src/examples/codeeditor.qdoc26
-rw-r--r--doc/src/examples/stardelegate.qdoc24
-rw-r--r--doc/src/index.qdoc2
-rw-r--r--doc/src/platforms/platform-notes.qdoc27
-rw-r--r--doc/src/platforms/supported-platforms.qdoc12
-rw-r--r--doc/src/platforms/symbian-introduction.qdoc2
-rw-r--r--doc/src/qt-features.qdoc204
-rw-r--r--doc/src/qt4-intro.qdoc3
-rw-r--r--examples/opengl/cube/mainwidget.h2
-rw-r--r--examples/webkit/simplewebplugin/csvfactory.h6
-rw-r--r--examples/webkit/webftpclient/ftpreply.h4
-rw-r--r--examples/webkit/webftpclient/ftpview.h3
-rw-r--r--examples/widgets/orientation/mainwindow.h6
-rw-r--r--mkspecs/features/help.prf2
-rw-r--r--src/3rdparty/webkit/.tag2
-rw-r--r--src/3rdparty/webkit/ChangeLog23
-rw-r--r--src/3rdparty/webkit/Source/JavaScriptCore/ChangeLog41
-rw-r--r--src/3rdparty/webkit/Source/JavaScriptCore/wtf/Platform.h8
-rw-r--r--src/3rdparty/webkit/Source/JavaScriptCore/wtf/wtf.pri2
-rw-r--r--src/3rdparty/webkit/Source/WebCore/ChangeLog167
-rw-r--r--src/3rdparty/webkit/Source/WebCore/dom/Range.cpp15
-rw-r--r--src/3rdparty/webkit/Source/WebCore/features.pri2
-rw-r--r--src/3rdparty/webkit/Source/WebCore/loader/DocumentWriter.cpp7
-rw-r--r--src/3rdparty/webkit/Source/WebCore/loader/FrameLoader.cpp33
-rw-r--r--src/3rdparty/webkit/Source/WebCore/page/FrameView.cpp17
-rw-r--r--src/3rdparty/webkit/Source/WebCore/page/FrameView.h2
-rw-r--r--src/3rdparty/webkit/Source/WebCore/rendering/RenderBlock.cpp6
-rw-r--r--src/3rdparty/webkit/Source/WebCore/rendering/RenderBox.cpp7
-rw-r--r--src/3rdparty/webkit/Source/WebCore/rendering/RenderObjectChildList.cpp15
-rw-r--r--src/3rdparty/webkit/Source/WebCore/rendering/RenderScrollbar.cpp2
-rw-r--r--src/3rdparty/webkit/Source/WebCore/rendering/RenderTableRow.cpp4
-rw-r--r--src/3rdparty/webkit/Source/WebCore/rendering/RenderTableSection.cpp4
-rw-r--r--src/3rdparty/webkit/Source/WebCore/rendering/RenderWidget.cpp5
-rw-r--r--src/3rdparty/webkit/Source/WebKit.pri3
-rw-r--r--src/3rdparty/webkit/Source/WebKit/qt/ChangeLog55
-rw-r--r--src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp5
-rw-r--r--src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h1
-rw-r--r--src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp4
-rw-r--r--src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h1
-rw-r--r--src/3rdparty/webkit/Source/WebKit/qt/symbian/eabi/QtWebKitu.def2
-rw-r--r--src/3rdparty/webkit/Source/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp55
-rw-r--r--src/3rdparty/webkit/VERSION2
-rw-r--r--src/corelib/arch/generic/qatomic_generic_windows.cpp3
-rw-r--r--src/corelib/global/qnamespace.qdoc2
-rw-r--r--src/corelib/io/qiodevice.cpp2
-rw-r--r--src/corelib/kernel/qmetaobject.cpp11
-rw-r--r--src/corelib/kernel/qsystemsemaphore_win.cpp4
-rw-r--r--src/corelib/tools/qdatetime.cpp4
-rw-r--r--src/corelib/tools/qline.cpp5
-rw-r--r--src/corelib/tools/qlist.cpp4
-rw-r--r--src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp4
-rw-r--r--src/declarative/graphicsitems/qdeclarativeborderimage.cpp10
-rw-r--r--src/declarative/graphicsitems/qdeclarativeborderimage_p.h6
-rw-r--r--src/declarative/graphicsitems/qdeclarativeflickable.cpp4
-rw-r--r--src/declarative/graphicsitems/qdeclarativegridview.cpp2
-rw-r--r--src/declarative/graphicsitems/qdeclarativeimage.cpp4
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitem.cpp2
-rw-r--r--src/declarative/graphicsitems/qdeclarativelistview.cpp2
-rw-r--r--src/declarative/graphicsitems/qdeclarativemousearea.cpp2
-rw-r--r--src/declarative/graphicsitems/qdeclarativepositioners.cpp6
-rw-r--r--src/declarative/graphicsitems/qdeclarativerepeater.cpp6
-rw-r--r--src/declarative/graphicsitems/qdeclarativetext.cpp8
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextedit.cpp10
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextedit_p_p.h2
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextinput.cpp8
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextinput_p_p.h2
-rw-r--r--src/declarative/qml/qdeclarativetypeloader.cpp5
-rw-r--r--src/gui/image/qpnghandler.cpp23
-rw-r--r--src/gui/inputmethod/qcoefepinputcontext_p.h1
-rw-r--r--src/gui/inputmethod/qcoefepinputcontext_s60.cpp50
-rw-r--r--src/gui/kernel/qapplication_s60.cpp3
-rw-r--r--src/gui/kernel/qevent.cpp3
-rw-r--r--src/gui/kernel/qkeysequence.cpp4
-rw-r--r--src/gui/kernel/qsoftkeymanager.cpp14
-rw-r--r--src/gui/kernel/qt_s60_p.h26
-rw-r--r--src/gui/kernel/qwidget.cpp10
-rw-r--r--src/gui/kernel/qwidget.h2
-rw-r--r--src/gui/kernel/qwidget_mac.mm2
-rw-r--r--src/gui/kernel/qwidget_p.h3
-rw-r--r--src/gui/kernel/qwidget_s60.cpp21
-rw-r--r--src/gui/text/qfontdatabase_s60.cpp30
-rw-r--r--src/gui/text/qfontengine_coretext_p.h8
-rw-r--r--src/gui/util/qdesktopservices_s60.cpp8
-rw-r--r--src/gui/widgets/qabstractplatformmenubar_p.h108
-rw-r--r--src/gui/widgets/qlinecontrol.cpp6
-rw-r--r--src/gui/widgets/qmenu_mac.mm4
-rw-r--r--src/gui/widgets/qmenu_p.h6
-rw-r--r--src/gui/widgets/qmenu_symbian.cpp4
-rw-r--r--src/gui/widgets/qmenu_wince.cpp4
-rw-r--r--src/gui/widgets/qmenubar.cpp139
-rw-r--r--src/gui/widgets/qmenubar_p.h39
-rw-r--r--src/gui/widgets/qmenubar_x11.cpp139
-rw-r--r--src/gui/widgets/qmenubar_x11_p.h87
-rw-r--r--src/gui/widgets/qtextedit.cpp2
-rw-r--r--src/gui/widgets/widgets.pri8
-rw-r--r--src/qt3support/network/q3socketdevice_win.cpp5
-rw-r--r--src/s60installs/bwins/QtGuiu.def2
-rw-r--r--src/s60installs/eabi/QtGuiu.def2
-rw-r--r--tests/auto/qlineedit/tst_qlineedit.cpp7
-rw-r--r--tools/assistant/lib/lib.pro1
-rw-r--r--tools/designer/src/components/propertyeditor/propertyeditor.pri11
-rw-r--r--tools/qdbus/qdbus/qdbus.cpp8
-rw-r--r--tools/qdoc3/codemarker.cpp2
-rw-r--r--tools/qdoc3/codeparser.cpp3
-rw-r--r--tools/qdoc3/cppcodemarker.cpp20
-rw-r--r--tools/qdoc3/cppcodeparser.cpp17
-rw-r--r--tools/qdoc3/ditaxmlgenerator.cpp96
-rw-r--r--tools/qdoc3/ditaxmlgenerator.h11
-rw-r--r--tools/qdoc3/doc.cpp6
-rw-r--r--tools/qdoc3/generator.cpp153
-rw-r--r--tools/qdoc3/generator.h12
-rw-r--r--tools/qdoc3/htmlgenerator.cpp300
-rw-r--r--tools/qdoc3/htmlgenerator.h16
-rw-r--r--tools/qdoc3/node.cpp54
-rw-r--r--tools/qdoc3/node.h31
-rw-r--r--tools/qvfb/qvfb.pro9
-rw-r--r--tools/qvfb/qvfbshmem.cpp6
124 files changed, 2034 insertions, 497 deletions
diff --git a/doc/src/classes/phonon-api.qdoc b/doc/src/classes/phonon-api.qdoc
index 95e20ddffb..d1b26f6fc7 100644
--- a/doc/src/classes/phonon-api.qdoc
+++ b/doc/src/classes/phonon-api.qdoc
@@ -5131,6 +5131,30 @@
*/
/*!
+ \class Phonon::GlobalConfigPrivate
+ \inmodule Phonon
+ \internal
+*/
+
+/*!
+ \class Phonon::AudioDataOutputPrivate
+ \inmodule Phonon
+ \internal
+*/
+
+/*!
+ \class Phonon::AudioDataOutputInterface
+ \inmodule Phonon
+ \internal
+*/
+
+/*!
+ \class Phonon::SwiftSlider
+ \inmodule Phonon
+ \internal
+*/
+
+/*!
\fn Phonon::GlobalConfigPrivate::GlobalConfigPrivate()
\internal
*/
diff --git a/doc/src/declarative/anchor-layout.qdoc b/doc/src/declarative/anchor-layout.qdoc
index 41b04e88c8..e93e5399f9 100644
--- a/doc/src/declarative/anchor-layout.qdoc
+++ b/doc/src/declarative/anchor-layout.qdoc
@@ -53,7 +53,12 @@ Rectangle { id: rect1; ... }
Rectangle { id: rect2; anchors.left: rect1.right; ... }
\endcode
-In this case, the left edge of \e rect2 is bound to the right edge of \e rect1, producing the following:
+Each Item has two properties for each anchor line: one to bind from and one to bind to. The properties to bind
+from are contained in the \l{Item::}{anchors} attached property (seen as \c {anchors.left} above).
+The properties to bind to are normal properties (seen as \c {rect1.right} above).
+This way, each item can have several bindings to the same anchor line. Note that the properties to bind to are
+not visible in the documentation for Item.
+So in the example above, the left edge of \e rect2 is bound to the right edge of \e rect1, producing the following:
\image edge1.png
diff --git a/doc/src/declarative/declarativeui.qdoc b/doc/src/declarative/declarativeui.qdoc
index d89ca53dbb..cecccf6254 100644
--- a/doc/src/declarative/declarativeui.qdoc
+++ b/doc/src/declarative/declarativeui.qdoc
@@ -46,7 +46,7 @@ Qt applications.
\section1 Getting Started
\list
-\o \l{Intro to Qt Quick}{Introduction to Qt Quick}
+\o \l{Introduction to Qt Quick}
\o \l{QML for Qt Programmers}{QML Programming for Qt Programmers}
\o \l{Getting Started Programming with QML}
diff --git a/doc/src/declarative/qtquick-intro.qdoc b/doc/src/declarative/qtquick-intro.qdoc
index bdad2c3047..4cd5db3867 100644
--- a/doc/src/declarative/qtquick-intro.qdoc
+++ b/doc/src/declarative/qtquick-intro.qdoc
@@ -27,7 +27,7 @@
/*!
\page qml-intro.html
-\title Intro to Qt Quick
+\title Introduction to Qt Quick
Qt Quick is a collection of technologies that are designed to help developers
create the kind of intuitive, modern, and fluid user interfaces that are
diff --git a/doc/src/deployment/deployment.qdoc b/doc/src/deployment/deployment.qdoc
index a13e2b8e6b..ecb9ec65ea 100644
--- a/doc/src/deployment/deployment.qdoc
+++ b/doc/src/deployment/deployment.qdoc
@@ -102,15 +102,16 @@
of the libraries used by the application. Using static linking,
however, the Qt run-time is compiled into the executable.
- In general, you should deploy all plugins that your build of Qt uses,
- excluding only those that you have identified as being unnecessary
- for your application and its users.
+ In general, you should \l{Deploying Plugins}{deploy all plugins}
+ that your build of Qt uses, excluding only those that you have
+ identified as being unnecessary for your application and its users.
For instance, you may need to deploy plugins for JPEG support and
SQL drivers, but you should also deploy plugins that your users may
require, including those for accessibility.
- For more information about plugins, see the
- \l{plugins-howto.html}{How to Create Qt Plugins} documentation.
+ For more information about plugins, see
+ \l{plugins-howto.html}{How to Create Qt Plugins} and
+ \l{Deploying Plugins}.
When deploying an application using the shared library approach
you must ensure that the Qt libraries will use the correct path to
@@ -501,7 +502,8 @@
The \l{How to Create Qt Plugins} document outlines the issues you
need to pay attention to when building and deploying plugins for
- Qt applications.
+ Qt applications. More information about deployment can be found in
+ \l{Deploying Plugins}.
*/
/*!
diff --git a/doc/src/development/qmake-manual.qdoc b/doc/src/development/qmake-manual.qdoc
index 2c7fda2c73..0f85469b16 100644
--- a/doc/src/development/qmake-manual.qdoc
+++ b/doc/src/development/qmake-manual.qdoc
@@ -3263,6 +3263,29 @@
\snippet doc/src/snippets/code/doc_src_qmake-manual.pro 150
+ \section2 Ordered Targets and Visual Studio Solution Files
+
+ The \c ordered option is not supported for Visual Studio. The following list describes how
+ you can get around without it--dependencies are generated automatically if:
+
+ \list
+ \o 1a) There is a Lib/DLL project of which TARGET (the .lib is used and not the .dll)
+ is used on the link line of another project in your solution (you can modify the link
+ line with LIBS).
+
+ \o 1b) There is an Exe project of which TARGET is used in a custom
+ build-step of another project in your solution.
+
+ \o 2) You don't use paths in the TARGET variable (use DESTDIR/DLLDESTDIR for that),
+ e.g, TARGET=$(SOME_VARIABLE)/myLib, won't work.
+
+ \o 3) If you have a special location for your libs, you specify the -Lmy/library/path and
+ LIBS += mylib, instead of just using LIBS += my/library/path/mylib
+
+ \o 4) The leaf projects are created before you generate the solution file. (You can use the
+ recursive flag for qmake to do this, like "qmake -tp vc -r [yourproject.pro]"
+ \endlist
+
\target SYMBIAN_VERSION
\section1 SYMBIAN_VERSION
diff --git a/doc/src/examples/addressbook.qdoc b/doc/src/examples/addressbook.qdoc
index 114c22b3d7..f19582d4f6 100644
--- a/doc/src/examples/addressbook.qdoc
+++ b/doc/src/examples/addressbook.qdoc
@@ -29,7 +29,7 @@
\example itemviews/addressbook
\title Address Book Example
- The address book example shows how to use proxy models to display
+ \brief The address book example shows how to use proxy models to display
different views onto data from a single model.
\image addressbook-example.png Screenshot of the Address Book example
diff --git a/doc/src/examples/codeeditor.qdoc b/doc/src/examples/codeeditor.qdoc
index 435f650e9a..1718d52f75 100644
--- a/doc/src/examples/codeeditor.qdoc
+++ b/doc/src/examples/codeeditor.qdoc
@@ -194,4 +194,30 @@
with QSyntaxHighlighter" article in Qt Quarterly 31 implements
this. You find it here: \l{http://doc.qt.nokia.com/qq/}.
+ The line number area is now painted every time the cursor blinks
+ (because we connect \l{QPlainTextEdit::}{updateRequest()} to
+ \c updateLineNumberArea()). We can avoid this by introducing a new
+ member variable to CodeEditor that keeps track of when the update
+ request comes from a cursor blink (in which case we do not
+ repaint). The code below requires the \c m_countCache variable,
+ which is a QPair<int, int> initialized with \c -1 for both
+ \l{QPair::}{first} and \l{QPair::}{second}.
+
+ \code
+ void CodeEditor::updateLineNumberArea(const QRect &rect, int dy)
+ {
+ if (dy) {
+ lineNumberArea->scroll(0, dy);
+ } else if (m_countCache.first != blockCount()
+ || m_countCache.second != textCursor().block().lineCount()) {
+ lineNumberArea->update(0, rect.y(), lineNumberArea->width(), rect.height());
+ m_countCache.first = blockCount();
+ m_countCache.second = textCursor().block().lineCount();
+ }
+
+ if (rect.contains(viewport()->rect()))
+ updateLineNumberAreaWidth(0);
+ }
+ \endcode
*/
+
diff --git a/doc/src/examples/stardelegate.qdoc b/doc/src/examples/stardelegate.qdoc
index 3b009d5057..ed3ae7e896 100644
--- a/doc/src/examples/stardelegate.qdoc
+++ b/doc/src/examples/stardelegate.qdoc
@@ -42,12 +42,12 @@
editing takes place.
Delegates are subclasses of QAbstractItemDelegate. Qt provides
- QItemDelegate, which inherits QAbstractItemDelegate and handles
- the most common data types (notably \c int and QString). If we
- need to support custom data types, or want to customize the
+ QStyledItemDelegate, which inherits QAbstractItemDelegate and
+ handles the most common data types (notably \c int and QString).
+ If we need to support custom data types, or want to customize the
rendering or the editing for existing data types, we can subclass
- QAbstractItemDelegate or QItemDelegate. See \l{Delegate Classes}
- for more information about delegates, and \l{Model/View
+ QAbstractItemDelegate or QStyledItemDelegate. See \l{Delegate
+ Classes} for more information about delegates, and \l{Model/View
Programming} if you need a high-level introduction to Qt's
model/view architecture (including delegates).
@@ -62,9 +62,9 @@
expressed as stars, such as "2 out of 5 stars" or "5 out of
6 stars".
- \o \c StarDelegate inherits QItemDelegate and provides support
+ \o \c StarDelegate inherits QStyledItemDelegate and provides support
for \c StarRating (in addition to the data types already
- handled by QItemDelegate).
+ handled by QStyledItemDelegate).
\o \c StarEditor inherits QWidget and is used by \c StarDelegate
to let the user edit a star rating using the mouse.
@@ -80,20 +80,20 @@
\snippet examples/itemviews/stardelegate/stardelegate.h 0
All public functions are reimplemented virtual functions from
- QItemDelegate to provide custom rendering and editing.
+ QStyledItemDelegate to provide custom rendering and editing.
\section1 StarDelegate Class Implementation
- The \l{QAbstractItemDelegate::}{paint()} function is
- reimplemented from QItemDelegate and is called whenever the view
- needs to repaint an item:
+ The \l{QAbstractItemDelegate::}{paint()} function is reimplemented
+ from QStyledItemDelegate and is called whenever the view needs to
+ repaint an item:
\snippet examples/itemviews/stardelegate/stardelegate.cpp 0
The function is invoked once for each item, represented by a
QModelIndex object from the model. If the data stored in the item
is a \c StarRating, we paint it ourselves; otherwise, we let
- QItemDelegate paint it for us. This ensures that the \c
+ QStyledItemDelegate paint it for us. This ensures that the \c
StarDelegate can handle the most common data types.
In the case where the item is a \c StarRating, we draw the
diff --git a/doc/src/index.qdoc b/doc/src/index.qdoc
index 24903746fe..9680aa2d07 100644
--- a/doc/src/index.qdoc
+++ b/doc/src/index.qdoc
@@ -40,7 +40,7 @@
\o \l{How to Learn Qt}
\o \l{Introduction to Qt Quick}{Qt Quick}
\o \l{Qt Whitepaper}{Qt C++ Framework}
- \o \l{Intro to Qt Quick}{Qt Quick}
+ \o \l{Introduction to Qt Quick}{Qt Quick}
\o \l{external: Qt Mobility Manual}{Qt Mobility}
\o \l{Qt WebKit}
\endlist
diff --git a/doc/src/platforms/platform-notes.qdoc b/doc/src/platforms/platform-notes.qdoc
index 175cf1c90c..477f125077 100644
--- a/doc/src/platforms/platform-notes.qdoc
+++ b/doc/src/platforms/platform-notes.qdoc
@@ -774,7 +774,7 @@
\row \o QtCore
\o \c PowerMgmt if QProcess::kill(...) or QProcess::terminate(...) is called.
\row \o QtCore
- \o \c AllFiles when \l{http://developer.symbian.org/wiki/index.php/Capabilities_%28Symbian_Signed%29/AllFiles_Capability}{accessing specific areas.}
+ \o \c AllFiles when \l{http://wiki.forum.nokia.com/index.php/Capabilities_%28Symbian_Signed%29/AllFiles_Capability}{accessing specific areas.}
\row \o QtDeclarative
\o \c NetworkServices is automatically added for this module if no capabilities are explicitly specified.
\row \o QtNetwork
@@ -798,22 +798,27 @@
\section1 Multimedia and Phonon Support
- Qt provides a backend for Qt's Phonon module, which supports
- video and sound playback through Symbian's Multimedia Framework, MMF.
+ Qt provides a high-level API for multimedia functionality with
+ (\l{http://doc.qt.nokia.com/qtmobility/multimedia.html}).
- In this release the support is experimental. Video playback may have
- flickering issues, and support for effects and playback queueing is
- incomplete.
+ Qt also provides a backend for Qt's Phonon module, which supports video and
+ sound playback through Symbian's Multimedia Framework, MMF. Note that Phonon
+ support is not being extended, and that Qt's multimedia module will
+ take over for Phonon at a later stage.
+
+ In this release the support is experimental. Video playback may show
+ artifacts when the video is moved or resized (for instance during
+ orientation flips). This problem is present on Symbian^1 and earlier
+ versions, and on Symbian^3 systems.
The audio and video formats that Phonon supports depends on what support
the platform provides for MMF. The emulator is known to have limited
codec support.
- In addition, there exists a backend for the Helix framework. However, due
- to it not shipping with Qt, its availability depends on the Symbian
- platform in use. If available, it is loaded in preference over the MMF
- plugin. If the Helix plugin fails to load, the MMF plugin, if present on
- the device, will be loaded instead.
+ In addition, there exists a backend for the Helix framework. However, since
+ it is not shipped with Qt, its availability depends on the Symbian platform
+ in use. If the MFF plugin fails to load, the Helix plugin, if present on the
+ device, will be loaded instead.
\section1 Hardware Accelerated Rendering
diff --git a/doc/src/platforms/supported-platforms.qdoc b/doc/src/platforms/supported-platforms.qdoc
index 9d476952f5..ba59c375f4 100644
--- a/doc/src/platforms/supported-platforms.qdoc
+++ b/doc/src/platforms/supported-platforms.qdoc
@@ -334,8 +334,8 @@
\section2 Advanced Text Layout Engine
- Qt for Windows CE supports TrueType® and raster fonts. Qt also has
- extended Unicode support and right-to-left languages. Qt’s rich text
+ Qt for Windows CE supports TrueType and raster fonts. Qt also has
+ extended Unicode support and right-to-left languages. Qt's rich text
engine adds capabilities for complex text layouts including tables,
path tracing and text which flows around shapes.
@@ -373,7 +373,7 @@
by embedded Linux. You can use Qt to create highly memory efficient
devices and applications that have completely unique user experiences.
- Qt runs anywhere Linux runs. Qt’s intuitive API means fewer lines of
+ Qt runs anywhere Linux runs. Qt's intuitive API means fewer lines of
code and higher level functionality in less time. Use the code from
one single code-base and rebuild for all \l{Supported Platforms}
{supported platforms}.
@@ -410,7 +410,7 @@
frame buffer} that will match the physical device display, pixel for
pixel. This gives the developer a realistic testing infrastructure
testing on the desktop where the frame buffer simulates the physical
- device display’s width, height and color depth.
+ device display's width, height and color depth.
\section2 Inter-Process Communication (IPC)
@@ -421,7 +421,7 @@
\section2 Extended Font Format
Qt supports a wide range of font formats on embedded Linux including:
- TrueType®, Postscript® Type1 and Qt pre-rendered fonts. Qt has
+ TrueType, Postscript Type1 and Qt pre-rendered fonts. Qt has
extended Unicode support including automatic data extraction at build
time and automatic update at runtime.
@@ -681,7 +681,7 @@
\group platform-details
Qt is a cross-platform application and UI framework. Using Qt,
- you can write web-enabled applications once and deploy them
+ you can write GUI applications once and deploy them
across desktop, mobile and embedded operating systems without
rewriting the source code.
diff --git a/doc/src/platforms/symbian-introduction.qdoc b/doc/src/platforms/symbian-introduction.qdoc
index 9b1eea2bdb..e5d4a16488 100644
--- a/doc/src/platforms/symbian-introduction.qdoc
+++ b/doc/src/platforms/symbian-introduction.qdoc
@@ -74,6 +74,8 @@
Platform security capabilities are added via the
\l{qmake-variable-reference.html#target-capability}{TARGET.CAPABILITY}
qmake variable.
+
+ \sa {platform-notes-symbian.html#required-capabilities}{Required Capabilities}
*/
/*!
diff --git a/doc/src/qt-features.qdoc b/doc/src/qt-features.qdoc
new file mode 100644
index 0000000000..0ae00b0c3f
--- /dev/null
+++ b/doc/src/qt-features.qdoc
@@ -0,0 +1,204 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** GNU Free Documentation License
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms
+** and conditions contained in a signed written agreement between you
+** and Nokia.
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qt-overview.html
+ \title Qt Features Overview
+
+ This document provides a summary of the most important features of Qt,
+ providing links to other pages in the documentation that cover these
+ features in more detail. It is not intended to be a comprehensive
+ guide to Qt's features.
+
+ \section1 Fundamental Technologies in Qt
+
+ Qt is built upon a set of core technologies, provided by the \l QtCore
+ and \l QtGui modules. These include the following:
+
+ \list
+ \o \l{The Tulip Container Classes}, a set of template container classes.
+ \o \l{The Arthur Paint System}, the Qt 4 painting framework.
+ \o \l{The Interview Framework}, a model/view architecture for item views
+ and the \l{QtSQL Module}, which also uses this architecture.
+ \o \l{The Scribe Classes}, a framework for creating text documents,
+ performing low-level text layout and writing OpenDocument files.
+ \o A collection of \l{Qt Widget Gallery}{common desktop widgets}, styled
+ to fit in on each supported platform.
+ \o \l{The Qt 4 Main Window Classes}, a main window, toolbar, menu, and
+ docking architecture.
+ \o The \l{Graphics View} framework provides a canvas for producing
+ interactive graphics.
+ \o The \l{QtNetwork Module} provides support for TCP, UDP and local
+ sockets that are integrated with Qt's event model, including support
+ for Secure Socket Layer (SSL) communications,
+ \l{QNetworkProxy}{network proxy} servers and
+ \l{Bearer Management}{network bearer management}.
+ \o Enhanced \l{qt4-threads.html}{thread support} allows
+ \l{Signals & Slots}{signal-slot} connections across threads and
+ per-thread event loops.
+ Additionally, \l{Thread Support in Qt}{a framework for concurrent programming}
+ using Qt paradigms makes common threading tasks easier.
+ \o A \l{resource system} for embedding images and other resource files
+ into executable files makes it easier to deploy applications.
+ \o A \l{QTestLib Manual}{unit testing framework} for Qt applications and
+ libraries.
+ \endlist
+
+ The mature classes provided by these technologies have been used to build
+ robust, cross-platform desktop applications. They are augmented by a number
+ of additional technologies and improvements that have appeared over the
+ lifetime of Qt 4.
+
+ \section1 Graphical User Interfaces
+
+ \div{class="float-right"}
+ \inlineimage gtk-tabwidget.png
+ \enddiv
+ \div{class="float-right"}
+ \inlineimage gtk-progressbar.png
+ \br
+ \inlineimage gtk-checkbox.png
+ \br
+ \inlineimage plastique-combobox.png
+ \br
+ \inlineimage plastique-radiobutton.png
+ \enddiv
+
+ Alongside the support for traditional desktop user interfaces, Qt includes
+ support for declarative UI development with \l{Qt Quick}, a set of
+ technologies for creating fluid, dynamic user interfaces. A starting point
+ for exploring this approach can be found in the \l{Introduction to Qt Quick}
+ guide.
+
+ Qt provides a range of standard user interface elements, called widgets,
+ for each supported platform. Widgets can be used as containers for other
+ widgets, as windows, and as regular controls that the user interacts with.
+ Where the platform supports it, widgets can be made to appear partially
+ transparent, and may be styled with \l{Qt Style Sheets}.
+
+ Support for \l{QTouchEvent}{touch input} and \l{Gestures Programming}{gestures}
+ enable widgets to be used to create intuitive user interfaces for
+ touch-enabled devices.
+
+ User interfaces can also be created dynamically at run-time with the
+ features provided by the \l{QtUiTools} module.
+
+ A selection of available widgets are shown in the \l{Qt Widget Gallery}.
+ An introduction to the concepts behind widgets can be found in the
+ \l{Widgets Tutorial}.
+
+ \clearfloat
+ \section1 Painting, Printing and Rendering
+
+ \div{class="float-left"}
+ \inlineimage qpainter-affinetransformations.png
+ \enddiv
+
+ Widgets are just one of many kinds of paint device that Qt can render onto.
+ This support for unified painting makes it possible for applications to use
+ the same painting code for different tasks, as well as allowing Qt to be
+ extended to support additional file formats.
+
+ Qt provides support for common bitmap image formats,
+ \l{QtSvg Module}{Scalable Vector Graphics} (SVG) drawings and animations,
+ Postscript and Portable Document Format (PDF) files. Postscript and PDF are
+ integrated with \l{Printing with Qt}{Qt's printing system}, which also
+ allows printed output to be previewed.
+
+ Interactive graphics can be created with the
+ \l{The Animation Framework}{animation framework}, allowing animations to be
+ used with both widgets and graphics items. Animations can be used with the
+ \l{The State Machine Framework}{state machine framework}, which provides a
+ way to express application logic and integrate it with the user interface.
+ Animations can be enhanced with a collection of
+ \l{QGraphicsEffect}{graphics effects} that operate on graphics items and
+ can be applied individually or combined to create more complex effects.
+
+ Qt supports integration with \l{QtOpenGL}{OpenGL} on a number of levels,
+ providing convenience functions for handling textures and colors, as well
+ as providing support for pixel and sample buffers. Future support for
+ higher level 3D integration is provided by Qt3D enablers which include
+ \l{QMatrix4x4}{matrix multiplication}, \l{QQuaternion}{quaternions}, and an
+ API for \l{QGLShader}{vertex and fragment shaders}.
+
+ Two APIs are provided for multimedia. The
+ \l{Phonon Overview}{Phonon Multimedia Framework} has traditionally been
+ used on desktop platforms. A set of
+ \l{QtMultimedia Module}{multimedia services} provides low-level access to
+ the system's audio system and is often used on mobile devices.
+
+ \clearfloat
+ \section1 Infrastructure
+
+ \div{class="float-right"}
+ \inlineimage qtscript-context2d.png
+ \enddiv
+
+ Facilities for Inter-Process Communication (IPC) and Remote Procedure
+ Calling (RPC) mechanisms are available on platforms that support the
+ \l{intro-to-dbus.html}{D-Bus} message bus system.
+
+ An \l{Undo Framework}{Undo framework} based on the
+ \l{Books about GUI Design#Design Patterns}{Command pattern} is designed to
+ enable a consistent approach to handling data in editing applications.
+
+ The \l{QtScript} and \l{QtScriptTools} modules provide support for
+ application scripting and debugging using the ECMAScript language.
+
+ The \l{QtHelp Module} provides the foundations of an interactive help
+ system that can be used in conjunction with Qt Creator or integrated into
+ applications directly.
+
+ XML handling is supported in a number of places in Qt. The \l QtCore module
+ provides classes for reading and writing XML streams. The \l QtXmlPatterns
+ module includes XQuery, XPath and XSLT support, providing facilities for
+ XML processing beyond that supported by the QtXml module, which contains
+ SAX and DOM parsers. XML schema validation in the QtXmlPatterns module
+ covers large parts of version 1.0 of the specification.
+
+ \clearfloat
+ \section1 Web Client Integration
+
+ Integration between \l{Webkit in Qt}{Qt and WebKit} makes it possible for
+ developers to use a fully-featured Web browser engine to display documents
+ and access online services. Developers can access the browser's environment
+ to create documents and run scripts within one or more browser widgets.
+
+ A \l{QWebElement}{DOM access API} for QtWebKit provides a cleaner and safer
+ way to access elements and structures of Web pages without the use of
+ JavaScript.
+
+ \section1 Further Reading
+
+ Many of the technologies mentioned here, as well as other, more specific
+ features, are listed in the \l{What's New in Qt 4} document. A complete
+ list of Qt's modules can be found on the \l{All Modules} page, which
+ also includes more domain-specific technologies.
+
+ The tools that are supplied with Qt are covered by the listing in the
+ \l{Qt's Tools} document.
+*/
diff --git a/doc/src/qt4-intro.qdoc b/doc/src/qt4-intro.qdoc
index 17dc1af997..01103a8292 100644
--- a/doc/src/qt4-intro.qdoc
+++ b/doc/src/qt4-intro.qdoc
@@ -138,7 +138,7 @@
In Qt 4.4:
\list
- \o \l{Webkit in QT}{Qt WebKit integration}, making it possible for developers
+ \o \l{WebKit in Qt}{Qt WebKit integration}, making it possible for developers
to use a fully-featured Web browser to display documents and access online
services.
\o A multimedia API provided by the \l{Phonon Overview}{Phonon Multimedia Framework}.
@@ -707,7 +707,6 @@
introduced in Qt 4.7.
\sincelist 4.7
-
*/
/*!
diff --git a/examples/opengl/cube/mainwidget.h b/examples/opengl/cube/mainwidget.h
index c6da29faa5..eb509d0d40 100644
--- a/examples/opengl/cube/mainwidget.h
+++ b/examples/opengl/cube/mainwidget.h
@@ -48,8 +48,10 @@
#include <QQuaternion>
#include <QVector2D>
+QT_BEGIN_NAMESPACE
class QBasicTimer;
class QGLShaderProgram;
+QT_END_NAMESPACE
class GeometryEngine;
diff --git a/examples/webkit/simplewebplugin/csvfactory.h b/examples/webkit/simplewebplugin/csvfactory.h
index e3013b1ffe..0168dc2ff4 100644
--- a/examples/webkit/simplewebplugin/csvfactory.h
+++ b/examples/webkit/simplewebplugin/csvfactory.h
@@ -44,10 +44,10 @@
#include <QNetworkRequest>
#include <QWebPluginFactory>
-QT_BEGIN_NAMESPACE
class QNetworkAccessManager;
class QNetworkReply;
-QT_END_NAMESPACE
+
+QT_BEGIN_NAMESPACE
//! [plugin factory]
class CSVFactory : public QWebPluginFactory
@@ -66,4 +66,6 @@ private:
};
//! [plugin factory]
+QT_END_NAMESPACE
+
#endif
diff --git a/examples/webkit/webftpclient/ftpreply.h b/examples/webkit/webftpclient/ftpreply.h
index ca0a271e32..65c8c66d0a 100644
--- a/examples/webkit/webftpclient/ftpreply.h
+++ b/examples/webkit/webftpclient/ftpreply.h
@@ -46,6 +46,10 @@
#include <QUrlInfo>
#include <QFtp>
+QT_BEGIN_NAMESPACE
+class QFtp;
+QT_END_NAMESPACE
+
//! [class definition]
class FtpReply : public QNetworkReply
{
diff --git a/examples/webkit/webftpclient/ftpview.h b/examples/webkit/webftpclient/ftpview.h
index 544c0a9ac6..ae4f9c1fcb 100644
--- a/examples/webkit/webftpclient/ftpview.h
+++ b/examples/webkit/webftpclient/ftpview.h
@@ -41,6 +41,9 @@
#include <QWebView>
class Downloader;
+QT_BEGIN_NAMESPACE
+class QNetworkAccessManager;
+QT_END_NAMESPACE
class FtpView : public QWebView
{
diff --git a/examples/widgets/orientation/mainwindow.h b/examples/widgets/orientation/mainwindow.h
index 745497cc05..29ccf0698f 100644
--- a/examples/widgets/orientation/mainwindow.h
+++ b/examples/widgets/orientation/mainwindow.h
@@ -46,6 +46,10 @@
#include "ui_landscape.h"
#include "ui_portrait.h"
+class QAbstractButton;
+
+QT_BEGIN_NAMESPACE
+
//! [0]
class MainWindow : public QWidget
{
@@ -68,4 +72,6 @@ private:
};
//! [0]
+QT_END_NAMESPACE
+
#endif // MAINWINDOW_H
diff --git a/mkspecs/features/help.prf b/mkspecs/features/help.prf
index 15685e7a57..99521aff18 100644
--- a/mkspecs/features/help.prf
+++ b/mkspecs/features/help.prf
@@ -1,4 +1,4 @@
INCLUDEPATH = $$QMAKE_INCDIR_QT/QtHelp $$INCLUDEPATH
-QT += xml sql
+QT += sql
qtAddLibrary(QtHelp)
diff --git a/src/3rdparty/webkit/.tag b/src/3rdparty/webkit/.tag
index a560e52f56..458898a2aa 100644
--- a/src/3rdparty/webkit/.tag
+++ b/src/3rdparty/webkit/.tag
@@ -1 +1 @@
-dda59e50379214c098f365a39c4d64b39ced427e
+a2bd2bb1b19949c6807da38e25bfa7d210bb4b17
diff --git a/src/3rdparty/webkit/ChangeLog b/src/3rdparty/webkit/ChangeLog
index 5f97e57732..bc11b4dca3 100644
--- a/src/3rdparty/webkit/ChangeLog
+++ b/src/3rdparty/webkit/ChangeLog
@@ -1,26 +1,3 @@
-2011-08-26 Ademar de Souza Reis Jr. <ademar.reis@openbossa.org>
-
- [Qt] libwebcore.a source is compiled without -fvisibility=hidden
- -fvisibility-inlines-hidden
- https://bugs.webkit.org/show_bug.cgi?id=65470
-
- Patch by Holger Freyther <zecke@selfish.org>
- Rubberstamped by Andreas Kling.
-
- (qtwebkit-2.2 only by now)
-
- WTF_USE_EXPORT_MACROS is still not enabled on trunk because there are
- pending issues with WebKit2, but it appears to be safe to enable this
- on QtWebKit, so this change is being added to the qtwebkit-2.2 branch.
-
- The patch also adds CONFIG += hide_symbols and on Unix, +=
- bsymbolic_functions, which should help reduce the library binary size.
-
- Testing this is quite easy, so if there's any problem we'll soon
- know. :-)
-
- * Source/WebKit.pri:
-
2011-08-06 Aron Rosenberg <arosenberg@logitech.com>
Reviewed by Benjamin Poulain.
diff --git a/src/3rdparty/webkit/Source/JavaScriptCore/ChangeLog b/src/3rdparty/webkit/Source/JavaScriptCore/ChangeLog
index 010e66a276..5aec2e39c1 100644
--- a/src/3rdparty/webkit/Source/JavaScriptCore/ChangeLog
+++ b/src/3rdparty/webkit/Source/JavaScriptCore/ChangeLog
@@ -1,23 +1,36 @@
-2011-08-26 Ademar de Souza Reis Jr. <ademar.reis@openbossa.org>
+2011-08-30 Ademar de Souza Reis Jr. <ademar.reis@openbossa.org>
- [Qt] libwebcore.a source is compiled without -fvisibility=hidden
- -fvisibility-inlines-hidden
- https://bugs.webkit.org/show_bug.cgi?id=65470
+ [Qt] Do not unconditionally use pkg-config in .pro files
+ https://bugs.webkit.org/show_bug.cgi?id=67055
- Patch by Holger Freyther <zecke@selfish.org>
- Rubberstamped by Andreas Kling.
+ Reviewed by Andreas Kling.
+
+ Original patch from Rohan McGovern <rohan.mcgovern@nokia.com>
+
+ Using the first pkg-config in PATH is prone to errors when cross
+ compiling inside the Qt repository (using Qt's build-system).
+
+ This patch protect calls for pkg-config with
+ !contains(QT_CONFIG, no-pkg-config). no-pkg-config is added to
+ QT_CONFIG by Qt's 'configure' when cross-compiling on systems
+ without pkg-config.
- (qtwebkit-2.2 only by now)
+ The respective change in Qt's configure has been submited already.
- WTF_USE_EXPORT_MACROS is still not enabled on trunk because there are
- pending issues with WebKit2, but it appears to be safe to enable this
- on QtWebKit, so this change is being added to the qtwebkit-2.2 branch.
+ No new tests as this is just a build change.
- The patch also adds CONFIG += hide_symbols and on Unix, +=
- bsymbolic_functions, which should help reduce the library binary size.
+ * wtf/wtf.pri: protect pkg-config calls
+
+2011-08-28 Jonathan Liu <net147@gmail.com>
+
+ Fix build error when compiling with MinGW-w64 by disabling JIT
+ on Windows 64-bit
+ https://bugs.webkit.org/show_bug.cgi?id=61235
+
+ Reviewed by Gavin Barraclough.
- Testing this is quite easy, so if there's any problem we'll soon
- know. :-)
+ The fixed mmap executable allocator for JIT on x86_64 requires
+ sys/mman.h which is not available on Windows.
* wtf/Platform.h:
diff --git a/src/3rdparty/webkit/Source/JavaScriptCore/wtf/Platform.h b/src/3rdparty/webkit/Source/JavaScriptCore/wtf/Platform.h
index 8309accf3e..a8298c499c 100644
--- a/src/3rdparty/webkit/Source/JavaScriptCore/wtf/Platform.h
+++ b/src/3rdparty/webkit/Source/JavaScriptCore/wtf/Platform.h
@@ -1014,8 +1014,8 @@
#define ENABLE_JIT 0
#endif
-/* JIT is not implemented for 64 bit on MSVC */
-#if !defined(ENABLE_JIT) && COMPILER(MSVC) && CPU(X86_64)
+/* JIT is not implemented for Windows 64-bit */
+#if !defined(ENABLE_JIT) && OS(WINDOWS) && CPU(X86_64)
#define ENABLE_JIT 0
#endif
@@ -1221,11 +1221,7 @@
since most ports try to support sub-project independence, adding new headers
to WTF causes many ports to break, and so this way we can address the build
breakages one port at a time. */
-#if PLATFORM(QT)
-#define WTF_USE_EXPORT_MACROS 1
-#else
#define WTF_USE_EXPORT_MACROS 0
-#endif
#if PLATFORM(QT) || PLATFORM(GTK)
#define WTF_USE_UNIX_DOMAIN_SOCKETS 1
diff --git a/src/3rdparty/webkit/Source/JavaScriptCore/wtf/wtf.pri b/src/3rdparty/webkit/Source/JavaScriptCore/wtf/wtf.pri
index 5af613e26f..ccc2f602cc 100644
--- a/src/3rdparty/webkit/Source/JavaScriptCore/wtf/wtf.pri
+++ b/src/3rdparty/webkit/Source/JavaScriptCore/wtf/wtf.pri
@@ -42,7 +42,7 @@ SOURCES += \
wtf/unicode/UTF8.cpp
linux-*:!contains(DEFINES, USE_QTMULTIMEDIA=1) {
- !contains(QT_CONFIG, no-pkg-config):system(pkg-config --exists glib-2.0 gio-2.0 gstreamer-0.10) {
+ !contains(QT_CONFIG, no-pkg-config):system(pkg-config --exists glib-2.0 gio-2.0 gstreamer-0.10): {
DEFINES += ENABLE_GLIB_SUPPORT=1
PKGCONFIG += glib-2.0 gio-2.0
CONFIG += link_pkgconfig
diff --git a/src/3rdparty/webkit/Source/WebCore/ChangeLog b/src/3rdparty/webkit/Source/WebCore/ChangeLog
index 41d2ba72f3..a781b1f718 100644
--- a/src/3rdparty/webkit/Source/WebCore/ChangeLog
+++ b/src/3rdparty/webkit/Source/WebCore/ChangeLog
@@ -1,3 +1,170 @@
+2011-08-30 Abhishek Arya <inferno@chromium.org>
+
+ Removed m_owner accessed in custom scrollbars.
+ https://bugs.webkit.org/show_bug.cgi?id=64737
+
+ Reviewed by David Hyatt.
+
+ Problem does not reproduce in DRT, even with Eventhandler tricks
+ and gc(). So, adding a manual test.
+
+ * manual-tests/custom-scrollbar-renderer-removed-crash.html: Added.
+ * page/FrameView.cpp:
+ (WebCore::FrameView::clearOwningRendererForCustomScrollbars):
+ * page/FrameView.h:
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::willBeDestroyed): when this renderbox is getting
+ destroyed, clear the custom scrollbar in this frameview having this renderbox
+ as its owning renderer.
+ * rendering/RenderScrollbar.cpp:
+ (WebCore::RenderScrollbar::getScrollbarPseudoStyle): fix the null check.
+
+2011-09-04 Abhishek Arya <inferno@chromium.org>
+
+ Crash in Range::processAncestorsAndTheirSiblings.
+ https://bugs.webkit.org/show_bug.cgi?id=67556
+
+ Reviewed by Ryosuke Niwa.
+
+ Create a temporary RefPtr Node vector to keep all the ancestor's
+ childs so that we don't access removed child nodes.
+
+ Test: fast/dom/Range/range-delete-contents-event-fire-crash.html
+
+ * dom/Range.cpp:
+ (WebCore::Range::processContents):
+ (WebCore::Range::processAncestorsAndTheirSiblings):
+
+2011-08-30 Adam Barth <abarth@webkit.org>
+
+ Flaky crash with JavaScript URLs
+ https://bugs.webkit.org/show_bug.cgi?id=66360
+
+ Reviewed by Nate Chapin.
+
+ This patch teaches DocumentWriter::begin to make a copy of the URL
+ before beginning a new document to avoid a crash.
+
+ Test: fast/loader/javascript-url-iframe-crash.html
+
+ * loader/DocumentWriter.cpp:
+ (WebCore::DocumentWriter::begin):
+
+2011-08-30 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
+
+ Emit last progress notification before calling dispatchDidFinishLoad
+ https://bugs.webkit.org/show_bug.cgi?id=28851
+
+ Reviewed by Adam Barth.
+
+ Original patch by Xan Lopez. Change FrameLoader to dispatch the notifications in
+ a more natural sequence.
+
+ Test: http/tests/loading/progress-finished-callback.html
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
+
+2011-08-22 Nate Chapin <japhet@chromium.org>
+
+ Unload events can crash us when they blank out
+ a parent frame.
+ https://bugs.webkit.org/show_bug.cgi?id=64741
+
+ Reviewed by Adam Barth.
+
+ Test: fast/loader/document-destruction-within-unload.html
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::stopLoading): Prevent unload events
+ from going into infinite recursion.
+ (WebCore::FrameLoader::setDocumentLoader): Ensure we don't
+ let set m_documentLoader to a DocumentLoader with a null Frame*.
+ (WebCore::FrameLoader::detachChildren): Save off a vector of
+ children to detach, rather than doing it inline.
+
+2011-08-30 Abhishek Arya <inferno@chromium.org>
+
+ Style not updated for table parts in :before, :after content.
+ https://bugs.webkit.org/show_bug.cgi?id=66141
+
+ Reviewed by Dave Hyatt.
+
+ Tests: fast/table/table-before-child-style-update.html
+ fast/table/table-row-before-child-style-update.html
+
+ * rendering/RenderObjectChildList.cpp:
+ (WebCore::RenderObjectChildList::updateBeforeAfterContent):
+
+2011-08-25 Abhishek Arya <inferno@chromium.org>
+
+ Incorrect layout of :before and :after content, with display
+ table, table-row and table-cell.
+ https://bugs.webkit.org/show_bug.cgi?id=66699
+
+ Reviewed by David Hyatt.
+
+ Tests: fast/table/table-after-child-in-table.html
+ fast/table/table-before-child-in-table.html
+ fast/table/table-cell-after-child-in-block.html
+ fast/table/table-cell-after-child-in-table.html
+ fast/table/table-cell-before-child-in-block.html
+ fast/table/table-cell-before-child-in-table.html
+ fast/table/table-row-after-child-in-block.html
+ fast/table/table-row-after-child-in-table.html
+ fast/table/table-row-before-child-in-block.html
+ fast/table/table-row-before-child-in-table.html
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks):
+ Fix the looping condition to detect :after child correctly.
+ isAnonymousBlock() does not apply to tables, instead
+ using isAnonymous().
+ * rendering/RenderTableRow.cpp:
+ (WebCore::RenderTableRow::addChild): Don't add the new child
+ in the generatedContainer with :before, :after content.
+ * rendering/RenderTableSection.cpp:
+ (WebCore::RenderTableSection::addChild): Don't add the new child
+ in the generatedContainer with :before, :after content.
+
+2011-08-29 Abhishek Arya <inferno@chromium.org>
+
+ Crash in InlineBox::deleteLine due to accessing removed
+ renderer.
+ https://bugs.webkit.org/show_bug.cgi?id=66015
+
+ Reviewed by Simon Fraser.
+
+ Test: fast/block/line-layout/inline-box-wrapper-crash.html
+
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::positionLineBox): Make sure that the
+ previous inline box wrapper is destroyed properly, before
+ setting a new one.
+
+2011-08-30 Ademar de Souza Reis Jr. <ademar.reis@openbossa.org>
+
+ [Qt] Do not unconditionally use pkg-config in .pro files
+ https://bugs.webkit.org/show_bug.cgi?id=67055
+
+ Reviewed by Andreas Kling.
+
+ Original patch from Rohan McGovern <rohan.mcgovern@nokia.com>
+
+ Using the first pkg-config in PATH is prone to errors when cross
+ compiling inside the Qt repository (using Qt's build-system).
+
+ This patch protect calls for pkg-config with
+ !contains(QT_CONFIG, no-pkg-config). no-pkg-config is added to
+ QT_CONFIG by Qt's 'configure' when cross-compiling on systems
+ without pkg-config.
+
+ The respective change in Qt's configure has been submited already.
+
+ No new tests as this is just a build change.
+
+ * features.pri: protect pkg-config calls
+
2011-08-25 Ademar de Souza Reis Jr. <ademar.reis@openbossa.org>
[Qt] Enable password echo on Symbian builds
diff --git a/src/3rdparty/webkit/Source/WebCore/dom/Range.cpp b/src/3rdparty/webkit/Source/WebCore/dom/Range.cpp
index 0c247c2e3e..4f8ad8563d 100644
--- a/src/3rdparty/webkit/Source/WebCore/dom/Range.cpp
+++ b/src/3rdparty/webkit/Source/WebCore/dom/Range.cpp
@@ -51,6 +51,8 @@ using namespace std;
static WTF::RefCountedLeakCounter rangeCounter("Range");
#endif
+typedef Vector<RefPtr<Node> > NodeVector;
+
inline Range::Range(PassRefPtr<Document> ownerDocument)
: m_ownerDocument(ownerDocument)
, m_start(m_ownerDocument)
@@ -665,8 +667,6 @@ static inline unsigned lengthOfContentsInNode(Node* node)
PassRefPtr<DocumentFragment> Range::processContents(ActionType action, ExceptionCode& ec)
{
- typedef Vector<RefPtr<Node> > NodeVector;
-
RefPtr<DocumentFragment> fragment;
if (action == EXTRACT_CONTENTS || action == CLONE_CONTENTS)
fragment = DocumentFragment::create(m_ownerDocument.get());
@@ -880,9 +880,14 @@ PassRefPtr<Node> Range::processAncestorsAndTheirSiblings(ActionType action, Node
// FIXME: This assertion may fail if DOM is modified during mutation event
// FIXME: Share code with Range::processNodes
ASSERT(!firstChildInAncestorToProcess || firstChildInAncestorToProcess->parentNode() == ancestor);
- RefPtr<Node> next;
- for (Node* child = firstChildInAncestorToProcess.get(); child; child = next.get()) {
- next = direction == ProcessContentsForward ? child->nextSibling() : child->previousSibling();
+
+ NodeVector nodes;
+ for (Node* child = firstChildInAncestorToProcess.get(); child;
+ child = (direction == ProcessContentsForward) ? child->nextSibling() : child->previousSibling())
+ nodes.append(child);
+
+ for (NodeVector::const_iterator it = nodes.begin(); it != nodes.end(); it++) {
+ Node* child = it->get();
switch (action) {
case DELETE_CONTENTS:
ancestor->removeChild(child, ec);
diff --git a/src/3rdparty/webkit/Source/WebCore/features.pri b/src/3rdparty/webkit/Source/WebCore/features.pri
index 3e397a14b3..f04d0b416a 100644
--- a/src/3rdparty/webkit/Source/WebCore/features.pri
+++ b/src/3rdparty/webkit/Source/WebCore/features.pri
@@ -168,7 +168,7 @@ symbian|maemo5|maemo6 {
DEFINES += WTF_USE_QTKIT=1
DEFINES -= WTF_USE_QTKIT=0
} else: linux-*:!contains(DEFINES, USE_QTMULTIMEDIA=1) {
- !contains(QT_CONFIG, no-pkg-config):system(pkg-config --exists glib-2.0 gio-2.0 gstreamer-0.10) {
+ !contains(QT_CONFIG, no-pkg-config):system(pkg-config --exists glib-2.0 gio-2.0 gstreamer-0.10): {
DEFINES -= ENABLE_VIDEO=0
DEFINES += ENABLE_VIDEO=1
DEFINES += WTF_USE_GSTREAMER=1
diff --git a/src/3rdparty/webkit/Source/WebCore/loader/DocumentWriter.cpp b/src/3rdparty/webkit/Source/WebCore/loader/DocumentWriter.cpp
index 2fc02d1cf2..cbce0d3de9 100644
--- a/src/3rdparty/webkit/Source/WebCore/loader/DocumentWriter.cpp
+++ b/src/3rdparty/webkit/Source/WebCore/loader/DocumentWriter.cpp
@@ -106,12 +106,17 @@ PassRefPtr<Document> DocumentWriter::createDocument(const KURL& url)
return DOMImplementation::createDocument(m_mimeType, m_frame, url, m_frame->inViewSourceMode());
}
-void DocumentWriter::begin(const KURL& url, bool dispatch, SecurityOrigin* origin)
+void DocumentWriter::begin(const KURL& urlReference, bool dispatch, SecurityOrigin* origin)
{
// We need to take a reference to the security origin because |clear|
// might destroy the document that owns it.
RefPtr<SecurityOrigin> forcedSecurityOrigin = origin;
+ // We grab a local copy of the URL because it's easy for callers to supply
+ // a URL that will be deallocated during the execution of this function.
+ // For example, see <https://bugs.webkit.org/show_bug.cgi?id=66360>.
+ KURL url = urlReference;
+
// Create a new document before clearing the frame, because it may need to
// inherit an aliased security context.
RefPtr<Document> document = createDocument(url);
diff --git a/src/3rdparty/webkit/Source/WebCore/loader/FrameLoader.cpp b/src/3rdparty/webkit/Source/WebCore/loader/FrameLoader.cpp
index 1b046b3a64..4bef2496ac 100644
--- a/src/3rdparty/webkit/Source/WebCore/loader/FrameLoader.cpp
+++ b/src/3rdparty/webkit/Source/WebCore/loader/FrameLoader.cpp
@@ -1880,6 +1880,20 @@ void FrameLoader::setDocumentLoader(DocumentLoader* loader)
m_documentLoader->detachFromFrame();
m_documentLoader = loader;
+
+ // The following abomination is brought to you by the unload event.
+ // The detachChildren() call above may trigger a child frame's unload event,
+ // which could do something obnoxious like call document.write("") on
+ // the main frame, which results in detaching children while detaching children.
+ // This can cause the new m_documentLoader to be detached from its Frame*, but still
+ // be alive. To make matters worse, DocumentLoaders with a null Frame* aren't supposed
+ // to happen when they're still alive (and many places below us on the stack think the
+ // DocumentLoader is still usable). Ergo, we reattach loader to its Frame, and pretend
+ // like nothing ever happened.
+ if (m_documentLoader && !m_documentLoader->frame()) {
+ ASSERT(!m_documentLoader->isLoading());
+ m_documentLoader->setFrame(m_frame);
+ }
}
void FrameLoader::setPolicyDocumentLoader(DocumentLoader* loader)
@@ -2506,14 +2520,15 @@ void FrameLoader::checkLoadCompleteForThisFrame()
if (m_stateMachine.creatingInitialEmptyDocument() || !m_stateMachine.committedFirstRealDocumentLoad())
return;
+ if (Page* page = m_frame->page())
+ page->progress()->progressCompleted(m_frame);
+
const ResourceError& error = dl->mainDocumentError();
if (!error.isNull())
m_client->dispatchDidFailLoad(error);
else
m_client->dispatchDidFinishLoad();
- if (Page* page = m_frame->page())
- page->progress()->progressCompleted(m_frame);
return;
}
@@ -2589,12 +2604,14 @@ void FrameLoader::frameLoadCompleted()
void FrameLoader::detachChildren()
{
- // FIXME: Is it really necessary to do this in reverse order?
- Frame* previous;
- for (Frame* child = m_frame->tree()->lastChild(); child; child = previous) {
- previous = child->tree()->previousSibling();
- child->loader()->detachFromParent();
- }
+ typedef Vector<RefPtr<Frame> > FrameVector;
+ FrameVector childrenToDetach;
+ childrenToDetach.reserveCapacity(m_frame->tree()->childCount());
+ for (Frame* child = m_frame->tree()->lastChild(); child; child = child->tree()->previousSibling())
+ childrenToDetach.append(child);
+ FrameVector::iterator end = childrenToDetach.end();
+ for (FrameVector::iterator it = childrenToDetach.begin(); it != end; it++)
+ (*it)->loader()->detachFromParent();
}
void FrameLoader::closeAndRemoveChild(Frame* child)
diff --git a/src/3rdparty/webkit/Source/WebCore/page/FrameView.cpp b/src/3rdparty/webkit/Source/WebCore/page/FrameView.cpp
index 3dadbf33a9..ef72fb7c10 100644
--- a/src/3rdparty/webkit/Source/WebCore/page/FrameView.cpp
+++ b/src/3rdparty/webkit/Source/WebCore/page/FrameView.cpp
@@ -2277,6 +2277,23 @@ bool FrameView::hasCustomScrollbars() const
return false;
}
+void FrameView::clearOwningRendererForCustomScrollbars(RenderBox* box)
+{
+ const HashSet<RefPtr<Widget> >* viewChildren = children();
+ HashSet<RefPtr<Widget> >::const_iterator end = viewChildren->end();
+ for (HashSet<RefPtr<Widget> >::const_iterator current = viewChildren->begin(); current != end; ++current) {
+ Widget* widget = current->get();
+ if (widget->isScrollbar()) {
+ Scrollbar* scrollbar = static_cast<Scrollbar*>(widget);
+ if (scrollbar->isCustomScrollbar()) {
+ RenderScrollbar* customScrollbar = toRenderScrollbar(scrollbar);
+ if (customScrollbar->owningRenderer() == box)
+ customScrollbar->clearOwningRenderer();
+ }
+ }
+ }
+}
+
FrameView* FrameView::parentFrameView() const
{
if (Widget* parentView = parent()) {
diff --git a/src/3rdparty/webkit/Source/WebCore/page/FrameView.h b/src/3rdparty/webkit/Source/WebCore/page/FrameView.h
index fafebfe5c1..b151cfc3d3 100644
--- a/src/3rdparty/webkit/Source/WebCore/page/FrameView.h
+++ b/src/3rdparty/webkit/Source/WebCore/page/FrameView.h
@@ -267,6 +267,8 @@ public:
virtual bool shouldSuspendScrollAnimations() const;
+ void clearOwningRendererForCustomScrollbars(RenderBox*);
+
protected:
virtual bool scrollContentsFastPath(const IntSize& scrollDelta, const IntRect& rectToScroll, const IntRect& clipRect);
virtual void scrollContentsSlowPath(const IntRect& updateRect);
diff --git a/src/3rdparty/webkit/Source/WebCore/rendering/RenderBlock.cpp b/src/3rdparty/webkit/Source/WebCore/rendering/RenderBlock.cpp
index 39c0469048..df30adbff9 100644
--- a/src/3rdparty/webkit/Source/WebCore/rendering/RenderBlock.cpp
+++ b/src/3rdparty/webkit/Source/WebCore/rendering/RenderBlock.cpp
@@ -665,10 +665,10 @@ void RenderBlock::addChildIgnoringAnonymousColumnBlocks(RenderObject* newChild,
// Make sure we don't append things after :after-generated content if we have it.
if (!beforeChild) {
RenderObject* lastRenderer = lastChild();
- if (isAfterContent(lastRenderer))
+ while (lastRenderer && lastRenderer->isAnonymous() && !isAfterContent(lastRenderer))
+ lastRenderer = lastRenderer->lastChild();
+ if (lastRenderer && isAfterContent(lastRenderer))
beforeChild = lastRenderer;
- else if (lastRenderer && lastRenderer->isAnonymousBlock() && isAfterContent(lastRenderer->lastChild()))
- beforeChild = lastRenderer->lastChild();
}
// If the requested beforeChild is not one of our children, then this is because
diff --git a/src/3rdparty/webkit/Source/WebCore/rendering/RenderBox.cpp b/src/3rdparty/webkit/Source/WebCore/rendering/RenderBox.cpp
index 9c2aa48f52..f052ee72d1 100644
--- a/src/3rdparty/webkit/Source/WebCore/rendering/RenderBox.cpp
+++ b/src/3rdparty/webkit/Source/WebCore/rendering/RenderBox.cpp
@@ -204,6 +204,11 @@ void RenderBox::destroy()
if (style() && (style()->logicalHeight().isPercent() || style()->logicalMinHeight().isPercent() || style()->logicalMaxHeight().isPercent()))
RenderBlock::removePercentHeightDescendant(this);
+ // If this renderer is owning renderer for the frameview's custom scrollbars,
+ // we need to clear it from the scrollbar. See webkit bug 64737.
+ if (style() && style()->hasPseudoStyle(SCROLLBAR) && frame() && frame()->view())
+ frame()->view()->clearOwningRendererForCustomScrollbars(this);
+
RenderBoxModelObject::destroy();
}
@@ -1372,6 +1377,8 @@ void RenderBox::positionLineBox(InlineBox* box)
box->destroy(renderArena());
} else if (isReplaced()) {
setLocation(lroundf(box->x()), lroundf(box->y()));
+ if (m_inlineBoxWrapper)
+ deleteLineBoxWrapper();
m_inlineBoxWrapper = box;
}
}
diff --git a/src/3rdparty/webkit/Source/WebCore/rendering/RenderObjectChildList.cpp b/src/3rdparty/webkit/Source/WebCore/rendering/RenderObjectChildList.cpp
index ff9ff1543f..a6c2da9a51 100644
--- a/src/3rdparty/webkit/Source/WebCore/rendering/RenderObjectChildList.cpp
+++ b/src/3rdparty/webkit/Source/WebCore/rendering/RenderObjectChildList.cpp
@@ -388,6 +388,21 @@ void RenderObjectChildList::updateBeforeAfterContent(RenderObject* owner, Pseudo
if (!beforeAfterParent)
return;
+ // When beforeAfterParent is not equal to child (e.g. in tables),
+ // we need to create new styles inheriting from pseudoElementStyle
+ // on all the intermediate parents (leaving their display same).
+ if (beforeAfterParent != child) {
+ RenderObject* curr = beforeAfterParent;
+ while (curr && curr != child) {
+ ASSERT(curr->isAnonymous());
+ RefPtr<RenderStyle> newStyle = RenderStyle::create();
+ newStyle->inheritFrom(pseudoElementStyle);
+ newStyle->setDisplay(curr->style()->display());
+ curr->setStyle(newStyle);
+ curr = curr->parent();
+ }
+ }
+
// Note that if we ever support additional types of generated content (which should be way off
// in the future), this code will need to be patched.
for (RenderObject* genChild = beforeAfterParent->firstChild(); genChild; genChild = genChild->nextSibling()) {
diff --git a/src/3rdparty/webkit/Source/WebCore/rendering/RenderScrollbar.cpp b/src/3rdparty/webkit/Source/WebCore/rendering/RenderScrollbar.cpp
index 962024c212..7a75b2e62c 100644
--- a/src/3rdparty/webkit/Source/WebCore/rendering/RenderScrollbar.cpp
+++ b/src/3rdparty/webkit/Source/WebCore/rendering/RenderScrollbar.cpp
@@ -149,7 +149,7 @@ ScrollbarPart RenderScrollbar::partForStyleResolve()
PassRefPtr<RenderStyle> RenderScrollbar::getScrollbarPseudoStyle(ScrollbarPart partType, PseudoId pseudoId)
{
- if (!m_owner)
+ if (!owningRenderer())
return 0;
s_styleResolvePart = partType;
diff --git a/src/3rdparty/webkit/Source/WebCore/rendering/RenderTableRow.cpp b/src/3rdparty/webkit/Source/WebCore/rendering/RenderTableRow.cpp
index 2edcfc4777..dd4457790f 100644
--- a/src/3rdparty/webkit/Source/WebCore/rendering/RenderTableRow.cpp
+++ b/src/3rdparty/webkit/Source/WebCore/rendering/RenderTableRow.cpp
@@ -90,7 +90,7 @@ void RenderTableRow::addChild(RenderObject* child, RenderObject* beforeChild)
RenderObject* last = beforeChild;
if (!last)
last = lastChild();
- if (last && last->isAnonymous() && last->isTableCell()) {
+ if (last && last->isAnonymous() && last->isTableCell() && !isAfterContent(last) && !isBeforeContent(last)) {
if (beforeChild == last)
beforeChild = last->firstChild();
last->addChild(child, beforeChild);
@@ -98,7 +98,7 @@ void RenderTableRow::addChild(RenderObject* child, RenderObject* beforeChild)
}
// If beforeChild is inside an anonymous cell, insert into the cell.
- if (last && !last->isTableCell() && last->parent() && last->parent()->isAnonymous()) {
+ if (last && !last->isTableCell() && last->parent() && last->parent()->isAnonymous() && !isAfterContent(last->parent()) && !isBeforeContent(last->parent())) {
last->parent()->addChild(child, beforeChild);
return;
}
diff --git a/src/3rdparty/webkit/Source/WebCore/rendering/RenderTableSection.cpp b/src/3rdparty/webkit/Source/WebCore/rendering/RenderTableSection.cpp
index 6b080b865f..3f8440445c 100644
--- a/src/3rdparty/webkit/Source/WebCore/rendering/RenderTableSection.cpp
+++ b/src/3rdparty/webkit/Source/WebCore/rendering/RenderTableSection.cpp
@@ -96,7 +96,7 @@ void RenderTableSection::addChild(RenderObject* child, RenderObject* beforeChild
RenderObject* last = beforeChild;
if (!last)
last = lastChild();
- if (last && last->isAnonymous()) {
+ if (last && last->isAnonymous() && !isAfterContent(last) && !isBeforeContent(last)) {
if (beforeChild == last)
beforeChild = last->firstChild();
last->addChild(child, beforeChild);
@@ -108,7 +108,7 @@ void RenderTableSection::addChild(RenderObject* child, RenderObject* beforeChild
RenderObject* lastBox = last;
while (lastBox && lastBox->parent()->isAnonymous() && !lastBox->isTableRow())
lastBox = lastBox->parent();
- if (lastBox && lastBox->isAnonymous()) {
+ if (lastBox && lastBox->isAnonymous() && !isAfterContent(lastBox) && !isBeforeContent(lastBox)) {
lastBox->addChild(child, beforeChild);
return;
}
diff --git a/src/3rdparty/webkit/Source/WebCore/rendering/RenderWidget.cpp b/src/3rdparty/webkit/Source/WebCore/rendering/RenderWidget.cpp
index 97444cdb4a..5a003748ff 100644
--- a/src/3rdparty/webkit/Source/WebCore/rendering/RenderWidget.cpp
+++ b/src/3rdparty/webkit/Source/WebCore/rendering/RenderWidget.cpp
@@ -143,6 +143,11 @@ void RenderWidget::destroy()
if (style() && (style()->logicalHeight().isPercent() || style()->logicalMinHeight().isPercent() || style()->logicalMaxHeight().isPercent()))
RenderBlock::removePercentHeightDescendant(this);
+ // If this renderer is owning renderer for the frameview's custom scrollbars,
+ // we need to clear it from the scrollbar. See webkit bug 64737.
+ if (style() && style()->hasPseudoStyle(SCROLLBAR) && frame() && frame()->view())
+ frame()->view()->clearOwningRendererForCustomScrollbars(this);
+
if (hasLayer()) {
layer()->clearClipRects();
setHasLayer(false);
diff --git a/src/3rdparty/webkit/Source/WebKit.pri b/src/3rdparty/webkit/Source/WebKit.pri
index be1c7b714b..5bd95778e0 100644
--- a/src/3rdparty/webkit/Source/WebKit.pri
+++ b/src/3rdparty/webkit/Source/WebKit.pri
@@ -2,9 +2,6 @@
contains(QT_CONFIG, qpa)|contains(QT_CONFIG, embedded): CONFIG += embedded
-contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols
-unix:contains(QT_CONFIG, reduce_relocations):CONFIG += bsymbolic_functions
-
# Detect that we are building as a standalone package by the presence of
# either the generated files directory or as part of the Qt package through
# QTDIR_build
diff --git a/src/3rdparty/webkit/Source/WebKit/qt/ChangeLog b/src/3rdparty/webkit/Source/WebKit/qt/ChangeLog
index 0bca4b2bd8..4758de09a0 100644
--- a/src/3rdparty/webkit/Source/WebKit/qt/ChangeLog
+++ b/src/3rdparty/webkit/Source/WebKit/qt/ChangeLog
@@ -1,3 +1,58 @@
+2011-08-31 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
+
+ [Qt] Unskip API test for load signals order
+ https://bugs.webkit.org/show_bug.cgi?id=67285
+
+ Reviewed by Andreas Kling.
+
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (tst_QWebPage::loadSignalsOrder):
+
+2011-08-30 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
+
+ Emit last progress notification before calling dispatchDidFinishLoad
+ https://bugs.webkit.org/show_bug.cgi?id=28851
+
+ Reviewed by Adam Barth.
+
+ Add infrastructure to dump progressFinishedNotification callback in DRT.
+
+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+ (DumpRenderTreeSupportQt::dumpProgressFinishedCallback):
+ * WebCoreSupport/DumpRenderTreeSupportQt.h:
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::FrameLoaderClientQt::postProgressFinishedNotification):
+ * WebCoreSupport/FrameLoaderClientQt.h:
+
+2011-09-02 Jade Han <jade.han@nokia.com>
+
+ [Qt][Symbian] REGRESSION(93235) Missing .def update
+ https://bugs.webkit.org/show_bug.cgi?id=67307
+
+ Reviewed by Laszlo Gombos.
+
+ * symbian/eabi/QtWebKitu.def:
+
+2011-08-12 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
+
+ [Qt] Add test for correct order of load signals in QWebPage
+ https://bugs.webkit.org/show_bug.cgi?id=66016
+
+ Reviewed by Benjamin Poulain.
+
+ Add API test to ensure the order of load signals: loadStarted() needs to be emitted
+ first, then loadProgress(100), followed by loadFinished().
+
+ The test is skipped since this right now is broken, the bug
+ https://bugs.webkit.org/show_bug.cgi?id=28851 tracks one possible way to fix.
+
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (SpyForLoadSignalsOrder::SpyForLoadSignalsOrder):
+ (SpyForLoadSignalsOrder::isFinished):
+ (SpyForLoadSignalsOrder::onLoadProgress):
+ (tst_QWebPage::loadSignalsOrder_data):
+ (tst_QWebPage::loadSignalsOrder):
+
2011-08-25 Ademar de Souza Reis Jr. <ademar.reis@openbossa.org>
Unreviewed QtWebKit.pro fix for when building inside Qt
diff --git a/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp b/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
index 2fc8e84b79..5d4bf6d09c 100644
--- a/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
+++ b/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
@@ -677,6 +677,11 @@ void DumpRenderTreeSupportQt::dumpFrameLoader(bool b)
FrameLoaderClientQt::dumpFrameLoaderCallbacks = b;
}
+void DumpRenderTreeSupportQt::dumpProgressFinishedCallback(bool b)
+{
+ FrameLoaderClientQt::dumpProgressFinishedCallback = b;
+}
+
void DumpRenderTreeSupportQt::dumpUserGestureInFrameLoader(bool b)
{
FrameLoaderClientQt::dumpUserGestureInFrameLoaderCallbacks = b;
diff --git a/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h b/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
index 7040ea1e60..f485cb552d 100644
--- a/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
+++ b/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
@@ -163,6 +163,7 @@ public:
static QString plainText(const QVariant& rng);
static void dumpFrameLoader(bool b);
+ static void dumpProgressFinishedCallback(bool);
static void dumpUserGestureInFrameLoader(bool b);
static void dumpResourceLoadCallbacks(bool b);
static void dumpResourceResponseMIMETypes(bool b);
diff --git a/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp b/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
index 8971fc41c0..5e0a2e6343 100644
--- a/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
+++ b/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
@@ -170,6 +170,7 @@ static QString drtDescriptionSuitableForTestResult(const RefPtr<WebCore::Node> n
namespace WebCore {
bool FrameLoaderClientQt::dumpFrameLoaderCallbacks = false;
+bool FrameLoaderClientQt::dumpProgressFinishedCallback = false;
bool FrameLoaderClientQt::dumpUserGestureInFrameLoaderCallbacks = false;
bool FrameLoaderClientQt::dumpResourceLoadCallbacks = false;
bool FrameLoaderClientQt::sendRequestReturnsNullOnRedirect = false;
@@ -586,6 +587,9 @@ void FrameLoaderClientQt::postProgressEstimateChangedNotification()
void FrameLoaderClientQt::postProgressFinishedNotification()
{
+ if (dumpProgressFinishedCallback)
+ printf("postProgressFinishedNotification\n");
+
// Send a mousemove event to:
// (1) update the cursor to change according to whatever is underneath the mouse cursor right now;
// (2) display the tool tip if the mouse hovers a node which has a tool tip.
diff --git a/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h b/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
index 1be365dc59..1b9d3b8b68 100644
--- a/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
+++ b/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
@@ -247,6 +247,7 @@ public:
const KURL& lastRequestedUrl() const { return m_lastRequestedUrl; }
static bool dumpFrameLoaderCallbacks;
+ static bool dumpProgressFinishedCallback;
static bool dumpUserGestureInFrameLoaderCallbacks;
static bool dumpResourceLoadCallbacks;
static bool dumpResourceResponseMIMETypes;
diff --git a/src/3rdparty/webkit/Source/WebKit/qt/symbian/eabi/QtWebKitu.def b/src/3rdparty/webkit/Source/WebKit/qt/symbian/eabi/QtWebKitu.def
index d948de4a54..0a1c6cb2cb 100644
--- a/src/3rdparty/webkit/Source/WebKit/qt/symbian/eabi/QtWebKitu.def
+++ b/src/3rdparty/webkit/Source/WebKit/qt/symbian/eabi/QtWebKitu.def
@@ -878,3 +878,5 @@ EXPORTS
_ZN8QDRTNodeD1Ev @ 877 NONAME
_ZN8QDRTNodeD2Ev @ 878 NONAME
_ZN8QDRTNodeaSERKS_ @ 879 NONAME
+ _ZN23DumpRenderTreeSupportQt21injectInternalsObjectEP9QWebFrame @ 880 NONAME
+ _ZN23DumpRenderTreeSupportQt20resetInternalsObjectEP9QWebFrame @ 881 NONAME
diff --git a/src/3rdparty/webkit/Source/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp b/src/3rdparty/webkit/Source/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
index 893c284315..610210216b 100644
--- a/src/3rdparty/webkit/Source/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
+++ b/src/3rdparty/webkit/Source/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
@@ -28,6 +28,7 @@
#include <QMainWindow>
#include <QMenu>
#include <QPushButton>
+#include <QStateMachine>
#include <QStyle>
#include <QtTest/QtTest>
#include <QTextCharFormat>
@@ -155,6 +156,8 @@ private slots:
void navigatorCookieEnabled();
void deleteQWebViewTwice();
void renderOnRepaintRequestedShouldNotRecurse();
+ void loadSignalsOrder_data();
+ void loadSignalsOrder();
#ifdef Q_OS_MAC
void macCopyUnicodeToClipboard();
@@ -3065,5 +3068,57 @@ void tst_QWebPage::renderOnRepaintRequestedShouldNotRecurse()
QVERIFY(::waitForSignal(&r, SIGNAL(finished())));
}
+class SpyForLoadSignalsOrder : public QStateMachine {
+ Q_OBJECT
+public:
+ SpyForLoadSignalsOrder(QWebPage* page, QObject* parent = 0)
+ : QStateMachine(parent)
+ {
+ connect(page, SIGNAL(loadProgress(int)), SLOT(onLoadProgress(int)));
+
+ QState* waitingForLoadStarted = new QState(this);
+ QState* waitingForLastLoadProgress = new QState(this);
+ QState* waitingForLoadFinished = new QState(this);
+ QFinalState* final = new QFinalState(this);
+
+ waitingForLoadStarted->addTransition(page, SIGNAL(loadStarted()), waitingForLastLoadProgress);
+ waitingForLastLoadProgress->addTransition(this, SIGNAL(lastLoadProgress()), waitingForLoadFinished);
+ waitingForLoadFinished->addTransition(page, SIGNAL(loadFinished(bool)), final);
+
+ setInitialState(waitingForLoadStarted);
+ start();
+ }
+ bool isFinished() const
+ {
+ return !isRunning();
+ }
+public Q_SLOTS:
+ void onLoadProgress(int progress)
+ {
+ if (progress == 100)
+ emit lastLoadProgress();
+ }
+signals:
+ void lastLoadProgress();
+};
+
+void tst_QWebPage::loadSignalsOrder_data()
+{
+ QTest::addColumn<QUrl>("url");
+ QTest::newRow("inline data") << QUrl("data:text/html,This is first page");
+ QTest::newRow("simple page") << QUrl("qrc:///resources/content.html");
+ QTest::newRow("frameset page") << QUrl("qrc:///resources/index.html");
+}
+
+void tst_QWebPage::loadSignalsOrder()
+{
+ QFETCH(QUrl, url);
+ QWebPage page;
+ SpyForLoadSignalsOrder loadSpy(&page);
+ waitForSignal(&loadSpy, SIGNAL(started()));
+ page.mainFrame()->load(url);
+ QTRY_VERIFY(loadSpy.isFinished());
+}
+
QTEST_MAIN(tst_QWebPage)
#include "tst_qwebpage.moc"
diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION
index 413f504513..aeaa22c4a5 100644
--- a/src/3rdparty/webkit/VERSION
+++ b/src/3rdparty/webkit/VERSION
@@ -4,4 +4,4 @@ This is a snapshot of the Qt port of WebKit from
and has the sha1 checksum
- dda59e50379214c098f365a39c4d64b39ced427e
+ a2bd2bb1b19949c6807da38e25bfa7d210bb4b17
diff --git a/src/corelib/arch/generic/qatomic_generic_windows.cpp b/src/corelib/arch/generic/qatomic_generic_windows.cpp
index 7ce0eea076..123b8231c1 100644
--- a/src/corelib/arch/generic/qatomic_generic_windows.cpp
+++ b/src/corelib/arch/generic/qatomic_generic_windows.cpp
@@ -43,6 +43,7 @@
#include <QtCore/qatomic.h>
+QT_BEGIN_NAMESPACE
class QCriticalSection
{
@@ -129,3 +130,5 @@ void *QBasicAtomicPointer_fetchAndAddOrdered(void * volatile *_q_value, qptrdiff
qAtomicCriticalSection.unlock();
return returnValue;
}
+
+QT_END_NAMESPACE
diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc
index dc928663f0..4974aefe5e 100644
--- a/src/corelib/global/qnamespace.qdoc
+++ b/src/corelib/global/qnamespace.qdoc
@@ -539,7 +539,7 @@
string, "ddd MMM d yyyy". See QDate::toString() for more information.
\value ISODate \l{ISO 8601} extended format: either \c{YYYY-MM-DD} for dates or
- \c{YYYY-MM-DDTHH:MM:SS}, \c{YYYY-MM-DDTHH:MM:SSTZD} (e.g., 1997-07-16T19:20:30+01:00)
+ \c{YYYY-MM-DDTHH:mm:ss}, \c{YYYY-MM-DDTHH:mm:ssTZD} (e.g., 1997-07-16T19:20:30+01:00)
for combined dates and times.
\value SystemLocaleShortDate The \l{QLocale::ShortFormat}{short format} used
diff --git a/src/corelib/io/qiodevice.cpp b/src/corelib/io/qiodevice.cpp
index ea00cb4a1f..dae4e828bb 100644
--- a/src/corelib/io/qiodevice.cpp
+++ b/src/corelib/io/qiodevice.cpp
@@ -423,6 +423,8 @@ QIODevice::~QIODevice()
seeking backwards and forwards in the data stream. Regular files
are non-sequential.
+ The QIODevice implementation returns false.
+
\sa bytesAvailable()
*/
bool QIODevice::isSequential() const
diff --git a/src/corelib/kernel/qmetaobject.cpp b/src/corelib/kernel/qmetaobject.cpp
index b4c37f4778..8597fa3ce7 100644
--- a/src/corelib/kernel/qmetaobject.cpp
+++ b/src/corelib/kernel/qmetaobject.cpp
@@ -432,9 +432,10 @@ int QMetaObject::constructorCount() const
}
/*!
- Returns the number of methods in this class, including the number of
- properties provided by each base class. These include signals and slots
- as well as normal member functions.
+ Returns the number of methods known to the meta-object system in this class,
+ including the number of properties provided by each base class. These
+ include signals and slots as well as member functions declared with the
+ Q_INVOKABLE macro.
Use code like the following to obtain a QStringList containing the methods
specific to a given class:
@@ -1245,6 +1246,10 @@ bool QMetaObject::invokeMethod(QObject *obj,
tag(), and an access() specifier. You can use invoke() to invoke
the method on an arbitrary QObject.
+ A method will only be registered with the meta-object system if it
+ is a slot, a signal, or declared with the Q_INVOKABLE macro.
+ Constructors can also be registered with Q_INVOKABLE.
+
\sa QMetaObject, QMetaEnum, QMetaProperty, {Qt's Property System}
*/
diff --git a/src/corelib/kernel/qsystemsemaphore_win.cpp b/src/corelib/kernel/qsystemsemaphore_win.cpp
index 0e9d645edd..76b57b9587 100644
--- a/src/corelib/kernel/qsystemsemaphore_win.cpp
+++ b/src/corelib/kernel/qsystemsemaphore_win.cpp
@@ -133,6 +133,6 @@ bool QSystemSemaphorePrivate::modifySemaphore(int count)
return true;
}
-#endif // QT_NO_SYSTEMSEMAPHORE
-
QT_END_NAMESPACE
+
+#endif // QT_NO_SYSTEMSEMAPHORE
diff --git a/src/corelib/tools/qdatetime.cpp b/src/corelib/tools/qdatetime.cpp
index e33b7d54ed..e1b42324dc 100644
--- a/src/corelib/tools/qdatetime.cpp
+++ b/src/corelib/tools/qdatetime.cpp
@@ -1538,7 +1538,7 @@ int QTime::msec() const
If \a format is Qt::ISODate, the string format corresponds to the
ISO 8601 extended specification for representations of dates,
- which is also HH:MM:SS. (However, contrary to ISO 8601, dates
+ which is also HH:mm:ss. (However, contrary to ISO 8601, dates
before 15 October 1582 are handled as Julian dates, not Gregorian
dates. See \l{QDate G and J} {Use of Gregorian and Julian
Calendars}. This might change in a future version of Qt.)
@@ -2461,7 +2461,7 @@ void QDateTime::setTime_t(uint secsSince1Jan1970UTC)
If the \a format is Qt::ISODate, the string format corresponds
to the ISO 8601 extended specification for representations of
- dates and times, taking the form YYYY-MM-DDTHH:MM:SS[Z|[+|-]HH:MM],
+ dates and times, taking the form YYYY-MM-DDTHH:mm:ss[Z|[+|-]HH:mm],
depending on the timeSpec() of the QDateTime. If the timeSpec()
is Qt::UTC, Z will be appended to the string; if the timeSpec() is
Qt::OffsetFromUTC the offset in hours and minutes from UTC will
diff --git a/src/corelib/tools/qline.cpp b/src/corelib/tools/qline.cpp
index af3b7d55ef..0f67652fb5 100644
--- a/src/corelib/tools/qline.cpp
+++ b/src/corelib/tools/qline.cpp
@@ -564,8 +564,9 @@ qreal QLineF::length() const
Returns the angle of the line in degrees.
- Positive values for the angles mean counter-clockwise while negative values
- mean the clockwise direction. Zero degrees is at the 3 o'clock position.
+ The return value will be in the range of values from 0.0 up to but not
+ including 360.0. The angles are measured counter-clockwise from a point
+ on the x-axis to the right of the origin (x > 0).
\sa setAngle()
*/
diff --git a/src/corelib/tools/qlist.cpp b/src/corelib/tools/qlist.cpp
index e68ddd5aa1..18bfe242c0 100644
--- a/src/corelib/tools/qlist.cpp
+++ b/src/corelib/tools/qlist.cpp
@@ -460,8 +460,8 @@ void **QListData::erase(void **xi)
Note that the internal array only ever gets bigger over the life
of the list. It never shrinks. The internal array is deallocated
- by the destructor and by the assignment operator, when one list
- is assigned to another.
+ by the destructor, by clear(), and by the assignment operator,
+ when one list is assigned to another.
Here's an example of a QList that stores integers and
a QList that stores QDate values:
diff --git a/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp b/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp
index 8787a5ed68..b1ebec832a 100644
--- a/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp
@@ -114,7 +114,7 @@ QT_BEGIN_NAMESPACE
/*!
\qmlproperty bool AnimatedImage::cache
- \since Quick 1.1
+ \since QtQuick 1.1
Specifies whether the image should be cached. The default value is
true. Setting \a cache to false is useful when dealing with large images,
@@ -123,7 +123,7 @@ QT_BEGIN_NAMESPACE
/*!
\qmlproperty bool AnimatedImage::mirror
- \since Quick 1.1
+ \since QtQuick 1.1
This property holds whether the image should be horizontally inverted
(effectively displaying a mirrored image).
diff --git a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp
index 9c274e93fa..d3bab7afcd 100644
--- a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp
@@ -215,7 +215,7 @@ QDeclarativeBorderImage::~QDeclarativeBorderImage()
/*!
\qmlproperty bool BorderImage::cache
- \since Quick 1.1
+ \since QtQuick 1.1
Specifies whether the image should be cached. The default value is
true. Setting \a cache to false is useful when dealing with large images,
@@ -224,7 +224,7 @@ QDeclarativeBorderImage::~QDeclarativeBorderImage()
/*!
\qmlproperty bool BorderImage::mirror
- \since Quick 1.1
+ \since QtQuick 1.1
This property holds whether the image should be horizontally inverted
(effectively displaying a mirrored image).
@@ -289,6 +289,12 @@ void QDeclarativeBorderImage::setSource(const QUrl &url)
load();
}
+void QDeclarativeBorderImage::setSourceSize(const QSize& size)
+{
+ Q_UNUSED(size);
+ qmlInfo(this) << "Setting sourceSize for borderImage not supported";
+}
+
void QDeclarativeBorderImage::load()
{
Q_D(QDeclarativeBorderImage);
diff --git a/src/declarative/graphicsitems/qdeclarativeborderimage_p.h b/src/declarative/graphicsitems/qdeclarativeborderimage_p.h
index 6a50c3cfec..6b0560863b 100644
--- a/src/declarative/graphicsitems/qdeclarativeborderimage_p.h
+++ b/src/declarative/graphicsitems/qdeclarativeborderimage_p.h
@@ -63,9 +63,6 @@ class Q_AUTOTEST_EXPORT QDeclarativeBorderImage : public QDeclarativeImageBase
Q_PROPERTY(TileMode horizontalTileMode READ horizontalTileMode WRITE setHorizontalTileMode NOTIFY horizontalTileModeChanged)
Q_PROPERTY(TileMode verticalTileMode READ verticalTileMode WRITE setVerticalTileMode NOTIFY verticalTileModeChanged)
- // read-only for BorderImage
- Q_PROPERTY(QSize sourceSize READ sourceSize NOTIFY sourceSizeChanged)
-
public:
QDeclarativeBorderImage(QDeclarativeItem *parent=0);
~QDeclarativeBorderImage();
@@ -83,10 +80,11 @@ public:
void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *);
void setSource(const QUrl &url);
+ void setSourceSize(const QSize&);
+
Q_SIGNALS:
void horizontalTileModeChanged();
void verticalTileModeChanged();
- void sourceSizeChanged();
protected:
virtual void load();
diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
index d5c58df28f..fd2dc45a2e 100644
--- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
@@ -1399,7 +1399,7 @@ void QDeclarativeFlickable::setContentHeight(qreal h)
/*!
\qmlmethod Flickable::resizeContent(real width, real height, QPointF center)
\preliminary
- \since Quick 1.1
+ \since QtQuick 1.1
Resizes the content to \a width x \a height about \a center.
@@ -1439,7 +1439,7 @@ void QDeclarativeFlickable::resizeContent(qreal w, qreal h, QPointF center)
/*!
\qmlmethod Flickable::returnToBounds()
\preliminary
- \since Quick 1.1
+ \since QtQuick 1.1
Ensures the content is within legal bounds.
diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp
index 23433d653e..e53472d484 100644
--- a/src/declarative/graphicsitems/qdeclarativegridview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp
@@ -2618,7 +2618,7 @@ void QDeclarativeGridView::positionViewAtIndex(int index, int mode)
/*!
\qmlmethod GridView::positionViewAtBeginning()
\qmlmethod GridView::positionViewAtEnd()
- \since Quick 1.1
+ \since QtQuick 1.1
Positions the view at the beginning or end, taking into account any header or footer.
diff --git a/src/declarative/graphicsitems/qdeclarativeimage.cpp b/src/declarative/graphicsitems/qdeclarativeimage.cpp
index e6bb798ece..9b9d68025e 100644
--- a/src/declarative/graphicsitems/qdeclarativeimage.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeimage.cpp
@@ -473,7 +473,7 @@ QRectF QDeclarativeImage::boundingRect() const
/*!
\qmlproperty bool Image::cache
- \since Quick 1.1
+ \since QtQuick 1.1
Specifies whether the image should be cached. The default value is
true. Setting \a cache to false is useful when dealing with large images,
@@ -482,7 +482,7 @@ QRectF QDeclarativeImage::boundingRect() const
/*!
\qmlproperty bool Image::mirror
- \since Quick 1.1
+ \since QtQuick 1.1
This property holds whether the image should be horizontally inverted
(effectively displaying a mirrored image).
diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp
index 7127173b6a..b9d231e19a 100644
--- a/src/declarative/graphicsitems/qdeclarativeitem.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp
@@ -3480,7 +3480,7 @@ qreal QDeclarativeItem::implicitHeight() const
/*!
\qmlproperty real Item::implicitWidth
\qmlproperty real Item::implicitHeight
- \since Quick 1.1
+ \since QtQuick 1.1
Defines the natural width or height of the Item if no \l width or \l height is specified.
diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp
index f29f778fcd..f0fc96b010 100644
--- a/src/declarative/graphicsitems/qdeclarativelistview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp
@@ -3028,7 +3028,7 @@ void QDeclarativeListView::positionViewAtIndex(int index, int mode)
/*!
\qmlmethod ListView::positionViewAtBeginning()
\qmlmethod ListView::positionViewAtEnd()
- \since Quick 1.1
+ \since QtQuick 1.1
Positions the view at the beginning or end, taking into account any header or footer.
diff --git a/src/declarative/graphicsitems/qdeclarativemousearea.cpp b/src/declarative/graphicsitems/qdeclarativemousearea.cpp
index 18f008a870..0e06a4c2fe 100644
--- a/src/declarative/graphicsitems/qdeclarativemousearea.cpp
+++ b/src/declarative/graphicsitems/qdeclarativemousearea.cpp
@@ -419,7 +419,7 @@ void QDeclarativeMouseArea::setEnabled(bool a)
/*!
\qmlproperty bool MouseArea::preventStealing
- \since Quick 1.1
+ \since QtQuick 1.1
This property holds whether the mouse events may be stolen from this
MouseArea.
diff --git a/src/declarative/graphicsitems/qdeclarativepositioners.cpp b/src/declarative/graphicsitems/qdeclarativepositioners.cpp
index f3d1a68cd0..483cad4b09 100644
--- a/src/declarative/graphicsitems/qdeclarativepositioners.cpp
+++ b/src/declarative/graphicsitems/qdeclarativepositioners.cpp
@@ -584,7 +584,7 @@ QDeclarativeRow::QDeclarativeRow(QDeclarativeItem *parent)
/*!
\qmlproperty enumeration Row::layoutDirection
- \since Quick 1.1
+ \since QtQuick 1.1
This property holds the layoutDirection of the row.
@@ -878,7 +878,7 @@ void QDeclarativeGrid::setFlow(Flow flow)
/*!
\qmlproperty enumeration Grid::layoutDirection
- \since Quick 1.1
+ \since QtQuick 1.1
This property holds the layout direction of the layout.
@@ -1236,7 +1236,7 @@ void QDeclarativeFlow::setFlow(Flow flow)
/*!
\qmlproperty enumeration Flow::layoutDirection
- \since Quick 1.1
+ \since QtQuick 1.1
This property holds the layout direction of the layout.
diff --git a/src/declarative/graphicsitems/qdeclarativerepeater.cpp b/src/declarative/graphicsitems/qdeclarativerepeater.cpp
index 813c255300..e881b96bcb 100644
--- a/src/declarative/graphicsitems/qdeclarativerepeater.cpp
+++ b/src/declarative/graphicsitems/qdeclarativerepeater.cpp
@@ -128,7 +128,7 @@ QDeclarativeRepeaterPrivate::~QDeclarativeRepeaterPrivate()
/*!
\qmlsignal Repeater::onItemAdded(int index, Item item)
- \since Quick 1.1
+ \since QtQuick 1.1
This handler is called when an item is added to the repeater. The \a index
parameter holds the index at which the item has been inserted within the
@@ -137,7 +137,7 @@ QDeclarativeRepeaterPrivate::~QDeclarativeRepeaterPrivate()
/*!
\qmlsignal Repeater::onItemRemoved(int index, Item item)
- \since Quick 1.1
+ \since QtQuick 1.1
This handler is called when an item is removed from the repeater. The \a index
parameter holds the index at which the item was removed from the repeater,
@@ -306,7 +306,7 @@ int QDeclarativeRepeater::count() const
/*!
\qmlmethod Item Repeater::itemAt(index)
- \since Quick 1.1
+ \since QtQuick 1.1
Returns the \l Item that has been created at the given \a index, or \c null
if no item exists at \a index.
diff --git a/src/declarative/graphicsitems/qdeclarativetext.cpp b/src/declarative/graphicsitems/qdeclarativetext.cpp
index 54ff406ec3..20e4eefa46 100644
--- a/src/declarative/graphicsitems/qdeclarativetext.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetext.cpp
@@ -1190,7 +1190,7 @@ void QDeclarativeText::setWrapMode(WrapMode mode)
/*!
\qmlproperty int Text::lineCount
- \since Quick 1.1
+ \since QtQuick 1.1
Returns the number of lines visible in the text item.
@@ -1206,7 +1206,7 @@ int QDeclarativeText::lineCount() const
/*!
\qmlproperty bool Text::truncated
- \since Quick 1.1
+ \since QtQuick 1.1
Returns true if the text has been truncated due to \l maximumLineCount
or \l elide.
@@ -1223,7 +1223,7 @@ bool QDeclarativeText::truncated() const
/*!
\qmlproperty int Text::maximumLineCount
- \since Quick 1.1
+ \since QtQuick 1.1
Set this property to limit the number of lines that the text item will show.
If elide is set to Text.ElideRight, the text will be elided appropriately.
@@ -1457,7 +1457,7 @@ qreal QDeclarativeText::paintedHeight() const
/*!
\qmlproperty real Text::lineHeight
- \since Quick 1.1
+ \since QtQuick 1.1
Sets the line height for the text.
The value can be in pixels or a multiplier depending on lineHeightMode.
diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp
index 0ea7ff3f78..6a9cf19387 100644
--- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp
@@ -107,7 +107,7 @@ TextEdit {
/*!
\qmlsignal TextEdit::onLinkActivated(string link)
- \since Quick 1.1
+ \since QtQuick 1.1
This handler is called when the user clicks on a link embedded in the text.
The link must be in rich text or HTML format and the
@@ -623,7 +623,7 @@ void QDeclarativeTextEdit::setWrapMode(WrapMode mode)
/*!
\qmlproperty int TextEdit::lineCount
- \since Quick 1.1
+ \since QtQuick 1.1
Returns the total number of lines in the textEdit item.
*/
@@ -717,7 +717,7 @@ void QDeclarativeTextEdit::moveCursorSelection(int pos)
/*!
\qmlmethod void TextEdit::moveCursorSelection(int position, SelectionMode mode = TextEdit.SelectCharacters)
- \since Quick 1.1
+ \since QtQuick 1.1
Moves the cursor to \a position and updates the selection according to the optional \a mode
parameter. (To only move the cursor, set the \l cursorPosition property.)
@@ -1082,7 +1082,7 @@ void QDeclarativeTextEdit::setSelectByMouse(bool on)
/*!
\qmlproperty enum TextEdit::mouseSelectionMode
- \since Quick 1.1
+ \since QtQuick 1.1
Specifies how text should be selected using a mouse.
@@ -1228,7 +1228,7 @@ void QDeclarativeTextEditPrivate::focusChanged(bool hasFocus)
/*!
\qmlmethod void TextEdit::deselect()
- \since Quick 1.1
+ \since QtQuick 1.1
Removes active text selection.
*/
diff --git a/src/declarative/graphicsitems/qdeclarativetextedit_p_p.h b/src/declarative/graphicsitems/qdeclarativetextedit_p_p.h
index 731d956602..412d33c431 100644
--- a/src/declarative/graphicsitems/qdeclarativetextedit_p_p.h
+++ b/src/declarative/graphicsitems/qdeclarativetextedit_p_p.h
@@ -77,7 +77,7 @@ public:
yoff(0)
{
#ifdef Q_OS_SYMBIAN
- if (QSysInfo::symbianVersion() == QSysInfo::SV_SF_1 || QSysInfo::symbianVersion() == QSysInfo::SV_SF_3) {
+ if (QSysInfo::symbianVersion() >= QSysInfo::SV_SF_1) {
showInputPanelOnFocus = false;
}
#endif
diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
index cc3f0b9003..5928d31869 100644
--- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
@@ -1015,7 +1015,7 @@ int QDeclarativeTextInput::positionAt(int x) const
/*!
\qmlmethod int TextInput::positionAt(int x, CursorPosition position = CursorBetweenCharacters)
- \since Quick 1.1
+ \since QtQuick 1.1
This function returns the character position at
x pixels from the left of the textInput. Position 0 is before the
@@ -1403,7 +1403,7 @@ QVariant QDeclarativeTextInput::inputMethodQuery(Qt::InputMethodQuery property)
/*!
\qmlmethod void TextInput::deselect()
- \since Quick 1.1
+ \since QtQuick 1.1
Removes active text selection.
*/
@@ -1575,7 +1575,7 @@ void QDeclarativeTextInput::setSelectByMouse(bool on)
/*!
\qmlproperty enum TextInput::mouseSelectionMode
- \since Quick 1.1
+ \since QtQuick 1.1
Specifies how text should be selected using a mouse.
@@ -1623,7 +1623,7 @@ void QDeclarativeTextInput::moveCursorSelection(int position)
/*!
\qmlmethod void TextInput::moveCursorSelection(int position, SelectionMode mode = TextInput.SelectCharacters)
- \since Quick 1.1
+ \since QtQuick 1.1
Moves the cursor to \a position and updates the selection according to the optional \a mode
parameter. (To only move the cursor, set the \l cursorPosition property.)
diff --git a/src/declarative/graphicsitems/qdeclarativetextinput_p_p.h b/src/declarative/graphicsitems/qdeclarativetextinput_p_p.h
index 4712c65ff0..0325016ed1 100644
--- a/src/declarative/graphicsitems/qdeclarativetextinput_p_p.h
+++ b/src/declarative/graphicsitems/qdeclarativetextinput_p_p.h
@@ -80,7 +80,7 @@ public:
selectPressed(false)
{
#ifdef Q_OS_SYMBIAN
- if (QSysInfo::symbianVersion() == QSysInfo::SV_SF_1 || QSysInfo::symbianVersion() == QSysInfo::SV_SF_3) {
+ if (QSysInfo::symbianVersion() >= QSysInfo::SV_SF_1) {
showInputPanelOnFocus = false;
}
#endif
diff --git a/src/declarative/qml/qdeclarativetypeloader.cpp b/src/declarative/qml/qdeclarativetypeloader.cpp
index 168c1512e2..82197dcf03 100644
--- a/src/declarative/qml/qdeclarativetypeloader.cpp
+++ b/src/declarative/qml/qdeclarativetypeloader.cpp
@@ -65,6 +65,11 @@ The QDeclarativeDataLoader invokes callbacks on the QDeclarativeDataBlob as data
*/
/*!
+ \class QDeclarativeTypeLoader
+ \internal
+*/
+
+/*!
\enum QDeclarativeDataBlob::Status
This enum describes the status of the data blob.
diff --git a/src/gui/image/qpnghandler.cpp b/src/gui/image/qpnghandler.cpp
index f7d07a5b14..1714442eb6 100644
--- a/src/gui/image/qpnghandler.cpp
+++ b/src/gui/image/qpnghandler.cpp
@@ -58,6 +58,29 @@
#include <pngconf.h>
#endif
+#if PNG_LIBPNG_VER >= 10400 && PNG_LIBPNG_VER <= 10502 \
+ && defined(PNG_PEDANTIC_WARNINGS_SUPPORTED)
+/*
+ Versions 1.4.0 to 1.5.2 of libpng declare png_longjmp_ptr to
+ have a noreturn attribute if PNG_PEDANTIC_WARNINGS_SUPPORTED
+ is enabled, but most declarations of longjmp in the wild do
+ not add this attribute. This causes problems when the png_jmpbuf
+ macro expands to calling png_set_longjmp_fn with a mismatched
+ longjmp, as compilers such as Clang will treat this as an error.
+
+ To work around this we override the png_jmpbuf macro to cast
+ longjmp to a png_longjmp_ptr.
+*/
+# undef png_jmpbuf
+# ifdef PNG_SETJMP_SUPPORTED
+# define png_jmpbuf(png_ptr) \
+ (*png_set_longjmp_fn((png_ptr), (png_longjmp_ptr)longjmp, sizeof(jmp_buf)))
+# else
+# define png_jmpbuf(png_ptr) \
+ (LIBPNG_WAS_COMPILED_WITH__PNG_NO_SETJMP)
+# endif
+#endif
+
#ifdef Q_OS_WINCE
#define CALLBACK_CALL_TYPE __cdecl
#else
diff --git a/src/gui/inputmethod/qcoefepinputcontext_p.h b/src/gui/inputmethod/qcoefepinputcontext_p.h
index 98570153b1..8c30838071 100644
--- a/src/gui/inputmethod/qcoefepinputcontext_p.h
+++ b/src/gui/inputmethod/qcoefepinputcontext_p.h
@@ -154,6 +154,7 @@ private:
TUint m_textCapabilities;
bool m_inDestruction;
bool m_pendingInputCapabilitiesChanged;
+ bool m_pendingTransactionCancel;
int m_cursorVisibility;
int m_inlinePosition;
MFepInlineTextFormatRetriever *m_formatRetriever;
diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
index 5ddd53fd89..56338b2897 100644
--- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
+++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
@@ -64,6 +64,8 @@
#define QT_EAknCursorPositionChanged MAknEdStateObserver::EAknEdwinStateEvent(6)
// MAknEdStateObserver::EAknActivatePenInputRequest
#define QT_EAknActivatePenInputRequest MAknEdStateObserver::EAknEdwinStateEvent(7)
+// MAknEdStateObserver::EAknClosePenInputRequest
+#define QT_EAknClosePenInputRequest MAknEdStateObserver::EAknEdwinStateEvent(10)
// EAknEditorFlagSelectionVisible is only valid from 3.2 onwards.
// Sym^3 AVKON FEP manager expects that this flag is used for FEP-aware editors
@@ -107,6 +109,7 @@ QCoeFepInputContext::QCoeFepInputContext(QObject *parent)
m_textCapabilities(TCoeInputCapabilities::EAllText),
m_inDestruction(false),
m_pendingInputCapabilitiesChanged(false),
+ m_pendingTransactionCancel(false),
m_cursorVisibility(1),
m_inlinePosition(0),
m_formatRetriever(0),
@@ -252,9 +255,6 @@ bool QCoeFepInputContext::needsInputPanel()
bool QCoeFepInputContext::filterEvent(const QEvent *event)
{
- // The CloseSoftwareInputPanel event is not handled here, because the VK will automatically
- // close when it discovers that the underlying widget does not have input capabilities.
-
if (!focusWidget())
return false;
@@ -318,6 +318,12 @@ bool QCoeFepInputContext::filterEvent(const QEvent *event)
if (!needsInputPanel())
return false;
+ if ((event->type() == QEvent::CloseSoftwareInputPanel)
+ && (QSysInfo::s60Version() > QSysInfo::SV_S60_5_0)) {
+ m_fepState->ReportAknEdStateEventL(QT_EAknClosePenInputRequest);
+ return false;
+ }
+
if (event->type() == QEvent::RequestSoftwareInputPanel) {
// Only request virtual keyboard if it is not yet active or if this is the first time
// panel is requested for this application.
@@ -354,10 +360,6 @@ bool QCoeFepInputContext::filterEvent(const QEvent *event)
if (sControl) {
sControl->setIgnoreFocusChanged(false);
}
- //If m_pointerHandler has already been set, it means that fep inline editing is in progress.
- //When this is happening, do not filter out pointer events.
- if (!m_pointerHandler)
- return true;
}
}
@@ -473,7 +475,7 @@ void QCoeFepInputContext::resetSplitViewWidget(bool keepInputWidget)
windowToMove->setUpdatesEnabled(false);
if (!alwaysResize) {
- if (gv->scene()) {
+ if (gv->scene() && S60->partial_keyboardAutoTranslation) {
if (gv->scene()->focusItem()) {
// Check if the widget contains cursorPositionChanged signal and disconnect from it.
QByteArray signal = QMetaObject::normalizedSignature(SIGNAL(cursorPositionChanged()));
@@ -580,7 +582,7 @@ void QCoeFepInputContext::ensureFocusWidgetVisible(QWidget *widget)
if (!moveWithinVisibleArea) {
// Check if the widget contains cursorPositionChanged signal and connect to it.
QByteArray signal = QMetaObject::normalizedSignature(SIGNAL(cursorPositionChanged()));
- if (gv->scene() && gv->scene()->focusItem()) {
+ if (gv->scene() && gv->scene()->focusItem() && S60->partial_keyboardAutoTranslation) {
int index = gv->scene()->focusItem()->toGraphicsObject()->metaObject()->indexOfSignal(signal.right(signal.length() - 1));
if (index != -1)
connect(gv->scene()->focusItem()->toGraphicsObject(), SIGNAL(cursorPositionChanged()), this, SLOT(translateInputWidget()));
@@ -1062,15 +1064,24 @@ void QCoeFepInputContext::CancelFepInlineEdit()
// We are not supposed to ever have a tempPreeditString and a real preedit string
// from S60 at the same time, so it should be safe to rely on this test to determine
// whether we should honor S60's request to clear the text or not.
- if (m_hasTempPreeditString)
+ if (m_hasTempPreeditString || m_pendingTransactionCancel)
return;
+ m_pendingTransactionCancel = true;
+
QList<QInputMethodEvent::Attribute> attributes;
QInputMethodEvent event(QLatin1String(""), attributes);
event.setCommitString(QLatin1String(""), 0, 0);
m_preeditString.clear();
m_inlinePosition = 0;
sendEvent(event);
+
+ // Sync with native side editor state. Native side can then do various operations
+ // based on editor state, such as removing 'exact word bubble'.
+ if (!m_pendingInputCapabilitiesChanged)
+ ReportAknEdStateEvent(MAknEdStateObserver::EAknSyncEdwinState);
+
+ m_pendingTransactionCancel = false;
}
TInt QCoeFepInputContext::DocumentLengthForFep() const
@@ -1080,7 +1091,18 @@ TInt QCoeFepInputContext::DocumentLengthForFep() const
return 0;
QVariant variant = w->inputMethodQuery(Qt::ImSurroundingText);
- return variant.value<QString>().size() + m_preeditString.size();
+
+ int size = variant.value<QString>().size() + m_preeditString.size();
+
+ // To fix an issue with backspaces not being generated if document size is zero,
+ // fake document length to be at least one always, except when dealing with
+ // hidden text widgets, where this faking would generate extra asterisk. Since the
+ // primary use of hidden text widgets is password fields, they are unlikely to
+ // support multiple lines anyway.
+ if (size == 0 && !(m_textCapabilities & TCoeInputCapabilities::ESecretText))
+ size = 1;
+
+ return size;
}
TInt QCoeFepInputContext::DocumentMaximumLengthForFep() const
@@ -1163,6 +1185,12 @@ void QCoeFepInputContext::GetEditorContentForFep(TDes& aEditorContent, TInt aDoc
// FEP expects the preedit string to be part of the editor content, so let's mix it in.
int cursor = w->inputMethodQuery(Qt::ImCursorPosition).toInt();
text.insert(cursor, m_preeditString);
+
+ // Add additional space to empty non-password text to compensate
+ // for the fake length we specified in DocumentLengthForFep().
+ if (text.size() == 0 && !(m_textCapabilities & TCoeInputCapabilities::ESecretText))
+ text += QChar(0x20);
+
aEditorContent.Copy(qt_QString2TPtrC(text.mid(aDocumentPosition, aLengthToRetrieve)));
}
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index 361af8ba46..80bcdf0ea5 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -2767,6 +2767,9 @@ QS60ThreadLocalData::QS60ThreadLocalData()
QS60ThreadLocalData::~QS60ThreadLocalData()
{
+ for (int i = 0; i < releaseFuncs.count(); ++i)
+ releaseFuncs[i]();
+ releaseFuncs.clear();
if (!usingCONEinstances) {
delete screenDevice;
wsSession.Close();
diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp
index de2d87e126..e1df267d65 100644
--- a/src/gui/kernel/qevent.cpp
+++ b/src/gui/kernel/qevent.cpp
@@ -142,8 +142,7 @@ QInputEvent::~QInputEvent()
and QWidget::mouseMoveEvent() to receive mouse events in your own
widgets.
- \sa QWidget::setMouseTracking() QWidget::grabMouse()
- QCursor::pos()
+ \sa QWidget::setMouseTracking() QWidget::grabMouse() QCursor::pos()
*/
/*!
diff --git a/src/gui/kernel/qkeysequence.cpp b/src/gui/kernel/qkeysequence.cpp
index 117b72fd30..5fc72d4f6f 100644
--- a/src/gui/kernel/qkeysequence.cpp
+++ b/src/gui/kernel/qkeysequence.cpp
@@ -933,7 +933,7 @@ QKeySequence::QKeySequence(const QString &key)
}
/*!
- \since 4.x
+ \since 4.7
Creates a key sequence from the \a key string based on \a format.
*/
QKeySequence::QKeySequence(const QString &key, QKeySequence::SequenceFormat format)
@@ -1130,7 +1130,7 @@ int QKeySequence::assign(const QString &ks)
/*!
\fn int QKeySequence::assign(const QString &keys, QKeySequence::SequenceFormat format)
- \since 4.x
+ \since 4.7
Adds the given \a keys to the key sequence (based on \a format).
\a keys may contain up to four key codes, provided they are
diff --git a/src/gui/kernel/qsoftkeymanager.cpp b/src/gui/kernel/qsoftkeymanager.cpp
index 510705f14e..9caa37e955 100644
--- a/src/gui/kernel/qsoftkeymanager.cpp
+++ b/src/gui/kernel/qsoftkeymanager.cpp
@@ -123,8 +123,10 @@ QAction *QSoftKeyManager::createAction(StandardSoftKey standardKey, QWidget *act
default:
break;
};
- if (key != 0)
+ if (key != 0) {
QSoftKeyManager::instance()->d_func()->softKeyCommandActions.insert(action, key);
+ connect(action, SIGNAL(destroyed(QObject*)), QSoftKeyManager::instance(), SLOT(cleanupHash(QObject*)));
+ }
#endif
QAction::SoftKeyRole softKeyRole = QAction::NoSoftKey;
switch (standardKey) {
@@ -157,7 +159,13 @@ QAction *QSoftKeyManager::createKeyedAction(StandardSoftKey standardKey, Qt::Key
QScopedPointer<QAction> action(createAction(standardKey, actionWidget));
connect(action.data(), SIGNAL(triggered()), QSoftKeyManager::instance(), SLOT(sendKeyEvent()));
+
+#if defined(Q_WS_S60) && !defined(SYMBIAN_VERSION_9_4) && !defined(SYMBIAN_VERSION_9_3) && !defined(SYMBIAN_VERSION_9_2)
+ // Don't connect destroyed slot if is was already connected in createAction
+ if (!(QSoftKeyManager::instance()->d_func()->softKeyCommandActions.contains(action.data())))
+#endif
connect(action.data(), SIGNAL(destroyed(QObject*)), QSoftKeyManager::instance(), SLOT(cleanupHash(QObject*)));
+
QSoftKeyManager::instance()->d_func()->keyedActions.insert(action.data(), key);
return action.take();
#endif //QT_NO_ACTION
@@ -166,7 +174,9 @@ QAction *QSoftKeyManager::createKeyedAction(StandardSoftKey standardKey, Qt::Key
void QSoftKeyManager::cleanupHash(QObject *obj)
{
Q_D(QSoftKeyManager);
- QAction *action = qobject_cast<QAction*>(obj);
+ // Can't use qobject_cast in destroyed() signal handler as that'll return NULL,
+ // so use static_cast instead. Since the pointer is only used as a hash key, it is safe.
+ QAction *action = static_cast<QAction *>(obj);
d->keyedActions.remove(action);
#if defined(Q_WS_S60) && !defined(SYMBIAN_VERSION_9_4) && !defined(SYMBIAN_VERSION_9_3) && !defined(SYMBIAN_VERSION_9_2)
d->softKeyCommandActions.remove(action);
diff --git a/src/gui/kernel/qt_s60_p.h b/src/gui/kernel/qt_s60_p.h
index 01d5f22d2c..96b8141d61 100644
--- a/src/gui/kernel/qt_s60_p.h
+++ b/src/gui/kernel/qt_s60_p.h
@@ -98,6 +98,10 @@ static const int qt_symbian_max_screens = 4;
//this macro exists because EColor16MAP enum value doesn't exist in Symbian OS 9.2
#define Q_SYMBIAN_ECOLOR16MAP TDisplayMode(13)
+class QSymbianTypeFaceExtras;
+typedef QHash<QString, const QSymbianTypeFaceExtras *> QSymbianTypeFaceExtrasHash;
+typedef void (*QThreadLocalReleaseFunc)();
+
class Q_AUTOTEST_EXPORT QS60ThreadLocalData
{
public:
@@ -106,6 +110,8 @@ public:
bool usingCONEinstances;
RWsSession wsSession;
CWsScreenDevice *screenDevice;
+ QSymbianTypeFaceExtrasHash fontData;
+ QVector<QThreadLocalReleaseFunc> releaseFuncs;
};
class QS60Data
@@ -179,6 +185,8 @@ public:
inline CWsScreenDevice* screenDevice(const QWidget *widget);
inline CWsScreenDevice* screenDevice(int screenNumber);
static inline int screenNumberForWidget(const QWidget *widget);
+ inline QSymbianTypeFaceExtrasHash& fontData();
+ inline void addThreadLocalReleaseFunc(QThreadLocalReleaseFunc func);
static inline CCoeAppUi* appUi();
static inline CEikMenuBar* menuBar();
#ifdef Q_WS_S60
@@ -505,6 +513,24 @@ inline int QS60Data::screenNumberForWidget(const QWidget *widget)
return qt_widget_private(const_cast<QWidget *>(w))->symbianScreenNumber;
}
+inline QSymbianTypeFaceExtrasHash& QS60Data::fontData()
+{
+ if (!tls.hasLocalData()) {
+ tls.setLocalData(new QS60ThreadLocalData);
+ }
+ return tls.localData()->fontData;
+}
+
+inline void QS60Data::addThreadLocalReleaseFunc(QThreadLocalReleaseFunc func)
+{
+ if (!tls.hasLocalData()) {
+ tls.setLocalData(new QS60ThreadLocalData);
+ }
+ QS60ThreadLocalData *data = tls.localData();
+ if (!data->releaseFuncs.contains(func))
+ data->releaseFuncs.append(func);
+}
+
inline CCoeAppUi* QS60Data::appUi()
{
return CCoeEnv::Static()-> AppUi();
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index ad8fbb7434..0aa1dfa283 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -345,6 +345,10 @@ QWidgetPrivate::QWidgetPrivate(int version)
QWidgetPrivate::~QWidgetPrivate()
{
+#ifdef Q_OS_SYMBIAN
+ _q_cleanupWinIds();
+#endif
+
if (widgetItem)
widgetItem->wid = 0;
@@ -12668,9 +12672,11 @@ void QWidget::clearMask()
*/
#ifdef Q_OS_SYMBIAN
-void QWidgetPrivate::_q_delayedDestroy(WId winId)
+void QWidgetPrivate::_q_cleanupWinIds()
{
- delete winId;
+ foreach (WId wid, widCleanupList)
+ delete wid;
+ widCleanupList.clear();
}
#endif
diff --git a/src/gui/kernel/qwidget.h b/src/gui/kernel/qwidget.h
index 1a9987d171..8306ed4c41 100644
--- a/src/gui/kernel/qwidget.h
+++ b/src/gui/kernel/qwidget.h
@@ -806,7 +806,7 @@ private:
Q_DISABLE_COPY(QWidget)
Q_PRIVATE_SLOT(d_func(), void _q_showIfNotHidden())
#ifdef Q_OS_SYMBIAN
- Q_PRIVATE_SLOT(d_func(), void _q_delayedDestroy(WId winId))
+ Q_PRIVATE_SLOT(d_func(), void void _q_cleanupWinIds())
#endif
QWidgetData *data;
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm
index a51e295979..632df78229 100644
--- a/src/gui/kernel/qwidget_mac.mm
+++ b/src/gui/kernel/qwidget_mac.mm
@@ -5031,7 +5031,7 @@ void QWidgetPrivate::registerTouchWindow(bool enable)
if (enable == touchEventsEnabled)
return;
- QCocoaView *view = static_cast<QCocoaView *>(qt_mac_effectiveview_for(q));
+ QT_MANGLE_NAMESPACE(QCocoaView) *view = static_cast<QT_MANGLE_NAMESPACE(QCocoaView) *>(qt_mac_effectiveview_for(q));
if (!view)
return;
diff --git a/src/gui/kernel/qwidget_p.h b/src/gui/kernel/qwidget_p.h
index ad652744c8..aefffb6ceb 100644
--- a/src/gui/kernel/qwidget_p.h
+++ b/src/gui/kernel/qwidget_p.h
@@ -419,7 +419,7 @@ public:
#ifdef Q_OS_SYMBIAN
void setSoftKeys_sys(const QList<QAction*> &softkeys);
void activateSymbianWindow(WId wid = 0);
- void _q_delayedDestroy(WId winId);
+ void _q_cleanupWinIds();
#endif
void raise_sys();
@@ -914,6 +914,7 @@ public:
void s60UpdateIsOpaque();
void reparentChildren();
void registerTouchWindow();
+ QList<WId> widCleanupList;
#endif
};
diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp
index 256e34b02a..2b51aaae6c 100644
--- a/src/gui/kernel/qwidget_s60.cpp
+++ b/src/gui/kernel/qwidget_s60.cpp
@@ -58,9 +58,7 @@
#endif
// This is necessary in order to be able to perform delayed invocation on slots
-// which take arguments of type WId. One example is
-// QWidgetPrivate::_q_delayedDestroy, which is used to delay destruction of
-// CCoeControl objects until after the CONE event handler has finished running.
+// which take arguments of type WId.
Q_DECLARE_METATYPE(WId)
// Workaround for the fact that S60 SDKs 3.x do not contain the akntoolbar.h
@@ -235,11 +233,22 @@ void QWidgetPrivate::setGeometry_sys(int x, int y, int w, int h, bool isMove)
QSize oldSize(q->size());
QRect oldGeom(data.crect);
+ bool checkExtra = true;
+ if (q->isWindow() && (data.window_state & (Qt::WindowFullScreen | Qt::WindowMaximized))) {
+ // Do not allow fullscreen/maximized windows to expand beyond client rect
+ TRect r = S60->clientRect();
+ w = qMin(w, r.Width());
+ h = qMin(h, r.Height());
+
+ if (w == r.Width() && h == r.Height())
+ checkExtra = false;
+ }
+
// Lose maximized status if deliberate resize
if (w != oldSize.width() || h != oldSize.height())
data.window_state &= ~Qt::WindowMaximized;
- if (extra) { // any size restrictions?
+ if (checkExtra && extra) { // any size restrictions?
w = qMin(w,extra->maxw);
h = qMin(h,extra->maxh);
w = qMax(w,extra->minw);
@@ -480,8 +489,8 @@ void QWidgetPrivate::create_sys(WId window, bool /* initializeWindow */, bool de
// Delay deletion of the control in case this function is called in the
// context of a CONE event handler such as
// CCoeControl::ProcessPointerEventL
- QMetaObject::invokeMethod(q, "_q_delayedDestroy",
- Qt::QueuedConnection, Q_ARG(WId, destroyw));
+ widCleanupList << destroyw;
+ QMetaObject::invokeMethod(q, "_q_cleanupWinIds", Qt::QueuedConnection);
}
if (q->testAttribute(Qt::WA_AcceptTouchEvents))
diff --git a/src/gui/text/qfontdatabase_s60.cpp b/src/gui/text/qfontdatabase_s60.cpp
index 8400febd1b..ffa4e59872 100644
--- a/src/gui/text/qfontdatabase_s60.cpp
+++ b/src/gui/text/qfontdatabase_s60.cpp
@@ -166,7 +166,6 @@ public:
COpenFontRasterizer *m_rasterizer;
mutable QList<const QSymbianTypeFaceExtras *> m_extras;
- mutable QHash<QString, const QSymbianTypeFaceExtras *> m_extrasHash;
mutable QSet<QString> m_applicationFontFamilies;
};
@@ -269,8 +268,9 @@ void QSymbianFontDatabaseExtrasImplementation::clear()
static_cast<const QSymbianFontDatabaseExtrasImplementation*>(db->symbianExtras);
if (!dbExtras)
return; // initializeDb() has never been called
+ QSymbianTypeFaceExtrasHash &extrasHash = S60->fontData();
if (QSymbianTypeFaceExtras::symbianFontTableApiAvailable()) {
- qDeleteAll(dbExtras->m_extrasHash);
+ qDeleteAll(extrasHash);
} else {
typedef QList<const QSymbianTypeFaceExtras *>::iterator iterator;
for (iterator p = dbExtras->m_extras.begin(); p != dbExtras->m_extras.end(); ++p) {
@@ -279,11 +279,16 @@ void QSymbianFontDatabaseExtrasImplementation::clear()
}
dbExtras->m_extras.clear();
}
- dbExtras->m_extrasHash.clear();
+ extrasHash.clear();
}
void qt_cleanup_symbianFontDatabase()
{
+ static bool cleanupDone = false;
+ if (cleanupDone)
+ return;
+ cleanupDone = true;
+
QFontDatabasePrivate *db = privateDb();
if (!db)
return;
@@ -334,9 +339,12 @@ COpenFont* OpenFontFromBitmapFont(const CBitmapFont* aBitmapFont)
const QSymbianTypeFaceExtras *QSymbianFontDatabaseExtrasImplementation::extras(const QString &aTypeface,
bool bold, bool italic) const
{
+ QSymbianTypeFaceExtrasHash &extrasHash = S60->fontData();
+ if (extrasHash.isEmpty() && QThread::currentThread() != QApplication::instance()->thread())
+ S60->addThreadLocalReleaseFunc(clear);
const QString typeface = qt_symbian_fontNameWithAppFontMarker(aTypeface);
const QString searchKey = typeface + QString::number(int(bold)) + QString::number(int(italic));
- if (!m_extrasHash.contains(searchKey)) {
+ if (!extrasHash.contains(searchKey)) {
TFontSpec searchSpec(qt_QString2TPtrC(typeface), 1);
if (bold)
searchSpec.iFontStyle.SetStrokeWeight(EStrokeWeightBold);
@@ -350,7 +358,7 @@ const QSymbianTypeFaceExtras *QSymbianFontDatabaseExtrasImplementation::extras(c
QScopedPointer<CFont, CFontFromScreenDeviceReleaser> sFont(font);
QSymbianTypeFaceExtras *extras = new QSymbianTypeFaceExtras(font);
sFont.take();
- m_extrasHash.insert(searchKey, extras);
+ extrasHash.insert(searchKey, extras);
} else {
const TInt err = m_store->GetNearestFontToDesignHeightInPixels(font, searchSpec);
Q_ASSERT(err == KErrNone && font);
@@ -364,20 +372,20 @@ const QSymbianTypeFaceExtras *QSymbianFontDatabaseExtrasImplementation::extras(c
const TOpenFontFaceAttrib* const attrib = openFont->FaceAttrib();
const QString foundKey =
QString((const QChar*)attrib->FullName().Ptr(), attrib->FullName().Length());
- if (!m_extrasHash.contains(foundKey)) {
+ if (!extrasHash.contains(foundKey)) {
QScopedPointer<CFont, CFontFromFontStoreReleaser> sFont(font);
QSymbianTypeFaceExtras *extras = new QSymbianTypeFaceExtras(font, openFont);
sFont.take();
m_extras.append(extras);
- m_extrasHash.insert(searchKey, extras);
- m_extrasHash.insert(foundKey, extras);
+ extrasHash.insert(searchKey, extras);
+ extrasHash.insert(foundKey, extras);
} else {
m_store->ReleaseFont(font);
- m_extrasHash.insert(searchKey, m_extrasHash.value(foundKey));
+ extrasHash.insert(searchKey, extrasHash.value(foundKey));
}
}
}
- return m_extrasHash.value(searchKey);
+ return extrasHash.value(searchKey);
}
void QSymbianFontDatabaseExtrasImplementation::removeAppFontData(
@@ -973,7 +981,7 @@ bool QFontDatabase::removeAllApplicationFonts()
bool QFontDatabase::supportsThreadedFontRendering()
{
- return false;
+ return QSymbianTypeFaceExtras::symbianFontTableApiAvailable();
}
static
diff --git a/src/gui/text/qfontengine_coretext_p.h b/src/gui/text/qfontengine_coretext_p.h
index 0a2ae1f128..4bd80beb00 100644
--- a/src/gui/text/qfontengine_coretext_p.h
+++ b/src/gui/text/qfontengine_coretext_p.h
@@ -52,6 +52,10 @@
#if !defined(Q_WS_MAC) || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
class QRawFontPrivate;
class QCoreTextFontEngineMulti;
class QCoreTextFontEngine : public QFontEngine
@@ -146,6 +150,10 @@ private:
CGAffineTransform qt_transform_from_fontdef(const QFontDef &fontDef);
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
#endif// !defined(Q_WS_MAC) || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
#endif // QFONTENGINE_CORETEXT_P_H
diff --git a/src/gui/util/qdesktopservices_s60.cpp b/src/gui/util/qdesktopservices_s60.cpp
index 8c243edda2..7a5322474d 100644
--- a/src/gui/util/qdesktopservices_s60.cpp
+++ b/src/gui/util/qdesktopservices_s60.cpp
@@ -313,12 +313,12 @@ static void handleUrlL(const TDesC& aUrl)
CleanupStack::PopAndDestroy();
}
-static bool handleUrl(const QUrl &url)
+static bool handleUrl(const QUrl &url, bool useEncodedUrl)
{
if (!url.isValid())
return false;
- QString urlString(url.toEncoded());
+ QString urlString(useEncodedUrl ? url.toEncoded() : url.toString());
TPtrC urlPtr(qt_QString2TPtrC(urlString));
TRAPD( err, handleUrlL(urlPtr));
return err ? false : true;
@@ -326,12 +326,12 @@ static bool handleUrl(const QUrl &url)
static bool launchWebBrowser(const QUrl &url)
{
- return handleUrl(url);
+ return handleUrl(url, true);
}
static bool openDocument(const QUrl &file)
{
- return handleUrl(file);
+ return handleUrl(file, false);
}
#endif //USE_SCHEMEHANDLER
diff --git a/src/gui/widgets/qabstractplatformmenubar_p.h b/src/gui/widgets/qabstractplatformmenubar_p.h
new file mode 100644
index 0000000000..10e6fdcab2
--- /dev/null
+++ b/src/gui/widgets/qabstractplatformmenubar_p.h
@@ -0,0 +1,108 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QABSTRACTPLATFORMMENUBAR_P_H
+#define QABSTRACTPLATFORMMENUBAR_P_H
+
+#include <qfactoryinterface.h>
+#include <qglobal.h>
+#include <qplugin.h>
+
+#ifndef QT_NO_MENUBAR
+
+QT_BEGIN_NAMESPACE
+
+class QAction;
+class QActionEvent;
+class QEvent;
+class QMenuBar;
+class QObject;
+class QWidget;
+
+class QAbstractPlatformMenuBar;
+
+struct QPlatformMenuBarFactoryInterface : public QFactoryInterface
+{
+ virtual QAbstractPlatformMenuBar *create() = 0;
+};
+
+#define QPlatformMenuBarFactoryInterface_iid "com.nokia.qt.QPlatformMenuBarFactoryInterface"
+Q_DECLARE_INTERFACE(QPlatformMenuBarFactoryInterface, QPlatformMenuBarFactoryInterface_iid)
+
+/*!
+ The platform-specific implementation of a menubar
+*/
+class QAbstractPlatformMenuBar
+{
+public:
+ virtual ~QAbstractPlatformMenuBar() {}
+
+ virtual void init(QMenuBar *) = 0;
+
+ virtual void setVisible(bool visible) = 0;
+
+ virtual void actionEvent(QActionEvent *) = 0;
+
+ virtual void handleReparent(QWidget *oldParent, QWidget *newParent, QWidget *oldWindow, QWidget *newWindow) = 0;
+
+ virtual bool allowCornerWidgets() const = 0;
+
+ virtual void popupAction(QAction *) = 0;
+
+ virtual void setNativeMenuBar(bool) = 0;
+
+ virtual bool isNativeMenuBar() const = 0;
+
+ /*!
+ Return true if the native menubar is capable of listening to the
+ shortcut keys. If false is returned, QMenuBar will trigger actions on
+ shortcut itself.
+ */
+ virtual bool shortcutsHandledByNativeMenuBar() const = 0;
+
+ virtual bool menuBarEventFilter(QObject *, QEvent *event) = 0;
+};
+
+QT_END_NAMESPACE
+
+#endif // QT_NO_MENUBAR
+
+#endif // QABSTRACTPLATFORMMENUBAR_P_H
diff --git a/src/gui/widgets/qlinecontrol.cpp b/src/gui/widgets/qlinecontrol.cpp
index b6e2f9057b..a8031e719c 100644
--- a/src/gui/widgets/qlinecontrol.cpp
+++ b/src/gui/widgets/qlinecontrol.cpp
@@ -60,7 +60,7 @@
QT_BEGIN_NAMESPACE
#ifdef QT_GUI_PASSWORD_ECHO_DELAY
-static int qt_passwordEchoDelay = QT_GUI_PASSWORD_ECHO_DELAY;
+static const int qt_passwordEchoDelay = QT_GUI_PASSWORD_ECHO_DELAY;
#endif
/*!
@@ -93,8 +93,8 @@ void QLineControl::updateDisplayText(bool forceUpdate)
if (m_echoMode == QLineEdit::Password) {
str.fill(m_passwordCharacter);
#ifdef QT_GUI_PASSWORD_ECHO_DELAY
- if (m_passwordEchoTimer != 0 && !str.isEmpty()) {
- int cursor = m_text.length() - 1;
+ if (m_passwordEchoTimer != 0 && m_cursor > 0 && m_cursor <= m_text.length()) {
+ int cursor = m_cursor - 1;
QChar uc = m_text.at(cursor);
str[cursor] = uc;
if (cursor > 0 && uc.unicode() >= 0xdc00 && uc.unicode() < 0xe000) {
diff --git a/src/gui/widgets/qmenu_mac.mm b/src/gui/widgets/qmenu_mac.mm
index 9db068c77f..56658b3718 100644
--- a/src/gui/widgets/qmenu_mac.mm
+++ b/src/gui/widgets/qmenu_mac.mm
@@ -1639,7 +1639,7 @@ QMenuBarPrivate::QMacMenuBarPrivate::~QMacMenuBarPrivate()
}
void
-QMenuBarPrivate::QMacMenuBarPrivate::addAction(QAction *a, QMacMenuAction *before)
+QMenuBarPrivate::QMacMenuBarPrivate::addAction(QAction *a, QAction *before)
{
if (a->isSeparator() || !menu)
return;
@@ -1649,7 +1649,7 @@ QMenuBarPrivate::QMacMenuBarPrivate::addAction(QAction *a, QMacMenuAction *befor
#ifndef QT_MAC_USE_COCOA
action->command = qt_mac_menu_static_cmd_id++;
#endif
- addAction(action, before);
+ addAction(action, findAction(before));
}
void
diff --git a/src/gui/widgets/qmenu_p.h b/src/gui/widgets/qmenu_p.h
index 0e6379990f..82bd932be7 100644
--- a/src/gui/widgets/qmenu_p.h
+++ b/src/gui/widgets/qmenu_p.h
@@ -154,6 +154,9 @@ public:
#endif
scroll(0), eventLoop(0), tearoff(0), tornoff(0), tearoffHighlighted(0),
hasCheckableItems(0), sloppyAction(0), doChildEffects(false)
+#ifdef QT3_SUPPORT
+ ,emitHighlighted(false)
+#endif
#ifdef Q_WS_MAC
,mac_menu(0)
#endif
@@ -163,9 +166,6 @@ public:
#ifdef Q_WS_S60
,symbian_menu(0)
#endif
-#ifdef QT3_SUPPORT
- ,emitHighlighted(false)
-#endif
{ }
~QMenuPrivate()
{
diff --git a/src/gui/widgets/qmenu_symbian.cpp b/src/gui/widgets/qmenu_symbian.cpp
index c9dbff538a..99a1d78bab 100644
--- a/src/gui/widgets/qmenu_symbian.cpp
+++ b/src/gui/widgets/qmenu_symbian.cpp
@@ -398,12 +398,12 @@ void QMenuPrivate::QSymbianMenuPrivate::rebuild(bool)
{
}
-void QMenuBarPrivate::QSymbianMenuBarPrivate::addAction(QAction *a, QSymbianMenuAction *before)
+void QMenuBarPrivate::QSymbianMenuBarPrivate::addAction(QAction *a, QAction *before)
{
QSymbianMenuAction *action = new QSymbianMenuAction;
action->action = a;
action->command = qt_symbian_menu_static_cmd_id++;
- addAction(action, before);
+ addAction(action, findAction(before));
}
void QMenuBarPrivate::QSymbianMenuBarPrivate::addAction(QSymbianMenuAction *action, QSymbianMenuAction *before)
diff --git a/src/gui/widgets/qmenu_wince.cpp b/src/gui/widgets/qmenu_wince.cpp
index 1157fff8a2..b0c6c1bd12 100644
--- a/src/gui/widgets/qmenu_wince.cpp
+++ b/src/gui/widgets/qmenu_wince.cpp
@@ -504,12 +504,12 @@ void QMenuPrivate::QWceMenuPrivate::removeAction(QWceMenuAction *action)
rebuild();
}
-void QMenuBarPrivate::QWceMenuBarPrivate::addAction(QAction *a, QWceMenuAction *before)
+void QMenuBarPrivate::QWceMenuBarPrivate::addAction(QAction *a, QAction *before)
{
QWceMenuAction *action = new QWceMenuAction;
action->action = a;
action->command = qt_wce_menu_static_cmd_id++;
- addAction(action, before);
+ addAction(action, findAction(before));
}
void QMenuBarPrivate::QWceMenuBarPrivate::addAction(QWceMenuAction *action, QWceMenuAction *before)
diff --git a/src/gui/widgets/qmenubar.cpp b/src/gui/widgets/qmenubar.cpp
index 3ff98a4b90..3e5365c7a7 100644
--- a/src/gui/widgets/qmenubar.cpp
+++ b/src/gui/widgets/qmenubar.cpp
@@ -55,6 +55,9 @@
#include <qtoolbar.h>
#include <qtoolbutton.h>
#include <qwhatsthis.h>
+#ifdef Q_WS_X11
+#include <qpluginloader.h>
+#endif
#ifndef QT_NO_MENUBAR
@@ -66,6 +69,9 @@
#include "qmenu_p.h"
#include "qmenubar_p.h"
#include "qdebug.h"
+#ifdef Q_WS_X11
+#include "qmenubar_x11_p.h"
+#endif
#ifdef Q_WS_WINCE
extern bool qt_wince_is_mobile(); //defined in qguifunctions_wce.cpp
@@ -173,7 +179,11 @@ void QMenuBarPrivate::updateGeometries()
return;
int q_width = q->width()-(q->style()->pixelMetric(QStyle::PM_MenuBarPanelWidth, 0, q)*2);
int q_start = -1;
- if(leftWidget || rightWidget) {
+ if(
+#ifdef Q_WS_X11
+ platformMenuBar->allowCornerWidgets() &&
+#endif
+ (leftWidget || rightWidget)) {
int vmargin = q->style()->pixelMetric(QStyle::PM_MenuBarVMargin, 0, q)
+ q->style()->pixelMetric(QStyle::PM_MenuBarPanelWidth, 0, q);
int hmargin = q->style()->pixelMetric(QStyle::PM_MenuBarHMargin, 0, q)
@@ -204,7 +214,11 @@ void QMenuBarPrivate::updateGeometries()
calcActionRects(q_width, q_start);
currentAction = 0;
#ifndef QT_NO_SHORTCUT
- if(itemsDirty) {
+ if(
+#ifdef Q_WS_X11
+ !platformMenuBar->shortcutsHandledByNativeMenuBar() &&
+#endif
+ itemsDirty) {
for(int j = 0; j < shortcutIndexMap.size(); ++j)
q->releaseShortcut(shortcutIndexMap.value(j));
shortcutIndexMap.resize(0); // faster than clear
@@ -212,6 +226,12 @@ void QMenuBarPrivate::updateGeometries()
shortcutIndexMap.append(q->grabShortcut(QKeySequence::mnemonic(actions.at(i)->text())));
}
#endif
+#ifdef Q_WS_X11
+ if(q->isNativeMenuBar()) {//nothing to see here folks, move along..
+ itemsDirty = false;
+ return;
+ }
+#endif
itemsDirty = false;
hiddenActions.clear();
@@ -743,6 +763,11 @@ void QMenuBarPrivate::init()
QApplication::setAttribute(Qt::AA_DontUseNativeMenuBar, true);
}
#endif
+#ifdef Q_WS_X11
+ platformMenuBar = qt_guiPlatformMenuBarFactory()->create();
+ platformMenuBar->init(q);
+#endif
+
q->setBackgroundRole(QPalette::Button);
oldWindow = oldParent = 0;
#ifdef QT3_SUPPORT
@@ -751,6 +776,10 @@ void QMenuBarPrivate::init()
#ifdef QT_SOFTKEYS_ENABLED
menuBarAction = 0;
#endif
+#ifdef Q_WS_X11
+ cornerWidgetToolBar = 0;
+ cornerWidgetContainer = 0;
+#endif
handleReparent();
q->setMouseTracking(q->style()->styleHint(QStyle::SH_MenuBar_MouseTracking, 0, q));
@@ -821,6 +850,10 @@ QMenuBar::~QMenuBar()
Q_D(QMenuBar);
d->symbianDestroyMenuBar();
#endif
+#ifdef Q_WS_X11
+ Q_D(QMenuBar);
+ delete d->cornerWidgetToolBar;
+#endif
}
/*!
@@ -1072,6 +1105,10 @@ void QMenuBar::paintEvent(QPaintEvent *e)
*/
void QMenuBar::setVisible(bool visible)
{
+#ifdef Q_WS_X11
+ Q_D(QMenuBar);
+ d->platformMenuBar->setVisible(visible);
+#else
#if defined(Q_WS_MAC) || defined(Q_OS_WINCE) || defined(Q_WS_S60)
if (isNativeMenuBar()) {
if (!visible)
@@ -1080,6 +1117,7 @@ void QMenuBar::setVisible(bool visible)
}
#endif
QWidget::setVisible(visible);
+#endif // Q_WS_X11
}
/*!
@@ -1275,6 +1313,9 @@ void QMenuBar::actionEvent(QActionEvent *e)
{
Q_D(QMenuBar);
d->itemsDirty = true;
+#ifdef Q_WS_X11
+ d->platformMenuBar->actionEvent(e);
+#endif
#if defined (Q_WS_MAC) || defined(Q_OS_WINCE) || defined(Q_WS_S60)
if (isNativeMenuBar()) {
#ifdef Q_WS_MAC
@@ -1287,7 +1328,7 @@ void QMenuBar::actionEvent(QActionEvent *e)
if (!nativeMenuBar)
return;
if(e->type() == QEvent::ActionAdded)
- nativeMenuBar->addAction(e->action(), nativeMenuBar->findAction(e->before()));
+ nativeMenuBar->addAction(e->action(), e->before());
else if(e->type() == QEvent::ActionRemoved)
nativeMenuBar->removeAction(e->action());
else if(e->type() == QEvent::ActionChanged)
@@ -1369,6 +1410,10 @@ void QMenuBarPrivate::handleReparent()
newWindow->installEventFilter(q);
}
+#ifdef Q_WS_X11
+ platformMenuBar->handleReparent(oldParent, newParent, oldWindow, newWindow);
+#endif
+
oldParent = newParent;
oldWindow = newWindow;
@@ -1566,6 +1611,11 @@ bool QMenuBar::event(QEvent *e)
bool QMenuBar::eventFilter(QObject *object, QEvent *event)
{
Q_D(QMenuBar);
+#ifdef Q_WS_X11
+ if (d->platformMenuBar->menuBarEventFilter(object, event)) {
+ return true;
+ }
+#endif
if (object == parent() && object) {
#ifdef QT3_SUPPORT
if (d->doAutoResize && event->type() == QEvent::Resize) {
@@ -1659,7 +1709,7 @@ QRect QMenuBar::actionGeometry(QAction *act) const
QSize QMenuBar::minimumSizeHint() const
{
Q_D(const QMenuBar);
-#if defined(Q_WS_MAC) || defined(Q_WS_WINCE) || defined(Q_WS_S60)
+#if defined(Q_WS_MAC) || defined(Q_WS_WINCE) || defined(Q_WS_S60) || defined(Q_WS_X11)
const bool as_gui_menubar = !isNativeMenuBar();
#else
const bool as_gui_menubar = true;
@@ -1682,6 +1732,9 @@ QSize QMenuBar::minimumSizeHint() const
ret += QSize(2*fw + hmargin, 2*fw + vmargin);
}
int margin = 2*vmargin + 2*fw + spaceBelowMenuBar;
+#ifdef Q_WS_X11
+ if (d->platformMenuBar->allowCornerWidgets()) {
+#endif
if(d->leftWidget) {
QSize sz = d->leftWidget->minimumSizeHint();
ret.setWidth(ret.width() + sz.width());
@@ -1694,6 +1747,9 @@ QSize QMenuBar::minimumSizeHint() const
if(sz.height() + margin > ret.height())
ret.setHeight(sz.height() + margin);
}
+#ifdef Q_WS_X11
+ }
+#endif
if(as_gui_menubar) {
QStyleOptionMenuItem opt;
opt.rect = rect();
@@ -1715,7 +1771,7 @@ QSize QMenuBar::minimumSizeHint() const
QSize QMenuBar::sizeHint() const
{
Q_D(const QMenuBar);
-#if defined(Q_WS_MAC) || defined(Q_WS_WINCE) || defined(Q_WS_S60)
+#if defined(Q_WS_MAC) || defined(Q_WS_WINCE) || defined(Q_WS_S60) || defined(Q_WS_X11)
const bool as_gui_menubar = !isNativeMenuBar();
#else
const bool as_gui_menubar = true;
@@ -1741,6 +1797,9 @@ QSize QMenuBar::sizeHint() const
ret += QSize(fw + hmargin, fw + vmargin);
}
int margin = 2*vmargin + 2*fw + spaceBelowMenuBar;
+#ifdef Q_WS_X11
+ if(d->platformMenuBar->allowCornerWidgets()) {
+#endif
if(d->leftWidget) {
QSize sz = d->leftWidget->sizeHint();
ret.setWidth(ret.width() + sz.width());
@@ -1753,6 +1812,9 @@ QSize QMenuBar::sizeHint() const
if(sz.height() + margin > ret.height())
ret.setHeight(sz.height() + margin);
}
+#ifdef Q_WS_X11
+ }
+#endif
if(as_gui_menubar) {
QStyleOptionMenuItem opt;
opt.rect = rect();
@@ -1774,7 +1836,7 @@ QSize QMenuBar::sizeHint() const
int QMenuBar::heightForWidth(int) const
{
Q_D(const QMenuBar);
-#if defined(Q_WS_MAC) || defined(Q_WS_WINCE) || defined(Q_WS_S60)
+#if defined(Q_WS_MAC) || defined(Q_WS_WINCE) || defined(Q_WS_S60) || defined(Q_WS_X11)
const bool as_gui_menubar = !isNativeMenuBar();
#else
const bool as_gui_menubar = true;
@@ -1794,10 +1856,16 @@ int QMenuBar::heightForWidth(int) const
height += 2*vmargin;
}
int margin = 2*vmargin + 2*fw + spaceBelowMenuBar;
+#ifdef Q_WS_X11
+ if(d->platformMenuBar->allowCornerWidgets()) {
+#endif
if(d->leftWidget)
height = qMax(d->leftWidget->sizeHint().height() + margin, height);
if(d->rightWidget)
height = qMax(d->rightWidget->sizeHint().height() + margin, height);
+#ifdef Q_WS_X11
+ }
+#endif
if(as_gui_menubar) {
QStyleOptionMenuItem opt;
opt.init(this);
@@ -1817,7 +1885,15 @@ void QMenuBarPrivate::_q_internalShortcutActivated(int id)
{
Q_Q(QMenuBar);
QAction *act = actions.at(id);
- setCurrentAction(act, true, true);
+#ifdef Q_WS_X11
+ if (q->isNativeMenuBar()) {
+ platformMenuBar->popupAction(act);
+ } else {
+#endif
+ setCurrentAction(act, true, true);
+#ifdef Q_WS_X11
+ }
+#endif
if (act && !act->menu()) {
activateAction(act, QAction::Trigger);
//100 is the same as the default value in QPushButton::animateClick
@@ -1838,6 +1914,39 @@ void QMenuBarPrivate::_q_updateLayout()
}
}
+#ifdef Q_WS_X11
+void QMenuBarPrivate::updateCornerWidgetToolBar()
+{
+ Q_Q(QMenuBar);
+ if (!cornerWidgetToolBar) {
+ QMainWindow *window = qobject_cast<QMainWindow *>(q->window());
+ if (!window) {
+ qWarning() << "Menubar parent is not a QMainWindow, not showing corner widgets";
+ return;
+ }
+ cornerWidgetToolBar = window->addToolBar(QApplication::translate("QMenuBar", "Corner Toolbar"));
+ cornerWidgetToolBar->setObjectName(QLatin1String("CornerToolBar"));
+ cornerWidgetContainer = new QWidget;
+ cornerWidgetToolBar->addWidget(cornerWidgetContainer);
+ new QHBoxLayout(cornerWidgetContainer);
+ } else {
+ QLayout *layout = cornerWidgetContainer->layout();
+ while (layout->count() > 0) {
+ layout->takeAt(0);
+ }
+ }
+ if (leftWidget) {
+ leftWidget->setParent(cornerWidgetContainer);
+ cornerWidgetContainer->layout()->addWidget(leftWidget);
+ }
+ if (rightWidget) {
+ rightWidget->setParent(cornerWidgetContainer);
+ cornerWidgetContainer->layout()->addWidget(rightWidget);
+ }
+}
+#endif
+
+
/*!
\fn void QMenuBar::setCornerWidget(QWidget *widget, Qt::Corner corner)
@@ -1870,10 +1979,18 @@ void QMenuBar::setCornerWidget(QWidget *w, Qt::Corner corner)
return;
}
+#ifdef Q_WS_X11
+ if(!d->platformMenuBar->allowCornerWidgets()) {
+ d->updateCornerWidgetToolBar();
+ } else {
+#endif
if (w) {
w->setParent(this);
w->installEventFilter(this);
}
+#ifdef Q_WS_X11
+ }
+#endif
d->_q_updateLayout();
}
@@ -1923,6 +2040,9 @@ QWidget *QMenuBar::cornerWidget(Qt::Corner corner) const
void QMenuBar::setNativeMenuBar(bool nativeMenuBar)
{
Q_D(QMenuBar);
+#ifdef Q_WS_X11
+ d->platformMenuBar->setNativeMenuBar(nativeMenuBar);
+#else
if (d->nativeMenuBar == -1 || (nativeMenuBar != bool(d->nativeMenuBar))) {
d->nativeMenuBar = nativeMenuBar;
#ifdef Q_WS_MAC
@@ -1947,15 +2067,20 @@ void QMenuBar::setNativeMenuBar(bool nativeMenuBar)
setVisible(true);
#endif
}
+#endif // Q_WS_X11
}
bool QMenuBar::isNativeMenuBar() const
{
Q_D(const QMenuBar);
+#ifdef Q_WS_X11
+ return d->platformMenuBar->isNativeMenuBar();
+#else
if (d->nativeMenuBar == -1) {
return !QApplication::instance()->testAttribute(Qt::AA_DontUseNativeMenuBar);
}
return d->nativeMenuBar;
+#endif
}
/*!
diff --git a/src/gui/widgets/qmenubar_p.h b/src/gui/widgets/qmenubar_p.h
index 1ac694eead..9a1f75884a 100644
--- a/src/gui/widgets/qmenubar_p.h
+++ b/src/gui/widgets/qmenubar_p.h
@@ -47,7 +47,7 @@
// -------------
//
// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
+// platformMenuBarementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
@@ -61,6 +61,10 @@
#include "qguifunctions_wince.h"
#endif
+#ifdef Q_WS_X11
+#include "qabstractplatformmenubar_p.h"
+#endif
+
#ifndef QT_NO_MENUBAR
#ifdef Q_WS_S60
class CCoeControl;
@@ -71,21 +75,27 @@ class CEikMenuBar;
QT_BEGIN_NAMESPACE
#ifndef QT_NO_MENUBAR
+class QToolBar;
class QMenuBarExtension;
class QMenuBarPrivate : public QWidgetPrivate
{
Q_DECLARE_PUBLIC(QMenuBar)
public:
QMenuBarPrivate() : itemsDirty(0), currentAction(0), mouseDown(0),
- closePopupMode(0), defaultPopDown(1), popupState(0), keyboardState(0), altPressed(0),
- nativeMenuBar(-1), doChildEffects(false)
+ closePopupMode(0), defaultPopDown(1), popupState(0), keyboardState(0), altPressed(0)
+#ifndef Q_WS_X11
+ , nativeMenuBar(-1)
+#endif
+ , doChildEffects(false)
#ifdef QT3_SUPPORT
, doAutoResize(false)
#endif
#ifdef Q_WS_MAC
, mac_menubar(0)
#endif
-
+#ifdef Q_WS_X11
+ , platformMenuBar(0)
+#endif
#ifdef Q_WS_WINCE
, wce_menubar(0), wceClassicMenu(false)
#endif
@@ -96,6 +106,9 @@ public:
{ }
~QMenuBarPrivate()
{
+#ifdef Q_WS_X11
+ delete platformMenuBar;
+#endif
#ifdef Q_WS_MAC
delete mac_menubar;
#endif
@@ -136,8 +149,9 @@ public:
uint keyboardState : 1, altPressed : 1;
QPointer<QWidget> keyboardFocusWidget;
-
+#ifndef Q_WS_X11
int nativeMenuBar : 3; // Only has values -1, 0, and 1
+#endif
//firing of events
void activateAction(QAction *, QAction::ActionEvent);
@@ -173,6 +187,9 @@ public:
#ifdef QT3_SUPPORT
bool doAutoResize;
#endif
+#ifdef Q_WS_X11
+ QAbstractPlatformMenuBar *platformMenuBar;
+#endif
#ifdef Q_WS_MAC
//mac menubar binding
struct QMacMenuBarPrivate {
@@ -181,7 +198,7 @@ public:
QMacMenuBarPrivate();
~QMacMenuBarPrivate();
- void addAction(QAction *, QMacMenuAction* =0);
+ void addAction(QAction *, QAction* =0);
void addAction(QMacMenuAction *, QMacMenuAction* =0);
void syncAction(QMacMenuAction *);
inline void syncAction(QAction *a) { syncAction(findAction(a)); }
@@ -220,7 +237,7 @@ public:
QWceMenuBarPrivate(QMenuBarPrivate *menubar);
~QWceMenuBarPrivate();
- void addAction(QAction *, QWceMenuAction* =0);
+ void addAction(QAction *, QAction* =0);
void addAction(QWceMenuAction *, QWceMenuAction* =0);
void syncAction(QWceMenuAction *);
inline void syncAction(QAction *a) { syncAction(findAction(a)); }
@@ -250,7 +267,7 @@ public:
QMenuBarPrivate *d;
QSymbianMenuBarPrivate(QMenuBarPrivate *menubar);
~QSymbianMenuBarPrivate();
- void addAction(QAction *, QSymbianMenuAction* =0);
+ void addAction(QAction *, QAction* =0);
void addAction(QSymbianMenuAction *, QSymbianMenuAction* =0);
void syncAction(QSymbianMenuAction *);
inline void syncAction(QAction *a) { syncAction(findAction(a)); }
@@ -273,6 +290,12 @@ public:
#ifdef QT_SOFTKEYS_ENABLED
QAction *menuBarAction;
#endif
+
+#ifdef Q_WS_X11
+ void updateCornerWidgetToolBar();
+ QToolBar *cornerWidgetToolBar;
+ QWidget *cornerWidgetContainer;
+#endif
};
#endif
diff --git a/src/gui/widgets/qmenubar_x11.cpp b/src/gui/widgets/qmenubar_x11.cpp
new file mode 100644
index 0000000000..25336d4378
--- /dev/null
+++ b/src/gui/widgets/qmenubar_x11.cpp
@@ -0,0 +1,139 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qmenubar_x11_p.h"
+
+#ifndef QT_NO_MENUBAR
+
+#include "qapplication.h"
+#include "qdebug.h"
+#include "qevent.h"
+#include "qmenu.h"
+#include "qmenubar.h"
+
+#include <private/qfactoryloader_p.h>
+
+QT_BEGIN_NAMESPACE
+
+QX11MenuBar::~QX11MenuBar()
+{
+}
+
+void QX11MenuBar::init(QMenuBar *_menuBar)
+{
+ nativeMenuBar = -1;
+ menuBar = _menuBar;
+}
+
+void QX11MenuBar::setVisible(bool visible)
+{
+ menuBar->QWidget::setVisible(visible);
+}
+
+void QX11MenuBar::actionEvent(QActionEvent *e)
+{
+ Q_UNUSED(e);
+}
+
+void QX11MenuBar::handleReparent(QWidget *oldParent, QWidget *newParent, QWidget *oldWindow, QWidget *newWindow)
+{
+ Q_UNUSED(oldParent)
+ Q_UNUSED(newParent)
+ Q_UNUSED(oldWindow)
+ Q_UNUSED(newWindow)
+}
+
+bool QX11MenuBar::allowCornerWidgets() const
+{
+ return true;
+}
+
+void QX11MenuBar::popupAction(QAction *)
+{
+}
+
+void QX11MenuBar::setNativeMenuBar(bool value)
+{
+ if (nativeMenuBar == -1 || (value != bool(nativeMenuBar))) {
+ nativeMenuBar = value;
+ }
+}
+
+bool QX11MenuBar::isNativeMenuBar() const
+{
+ return false;
+}
+
+bool QX11MenuBar::shortcutsHandledByNativeMenuBar() const
+{
+ return false;
+}
+
+bool QX11MenuBar::menuBarEventFilter(QObject *, QEvent *)
+{
+ return false;
+}
+
+struct QX11MenuBarFactory : public QPlatformMenuBarFactoryInterface
+{
+ QAbstractPlatformMenuBar *create() { return new QX11MenuBar; }
+ virtual QStringList keys() const { return QStringList(); }
+};
+
+QPlatformMenuBarFactoryInterface *qt_guiPlatformMenuBarFactory()
+{
+ static QPlatformMenuBarFactoryInterface *factory = 0;
+ if (!factory) {
+#ifndef QT_NO_LIBRARY
+ QFactoryLoader loader(QPlatformMenuBarFactoryInterface_iid, QLatin1String("/menubar"));
+ factory = qobject_cast<QPlatformMenuBarFactoryInterface *>(loader.instance(QLatin1String("default")));
+#endif // QT_NO_LIBRARY
+ if(!factory) {
+ static QX11MenuBarFactory def;
+ factory = &def;
+ }
+ }
+ return factory;
+}
+
+QT_END_NAMESPACE
+
+#endif // QT_NO_MENUBAR
diff --git a/src/gui/widgets/qmenubar_x11_p.h b/src/gui/widgets/qmenubar_x11_p.h
new file mode 100644
index 0000000000..41debd062a
--- /dev/null
+++ b/src/gui/widgets/qmenubar_x11_p.h
@@ -0,0 +1,87 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QX11MENUBAR_P_H
+#define QX11MENUBAR_P_H
+
+#ifndef QT_NO_MENUBAR
+
+#include "qabstractplatformmenubar_p.h"
+
+QT_BEGIN_NAMESPACE
+
+class QMenuBar;
+
+class QX11MenuBar : public QAbstractPlatformMenuBar
+{
+public:
+ ~QX11MenuBar();
+
+ virtual void init(QMenuBar *);
+
+ virtual void setVisible(bool visible);
+
+ virtual void actionEvent(QActionEvent *e);
+
+ virtual void handleReparent(QWidget *oldParent, QWidget *newParent, QWidget *oldWindow, QWidget *newWindow);
+
+ virtual bool allowCornerWidgets() const;
+
+ virtual void popupAction(QAction*);
+
+ virtual void setNativeMenuBar(bool);
+ virtual bool isNativeMenuBar() const;
+
+ virtual bool shortcutsHandledByNativeMenuBar() const;
+ virtual bool menuBarEventFilter(QObject *, QEvent *event);
+
+private:
+ QMenuBar *menuBar;
+ int nativeMenuBar : 3; // Only has values -1, 0, and 1
+};
+
+QPlatformMenuBarFactoryInterface *qt_guiPlatformMenuBarFactory();
+
+QT_END_NAMESPACE
+
+#endif // QT_NO_MENUBAR
+
+#endif /* QX11MENUBAR_P_H */
diff --git a/src/gui/widgets/qtextedit.cpp b/src/gui/widgets/qtextedit.cpp
index 2670089133..61d4fed722 100644
--- a/src/gui/widgets/qtextedit.cpp
+++ b/src/gui/widgets/qtextedit.cpp
@@ -2472,6 +2472,8 @@ bool QTextEdit::find(const QString &exp, QTextDocument::FindFlags options)
and the text edit will try to guess the right format.
Use setHtml() or setPlainText() directly to avoid text edit's guessing.
+
+ \sa toPlainText(), toHtml()
*/
void QTextEdit::setText(const QString &text)
{
diff --git a/src/gui/widgets/widgets.pri b/src/gui/widgets/widgets.pri
index 669b83830f..6b3d6a984a 100644
--- a/src/gui/widgets/widgets.pri
+++ b/src/gui/widgets/widgets.pri
@@ -144,6 +144,14 @@ SOURCES += \
widgets/qplaintextedit.cpp \
widgets/qprintpreviewwidget.cpp
+x11: {
+ HEADERS += \
+ widgets/qabstractplatformmenubar_p.h
+
+ SOURCES += \
+ widgets/qmenubar_x11.cpp
+}
+
!embedded:!qpa:mac {
HEADERS += widgets/qmacnativewidget_mac.h \
widgets/qmaccocoaviewcontainer_mac.h
diff --git a/src/qt3support/network/q3socketdevice_win.cpp b/src/qt3support/network/q3socketdevice_win.cpp
index df115d7b26..bde63a0623 100644
--- a/src/qt3support/network/q3socketdevice_win.cpp
+++ b/src/qt3support/network/q3socketdevice_win.cpp
@@ -83,8 +83,13 @@ typedef struct {
struct qt_in6_addr sin6_addr; /* IPv6 address */
u_long sin6_scope_id; /* set of interfaces for a scope */
} qt_sockaddr_in6;
+
+QT_END_NAMESPACE
+
#endif
+QT_BEGIN_NAMESPACE
+
#ifndef AF_INET6
#define AF_INET6 23 /* Internetwork Version 6 */
#endif
diff --git a/src/s60installs/bwins/QtGuiu.def b/src/s60installs/bwins/QtGuiu.def
index 3649b104fa..16de776c58 100644
--- a/src/s60installs/bwins/QtGuiu.def
+++ b/src/s60installs/bwins/QtGuiu.def
@@ -1901,7 +1901,7 @@ EXPORTS
?ResourceFileName@QS60MainApplication@@UBE?AV?$TBuf@$0BAA@@@XZ @ 1900 NONAME ; class TBuf<256> QS60MainApplication::ResourceFileName(void) const
?RestoreMenuL@QS60MainAppUi@@UAEXPAVCCoeControl@@HW4TMenuType@MEikMenuObserver@@@Z @ 1901 NONAME ; void QS60MainAppUi::RestoreMenuL(class CCoeControl *, int, enum MEikMenuObserver::TMenuType)
?_q_clipboardChanged@QLineControl@@AAEXXZ @ 1902 NONAME ; void QLineControl::_q_clipboardChanged(void)
- ?_q_delayedDestroy@QWidgetPrivate@@QAEXPAVCCoeControl@@@Z @ 1903 NONAME ; void QWidgetPrivate::_q_delayedDestroy(class CCoeControl *)
+ ?_q_delayedDestroy@QWidgetPrivate@@QAEXPAVCCoeControl@@@Z @ 1903 NONAME ABSENT ; void QWidgetPrivate::_q_delayedDestroy(class CCoeControl *)
?_q_deleteSelected@QLineControl@@AAEXXZ @ 1904 NONAME ; void QLineControl::_q_deleteSelected(void)
?_q_showIfNotHidden@QWidgetPrivate@@QAEXXZ @ 1905 NONAME ; void QWidgetPrivate::_q_showIfNotHidden(void)
?about@QMessageBox@@SAXPAVQWidget@@ABVQString@@1@Z @ 1906 NONAME ; void QMessageBox::about(class QWidget *, class QString const &, class QString const &)
diff --git a/src/s60installs/eabi/QtGuiu.def b/src/s60installs/eabi/QtGuiu.def
index d97eff1ab3..4133773ccf 100644
--- a/src/s60installs/eabi/QtGuiu.def
+++ b/src/s60installs/eabi/QtGuiu.def
@@ -11593,7 +11593,7 @@ EXPORTS
_ZN13QSymbianEventD2Ev @ 11592 NONAME
_ZN14QFileOpenEventC1ERK4QUrl @ 11593 NONAME
_ZN14QFileOpenEventC2ERK4QUrl @ 11594 NONAME
- _ZN14QWidgetPrivate17_q_delayedDestroyEP11CCoeControl @ 11595 NONAME
+ _ZN14QWidgetPrivate17_q_delayedDestroyEP11CCoeControl @ 11595 NONAME ABSENT
_ZN14QWidgetPrivate21activateSymbianWindowEP11CCoeControl @ 11596 NONAME
_ZN14QWidgetPrivate26nearestGraphicsProxyWidgetEPK7QWidget @ 11597 NONAME
_ZN14QWidgetPrivate36invalidateGraphicsEffectsRecursivelyEv @ 11598 NONAME
diff --git a/tests/auto/qlineedit/tst_qlineedit.cpp b/tests/auto/qlineedit/tst_qlineedit.cpp
index 6abbdcdf17..2c88561d1c 100644
--- a/tests/auto/qlineedit/tst_qlineedit.cpp
+++ b/tests/auto/qlineedit/tst_qlineedit.cpp
@@ -1770,6 +1770,13 @@ void tst_QLineEdit::passwordEchoDelay()
QApplication::sendEvent(testWidget, &ev);
QCOMPARE(testWidget->displayText(), QString(7, fillChar) + QLatin1Char('7'));
+ testWidget->setCursorPosition(3);
+ QCOMPARE(testWidget->displayText(), QString(7, fillChar) + QLatin1Char('7'));
+ QTest::keyPress(testWidget, 'a');
+ QCOMPARE(testWidget->displayText(), QString(3, fillChar) + QLatin1Char('a') + QString(5, fillChar));
+ QTest::keyPress(testWidget, Qt::Key_Backspace);
+ QCOMPARE(testWidget->displayText(), QString(8, fillChar));
+
// restore clean state
testWidget->setEchoMode(QLineEdit::Normal);
}
diff --git a/tools/assistant/lib/lib.pro b/tools/assistant/lib/lib.pro
index 03821b2a7f..d6c3fce90c 100644
--- a/tools/assistant/lib/lib.pro
+++ b/tools/assistant/lib/lib.pro
@@ -1,5 +1,4 @@
QT += sql \
- xml \
network
TEMPLATE = lib
TARGET = QtHelp
diff --git a/tools/designer/src/components/propertyeditor/propertyeditor.pri b/tools/designer/src/components/propertyeditor/propertyeditor.pri
index bb1afdb94b..60219e1a9b 100644
--- a/tools/designer/src/components/propertyeditor/propertyeditor.pri
+++ b/tools/designer/src/components/propertyeditor/propertyeditor.pri
@@ -4,15 +4,8 @@
INCLUDEPATH += $$PWD
-# --- Property browser is also linked into the designer_shared library.
-# Avoid conflict when linking statically
-contains(CONFIG, static) {
- INCLUDEPATH *= $$QT_SOURCE_TREE/tools/shared/qtpropertybrowser
- INCLUDEPATH *= $$QT_SOURCE_TREE/tools/shared/qtgradienteditor
-} else {
- include(../../../../shared/qtpropertybrowser/qtpropertybrowser.pri)
- include(../../../../shared/qtgradienteditor/qtcolorbutton.pri)
-}
+include(../../../../shared/qtpropertybrowser/qtpropertybrowser.pri)
+include(../../../../shared/qtgradienteditor/qtcolorbutton.pri)
FORMS += $$PWD/paletteeditor.ui \
$$PWD/stringlisteditor.ui \
diff --git a/tools/qdbus/qdbus/qdbus.cpp b/tools/qdbus/qdbus/qdbus.cpp
index 14b4b9e053..757267f61f 100644
--- a/tools/qdbus/qdbus/qdbus.cpp
+++ b/tools/qdbus/qdbus/qdbus.cpp
@@ -59,7 +59,7 @@ static bool printArgumentsLiterally = false;
static void showUsage()
{
- printf("Usage: qdbus [--system] [--literal] [servicename] [path] [method] [args]\n"
+ printf("Usage: qdbus [--system | --address ADDRESS] [--literal] [servicename] [path] [method] [args]\n"
"\n"
" servicename the service to connect to (e.g., org.freedesktop.DBus)\n"
" path the path to the object (e.g., /)\n"
@@ -71,6 +71,7 @@ static void showUsage()
"\n"
"Options:\n"
" --system connect to the system bus\n"
+ " --address ADDRESS connect to the given bus\n"
" --literal print replies literally\n");
}
@@ -454,6 +455,11 @@ int main(int argc, char **argv)
if (arg == QLatin1String("--system")) {
connection = QDBusConnection::systemBus();
connectionOpened = true;
+ } else if (arg == QLatin1String("--address")) {
+ if (!args.isEmpty()) {
+ connection = QDBusConnection::connectToBus(args.takeFirst(), "bus");
+ connectionOpened = true;
+ }
} else if (arg == QLatin1String("--literal")) {
printArgumentsLiterally = true;
} else if (arg == QLatin1String("--help")) {
diff --git a/tools/qdoc3/codemarker.cpp b/tools/qdoc3/codemarker.cpp
index 614419e2d0..705ef6cb31 100644
--- a/tools/qdoc3/codemarker.cpp
+++ b/tools/qdoc3/codemarker.cpp
@@ -76,7 +76,7 @@ CodeMarker::~CodeMarker()
A code market performs no initialization by default. Marker-specific
initialization is performed in subclasses.
*/
-void CodeMarker::initializeMarker(const Config &config)
+void CodeMarker::initializeMarker(const Config& ) // config
{
}
diff --git a/tools/qdoc3/codeparser.cpp b/tools/qdoc3/codeparser.cpp
index c7a89122f3..9ab5f826c5 100644
--- a/tools/qdoc3/codeparser.cpp
+++ b/tools/qdoc3/codeparser.cpp
@@ -287,6 +287,9 @@ void CodeParser::processCommonMetaCommand(const Location &location,
FakeNode *fake = static_cast<FakeNode *>(node);
fake->setTitle(arg);
nameToTitle.insert(fake->name(),arg);
+ if (fake->subType() == Node::Example) {
+
+ }
}
else
location.warning(tr("Ignored '\\%1'").arg(COMMAND_TITLE));
diff --git a/tools/qdoc3/cppcodemarker.cpp b/tools/qdoc3/cppcodemarker.cpp
index 71b4e908dd..37c2c3a745 100644
--- a/tools/qdoc3/cppcodemarker.cpp
+++ b/tools/qdoc3/cppcodemarker.cpp
@@ -935,7 +935,7 @@ QString CppCodeMarker::addMarkUp(const QString &in,
ident += ch;
finish = i;
readChar();
- } while (isalnum(ch) || ch == '_');
+ } while (ch >= 0 && isalnum(ch) || ch == '_');
if (classRegExp.exactMatch(ident)) {
tag = QLatin1String("type");
@@ -1137,15 +1137,15 @@ QList<Section> CppCodeMarker::qmlSections(const QmlClassNode* qmlClassNode,
"property",
"properties");
FastSection qmlsignals(qmlClassNode,
- "Signals",
+ "Signal Handlers",
"",
- "signal",
- "signals");
+ "signal handler",
+ "signal handlers");
FastSection qmlattachedsignals(qmlClassNode,
- "Attached Signals",
+ "Attached Signal Handlers",
"",
- "signal",
- "signals");
+ "signal handler",
+ "signal handlers");
FastSection qmlmethods(qmlClassNode,
"Methods",
"",
@@ -1200,9 +1200,9 @@ QList<Section> CppCodeMarker::qmlSections(const QmlClassNode* qmlClassNode,
FastSection qmlproperties(qmlClassNode, "Property Documentation","qmlprop","member","members");
FastSection qmlattachedproperties(qmlClassNode,"Attached Property Documentation","qmlattprop",
"member","members");
- FastSection qmlsignals(qmlClassNode,"Signal Documentation","qmlsig","member","members");
- FastSection qmlattachedsignals(qmlClassNode,"Attached Signal Documentation","qmlattsig",
- "member","members");
+ FastSection qmlsignals(qmlClassNode,"Signal Handler Documentation","qmlsig","handler","handlers");
+ FastSection qmlattachedsignals(qmlClassNode,"Attached Signal Handler Documentation","qmlattsig",
+ "handler","handlers");
FastSection qmlmethods(qmlClassNode,"Method Documentation","qmlmeth","member","members");
FastSection qmlattachedmethods(qmlClassNode,"Attached Method Documentation","qmlattmeth",
"member","members");
diff --git a/tools/qdoc3/cppcodeparser.cpp b/tools/qdoc3/cppcodeparser.cpp
index 6f5baa03d8..1a4c3448a8 100644
--- a/tools/qdoc3/cppcodeparser.cpp
+++ b/tools/qdoc3/cppcodeparser.cpp
@@ -47,7 +47,7 @@
#include <stdio.h>
#include <errno.h>
-
+#include <qdebug.h>
#include "codechunk.h"
#include "config.h"
#include "cppcodeparser.h"
@@ -704,7 +704,7 @@ Node *CppCodeParser::processTopicCommand(const Doc& doc,
if (command == COMMAND_CLASS) {
if (paths.size() > 1) {
if (!paths[1].endsWith(".h")) {
- ClassNode*cnode = static_cast<ClassNode*>(node);
+ ClassNode* cnode = static_cast<ClassNode*>(node);
cnode->setQmlElement(paths[1]);
}
}
@@ -712,9 +712,9 @@ Node *CppCodeParser::processTopicCommand(const Doc& doc,
return node;
}
else if (command == COMMAND_EXAMPLE) {
- FakeNode *fake = new FakeNode(tre->root(), arg, Node::Example);
- createExampleFileNodes(fake);
- return fake;
+ ExampleNode* en = new ExampleNode(tre->root(), arg);
+ createExampleFileNodes(en);
+ return en;
}
else if (command == COMMAND_EXTERNALPAGE) {
return new FakeNode(tre->root(), arg, Node::ExternalPage);
@@ -2349,8 +2349,8 @@ void CppCodeParser::createExampleFileNodes(FakeNode *fake)
proFileName,
userFriendlyFilePath);
if (fullPath.isEmpty()) {
- fake->doc().location().warning(
- tr("Cannot find file '%1' or '%2'").arg(tmp).arg(proFileName));
+ fake->doc().location().warning(tr("Cannot find file '%1' or '%2'").arg(tmp).arg(proFileName));
+ fake->doc().location().warning(tr("EXAMPLE PATH DOES NOT EXIST: %1").arg(examplePath));
return;
}
}
@@ -2362,7 +2362,6 @@ void CppCodeParser::createExampleFileNodes(FakeNode *fake)
QStringList exampleFiles = Config::getFilesHere(fullPath,exampleNameFilter);
QString imagesPath = fullPath + "/images";
QStringList imageFiles = Config::getFilesHere(imagesPath,exampleImageFilter);
-
if (!exampleFiles.isEmpty()) {
// move main.cpp and to the end, if it exists
QString mainCpp;
@@ -2382,7 +2381,7 @@ void CppCodeParser::createExampleFileNodes(FakeNode *fake)
exampleFiles.append(mainCpp);
// add any qmake Qt resource files and qmake project files
- exampleFiles += Config::getFilesHere(fullPath, "*.qrc *.pro qmldir");
+ exampleFiles += Config::getFilesHere(fullPath, "*.qrc *.pro *.qmlproject qmldir");
}
foreach (const QString &exampleFile, exampleFiles)
diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp
index fc66923d10..e3e32a0a5e 100644
--- a/tools/qdoc3/ditaxmlgenerator.cpp
+++ b/tools/qdoc3/ditaxmlgenerator.cpp
@@ -62,25 +62,6 @@ QT_BEGIN_NAMESPACE
#define COMMAND_VERSION Doc::alias("version")
int DitaXmlGenerator::id = 0;
-QString DitaXmlGenerator::sinceTitles[] =
- {
- " New Namespaces",
- " New Classes",
- " New Member Functions",
- " New Functions in Namespaces",
- " New Global Functions",
- " New Macros",
- " New Enum Types",
- " New Typedefs",
- " New Properties",
- " New Variables",
- " New QML Elements",
- " New Qml Properties",
- " New Qml Signals",
- " New Qml Methods",
- ""
- };
-
/*
The strings in this array must appear in the same order as
the values in enum DitaXmlGenerator::DitaTag.
@@ -770,7 +751,7 @@ int DitaXmlGenerator::generateAtom(const Atom *atom,
{
writeStartTag(DT_codeblock);
xmlWriter().writeAttribute("outputclass","cpp");
- QString chars = trimmedTrailing(atom->string());
+ QString chars = trimmedTrailing(atom->string());
writeText(chars, marker, relative);
writeEndTag(); // </codeblock>
}
@@ -1199,7 +1180,10 @@ int DitaXmlGenerator::generateAtom(const Atom *atom,
Just output the href as if the image is in
the images directory...
*/
- fileName = QLatin1String("images/") + protectEnc(atom->string());
+ if (atom->string()[0] == '/')
+ fileName = QLatin1String("images") + atom->string();
+ else
+ fileName = QLatin1String("images/") + atom->string();
}
if (currentTag() != DT_xref)
@@ -3408,6 +3392,7 @@ void DitaXmlGenerator::writeText(const QString& markedCode,
"<@type>", "<@type>",
"<@headerfile>", "<@headerfile>",
"<@func>", "<@func>",
+ "<@func ", "<@func ",
"<@param>", "<@param>",
"<@extra>", "<@extra>",
"</@link>", "</@link>",
@@ -3420,7 +3405,7 @@ void DitaXmlGenerator::writeText(const QString& markedCode,
for (int i = 0, n = src.size(); i < n;) {
if (src.at(i) == charLangle) {
bool handled = false;
- for (int k = 0; k != 12; ++k) {
+ for (int k = 0; k != 13; ++k) {
const QString & tag = spanTags[2 * k];
if (tag == QStringRef(&src, i, tag.length())) {
html += spanTags[2 * k + 1];
@@ -3953,70 +3938,6 @@ void DitaXmlGenerator::findAllClasses(const InnerNode* node)
}
}
-/*!
- For generating the "New Classes... in 4.x" section on the
- What's New in 4.x" page.
- */
-void DitaXmlGenerator::findAllSince(const InnerNode* node)
-{
- NodeList::const_iterator child = node->childNodes().constBegin();
- while (child != node->childNodes().constEnd()) {
- QString sinceVersion = (*child)->since();
- if (((*child)->access() != Node::Private) && !sinceVersion.isEmpty()) {
- NewSinceMaps::iterator nsmap = newSinceMaps.find(sinceVersion);
- if (nsmap == newSinceMaps.end())
- nsmap = newSinceMaps.insert(sinceVersion,NodeMultiMap());
- NewClassMaps::iterator ncmap = newClassMaps.find(sinceVersion);
- if (ncmap == newClassMaps.end())
- ncmap = newClassMaps.insert(sinceVersion,NodeMap());
- NewClassMaps::iterator nqcmap = newQmlClassMaps.find(sinceVersion);
- if (nqcmap == newQmlClassMaps.end())
- nqcmap = newQmlClassMaps.insert(sinceVersion,NodeMap());
-
- if ((*child)->type() == Node::Function) {
- FunctionNode *func = static_cast<FunctionNode *>(*child);
- if ((func->status() > Node::Obsolete) &&
- (func->metaness() != FunctionNode::Ctor) &&
- (func->metaness() != FunctionNode::Dtor)) {
- nsmap.value().insert(func->name(),(*child));
- }
- }
- else if ((*child)->url().isEmpty()) {
- if ((*child)->type() == Node::Class && !(*child)->doc().isEmpty()) {
- QString className = (*child)->name();
- if ((*child)->parent() &&
- (*child)->parent()->type() == Node::Namespace &&
- !(*child)->parent()->name().isEmpty())
- className = (*child)->parent()->name()+"::"+className;
- nsmap.value().insert(className,(*child));
- ncmap.value().insert(className,(*child));
- }
- else if ((*child)->subType() == Node::QmlClass) {
- QString className = (*child)->name();
- if ((*child)->parent() &&
- (*child)->parent()->type() == Node::Namespace &&
- !(*child)->parent()->name().isEmpty())
- className = (*child)->parent()->name()+"::"+className;
- nsmap.value().insert(className,(*child));
- nqcmap.value().insert(className,(*child));
- }
- }
- else {
- QString name = (*child)->name();
- if ((*child)->parent() &&
- (*child)->parent()->type() == Node::Namespace &&
- !(*child)->parent()->name().isEmpty())
- name = (*child)->parent()->name()+"::"+name;
- nsmap.value().insert(name,(*child));
- }
- if ((*child)->isInnerNode()) {
- findAllSince(static_cast<InnerNode *>(*child));
- }
- }
- ++child;
- }
-}
-
void DitaXmlGenerator::findAllFunctions(const InnerNode* node)
{
NodeList::ConstIterator c = node->childNodes().begin();
@@ -4397,7 +4318,8 @@ void DitaXmlGenerator::generateDetailedQmlMember(const Node* node,
writeStartTag(DT_li);
writeGuidAttribute((Node*)qpn);
QString attr;
- if (!qpn->isWritable(myTree))
+ const ClassNode* cn = qpn->declarativeCppNode();
+ if (cn && !qpn->isWritable(myTree))
attr = "read-only";
if (qpgn->isDefault()) {
if (!attr.isEmpty())
diff --git a/tools/qdoc3/ditaxmlgenerator.h b/tools/qdoc3/ditaxmlgenerator.h
index 408f46c575..d8d3563009 100644
--- a/tools/qdoc3/ditaxmlgenerator.h
+++ b/tools/qdoc3/ditaxmlgenerator.h
@@ -51,12 +51,6 @@
QT_BEGIN_NAMESPACE
-typedef QMultiMap<QString, Node*> NodeMultiMap;
-typedef QMap<QString, NodeMultiMap> NewSinceMaps;
-typedef QMap<Node*, NodeMultiMap> ParentMaps;
-typedef QMap<QString, const Node*> NodeMap;
-typedef QMap<QString, NodeMap> NewClassMaps;
-
typedef QMap<QString, QString> GuidMap;
typedef QMap<QString, GuidMap*> GuidMaps;
@@ -418,7 +412,6 @@ class DitaXmlGenerator : public PageGenerator
void findAllFunctions(const InnerNode *node);
void findAllLegaleseTexts(const InnerNode *node);
void findAllNamespaces(const InnerNode *node);
- void findAllSince(const InnerNode *node);
static int hOffset(const Node *node);
static bool isThreeColumnEnumValueTable(const Atom *atom);
virtual QString getLink(const Atom *atom,
@@ -515,10 +508,6 @@ class DitaXmlGenerator : public PageGenerator
#endif
QMap<QString, NodeMap > funcIndex;
QMap<Text, const Node*> legaleseTexts;
- NewSinceMaps newSinceMaps;
- static QString sinceTitles[];
- NewClassMaps newClassMaps;
- NewClassMaps newQmlClassMaps;
static int id;
static QString ditaTags[];
QStack<QXmlStreamWriter*> xmlWriterStack;
diff --git a/tools/qdoc3/doc.cpp b/tools/qdoc3/doc.cpp
index 479931dea9..f1f1418907 100644
--- a/tools/qdoc3/doc.cpp
+++ b/tools/qdoc3/doc.cpp
@@ -62,7 +62,7 @@ QT_BEGIN_NAMESPACE
Q_GLOBAL_STATIC(QSet<QString>, null_Set_QString)
Q_GLOBAL_STATIC(QStringList, null_QStringList)
Q_GLOBAL_STATIC(QList<Text>, null_QList_Text)
-Q_GLOBAL_STATIC(QStringMap, null_QStringMap)
+//Q_GLOBAL_STATIC(QStringMap, null_QStringMap)
Q_GLOBAL_STATIC(QStringMultiMap, null_QStringMultiMap)
struct Macro
@@ -828,7 +828,7 @@ void DocParser::parse(const QString& source,
append(Atom::AnnotatedList, getArgument());
break;
case CMD_SINCELIST:
- append(Atom::SinceList, getArgument());
+ append(Atom::SinceList, getRestOfLine().simplified());
break;
case CMD_GENERATELIST:
append(Atom::GeneratedList, getArgument());
@@ -1861,7 +1861,7 @@ void DocParser::startSection(Doc::Sections unit, int cmd)
}
-void DocParser::endSection(int unit, int endCmd)
+void DocParser::endSection(int , int) // (int unit, int endCmd)
{
leavePara();
append(Atom::SectionRight, QString::number(currentSection));
diff --git a/tools/qdoc3/generator.cpp b/tools/qdoc3/generator.cpp
index 33673018e4..355c9b20f0 100644
--- a/tools/qdoc3/generator.cpp
+++ b/tools/qdoc3/generator.cpp
@@ -77,6 +77,25 @@ QString Generator::outDir;
QString Generator::project;
QHash<QString, QString> Generator::outputPrefixes;
+QString Generator::sinceTitles[] =
+ {
+ " New Namespaces",
+ " New Classes",
+ " New Member Functions",
+ " New Functions in Namespaces",
+ " New Global Functions",
+ " New Macros",
+ " New Enum Types",
+ " New Typedefs",
+ " New Properties",
+ " New Variables",
+ " New QML Elements",
+ " New QML Properties",
+ " New QML Signals",
+ " New QML Methods",
+ ""
+ };
+
static void singularPlural(Text& text, const NodeList& nodes)
{
if (nodes.count() == 1)
@@ -760,8 +779,18 @@ QString Generator::typeString(const Node *node)
case Node::Class:
return "class";
case Node::Fake:
- default:
- return "documentation";
+ {
+ switch (node->subType()) {
+ case Node::QmlClass:
+ return "element";
+ case Node::QmlPropertyGroup:
+ return "property group";
+ case Node::QmlBasicType:
+ return "type";
+ default:
+ return "documentation";
+ }
+ }
case Node::Enum:
return "enum";
case Node::Typedef:
@@ -770,6 +799,8 @@ QString Generator::typeString(const Node *node)
return "function";
case Node::Property:
return "property";
+ default:
+ return "documentation";
}
}
@@ -783,10 +814,13 @@ QString Generator::imageFileName(const Node *relative, const QString& fileBase)
if (filePath.isEmpty())
return QString();
- return QLatin1String("images/")
- + Config::copyFile(relative->doc().location(),
- filePath, userFriendlyFilePath,
- outputDir() + QLatin1String("/images"));
+ QString path = Config::copyFile(relative->doc().location(),
+ filePath,
+ userFriendlyFilePath,
+ outputDir() + QLatin1String("/images"));
+ if (path[0] != '/')
+ return QLatin1String("images/") + path;
+ return QLatin1String("images") + path;
}
void Generator::setImageFileExtensions(const QStringList& extensions)
@@ -1091,11 +1125,21 @@ void Generator::generateSince(const Node *node, CodeMarker *marker)
text << " was introduced or modified in ";
else
text << " was introduced in ";
- if (project.isEmpty())
- text << "version";
- else
- text << project;
- text << " " << node->since() << "." << Atom::ParaRight;
+
+ QStringList since = node->since().split(" ");
+ if (since.count() == 1) {
+ // Handle legacy use of \since <version>.
+ if (project.isEmpty())
+ text << "version";
+ else
+ text << project;
+ text << " " << since[0];
+ } else {
+ // Reconstruct the <project> <version> string.
+ text << " " << since.join(" ");
+ }
+
+ text << "." << Atom::ParaRight;
generateText(text, node, marker);
}
}
@@ -1346,4 +1390,91 @@ QStringList Generator::getMetadataElements(const InnerNode* inner, const QString
return s;
}
+/*!
+ For generating the "New Classes... in 4.6" section on the
+ What's New in 4.6" page.
+ */
+void Generator::findAllSince(const InnerNode *node)
+{
+ NodeList::const_iterator child = node->childNodes().constBegin();
+
+ // Traverse the tree, starting at the node supplied.
+
+ while (child != node->childNodes().constEnd()) {
+
+ QString sinceString = (*child)->since();
+
+ if (((*child)->access() != Node::Private) && !sinceString.isEmpty()) {
+
+ // Insert a new entry into each map for each new since string found.
+ NewSinceMaps::iterator nsmap = newSinceMaps.find(sinceString);
+ if (nsmap == newSinceMaps.end())
+ nsmap = newSinceMaps.insert(sinceString,NodeMultiMap());
+
+ NewClassMaps::iterator ncmap = newClassMaps.find(sinceString);
+ if (ncmap == newClassMaps.end())
+ ncmap = newClassMaps.insert(sinceString,NodeMap());
+
+ NewClassMaps::iterator nqcmap = newQmlClassMaps.find(sinceString);
+ if (nqcmap == newQmlClassMaps.end())
+ nqcmap = newQmlClassMaps.insert(sinceString,NodeMap());
+
+ if ((*child)->type() == Node::Function) {
+ // Insert functions into the general since map.
+ FunctionNode *func = static_cast<FunctionNode *>(*child);
+ if ((func->status() > Node::Obsolete) &&
+ (func->metaness() != FunctionNode::Ctor) &&
+ (func->metaness() != FunctionNode::Dtor)) {
+ nsmap.value().insert(func->name(),(*child));
+ }
+ }
+ else if ((*child)->url().isEmpty()) {
+ if ((*child)->type() == Node::Class && !(*child)->doc().isEmpty()) {
+ // Insert classes into the since and class maps.
+ QString className = (*child)->name();
+ if ((*child)->parent() &&
+ (*child)->parent()->type() == Node::Namespace &&
+ !(*child)->parent()->name().isEmpty())
+ className = (*child)->parent()->name()+"::"+className;
+
+ nsmap.value().insert(className,(*child));
+ ncmap.value().insert(className,(*child));
+ }
+ else if ((*child)->subType() == Node::QmlClass) {
+ // Insert QML elements into the since and element maps.
+ QString className = (*child)->name();
+ if ((*child)->parent() &&
+ (*child)->parent()->type() == Node::Namespace &&
+ !(*child)->parent()->name().isEmpty())
+ className = (*child)->parent()->name()+"::"+className;
+
+ nsmap.value().insert(className,(*child));
+ nqcmap.value().insert(className,(*child));
+ }
+ else if ((*child)->type() == Node::QmlProperty) {
+ // Insert QML properties into the since map.
+ QString propertyName = (*child)->name();
+ nsmap.value().insert(propertyName,(*child));
+ }
+ }
+ else {
+ // Insert external documents into the general since map.
+ QString name = (*child)->name();
+ if ((*child)->parent() &&
+ (*child)->parent()->type() == Node::Namespace &&
+ !(*child)->parent()->name().isEmpty())
+ name = (*child)->parent()->name()+"::"+name;
+
+ nsmap.value().insert(name,(*child));
+ }
+
+ // Find child nodes with since commands.
+ if ((*child)->isInnerNode()) {
+ findAllSince(static_cast<InnerNode *>(*child));
+ }
+ }
+ ++child;
+ }
+}
+
QT_END_NAMESPACE
diff --git a/tools/qdoc3/generator.h b/tools/qdoc3/generator.h
index e5e974778d..e66915b9bd 100644
--- a/tools/qdoc3/generator.h
+++ b/tools/qdoc3/generator.h
@@ -57,6 +57,12 @@
QT_BEGIN_NAMESPACE
+typedef QMap<QString, const Node*> NodeMap;
+typedef QMultiMap<QString, Node*> NodeMultiMap;
+typedef QMap<QString, NodeMultiMap> NewSinceMaps;
+typedef QMap<Node*, NodeMultiMap> ParentMaps;
+typedef QMap<QString, NodeMap> NewClassMaps;
+
class ClassNode;
class Config;
class CodeMarker;
@@ -152,6 +158,7 @@ class Generator
QString getMetadataElement(const InnerNode* inner, const QString& t);
QStringList getMetadataElements(const InnerNode* inner, const QString& t);
+ void findAllSince(const InnerNode *node);
private:
void generateReimplementedFrom(const FunctionNode *func,
@@ -180,6 +187,11 @@ class Generator
const NodeList& subs,
CodeMarker *marker);
+ static QString sinceTitles[];
+ NewSinceMaps newSinceMaps;
+ NewClassMaps newClassMaps;
+ NewClassMaps newQmlClassMaps;
+
private:
QString amp;
QString lt;
diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp
index 52da1787c8..85ce9ac2be 100644
--- a/tools/qdoc3/htmlgenerator.cpp
+++ b/tools/qdoc3/htmlgenerator.cpp
@@ -66,25 +66,6 @@ bool HtmlGenerator::debugging_on = false;
QString HtmlGenerator::divNavTop = "";
-QString HtmlGenerator::sinceTitles[] =
- {
- " New Namespaces",
- " New Classes",
- " New Member Functions",
- " New Functions in Namespaces",
- " New Global Functions",
- " New Macros",
- " New Enum Types",
- " New Typedefs",
- " New Properties",
- " New Variables",
- " New QML Elements",
- " New QML Properties",
- " New QML Signals",
- " New QML Methods",
- ""
- };
-
static bool showBrokenLinks = false;
static QRegExp linkTag("(<@link node=\"([^\"]+)\">).*(</@link>)");
@@ -180,6 +161,9 @@ void HtmlGenerator::initializeGenerator(const Config &config)
pleaseGenerateMacRef = config.getBool(HtmlGenerator::format() +
Config::dot +
HTMLGENERATOR_GENERATEMACREFS);
+ noBreadCrumbs = config.getBool(HtmlGenerator::format() +
+ Config::dot +
+ HTMLGENERATOR_NOBREADCRUMBS);
project = config.getString(CONFIG_PROJECT);
@@ -276,6 +260,7 @@ void HtmlGenerator::generateTree(const Tree *tree)
generatePageIndex(outputDir() + "/" + fileBase + ".pageindex");
helpProjectWriter->generate(myTree);
+ generateManifestFiles();
}
void HtmlGenerator::startText(const Node * /* relative */,
@@ -331,8 +316,10 @@ int HtmlGenerator::generateAtom(const Atom *atom,
break;
case Atom::BriefLeft:
if (relative->type() == Node::Fake) {
- skipAhead = skipAtoms(atom, Atom::BriefRight);
- break;
+ if (relative->subType() != Node::Example) {
+ skipAhead = skipAtoms(atom, Atom::BriefRight);
+ break;
+ }
}
out() << "<p>";
@@ -606,14 +593,18 @@ int HtmlGenerator::generateAtom(const Atom *atom,
ncmap = newClassMaps.find(atom->string());
NewClassMaps::const_iterator nqcmap;
nqcmap = newQmlClassMaps.find(atom->string());
+
if ((nsmap != newSinceMaps.constEnd()) && !nsmap.value().isEmpty()) {
QList<Section> sections;
QList<Section>::ConstIterator s;
+
for (int i=0; i<LastSinceType; ++i)
sections.append(Section(sinceTitle(i),QString(),QString(),QString()));
NodeMultiMap::const_iterator n = nsmap.value().constBegin();
+
while (n != nsmap.value().constEnd()) {
+
const Node* node = n.value();
switch (node->type()) {
case Node::Fake:
@@ -765,6 +756,15 @@ int HtmlGenerator::generateAtom(const Atom *atom,
out() << " alt=\"" << protectEnc(text) << "\"";
out() << " />";
helpProjectWriter->addExtraFile(fileName);
+ if ((relative->type() == Node::Fake) &&
+ (relative->subType() == Node::Example)) {
+ const ExampleNode* cen = static_cast<const ExampleNode*>(relative);
+ if (cen->imageFileName().isEmpty()) {
+ ExampleNode* en = const_cast<ExampleNode*>(cen);
+ en->setImageFileName(fileName);
+ ExampleNode::exampleNodeMap.insert(en->title(),en);
+ }
+ }
}
if (atom->type() == Atom::Image)
out() << "</p>";
@@ -1346,6 +1346,7 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker)
// Generate brief text and status for modules.
generateBrief(fake, marker);
generateStatus(fake, marker);
+ generateSince(fake, marker);
if (moduleNamespaceMap.contains(fake->name())) {
out() << "<a name=\"" << registerRef("namespaces") << "\"></a>" << divNavTop << "\n";
@@ -1362,6 +1363,7 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker)
// Generate brief text and status for modules.
generateBrief(fake, marker);
generateStatus(fake, marker);
+ generateSince(fake, marker);
out() << "<ul>\n";
@@ -1393,6 +1395,7 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker)
generateQmlInherits(qml_cn, marker);
generateQmlInheritedBy(qml_cn, marker);
generateQmlInstantiates(qml_cn, marker);
+ generateSince(qml_cn, marker);
QString allQmlMembersLink = generateAllQmlMembersFile(qml_cn, marker);
if (!allQmlMembersLink.isEmpty()) {
@@ -1504,8 +1507,10 @@ void HtmlGenerator::generateBreadCrumbs(const QString &title,
const Node *node,
CodeMarker *marker)
{
+ if (noBreadCrumbs)
+ return;
+
Text breadcrumbs;
-
if (node->type() == Node::Class) {
const ClassNode *cn = static_cast<const ClassNode *>(node);
QString name = node->moduleName();
@@ -1792,7 +1797,6 @@ void HtmlGenerator::generateTableOfContents(const Node *node,
toc = node->doc().tableOfContents();
if (toc.isEmpty() && !sections && (node->subType() != Node::Module))
return;
- bool debug = false;
QStringList sectionNumber;
int detailsBase = 0;
@@ -2242,9 +2246,6 @@ void HtmlGenerator::generateCompactList(const Node *relative,
for (int i=0; i<NumParagraphs; i++) // i = 0..36
paragraphOffset[i+1] = paragraphOffset[i] + paragraph[i].count();
- int curParNr = 0;
- int curParOffset = 0;
-
/*
Output the alphabet as a row of links.
*/
@@ -2262,8 +2263,12 @@ void HtmlGenerator::generateCompactList(const Node *relative,
Output a <div> element to contain all the <dl> elements.
*/
out() << "<div class=\"flowListDiv\">\n";
+ numTableRows = 0;
- for (int i=0; i<classMap.count()-1; i++) {
+ int curParNr = 0;
+ int curParOffset = 0;
+
+ for (int i=0; i<classMap.count(); i++) {
while ((curParNr < NumParagraphs) &&
(curParOffset == paragraph[curParNr].count())) {
++curParNr;
@@ -2324,7 +2329,9 @@ void HtmlGenerator::generateCompactList(const Node *relative,
out() << "</dd>\n";
curParOffset++;
}
- out() << "</dl>\n";
+ if (classMap.count() > 0)
+ out() << "</dl>\n";
+
out() << "</div>\n";
}
@@ -3357,70 +3364,6 @@ void HtmlGenerator::findAllClasses(const InnerNode *node)
}
}
-/*!
- For generating the "New Classes... in 4.6" section on the
- What's New in 4.6" page.
- */
-void HtmlGenerator::findAllSince(const InnerNode *node)
-{
- NodeList::const_iterator child = node->childNodes().constBegin();
- while (child != node->childNodes().constEnd()) {
- QString sinceVersion = (*child)->since();
- if (((*child)->access() != Node::Private) && !sinceVersion.isEmpty()) {
- NewSinceMaps::iterator nsmap = newSinceMaps.find(sinceVersion);
- if (nsmap == newSinceMaps.end())
- nsmap = newSinceMaps.insert(sinceVersion,NodeMultiMap());
- NewClassMaps::iterator ncmap = newClassMaps.find(sinceVersion);
- if (ncmap == newClassMaps.end())
- ncmap = newClassMaps.insert(sinceVersion,NodeMap());
- NewClassMaps::iterator nqcmap = newQmlClassMaps.find(sinceVersion);
- if (nqcmap == newQmlClassMaps.end())
- nqcmap = newQmlClassMaps.insert(sinceVersion,NodeMap());
-
- if ((*child)->type() == Node::Function) {
- FunctionNode *func = static_cast<FunctionNode *>(*child);
- if ((func->status() > Node::Obsolete) &&
- (func->metaness() != FunctionNode::Ctor) &&
- (func->metaness() != FunctionNode::Dtor)) {
- nsmap.value().insert(func->name(),(*child));
- }
- }
- else if ((*child)->url().isEmpty()) {
- if ((*child)->type() == Node::Class && !(*child)->doc().isEmpty()) {
- QString className = (*child)->name();
- if ((*child)->parent() &&
- (*child)->parent()->type() == Node::Namespace &&
- !(*child)->parent()->name().isEmpty())
- className = (*child)->parent()->name()+"::"+className;
- nsmap.value().insert(className,(*child));
- ncmap.value().insert(className,(*child));
- }
- else if ((*child)->subType() == Node::QmlClass) {
- QString className = (*child)->name();
- if ((*child)->parent() &&
- (*child)->parent()->type() == Node::Namespace &&
- !(*child)->parent()->name().isEmpty())
- className = (*child)->parent()->name()+"::"+className;
- nsmap.value().insert(className,(*child));
- nqcmap.value().insert(className,(*child));
- }
- }
- else {
- QString name = (*child)->name();
- if ((*child)->parent() &&
- (*child)->parent()->type() == Node::Namespace &&
- !(*child)->parent()->name().isEmpty())
- name = (*child)->parent()->name()+"::"+name;
- nsmap.value().insert(name,(*child));
- }
- if ((*child)->isInnerNode()) {
- findAllSince(static_cast<InnerNode *>(*child));
- }
- }
- ++child;
- }
-}
-
void HtmlGenerator::findAllFunctions(const InnerNode *node)
{
NodeList::ConstIterator c = node->childNodes().begin();
@@ -3779,8 +3722,6 @@ void HtmlGenerator::endLink()
inObsoleteLink = false;
}
-#ifdef QDOC_QML
-
/*!
Generates the summary for the \a section. Only used for
sections of QML element documentation.
@@ -3837,7 +3778,8 @@ void HtmlGenerator::generateDetailedQmlMember(const Node *node,
out() << "<a name=\"" + refForNode(qpn) + "\"></a>";
- if (!qpn->isWritable(myTree)) {
+ const ClassNode* cn = qpn->declarativeCppNode();
+ if (cn && !qpn->isWritable(myTree)) {
out() << "<span class=\"qmlreadonly\">read-only</span>";
}
if (qpgn->isDefault())
@@ -4266,7 +4208,6 @@ QString HtmlGenerator::fullDocumentLocation(const Node *node)
return "";
}
else if (node->type() == Node::Fake) {
-#ifdef QDOC_QML
if ((node->subType() == Node::QmlClass) ||
(node->subType() == Node::QmlBasicType)) {
QString fb = node->fileBase();
@@ -4274,9 +4215,9 @@ QString HtmlGenerator::fullDocumentLocation(const Node *node)
return fb + ".html";
else
return Generator::outputPrefix(QLatin1String("QML")) + node->fileBase() + QLatin1String(".html");
- } else
-#endif
- parentName = node->fileBase() + ".html";
+ }
+ else
+ parentName = node->fileBase() + ".html";
}
else if (node->fileBase().isEmpty())
return "";
@@ -4387,6 +4328,165 @@ QString HtmlGenerator::fullDocumentLocation(const Node *node)
return parentName.toLower() + anchorRef;
}
-#endif
+/*!
+ This function outputs one or more manifest files in XML.
+ They are used by Creator.
+ */
+void HtmlGenerator::generateManifestFiles()
+{
+ generateManifestFile("examples", "example");
+ generateManifestFile("demos", "demo");
+ ExampleNode::exampleNodeMap.clear();
+}
+
+/*!
+ This function is called by generaqteManiferstFile(), once
+ for each manifest file to be generated. \a manifest is the
+ type of manifest file.
+ */
+void HtmlGenerator::generateManifestFile(QString manifest, QString element)
+{
+ if (ExampleNode::exampleNodeMap.isEmpty())
+ return;
+ QString fileName = manifest +"-manifest.xml";
+ QFile file(outputDir() + "/" + fileName);
+ if (!file.open(QFile::WriteOnly | QFile::Text))
+ return ;
+ bool demos = false;
+ if (manifest == "demos")
+ demos = true;
+
+ bool proceed = false;
+ ExampleNodeMap::Iterator i = ExampleNode::exampleNodeMap.begin();
+ while (i != ExampleNode::exampleNodeMap.end()) {
+ const ExampleNode* en = i.value();
+ if (demos) {
+ if (en->name().startsWith("demos")) {
+ proceed = true;
+ break;
+ }
+ }
+ else if (!en->name().startsWith("demos")) {
+ proceed = true;
+ break;
+ }
+ ++i;
+ }
+ if (!proceed)
+ return;
+
+ QXmlStreamWriter writer(&file);
+ writer.setAutoFormatting(true);
+ writer.writeStartDocument();
+ writer.writeStartElement("instructionals");
+ writer.writeAttribute("module", project);
+ writer.writeStartElement(manifest);
+
+ i = ExampleNode::exampleNodeMap.begin();
+ while (i != ExampleNode::exampleNodeMap.end()) {
+ const ExampleNode* en = i.value();
+ if (demos) {
+ if (!en->name().startsWith("demos")) {
+ ++i;
+ continue;
+ }
+ }
+ else if (en->name().startsWith("demos")) {
+ ++i;
+ continue;
+ }
+ writer.writeStartElement(element);
+ writer.writeAttribute("name", en->title());
+ //QString docUrl = projectUrl + "/" + en->fileBase() + ".html";
+ QString docUrl = "%REPLACEME%/" + en->fileBase() + ".html";
+ writer.writeAttribute("docUrl", docUrl);
+ foreach (const Node* child, en->childNodes()) {
+ if (child->subType() == Node::File) {
+ QString file = child->name();
+ if (file.endsWith(".pro") || file.endsWith(".qmlproject")) {
+ if (file.startsWith("demos/"))
+ file = file.mid(6);
+ writer.writeAttribute("projectPath", file);
+ break;
+ }
+ }
+ }
+ //writer.writeAttribute("imageUrl", projectUrl + "/" + en->imageFileName());
+ writer.writeAttribute("imageUrl", "%REPLACEME%/" + en->imageFileName());
+ writer.writeStartElement("description");
+ Text brief = en->doc().briefText();
+ if (!brief.isEmpty())
+ writer.writeCDATA(brief.toString());
+ else
+ writer.writeCDATA(QString("No description available"));
+ writer.writeEndElement(); // description
+ QStringList tags = en->title().toLower().split(" ");
+ if (!tags.isEmpty()) {
+ writer.writeStartElement("tags");
+ bool wrote_one = false;
+ for (int n=0; n<tags.size(); ++n) {
+ QString tag = tags.at(n);
+ if (tag.at(0).isDigit())
+ continue;
+ if (tag.at(0) == '-')
+ continue;
+ if (tag.startsWith("example"))
+ continue;
+ if (tag.startsWith("chapter"))
+ continue;
+ if (tag.endsWith(":"))
+ tag.chop(1);
+ if (n>0 && wrote_one)
+ writer.writeCharacters(",");
+ writer.writeCharacters(tag);
+ wrote_one = true;
+ }
+ writer.writeEndElement(); // tags
+ }
+
+ QString ename = en->name().mid(en->name().lastIndexOf('/')+1);
+ QSet<QString> usedNames;
+ foreach (const Node* child, en->childNodes()) {
+ if (child->subType() == Node::File) {
+ QString file = child->name();
+ QString fileName = file.mid(file.lastIndexOf('/')+1);
+ QString baseName = fileName;
+ if ((fileName.count(QChar('.')) > 0) &&
+ (fileName.endsWith(".cpp") ||
+ fileName.endsWith(".h") ||
+ fileName.endsWith(".qml")))
+ baseName.truncate(baseName.lastIndexOf(QChar('.')));
+ if (baseName.toLower() == ename) {
+ if (!usedNames.contains(fileName)) {
+ writer.writeStartElement("fileToOpen");
+ if (file.startsWith("demos/"))
+ file = file.mid(6);
+ writer.writeCharacters(file);
+ writer.writeEndElement(); // fileToOpen
+ usedNames.insert(fileName);
+ }
+ }
+ else if (fileName.toLower().endsWith("main.cpp") ||
+ fileName.toLower().endsWith("main.qml")) {
+ if (!usedNames.contains(fileName)) {
+ writer.writeStartElement("fileToOpen");
+ if (file.startsWith("demos/"))
+ file = file.mid(6);
+ writer.writeCharacters(file);
+ writer.writeEndElement(); // fileToOpen
+ usedNames.insert(fileName);
+ }
+ }
+ }
+ }
+ writer.writeEndElement(); // example
+ ++i;
+ }
+
+ writer.writeEndElement(); // examples
+ writer.writeEndElement(); // instructionals
+ writer.writeEndDocument();
+ file.close();
+}
QT_END_NAMESPACE
diff --git a/tools/qdoc3/htmlgenerator.h b/tools/qdoc3/htmlgenerator.h
index 70ec0b7e25..62a7f60523 100644
--- a/tools/qdoc3/htmlgenerator.h
+++ b/tools/qdoc3/htmlgenerator.h
@@ -56,12 +56,6 @@
QT_BEGIN_NAMESPACE
-typedef QMultiMap<QString, Node*> NodeMultiMap;
-typedef QMap<QString, NodeMultiMap> NewSinceMaps;
-typedef QMap<Node*, NodeMultiMap> ParentMaps;
-typedef QMap<QString, const Node*> NodeMap;
-typedef QMap<QString, NodeMap> NewClassMaps;
-
class HelpProjectWriter;
class HtmlGenerator : public PageGenerator
@@ -93,6 +87,7 @@ class HtmlGenerator : public PageGenerator
virtual void terminateGenerator();
virtual QString format();
virtual void generateTree(const Tree *tree);
+ void generateManifestFiles();
QString protectEnc(const QString &string);
static QString protect(const QString &string, const QString &encoding = "ISO-8859-1");
@@ -112,6 +107,8 @@ class HtmlGenerator : public PageGenerator
virtual QString linkForNode(const Node *node, const Node *relative);
virtual QString refForAtom(Atom *atom, const Node *node);
+ void generateManifestFile(QString manifest, QString element);
+
private:
enum SubTitleSize { SmallSubTitle, LargeSubTitle };
enum ExtractionMarkType {
@@ -224,7 +221,6 @@ class HtmlGenerator : public PageGenerator
void findAllFunctions(const InnerNode *node);
void findAllLegaleseTexts(const InnerNode *node);
void findAllNamespaces(const InnerNode *node);
- void findAllSince(const InnerNode *node);
static int hOffset(const Node *node);
static bool isThreeColumnEnumValueTable(const Atom *atom);
virtual QString getLink(const Atom *atom,
@@ -273,6 +269,7 @@ class HtmlGenerator : public PageGenerator
QString footer;
QString address;
bool pleaseGenerateMacRef;
+ bool noBreadCrumbs;
QString project;
QString projectDescription;
QString projectUrl;
@@ -292,10 +289,6 @@ class HtmlGenerator : public PageGenerator
NodeMap qmlClasses;
QMap<QString, NodeMap > funcIndex;
QMap<Text, const Node *> legaleseTexts;
- NewSinceMaps newSinceMaps;
- static QString sinceTitles[];
- NewClassMaps newClassMaps;
- NewClassMaps newQmlClassMaps;
static int id;
public:
static bool debugging_on;
@@ -307,6 +300,7 @@ class HtmlGenerator : public PageGenerator
#define HTMLGENERATOR_GENERATEMACREFS "generatemacrefs" // ### document me
#define HTMLGENERATOR_POSTHEADER "postheader"
#define HTMLGENERATOR_POSTPOSTHEADER "postpostheader"
+#define HTMLGENERATOR_NOBREADCRUMBS "nobreadcrumbs"
QT_END_NAMESPACE
diff --git a/tools/qdoc3/node.cpp b/tools/qdoc3/node.cpp
index 94b51f02fc..709f03f472 100644
--- a/tools/qdoc3/node.cpp
+++ b/tools/qdoc3/node.cpp
@@ -51,6 +51,8 @@
QT_BEGIN_NAMESPACE
+ExampleNodeMap ExampleNode::exampleNodeMap;
+
/*!
\class Node
\brief The Node class is a node in the Tree.
@@ -157,6 +159,16 @@ void Node::setLink(LinkType linkType, const QString &link, const QString &desc)
}
/*!
+ Sets the information about the project and version a node was introduced
+ in. The string is simplified, removing excess whitespace before being
+ stored.
+*/
+void Node::setSince(const QString &since)
+{
+ sinc = since.simplified();
+}
+
+/*!
Returns a string representing the access specifier.
*/
QString Node::accessString() const
@@ -307,6 +319,38 @@ QString Node::ditaXmlHref()
}
/*!
+ If this node is a QML class node, return a pointer to it.
+ If it is a child of a QML class node, return a pointer to
+ the QML class node. Otherwise, return 0;
+ */
+const QmlClassNode* Node::qmlClassNode() const
+{
+ if (isQmlNode()) {
+ const Node* n = this;
+ while (n && n->subType() != Node::QmlClass)
+ n = n->parent();
+ if (n && n->subType() == Node::QmlClass)
+ return static_cast<const QmlClassNode*>(n);
+ }
+ return 0;
+}
+
+/*!
+ If this node is a QML node, find its QML class node,
+ and return a pointer to the C++ class node from the
+ QML class node. That pointer will be null if the QML
+ class node is a component. It will be non-null if
+ the QML class node is a QML element.
+ */
+const ClassNode* Node::declarativeCppNode() const
+{
+ const QmlClassNode* qcn = qmlClassNode();
+ if (qcn)
+ return qcn->classNode();
+ return 0;
+}
+
+/*!
\class InnerNode
*/
@@ -1063,6 +1107,16 @@ QString FakeNode::subTitle() const
}
/*!
+ The constructor calls the FakeNode constructor with
+ \a parent, \a name, and Node::Example.
+ */
+ExampleNode::ExampleNode(InnerNode* parent, const QString& name)
+ : FakeNode(parent, name, Node::Example)
+{
+ // nothing
+}
+
+/*!
\class EnumNode
*/
diff --git a/tools/qdoc3/node.h b/tools/qdoc3/node.h
index e1e9440906..a08151a2a9 100644
--- a/tools/qdoc3/node.h
+++ b/tools/qdoc3/node.h
@@ -58,7 +58,15 @@
QT_BEGIN_NAMESPACE
+class Node;
+class ClassNode;
class InnerNode;
+class ExampleNode;
+class QmlClassNode;
+
+typedef QMap<QString, const Node*> NodeMap;
+typedef QMultiMap<QString, Node*> NodeMultiMap;
+typedef QMap<QString, const ExampleNode*> ExampleNodeMap;
class Node
{
@@ -151,7 +159,7 @@ class Node
void setDoc(const Doc& doc, bool replace = false);
void setStatus(Status status) { sta = status; }
void setThreadSafeness(ThreadSafeness safeness) { saf = safeness; }
- void setSince(const QString &since) { sinc = since; }
+ void setSince(const QString &since);
void setRelates(InnerNode* pseudoParent);
void setModuleName(const QString &module) { mod = module; }
void setLink(LinkType linkType, const QString &link, const QString &desc);
@@ -194,6 +202,8 @@ class Node
QString guid() const;
QString ditaXmlHref();
QString extractClassName(const QString &string) const;
+ const QmlClassNode* qmlClassNode() const;
+ const ClassNode* declarativeCppNode() const;
protected:
Node(Type type, InnerNode* parent, const QString& name);
@@ -380,8 +390,10 @@ class FakeNode : public InnerNode
virtual QString title() const;
virtual QString fullTitle() const;
virtual QString subTitle() const;
+ virtual QString imageFileName() const { return QString(); }
const NodeList &groupMembers() const { return gr; }
virtual QString nameForLists() const { return title(); }
+ virtual void setImageFileName(const QString& ) { }
private:
SubType sub;
@@ -390,7 +402,21 @@ class FakeNode : public InnerNode
NodeList gr;
};
-#ifdef QDOC_QML
+class ExampleNode : public FakeNode
+{
+ public:
+ ExampleNode(InnerNode* parent, const QString& name);
+ virtual ~ExampleNode() { }
+ virtual QString imageFileName() const { return imageFileName_; }
+ virtual void setImageFileName(const QString& ifn) { imageFileName_ = ifn; }
+
+ public:
+ static ExampleNodeMap exampleNodeMap;
+
+ private:
+ QString imageFileName_;
+};
+
class QmlClassNode : public FakeNode
{
public:
@@ -482,7 +508,6 @@ class QmlPropertyNode : public LeafNode
Trool wri;
bool att;
};
-#endif
class EnumItem
{
diff --git a/tools/qvfb/qvfb.pro b/tools/qvfb/qvfb.pro
index 29ce202cb4..df68c972f9 100644
--- a/tools/qvfb/qvfb.pro
+++ b/tools/qvfb/qvfb.pro
@@ -8,6 +8,9 @@ DESTDIR = ../../bin
target.path=$$[QT_INSTALL_BINS]
INSTALLS += target
+DEPENDPATH += ../../include
+INCLUDEPATH += ../../src/gui/embedded
+
FORMS = config.ui
HEADERS = qvfb.h \
qvfbview.h \
@@ -27,6 +30,12 @@ SOURCES = qvfb.cpp \
qvfbshmem.cpp \
qvfbmmap.cpp
+!embedded {
+ DEFINES += QT_NO_QWS_SIGNALHANDLER
+ HEADERS += ../../src/gui/embedded/qlock_p.h
+ SOURCES += ../../src/gui/embedded/qlock.cpp
+}
+
include(../shared/deviceskin/deviceskin.pri)
contains(QT_CONFIG, opengl) {
diff --git a/tools/qvfb/qvfbshmem.cpp b/tools/qvfb/qvfbshmem.cpp
index c17a6808a5..c9a4293501 100644
--- a/tools/qvfb/qvfbshmem.cpp
+++ b/tools/qvfb/qvfbshmem.cpp
@@ -39,9 +39,11 @@
**
****************************************************************************/
+#include <qplatformdefs.h>
+
#include "qvfbshmem.h"
-#include <qvfbhdr.h>
-#include <private/qlock_p.h>
+#include "qvfbhdr.h"
+#include "qlock_p.h"
#include <QFile>
#include <QTimer>