summaryrefslogtreecommitdiffstats
path: root/doc/src
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/declarative/modules.qdoc123
-rw-r--r--doc/src/development/qmake-manual.qdoc49
-rw-r--r--doc/src/examples/ftp.qdoc4
-rw-r--r--doc/src/examples/wheel.qdoc109
-rw-r--r--doc/src/platforms/platform-notes.qdoc2
-rw-r--r--doc/src/snippets/qstring/stringbuilder.cpp7
-rwxr-xr-xdoc/src/template/scripts/functions.js2
7 files changed, 178 insertions, 118 deletions
diff --git a/doc/src/declarative/modules.qdoc b/doc/src/declarative/modules.qdoc
index dbc8806..f2e24f2 100644
--- a/doc/src/declarative/modules.qdoc
+++ b/doc/src/declarative/modules.qdoc
@@ -310,6 +310,7 @@ It is defined by a plain text file named "qmldir" that contains one or more line
<TypeName> [<InitialVersion>] <File>
internal <TypeName> <File>
plugin <Name> [<Path>]
+typeinfo <File>
\endcode
\bold {# <Comment>} lines are used for comments. They are ignored by the QML engine.
@@ -350,6 +351,14 @@ plugin file, or a relative path from the directory containing the \c qmldir file
containing the plugin file. By default the engine searches for the plugin library in the directory that contains the \c qmldir
file. The plugin search path can be queried with QDeclarativeEngine::pluginPathList() and modified using QDeclarativeEngine::addPluginPath(). When running the \l {QML Viewer}, use the \c -P option to add paths to the plugin search path.
+\bold {typeinfo <File>} lines add \l{Writing a qmltypes file}{type description files} to
+the module that can be read by QML tools such as Qt Creator to get information about the
+types defined by the module's plugins. <File> is the (relative) file name of a .qmltypes
+file.
+
+Without such a file QML tools may be unable to offer features such as code completion
+for the types defined in your plugins.
+
\section1 Debugging
@@ -358,5 +367,119 @@ when there are problems with finding and loading modules. See
\l{Debugging module imports} for more information.
+\section1 Writing a qmltypes file
+
+QML modules may refer to one or more type information files in their
+\l{Writing a qmldir file}{qmldir} file. These usually have the .qmltypes
+extension and are read by external tools to gain information about
+types defined in plugins.
+
+As such qmltypes files have no effect on the functionality of a QML module.
+Their only use is to allow tools such as Qt Creator to provide code completion,
+error checking and other functionality to users of your module.
+
+Any module that uses plugins should also ship a type description file.
+
+The best way to create a qmltypes file for your module is to generate it
+using the \c qmlplugindump tool that is provided with Qt.
+
+Example:
+If your module is in \c /tmp/imports/My/Module, you could run
+\code
+qmlplugindump My.Module 1.0 /tmp/imports > /tmp/imports/My/Module/mymodule.qmltypes
+\endcode
+to generate type information for your module. Afterwards, add the line
+\code
+typeinfo mymodule.qmltypes
+\endcode
+to \c /tmp/imports/My/Module/qmldir to register it.
+
+While the qmldump tool covers most cases, it does not work if:
+\list
+\o The plugin uses a \l{QDeclarativeCustomParser}. The component that uses
+ the custom parser will not get its members documented.
+\o The plugin can not be loaded. In particular if you cross-compiled
+ the plugin for a different architecture, qmldump will not be able to
+ load it.
+\endlist
+
+In case you have to create a qmltypes file manually or need to adjust
+an existing one, this is the file format:
+
+\qml
+import QtQuick.tooling 1.0
+
+// There always is a single Module object that contains all
+// Component objects.
+Module {
+ // A Component object directly corresponds to a type exported
+ // in a plugin with a call to qmlRegisterType.
+ Component {
+
+ // The name is a unique identifier used to refer to this type.
+ // It is recommended you simply use the C++ type name.
+ name: "QDeclarativeAbstractAnimation"
+
+ // The name of the prototype Component.
+ prototype: "QObject"
+
+ // The name of the default property.
+ defaultProperty: "animations"
+
+ // The name of the type containing attached properties
+ // and methods.
+ attachedType: "QDeclarativeAnimationAttached"
+
+ // The list of exports determines how a type can be imported.
+ // Each string has the format "URI/Name version" and matches the
+ // arguments to qmlRegisterType. Usually types are only exported
+ // once, if at all.
+ // If the "URI/" part of the string is missing that means the
+ // type should be put into the package defined by the URI the
+ // module was imported with.
+ // For example if this module was imported with 'import Foo 4.8'
+ // the Animation object would be found in the package Foo and
+ // QtQuick.
+ exports: [
+ "Animation 4.7",
+ "QtQuick/Animation 1.0"
+ ]
+
+ Property {
+ name: "animations";
+ type: "QDeclarativeAbstractAnimation"
+ // defaults to false, whether this property is read only
+ isReadonly: true
+ // defaults to false, whether the type of this property was a pointer in C++
+ isPointer: true
+ // defaults to false: whether the type actually is a QDeclarativeListProperty<type>
+ isList: true
+ }
+ Property { name: "loops"; type: "int" }
+ Property { name: "name"; type: "string" }
+ Property { name: "loopsEnum"; type: "Loops" }
+
+ Enum {
+ name: "Loops"
+ values: {
+ "Infinite": -2,
+ "OnceOnly": 1
+ }
+ }
+
+ // Signal and Method work the same way. The inner Parameter
+ // declarations also support the isReadonly, isPointer and isList
+ // attributes which mean the same as for Property
+ Method { name: "restart" }
+ Signal { name: "started" }
+ Signal {
+ name: "runningChanged"
+ Parameter { type: "bool" }
+ Parameter { name: "foo"; type: "bool" }
+ }
+ }
+}
+\endqml
+
*/
/
diff --git a/doc/src/development/qmake-manual.qdoc b/doc/src/development/qmake-manual.qdoc
index 2bc8a34..0149da2 100644
--- a/doc/src/development/qmake-manual.qdoc
+++ b/doc/src/development/qmake-manual.qdoc
@@ -1120,6 +1120,44 @@
\tableofcontents{3}
+
+ \target BACKUP_REGISTRATION_FILE_MAEMO
+ \section1 BACKUP_REGISTRATION_FILE_MAEMO
+
+ \e {This is only used on the Maemo platform.}
+
+ This variable is used to specify the backup registration file to use with
+ \c enable_backup \c CONFIG value for Maemo platform. The default value is:
+ \c{$$_PRO_FILE_PWD_/backup_registration/maemo/$$basename(TARGET).conf}.
+
+ Unfortunately it is not possible to have a common registration file for Maemo like there is
+ for Symbian, so the developer must always provide one if the platform default backup support is
+ not sufficient.
+
+ For documentation about how to create backup registration files and how the device
+ backup works in general, see:
+ (\l{http://wiki.maemo.org/Documentation/Maemo_5_Developer_Guide/Generic_Platform_Components/Using_Backup_Application}{Using Backup Application})
+
+ \target BACKUP_REGISTRATION_FILE_SYMBIAN
+ \section1 BACKUP_REGISTRATION_FILE_SYMBIAN
+
+ \e {This is only used on the Symbian platform.}
+
+ This variable is used to specify the backup registration file to use with
+ \c enable_backup \c CONFIG value for Symbian platform. The default value is
+ determined as follows:
+
+ If a custom registration file \c{$$_PRO_FILE_PWD_/backup_registration/symbian/backup_registration.xml}
+ exists, it is used. Otherwise, the common registration file \c{$$[QT_INSTALL_DATA]/mkspecs/common/symbian/backup_registration.xml}
+ is used. This common registration file will define backing up of application binaries,
+ resources, and all files under application private directory. Also note that \c{C:/Data}
+ contents are backed up by default on Symbian devices, so no registration is needed for any
+ files found there.
+
+ For documentation about how to create backup registration files and how the device
+ backup works in general, see:
+ (\l{http://library.forum.nokia.com/index.jsp?topic=/S60_5th_Edition_Cpp_Developers_Library/GUID-35228542-8C95-4849-A73F-2B4F082F0C44/sdk/doc_source/guide/Connectivity-subsystem-guide/Connectivity/PC_Connectivity_How-To_Write_Backup_Aware_Software.html}{How-To Write Backup-aware Software})
+
\target BLD_INF_RULES
\section1 BLD_INF_RULES
@@ -1341,6 +1379,17 @@
so some \c{.ts} files may be ignored by qmake.
\endtable
+ These options only have an effect on Symbian and Maemo platforms:
+
+ \table 95%
+ \header \o Option \o Description
+ \row \o enable_backup \o Generates deployment for backup registration file
+ to enable backing up the application during device backup.
+ See \l{#BACKUP_REGISTRATION_FILE_MAEMO}{BACKUP_REGISTRATION_FILE_MAEMO}
+ and \l{#BACKUP_REGISTRATION_FILE_SYMBIAN}{BACKUP_REGISTRATION_FILE_SYMBIAN}
+ for more information about backup.
+ \endtable
+
These options have an effect on Linux/Unix platforms:
\table 95%
diff --git a/doc/src/examples/ftp.qdoc b/doc/src/examples/ftp.qdoc
index 4fa2cfd..841d298 100644
--- a/doc/src/examples/ftp.qdoc
+++ b/doc/src/examples/ftp.qdoc
@@ -131,7 +131,9 @@
\snippet examples/network/qftp/ftpwindow.cpp 5
- QFtp supports canceling the download of files.
+ QFtp supports canceling the download of files. We make sure that
+ any file that is currently being written to is closed and removed,
+ and tidy up by deleting the file object.
\snippet examples/network/qftp/ftpwindow.cpp 6
diff --git a/doc/src/examples/wheel.qdoc b/doc/src/examples/wheel.qdoc
deleted file mode 100644
index 995ff87..0000000
--- a/doc/src/examples/wheel.qdoc
+++ /dev/null
@@ -1,109 +0,0 @@
-/****************************************************************************
-**
-** 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$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU 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.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \example scroller/wheel
- \title Wheel Scroller Example
-
- The Wheel Scroller Example shows how to use QScroller, QScrollEvent
- and QScrollPrepareEvent to implement smooth scrolling for a
- custom Widget.
-
- \section1 Basics
-
- The QScroller class is the main part of the smooth scrolling
- mechanism in Qt. It keeps track of the current scroll position and
- speed and updates the object through events.
- QScroller will get touch events via the QFlickGesture.
- It will query the target object through a QScrollPrepareEvent for
- the scroll area and other information.
- QScroller will send QScrollEvents to inform the target object about
- the current scroll position.
- The target object (usually a QWidget or a QGraphicsObject) will
- then need to update it's graphical representation to reflect the
- new scroll position.
-
- \section1 The Wheel Widget class
-
- To demonstrate how to use the QScroller we implement a QWidget that
- looks and works like the wheel of a slot machine.
- The wheel can be started via touch events and will continue getting
- slower.
- Additionally the wheel should appear as if no border exists (which
- would seem unnatural) and the scrolling should snap to center one
- item.
-
- In the widget we need to grab the QFlickGesture. The gesture itself
- will setAcceptTouchEvents for us, so we don't need to do that here.
-
- \snippet examples/scroller/wheel/wheelwidget.cpp 0
-
- The widget will get gesture events but in addition we also will
- get the events from QScroller.
- We will need to accept the QScrollPrepareEvent to indicate that
- a scrolling should really be started from the given position.
-
- \snippet examples/scroller/wheel/wheelwidget.cpp 1
-
- We should call all three set functions form QScrollPrepareEvent.
-
- \list
- \o \c setViewportSize to indicate our viewport size. Actually the
- given code could be improved by giving our size minus the borders.
- \o \c setMaxContentPos to indicate the maximum values for the scroll
- position. The minimum values are implicitely set to 0.
- In our example we give a very high number here and hope that the user
- is not patient enough to scroll until the very end.
- \o \c setContentPos to indicate the current scroll position.
- We give a position in the middle of the huge scroll area.
- Actually we give this position every time a new scroll is started so
- the user will only reach the end if he continuously scrolls in one
- direction which is not very likely.
- \endlist
-
- The handling of the QScrollEvent is a lengthly code not fully shown here.
- \snippet examples/scroller/wheel/wheelwidget.cpp 2
-
- In principle it does three steps.
- \list
- \o It calculates and updates the current scroll position as given by
- QScroller.
- \o It repaints the widget so that the new position is shown.
- \o It centers the item as soon as the scrolling stopps.
- \endlist
-
- The following code does the centering.
- \snippet examples/scroller/wheel/wheelwidget.cpp 3
-
- We check if the scrolling is finished which is indicated in the
- QScrollEvent by the \c isLast flag.
- We then check if the item is not already centered and if not start a new
- scroll by calling QScroller::scrollTo.
-
- As you can see the QScroller can be used for other things besides simple
- scroll areas.
-*/
diff --git a/doc/src/platforms/platform-notes.qdoc b/doc/src/platforms/platform-notes.qdoc
index 24b297f..aa39957 100644
--- a/doc/src/platforms/platform-notes.qdoc
+++ b/doc/src/platforms/platform-notes.qdoc
@@ -612,7 +612,7 @@
Qt::WA_MacNormalSize, Qt::WA_MacSmallSize, Qt::WA_MacMiniSize, Qt::WA_MacVariableSize,
Qt::WA_MacBrushedMetal, Qt::WA_MacAlwaysShowToolWindow, Qt::WA_MacFrameworkScaled,
Qt::WA_MacNoShadow, Qt::Sheet, Qt::Drawer, Qt::MacWindowToolBarButtonHint,
- QMainWindow::unifiedTitleAndToolBarOnMac
+ QMainWindow::unifiedTitleAndToolBarOnMac, WA_MacNoCocoaChildWindow
\section2 Mixing Qt with native code
Two classes are awailable for either adding native Cocoa views/controls
diff --git a/doc/src/snippets/qstring/stringbuilder.cpp b/doc/src/snippets/qstring/stringbuilder.cpp
index 8ff1dd8..b8acbc1 100644
--- a/doc/src/snippets/qstring/stringbuilder.cpp
+++ b/doc/src/snippets/qstring/stringbuilder.cpp
@@ -49,14 +49,9 @@
//! [0]
//! [3]
- #define QT_USE_FAST_CONCATENATION
+ DEFINES *= QT_USE_QSTRINGBUILDER
//! [3]
-//! [4]
- #define QT_USE_FAST_CONCATENATION
- #define QT_USE_FAST_OPERATOR_PLUS
-//! [4]
-
//! [5]
#include <QStringBuilder>
diff --git a/doc/src/template/scripts/functions.js b/doc/src/template/scripts/functions.js
index 62bc535..3ab4a08 100755
--- a/doc/src/template/scripts/functions.js
+++ b/doc/src/template/scripts/functions.js
@@ -184,7 +184,7 @@ var blankRE=/^\s*$/;
function CheckEmptyAndLoadList()
{
/* Start Extracting information for feedback and adding this to the feedback form */
- var pageUrl = window.location.href;
+ var pageUrl = window.location.pathname;
var pageVal = $('title').html();
$('#pageType').removeClass('red');
$('#feedUrl').remove();