summaryrefslogtreecommitdiffstats
path: root/doc/src
diff options
context:
space:
mode:
authorDavid Boddie <dboddie@trolltech.com>2009-12-18 13:52:46 (GMT)
committerDavid Boddie <dboddie@trolltech.com>2009-12-18 13:52:46 (GMT)
commit79a7b643231ac690ffeaaa53cc1ff7e8538a3056 (patch)
tree87f4988bcfe1d59234882293214829a6fbee0cf5 /doc/src
parentba7927c84e0e1ed4df197e60b1c9eeec8ce1475c (diff)
parente581386148a9615ef6c11eb3ae6735d0fa9668f6 (diff)
downloadQt-79a7b643231ac690ffeaaa53cc1ff7e8538a3056.zip
Qt-79a7b643231ac690ffeaaa53cc1ff7e8538a3056.tar.gz
Qt-79a7b643231ac690ffeaaa53cc1ff7e8538a3056.tar.bz2
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.6
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/development/assistant-manual.qdoc9
-rw-r--r--doc/src/objectmodel/signalsandslots.qdoc39
-rw-r--r--doc/src/qt4-intro.qdoc2
3 files changed, 47 insertions, 3 deletions
diff --git a/doc/src/development/assistant-manual.qdoc b/doc/src/development/assistant-manual.qdoc
index 8de500e..5a30e43 100644
--- a/doc/src/development/assistant-manual.qdoc
+++ b/doc/src/development/assistant-manual.qdoc
@@ -130,7 +130,7 @@
\o -collectionFile <file.qhc>
\o Uses the specified collection file instead of the default one.
\row
- \o -showUrl URL
+ \o -showUrl <URL>
\o Shows the document referenced by URL.
\row
\o -enableRemoteControl
@@ -156,7 +156,12 @@
\o Unregisters the specified compressed help file from the given
collection file.
\row
- \o -setCurrentFilter filter
+ \o -remove-search-index
+ \o Purges the help search engine's index. This option is
+ useful in case the associated index files get corrupted.
+ \QA will re-index the documentation at the next start-up.
+ \row
+ \o -setCurrentFilter <filter>
\o Sets the given filter as the active filter.
\row
\o -quiet
diff --git a/doc/src/objectmodel/signalsandslots.qdoc b/doc/src/objectmodel/signalsandslots.qdoc
index 9515904..d5e3280 100644
--- a/doc/src/objectmodel/signalsandslots.qdoc
+++ b/doc/src/objectmodel/signalsandslots.qdoc
@@ -376,6 +376,45 @@
Some irrelevant member functions have been omitted from this
example.
+ \section1 Signals And Slots With Default Arguments
+
+ The signatures of signals and slots may contain arguments, and the
+ arguments can have defualt values. Consider QObject::destroyed():
+
+ \code
+ void destroyed(QObject* = 0);
+ \endcode
+
+ When a QObject is deleted, it emits this QObject::destroyed()
+ signal. We want to catch this signal, wherever we might have a
+ dangling reference to the deleted QObject, so we can clean it up.
+ A suitable slot signature might be:
+
+ \code
+ void objectDestroyed(QObject* obj = 0);
+ \endcode
+
+ To connect the signal to the slot, we use QObject::connect() and
+ the \c{SIGNAL()} and \c{SLOT()} macros. The rule about whether to
+ include arguments or not in the \c{SIGNAL()} and \c{SLOT()}
+ macros, if the arguments have default values, is that the
+ signature passed to the \c{SIGNAL()} macro must \e not have fewer
+ arguments than the signature passed to the \c{SLOT()} macro.
+
+ All of these would work:
+ \code
+ connect(sender, SIGNAL(destroyed(QObject*)), this, SLOT(objectDestroyed(Qbject*)));
+ connect(sender, SIGNAL(destroyed(QObject*)), this, SLOT(objectDestroyed()));
+ connect(sender, SIGNAL(destroyed()), this, SLOT(objectDestroyed()));
+ \endcode
+ But this one won't work:
+ \code
+ connect(sender, SIGNAL(destroyed()), this, SLOT(objectDestroyed(QObject*)));
+ \endcode
+
+ ...because the slot will be expecting a QObject that the signal
+ will not send. This connection will report a runtime error.
+
\section1 Advanced Signals and Slots Usage
For cases where you may require information on the sender of the
diff --git a/doc/src/qt4-intro.qdoc b/doc/src/qt4-intro.qdoc
index fb1d0e4..a90544f 100644
--- a/doc/src/qt4-intro.qdoc
+++ b/doc/src/qt4-intro.qdoc
@@ -549,7 +549,7 @@
the state machine, it is also easier to use the framework for
animating GUIs, for instance.
- See \l{The State Machine Framework} documentation for more infromation.
+ See \l{The State Machine Framework} documentation for more information.
\section1 Multi-Touch and Gestures