summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-08-31 16:34:02 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-08-31 16:34:02 (GMT)
commitf14bbde351d90bed520f9503500f922f7aa18c92 (patch)
tree86fe9e3930aa3edbc142c207891d5856921270c3
parente546ecd3afd6660432178f2e9f692f8fcd16a712 (diff)
parent9c5f08452da280a90de48d0fa3862748cc428df4 (diff)
downloadQt-f14bbde351d90bed520f9503500f922f7aa18c92.zip
Qt-f14bbde351d90bed520f9503500f922f7aa18c92.tar.gz
Qt-f14bbde351d90bed520f9503500f922f7aa18c92.tar.bz2
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-doc-staging into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/qt-doc-staging: (25 commits) qdoc3: Updates to qdoc to print error message in ALL CAPS Doc: Added a note to Code Editor example docs Doc: QItemDelegate->QStyledItemDelegate in Star Delegate docs Doc: Added a link in Symbian Intro to Required Capabilities Doc: Added info on ordered targets for VS to qmake manual Doc: Small addition to the QML anchor layout docs Doc: Internalized QDeclarativeTypeLoader Doc: Said that QIODevice::isSequential returns false by default Doc: Said that QList::clear deallocates memory Doc: Updated platform notes for MultiMedia and Phonon Doc: Added links to the plugin deployment guide. Doc: Fix doc bug in QMouseEvent Doc: Fixed doc bug in QMetaObject Doc: Fixed date format doc bug in QDateTime/Qt namespace Doc: Removed internal Phonon classes from doce qdoc3: Updates for QTBUG-20776; include fileToOpen path. qdoc3: Updates for QTBUG-20776; clear map between runs. qdoc3: Updates for QTBUG-20739 (no read-only for QML components) qdoc3: Updates for QTBUG-20776 and QTBUG-20777 qdoc: Check pointer for null before dereferencing. ...
-rw-r--r--doc/src/classes/phonon-api.qdoc24
-rw-r--r--doc/src/declarative/anchor-layout.qdoc7
-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/platforms/platform-notes.qdoc27
-rw-r--r--doc/src/platforms/symbian-introduction.qdoc2
-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/tools/qdatetime.cpp4
-rw-r--r--src/corelib/tools/qlist.cpp4
-rw-r--r--src/declarative/qml/qdeclarativetypeloader.cpp5
-rw-r--r--src/gui/kernel/qevent.cpp3
-rw-r--r--tools/qdoc3/codemarker.cpp2
-rw-r--r--tools/qdoc3/codeparser.cpp3
-rw-r--r--tools/qdoc3/cppcodemarker.cpp18
-rw-r--r--tools/qdoc3/cppcodeparser.cpp17
-rw-r--r--tools/qdoc3/ditaxmlgenerator.cpp10
-rw-r--r--tools/qdoc3/doc.cpp4
-rw-r--r--tools/qdoc3/generator.h6
-rw-r--r--tools/qdoc3/htmlgenerator.cpp199
-rw-r--r--tools/qdoc3/htmlgenerator.h5
-rw-r--r--tools/qdoc3/node.cpp44
-rw-r--r--tools/qdoc3/node.h29
27 files changed, 436 insertions, 81 deletions
diff --git a/doc/src/classes/phonon-api.qdoc b/doc/src/classes/phonon-api.qdoc
index 95e20dd..d1b26f6 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 41b04e8..e93e539 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/deployment/deployment.qdoc b/doc/src/deployment/deployment.qdoc
index a13e2b8..ecb9ec6 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 2c7fda2..0f85469 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 114c22b..f19582d 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 435f650..1718d52 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 3b009d5..ed3ae7e 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/platforms/platform-notes.qdoc b/doc/src/platforms/platform-notes.qdoc
index 175cf1c..477f125 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/symbian-introduction.qdoc b/doc/src/platforms/symbian-introduction.qdoc
index 9b1eea2..e5d4a16 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/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc
index dc92866..4974aef 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 ea00cb4..dae4e82 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 b4c37f4..8597fa3 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/tools/qdatetime.cpp b/src/corelib/tools/qdatetime.cpp
index e33b7d5..e1b4232 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/qlist.cpp b/src/corelib/tools/qlist.cpp
index e68ddd5..18bfe24 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/qml/qdeclarativetypeloader.cpp b/src/declarative/qml/qdeclarativetypeloader.cpp
index 168c151..82197dc 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/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp
index de2d87e..e1df267 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/tools/qdoc3/codemarker.cpp b/tools/qdoc3/codemarker.cpp
index 614419e..705ef6c 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 c7a8912..9ab5f82 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 71b4e90..75d6094 100644
--- a/tools/qdoc3/cppcodemarker.cpp
+++ b/tools/qdoc3/cppcodemarker.cpp
@@ -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 6f5baa0..1a4c344 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 fc66923..4393e8d 100644
--- a/tools/qdoc3/ditaxmlgenerator.cpp
+++ b/tools/qdoc3/ditaxmlgenerator.cpp
@@ -76,7 +76,7 @@ QString DitaXmlGenerator::sinceTitles[] =
" New Variables",
" New QML Elements",
" New Qml Properties",
- " New Qml Signals",
+ " New Qml Signal Handlers",
" New Qml Methods",
""
};
@@ -770,7 +770,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>
}
@@ -3408,6 +3408,7 @@ void DitaXmlGenerator::writeText(const QString& markedCode,
"<@type>", "<@type>",
"<@headerfile>", "<@headerfile>",
"<@func>", "<@func>",
+ "<@func ", "<@func ",
"<@param>", "<@param>",
"<@extra>", "<@extra>",
"</@link>", "</@link>",
@@ -3420,7 +3421,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];
@@ -4397,7 +4398,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/doc.cpp b/tools/qdoc3/doc.cpp
index 479931d..f0c4264 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
@@ -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.h b/tools/qdoc3/generator.h
index e5e9747..bac7c61 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;
diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp
index 52da178..e79e180 100644
--- a/tools/qdoc3/htmlgenerator.cpp
+++ b/tools/qdoc3/htmlgenerator.cpp
@@ -80,7 +80,7 @@ QString HtmlGenerator::sinceTitles[] =
" New Variables",
" New QML Elements",
" New QML Properties",
- " New QML Signals",
+ " New QML Signal Handlers",
" New QML Methods",
""
};
@@ -180,6 +180,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 +279,7 @@ void HtmlGenerator::generateTree(const Tree *tree)
generatePageIndex(outputDir() + "/" + fileBase + ".pageindex");
helpProjectWriter->generate(myTree);
+ generateManifestFiles();
}
void HtmlGenerator::startText(const Node * /* relative */,
@@ -331,8 +335,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>";
@@ -765,6 +771,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>";
@@ -1504,8 +1519,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 +1809,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;
@@ -3779,8 +3795,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 +3851,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 +4281,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 +4288,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 +4401,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 70ec0b7..70508a0 100644
--- a/tools/qdoc3/htmlgenerator.h
+++ b/tools/qdoc3/htmlgenerator.h
@@ -93,6 +93,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 +113,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 {
@@ -273,6 +276,7 @@ class HtmlGenerator : public PageGenerator
QString footer;
QString address;
bool pleaseGenerateMacRef;
+ bool noBreadCrumbs;
QString project;
QString projectDescription;
QString projectUrl;
@@ -307,6 +311,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 94b51f0..41de23e 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.
@@ -307,6 +309,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 +1097,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 e1e9440..3b031b6 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
{
@@ -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
{