summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel
diff options
context:
space:
mode:
authorCasper van Donderen <casper.vandonderen@nokia.com>2012-03-20 19:37:07 +0100
committerQt by Nokia <qt-info@nokia.com>2012-04-19 07:34:53 +0200
commit0bc02fd0d61d1e4aed9b39890d28975dff30e822 (patch)
treee967ab719c7f8df24c35b088bd48e0f5b0942148 /src/corelib/kernel
parent7f0c130be963de90d1baeb037820b17a4f298700 (diff)
Doc: Prepare for building modular QtCore docs.
This change fixes most qdoc errors in QtCore. There are about 900 left. The main thing this change does is moving documentation from qtcore from /doc/src to /src/corelib/doc. Other issues resolved are mis-use of qdoc commands. Change-Id: I002d01edfb13575e8bf27ce91596a577a92562d1 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r--src/corelib/kernel/qabstracteventdispatcher.cpp4
-rw-r--r--src/corelib/kernel/qbasictimer.cpp8
-rw-r--r--src/corelib/kernel/qcoreapplication.cpp28
-rw-r--r--src/corelib/kernel/qeventloop.cpp2
-rw-r--r--src/corelib/kernel/qmetaobject.cpp22
-rw-r--r--src/corelib/kernel/qmetaobjectbuilder.cpp4
-rw-r--r--src/corelib/kernel/qmetatype.cpp30
-rw-r--r--src/corelib/kernel/qmetatype.h25
-rw-r--r--src/corelib/kernel/qmimedata.cpp16
-rw-r--r--src/corelib/kernel/qobject.cpp120
-rw-r--r--src/corelib/kernel/qobjectcleanuphandler.cpp2
-rw-r--r--src/corelib/kernel/qpointer.cpp6
-rw-r--r--src/corelib/kernel/qsharedmemory.cpp14
-rw-r--r--src/corelib/kernel/qsignalmapper.cpp10
-rw-r--r--src/corelib/kernel/qsystemsemaphore.cpp6
-rw-r--r--src/corelib/kernel/qtimer.cpp16
-rw-r--r--src/corelib/kernel/qtranslator.cpp2
-rw-r--r--src/corelib/kernel/qvariant.cpp20
18 files changed, 176 insertions, 159 deletions
diff --git a/src/corelib/kernel/qabstracteventdispatcher.cpp b/src/corelib/kernel/qabstracteventdispatcher.cpp
index cf9b0cea4f..2ef98dba0f 100644
--- a/src/corelib/kernel/qabstracteventdispatcher.cpp
+++ b/src/corelib/kernel/qabstracteventdispatcher.cpp
@@ -374,7 +374,7 @@ void QAbstractEventDispatcher::closingDown()
Typedef for a function with the signature
- \snippet doc/src/snippets/code/src_corelib_kernel_qabstracteventdispatcher.cpp 0
+ \snippet code/src_corelib_kernel_qabstracteventdispatcher.cpp 0
Note that the type of the \a message is platform dependent. The
following table shows the \a {message}'s type on Windows, Mac, and
@@ -460,7 +460,7 @@ bool QAbstractEventDispatcher::filterEvent(void *message)
This signal is emitted after the event loop returns from a
function that could block.
- \sa wakeUp() aboutToBlock()
+ \sa wakeUp(), aboutToBlock()
*/
/*! \fn void QAbstractEventDispatcher::aboutToBlock()
diff --git a/src/corelib/kernel/qbasictimer.cpp b/src/corelib/kernel/qbasictimer.cpp
index 621223eb88..76db945c45 100644
--- a/src/corelib/kernel/qbasictimer.cpp
+++ b/src/corelib/kernel/qbasictimer.cpp
@@ -92,7 +92,7 @@ QT_BEGIN_NAMESPACE
Returns true if the timer is running and has not been stopped; otherwise
returns false.
- \sa start() stop()
+ \sa start(), stop()
*/
/*!
@@ -112,7 +112,7 @@ QT_BEGIN_NAMESPACE
The given \a object will receive timer events.
- \sa stop() isActive() QObject::timerEvent() Qt::CoarseTimer
+ \sa stop(), isActive(), QObject::timerEvent(), Qt::CoarseTimer
*/
void QBasicTimer::start(int msec, QObject *obj)
{
@@ -139,7 +139,7 @@ void QBasicTimer::start(int msec, QObject *obj)
The given \a object will receive timer events.
- \sa stop() isActive() QObject::timerEvent() Qt::TimerType
+ \sa stop(), isActive(), QObject::timerEvent(), Qt::TimerType
*/
void QBasicTimer::start(int msec, Qt::TimerType timerType, QObject *obj)
{
@@ -160,7 +160,7 @@ void QBasicTimer::start(int msec, Qt::TimerType timerType, QObject *obj)
/*!
Stops the timer.
- \sa start() isActive()
+ \sa start(), isActive()
*/
void QBasicTimer::stop()
{
diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp
index 7b26a01cbf..d188ccbc9a 100644
--- a/src/corelib/kernel/qcoreapplication.cpp
+++ b/src/corelib/kernel/qcoreapplication.cpp
@@ -1000,7 +1000,7 @@ void QCoreApplication::exit(int returnCode)
The event is \e not deleted when the event has been sent. The normal
approach is to create the event on the stack, for example:
- \snippet doc/src/snippets/code/src_corelib_kernel_qcoreapplication.cpp 0
+ \snippet code/src_corelib_kernel_qcoreapplication.cpp 0
\sa postEvent(), notify()
*/
@@ -1467,7 +1467,7 @@ void QCoreApplicationPrivate::maybeQuit()
Example:
- \snippet doc/src/snippets/code/src_corelib_kernel_qcoreapplication.cpp 1
+ \snippet code/src_corelib_kernel_qcoreapplication.cpp 1
\sa exit(), aboutToQuit(), QApplication::lastWindowClosed()
*/
@@ -1515,7 +1515,7 @@ void QCoreApplication::quit()
The function returns true on success and false on failure.
- \sa removeTranslator() translate() QTranslator::load() {Dynamic Translation}
+ \sa removeTranslator(), translate(), QTranslator::load(), {Dynamic Translation}
*/
bool QCoreApplication::installTranslator(QTranslator *translationFile)
@@ -1628,7 +1628,7 @@ static void replacePercentN(QString *result, int n)
so will most likely result in crashes or other undesirable
behavior.
- \sa QObject::tr() installTranslator()
+ \sa QObject::tr(), installTranslator()
*/
@@ -1904,7 +1904,7 @@ QStringList QCoreApplication::arguments()
organizationName(). On all other platforms, QSettings uses
organizationName() as the organization.
- \sa organizationDomain applicationName
+ \sa organizationDomain, applicationName
*/
void QCoreApplication::setOrganizationName(const QString &orgName)
@@ -1930,7 +1930,7 @@ QString QCoreApplication::organizationName()
On all other platforms, QSettings uses organizationName() as the
organization.
- \sa organizationName applicationName applicationVersion
+ \sa organizationName, applicationName, applicationVersion
*/
void QCoreApplication::setOrganizationDomain(const QString &orgDomain)
{
@@ -1952,7 +1952,7 @@ QString QCoreApplication::organizationDomain()
If not set, the application name defaults to the executable name (since 5.0).
- \sa organizationName organizationDomain applicationVersion applicationFilePath
+ \sa organizationName, organizationDomain, applicationVersion, applicationFilePath
*/
void QCoreApplication::setApplicationName(const QString &application)
{
@@ -1978,7 +1978,7 @@ Q_CORE_EXPORT QString qt_applicationName_noFallback()
\since 4.4
\brief the version of this application
- \sa applicationName organizationName organizationDomain
+ \sa applicationName, organizationName, organizationDomain
*/
void QCoreApplication::setApplicationVersion(const QString &version)
{
@@ -2012,7 +2012,7 @@ Q_GLOBAL_STATIC_WITH_ARGS(QMutex, libraryPathMutex, (QMutex::Recursive))
If you want to iterate over the list, you can use the \l foreach
pseudo-keyword:
- \snippet doc/src/snippets/code/src_corelib_kernel_qcoreapplication.cpp 2
+ \snippet code/src_corelib_kernel_qcoreapplication.cpp 2
\sa setLibraryPaths(), addLibraryPath(), removeLibraryPath(), QLibrary,
{How to Create Qt Plugins}
@@ -2134,7 +2134,7 @@ void QCoreApplication::removeLibraryPath(const QString &path)
A function with the following signature that can be used as an
event filter:
- \snippet doc/src/snippets/code/src_corelib_kernel_qcoreapplication.cpp 3
+ \snippet code/src_corelib_kernel_qcoreapplication.cpp 3
\sa setEventFilter()
*/
@@ -2269,7 +2269,7 @@ void QCoreApplication::setEventDispatcher(QAbstractEventDispatcher *eventDispatc
The function specified by \a ptr should take no arguments and should
return nothing. For example:
- \snippet doc/src/snippets/code/src_corelib_kernel_qcoreapplication.cpp 4
+ \snippet code/src_corelib_kernel_qcoreapplication.cpp 4
Note that for an application- or module-wide cleanup,
qAddPostRoutine() is often not suitable. For example, if the
@@ -2283,7 +2283,7 @@ void QCoreApplication::setEventDispatcher(QAbstractEventDispatcher *eventDispatc
parent-child mechanism to call a cleanup function at the right
time:
- \snippet doc/src/snippets/code/src_corelib_kernel_qcoreapplication.cpp 5
+ \snippet code/src_corelib_kernel_qcoreapplication.cpp 5
By selecting the right parent object, this can often be made to
clean up the module's data at the right moment.
@@ -2297,7 +2297,7 @@ void QCoreApplication::setEventDispatcher(QAbstractEventDispatcher *eventDispatc
translation functions, \c tr() and \c trUtf8(), with these
signatures:
- \snippet doc/src/snippets/code/src_corelib_kernel_qcoreapplication.cpp 6
+ \snippet code/src_corelib_kernel_qcoreapplication.cpp 6
This macro is useful if you want to use QObject::tr() or
QObject::trUtf8() in classes that don't inherit from QObject.
@@ -2306,7 +2306,7 @@ void QCoreApplication::setEventDispatcher(QAbstractEventDispatcher *eventDispatc
class definition (before the first \c{public:} or \c{protected:}).
For example:
- \snippet doc/src/snippets/code/src_corelib_kernel_qcoreapplication.cpp 7
+ \snippet code/src_corelib_kernel_qcoreapplication.cpp 7
The \a context parameter is normally the class name, but it can
be any string.
diff --git a/src/corelib/kernel/qeventloop.cpp b/src/corelib/kernel/qeventloop.cpp
index d3a64aae04..deea463061 100644
--- a/src/corelib/kernel/qeventloop.cpp
+++ b/src/corelib/kernel/qeventloop.cpp
@@ -275,7 +275,7 @@ void QEventLoop::exit(int returnCode)
false. The event loop is considered running from the time when
exec() is called until exit() is called.
- \sa exec() exit()
+ \sa exec(), exit()
*/
bool QEventLoop::isRunning() const
{
diff --git a/src/corelib/kernel/qmetaobject.cpp b/src/corelib/kernel/qmetaobject.cpp
index e3b0b15e26..8a415c9944 100644
--- a/src/corelib/kernel/qmetaobject.cpp
+++ b/src/corelib/kernel/qmetaobject.cpp
@@ -492,7 +492,7 @@ int QMetaObject::constructorCount() const
Use code like the following to obtain a QStringList containing the methods
specific to a given class:
- \snippet doc/src/snippets/code/src_corelib_kernel_qmetaobject.cpp methodCount
+ \snippet code/src_corelib_kernel_qmetaobject.cpp methodCount
\sa method(), methodOffset(), indexOfMethod()
*/
@@ -530,7 +530,7 @@ int QMetaObject::enumeratorCount() const
Use code like the following to obtain a QStringList containing the properties
specific to a given class:
- \snippet doc/src/snippets/code/src_corelib_kernel_qmetaobject.cpp propertyCount
+ \snippet code/src_corelib_kernel_qmetaobject.cpp propertyCount
\sa property(), propertyOffset(), indexOfProperty()
*/
@@ -1102,7 +1102,7 @@ QMetaProperty QMetaObject::userProperty() const
Example:
- \snippet doc/src/snippets/code/src_corelib_kernel_qmetaobject.cpp 0
+ \snippet code/src_corelib_kernel_qmetaobject.cpp 0
\sa classInfoCount(), classInfoOffset(), indexOfClassInfo()
*/
@@ -1207,7 +1207,7 @@ static char *qNormalizeType(char *d, int &templdepth, QByteArray &result)
Example:
- \snippet doc/src/snippets/code/src_corelib_kernel_qmetaobject.cpp 1
+ \snippet code/src_corelib_kernel_qmetaobject.cpp 1
\sa normalizedSignature()
*/
@@ -1312,7 +1312,7 @@ enum { MaximumParamCount = 11 }; // up to 10 arguments + 1 return value
the \l{QPushButton::animateClick()}{animateClick()} slot on a
QPushButton, use the following code:
- \snippet doc/src/snippets/code/src_corelib_kernel_qmetaobject.cpp 2
+ \snippet code/src_corelib_kernel_qmetaobject.cpp 2
With asynchronous method invocations, the parameters must be of
types that are known to Qt's meta-object system, because Qt needs
@@ -1320,7 +1320,7 @@ enum { MaximumParamCount = 11 }; // up to 10 arguments + 1 return value
scenes. If you try to use a queued connection and get the error
message
- \snippet doc/src/snippets/code/src_corelib_kernel_qmetaobject.cpp 3
+ \snippet code/src_corelib_kernel_qmetaobject.cpp 3
call qRegisterMetaType() to register the data type before you
call invokeMethod().
@@ -1328,7 +1328,7 @@ enum { MaximumParamCount = 11 }; // up to 10 arguments + 1 return value
To synchronously invoke the \c compute(QString, int, double) slot on
some arbitrary object \c obj retrieve its return value:
- \snippet doc/src/snippets/code/src_corelib_kernel_qmetaobject.cpp 4
+ \snippet code/src_corelib_kernel_qmetaobject.cpp 4
If the "compute" slot does not take exactly one QString, one int
and one double in the specified order, the call will fail.
@@ -1883,7 +1883,7 @@ QMetaMethod::MethodType QMetaMethod::methodType() const
\l{QPushButton::animateClick()}{animateClick()} slot on a
QPushButton:
- \snippet doc/src/snippets/code/src_corelib_kernel_qmetaobject.cpp 6
+ \snippet code/src_corelib_kernel_qmetaobject.cpp 6
With asynchronous method invocations, the parameters must be of
types that are known to Qt's meta-object system, because Qt needs
@@ -1891,7 +1891,7 @@ QMetaMethod::MethodType QMetaMethod::methodType() const
scenes. If you try to use a queued connection and get the error
message
- \snippet doc/src/snippets/code/src_corelib_kernel_qmetaobject.cpp 7
+ \snippet code/src_corelib_kernel_qmetaobject.cpp 7
call qRegisterMetaType() to register the data type before you
call QMetaMethod::invoke().
@@ -1899,7 +1899,7 @@ QMetaMethod::MethodType QMetaMethod::methodType() const
To synchronously invoke the \c compute(QString, int, double) slot on
some arbitrary object \c obj retrieve its return value:
- \snippet doc/src/snippets/code/src_corelib_kernel_qmetaobject.cpp 8
+ \snippet code/src_corelib_kernel_qmetaobject.cpp 8
QMetaObject::normalizedSignature() is used here to ensure that the format
of the signature is what invoke() expects. E.g. extra whitespace is
@@ -3058,7 +3058,7 @@ bool QMetaProperty::isEditable(const QObject *object) const
are specified using Q_CLASSINFO() in the source code. The
information can be retrieved using name() and value(). For example:
- \snippet doc/src/snippets/code/src_corelib_kernel_qmetaobject.cpp 5
+ \snippet code/src_corelib_kernel_qmetaobject.cpp 5
This mechanism is free for you to use in your Qt applications. Qt
doesn't use it for any of its classes.
diff --git a/src/corelib/kernel/qmetaobjectbuilder.cpp b/src/corelib/kernel/qmetaobjectbuilder.cpp
index d262d6a61b..1dda9f2f05 100644
--- a/src/corelib/kernel/qmetaobjectbuilder.cpp
+++ b/src/corelib/kernel/qmetaobjectbuilder.cpp
@@ -609,7 +609,7 @@ QMetaPropertyBuilder QMetaObjectBuilder::addProperty(const QMetaProperty& protot
\a name. Returns an object that can be used to adjust
the other attributes of the enumerator.
- \sa enumerator(), enumeratorCount(), removeEnumerator(),
+ \sa enumerator(), enumeratorCount(), removeEnumerator()
\sa indexOfEnumerator()
*/
QMetaEnumBuilder QMetaObjectBuilder::addEnumerator(const QByteArray& name)
@@ -625,7 +625,7 @@ QMetaEnumBuilder QMetaObjectBuilder::addEnumerator(const QByteArray& name)
QMetaObject. Returns an object that can be used to adjust the
attributes of the enumerator.
- \sa enumerator(), enumeratorCount(), removeEnumerator(),
+ \sa enumerator(), enumeratorCount(), removeEnumerator()
\sa indexOfEnumerator()
*/
QMetaEnumBuilder QMetaObjectBuilder::addEnumerator(const QMetaEnum& prototype)
diff --git a/src/corelib/kernel/qmetatype.cpp b/src/corelib/kernel/qmetatype.cpp
index fba1aaf9b6..e7f68fd596 100644
--- a/src/corelib/kernel/qmetatype.cpp
+++ b/src/corelib/kernel/qmetatype.cpp
@@ -125,16 +125,16 @@ struct DefinedTypesFilter {
This example shows a typical use case of Q_DECLARE_METATYPE():
- \snippet doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp 0
+ \snippet code/src_corelib_kernel_qmetatype.cpp 0
If \c MyStruct is in a namespace, the Q_DECLARE_METATYPE() macro
has to be outside the namespace:
- \snippet doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp 1
+ \snippet code/src_corelib_kernel_qmetatype.cpp 1
Since \c{MyStruct} is now known to QMetaType, it can be used in QVariant:
- \snippet doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp 2
+ \snippet code/src_corelib_kernel_qmetatype.cpp 2
\sa qRegisterMetaType()
*/
@@ -220,21 +220,13 @@ struct DefinedTypesFilter {
\value User Base value for user types
\value UnknownType This is an invalid type id. It is returned from QMetaType for types that are not registered
- \omitvalue FirstGuiType
- \omitvalue FirstWidgetsType
- \omitvalue LastCoreType
- \omitvalue LastGuiType
- \omitvalue LastWidgetsType
- \omitvalue QReal
- \omitvalue HighestInternalId
-
Additional types can be registered using Q_DECLARE_METATYPE().
\sa type(), typeName()
*/
/*!
- \enum QMetaType::TypeFlags
+ \enum QMetaType::TypeFlag
The enum describes attributes of a type supported by QMetaType.
@@ -265,7 +257,7 @@ struct DefinedTypesFilter {
The following code allocates and destructs an instance of
\c{MyClass}:
- \snippet doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp 3
+ \snippet code/src_corelib_kernel_qmetatype.cpp 3
If we want the stream operators \c operator<<() and \c
operator>>() to work on QVariant objects that store custom types,
@@ -1486,12 +1478,12 @@ QMetaType::TypeFlags QMetaType::typeFlags(int type)
This example registers the class \c{MyClass}:
- \snippet doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp 4
+ \snippet code/src_corelib_kernel_qmetatype.cpp 4
This function is useful to register typedefs so they can be used
by QMetaProperty, or in QueuedConnections
- \snippet doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp 9
+ \snippet code/src_corelib_kernel_qmetatype.cpp 9
\sa qRegisterMetaTypeStreamOperators(), QMetaType::isRegistered(),
Q_DECLARE_METATYPE()
@@ -1509,11 +1501,11 @@ QMetaType::TypeFlags QMetaType::typeFlags(int type)
QMetaType::save(). These functions are used when streaming a
QVariant.
- \snippet doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp 5
+ \snippet code/src_corelib_kernel_qmetatype.cpp 5
The stream operators should have the following signatures:
- \snippet doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp 6
+ \snippet code/src_corelib_kernel_qmetatype.cpp 6
\sa qRegisterMetaType(), QMetaType::isRegistered(), Q_DECLARE_METATYPE()
*/
@@ -1548,7 +1540,7 @@ QMetaType::TypeFlags QMetaType::typeFlags(int type)
Example:
- \snippet doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp 7
+ \snippet code/src_corelib_kernel_qmetatype.cpp 7
To use the type \c T in QVariant, using Q_DECLARE_METATYPE() is
sufficient. To use the type \c T in queued signal and slot connections,
@@ -1574,7 +1566,7 @@ QMetaType::TypeFlags QMetaType::typeFlags(int type)
Typical usage:
- \snippet doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp 8
+ \snippet code/src_corelib_kernel_qmetatype.cpp 8
QMetaType::type() returns the same ID as qMetaTypeId(), but does
a lookup at runtime based on the name of the type.
diff --git a/src/corelib/kernel/qmetatype.h b/src/corelib/kernel/qmetatype.h
index 21f4bc7afe..14f349083d 100644
--- a/src/corelib/kernel/qmetatype.h
+++ b/src/corelib/kernel/qmetatype.h
@@ -195,6 +195,8 @@ class Q_CORE_EXPORT QMetaType {
FlagsEx = 0x100
};
public:
+#ifndef Q_QDOC
+ // The code that actually gets compiled.
enum Type {
// these are merged with QVariant
QT_FOR_EACH_STATIC_TYPE(QT_DEFINE_METATYPE_ID)
@@ -212,6 +214,29 @@ public:
UnknownType = 0,
User = 1024
};
+#else
+ // If we are using QDoc it fakes the Type enum looks like this.
+ enum Type {
+ Void = 0, Bool = 1, Int = 2, UInt = 3, LongLong = 4, ULongLong = 5,
+ Double = 6, Long = 32, Short = 33, Char = 34, ULong = 35, UShort = 36,
+ UChar = 37, Float = 38,
+ VoidStar = 31,
+ QChar = 7, QString = 10, QStringList = 11, QByteArray = 12,
+ QBitArray = 13, QDate = 14, QTime = 15, QDateTime = 16, QUrl = 17,
+ QLocale = 18, QRect = 19, QRectF = 20, QSize = 21, QSizeF = 22,
+ QLine = 23, QLineF = 24, QPoint = 25, QPointF = 26, QRegExp = 27,
+ QEasingCurve = 29, QUuid = 30, QVariant = 41, QModelIndex = 42,
+ QObjectStar = 39, QWidgetStar = 40,
+ QVariantMap = 8, QVariantList = 9, QVariantHash = 28,
+ QFont = 64, QPixmap = 65, QBrush = 66, QColor = 67, QPalette = 68,
+ QImage = 69, QPolygon = 70, QRegion = 71, QBitmap = 72, QCursor = 73,
+ QKeySequence = 74, QPen = 75, QTextLength = 76, QTextFormat = 77,
+ QMatrix = 78, QTransform = 79, QMatrix4x4 = 80, QVector2D = 81,
+ QVector3D = 82, QVector4D = 83, QQuaternion = 84, QPolygonF = 85,
+ QIcon = 120, QSizePolicy = 121,
+ User = 256
+ };
+#endif
enum TypeFlag {
NeedsConstruction = 0x1,
diff --git a/src/corelib/kernel/qmimedata.cpp b/src/corelib/kernel/qmimedata.cpp
index 3a3464e43e..c18ce22247 100644
--- a/src/corelib/kernel/qmimedata.cpp
+++ b/src/corelib/kernel/qmimedata.cpp
@@ -257,7 +257,7 @@ QVariant QMimeDataPrivate::retrieveTypedData(const QString &format, QVariant::Ty
For example, if your write a widget that accepts URL drags, you
would end up writing code like this:
- \snippet doc/src/snippets/code/src_corelib_kernel_qmimedata.cpp 0
+ \snippet code/src_corelib_kernel_qmimedata.cpp 0
There are three approaches for storing custom data in a QMimeData
object:
@@ -266,7 +266,7 @@ QVariant QMimeDataPrivate::retrieveTypedData(const QString &format, QVariant::Ty
\li Custom data can be stored directly in a QMimeData object as a
QByteArray using setData(). For example:
- \snippet doc/src/snippets/code/src_corelib_kernel_qmimedata.cpp 1
+ \snippet code/src_corelib_kernel_qmimedata.cpp 1
\li We can subclass QMimeData and reimplement hasFormat(),
formats(), and retrieveData().
@@ -276,7 +276,7 @@ QVariant QMimeDataPrivate::retrieveTypedData(const QString &format, QVariant::Ty
it, and use a qobject_cast() in the receiver's drop event
handler. For example:
- \snippet doc/src/snippets/code/src_corelib_kernel_qmimedata.cpp 2
+ \snippet code/src_corelib_kernel_qmimedata.cpp 2
\endlist
\section1 Platform-Specific MIME Types
@@ -286,11 +286,11 @@ QVariant QMimeDataPrivate::retrieveTypedData(const QString &format, QVariant::Ty
indicate that they represent data in non-standard formats.
The formats will take the following form:
- \snippet doc/src/snippets/code/src_corelib_kernel_qmimedata.cpp 3
+ \snippet code/src_corelib_kernel_qmimedata.cpp 3
The following are examples of custom MIME types:
- \snippet doc/src/snippets/code/src_corelib_kernel_qmimedata.cpp 4
+ \snippet code/src_corelib_kernel_qmimedata.cpp 4
The \c value declaration of each format describes the way in which the
data is encoded.
@@ -458,7 +458,7 @@ bool QMimeData::hasHtml() const
library, whereas QImage belongs to \l QtGui. To convert the
QVariant to a QImage, simply use qvariant_cast(). For example:
- \snippet doc/src/snippets/code/src_corelib_kernel_qmimedata.cpp 5
+ \snippet code/src_corelib_kernel_qmimedata.cpp 5
\sa hasImage()
*/
@@ -475,7 +475,7 @@ QVariant QMimeData::imageData() const
library, whereas QImage belongs to \l QtGui. The conversion
from QImage to QVariant is implicit. For example:
- \snippet doc/src/snippets/code/src_corelib_kernel_qmimedata.cpp 6
+ \snippet code/src_corelib_kernel_qmimedata.cpp 6
\sa hasImage(), setData()
*/
@@ -505,7 +505,7 @@ bool QMimeData::hasImage() const
library, whereas QColor belongs to \l QtGui. To convert the
QVariant to a QColor, simply use qvariant_cast(). For example:
- \snippet doc/src/snippets/code/src_corelib_kernel_qmimedata.cpp 7
+ \snippet code/src_corelib_kernel_qmimedata.cpp 7
\sa hasColor(), setColorData(), data()
*/
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp
index fb3e4e396b..5ccbad4667 100644
--- a/src/corelib/kernel/qobject.cpp
+++ b/src/corelib/kernel/qobject.cpp
@@ -568,9 +568,9 @@ void QMetaCallEvent::placeMetaCall(QObject *object)
\l uic generates code that invokes this function to enable
auto-connection to be performed between widgets on forms created
- with \QD. More information about using auto-connection with \QD is
+ with \e{Qt Designer}. More information about using auto-connection with \e{Qt Designer} is
given in the \l{Using a Designer UI File in Your Application} section of
- the \QD manual.
+ the \e{Qt Designer} manual.
\section1 Dynamic Properties
@@ -606,7 +606,7 @@ void QMetaCallEvent::placeMetaCall(QObject *object)
Returns 0 if there is no such child.
- \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 0
+ \snippet code/src_corelib_kernel_qobject.cpp 0
*/
void *qt_find_obj_child(QObject *parent, const char *type, const QString &name)
@@ -651,8 +651,8 @@ static bool check_parent_thread(QObject *parent,
Constructs an object with parent object \a parent.
The parent of an object may be viewed as the object's owner. For
- instance, a \l{QDialog}{dialog box} is the parent of the \gui OK
- and \gui Cancel buttons it contains.
+ instance, a \l{QDialog}{dialog box} is the parent of the \uicontrol{OK}
+ and \uicontrol{Cancel} buttons it contains.
The destructor of a parent object destroys all child objects.
@@ -881,7 +881,7 @@ QObjectPrivate::Connection::~Connection()
Example:
- \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 1
+ \snippet code/src_corelib_kernel_qobject.cpp 1
\sa staticMetaObject
*/
@@ -905,7 +905,7 @@ QObjectPrivate::Connection::~Connection()
Example:
- \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 2
+ \snippet code/src_corelib_kernel_qobject.cpp 2
\sa metaObject()
*/
@@ -924,7 +924,7 @@ QObjectPrivate::Connection::~Connection()
Example:
- \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 3
+ \snippet code/src_corelib_kernel_qobject.cpp 3
The qobject_cast() function behaves similarly to the standard C++
\c dynamic_cast(), with the advantages that it doesn't require
@@ -950,7 +950,7 @@ QObjectPrivate::Connection::~Connection()
Example:
- \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 4
+ \snippet code/src_corelib_kernel_qobject.cpp 4
If you need to determine whether an object is an instance of a particular
class for the purpose of casting it, consider using qobject_cast<Type *>(object)
@@ -967,7 +967,7 @@ QObjectPrivate::Connection::~Connection()
You can find an object by name (and type) using findChild().
You can find a set of objects with findChildren().
- \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 5
+ \snippet code/src_corelib_kernel_qobject.cpp 5
By default, this property contains an empty string.
@@ -1155,7 +1155,7 @@ void QObject::customEvent(QEvent * /* event */)
true; otherwise return false.
Example:
- \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 6
+ \snippet code/src_corelib_kernel_qobject.cpp 6
Notice in the example above that unhandled events are passed to
the base class's eventFilter() function, since the base class
@@ -1225,7 +1225,7 @@ QThread *QObject::thread() const
QApplication::thread() to retrieve the thread in which the
application lives. For example:
- \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 7
+ \snippet code/src_corelib_kernel_qobject.cpp 7
If \a targetThread is zero, all event processing for this object
and its children stops.
@@ -1390,7 +1390,7 @@ void QObjectPrivate::_q_reregisterTimers(void *pointer)
Example:
- \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 8
+ \snippet code/src_corelib_kernel_qobject.cpp 8
Note that QTimer's accuracy depends on the underlying operating system and
hardware. The \a timerType argument allows you to customize the accuracy of
@@ -1472,7 +1472,7 @@ void QObject::killTimer(int id)
The QObjectList class is defined in the \c{<QObject>} header
file as the following:
- \quotefromfile src/corelib/kernel/qobject.h
+ \quotefromfile kernel/qobject.h
\skipto /typedef .*QObjectList/
\printuntil QObjectList
@@ -1507,21 +1507,21 @@ void QObject::killTimer(int id)
named \c{"button1"}, even if the button isn't a direct child of
the parent:
- \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 10
+ \snippet code/src_corelib_kernel_qobject.cpp 10
This example returns a \l{QListWidget} child of \c{parentWidget}:
- \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 11
+ \snippet code/src_corelib_kernel_qobject.cpp 11
This example returns a child \l{QPushButton} of \c{parentWidget}
(its direct parent) named \c{"button1"}:
- \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 41
+ \snippet code/src_corelib_kernel_qobject.cpp 41
This example returns a \l{QListWidget} child of \c{parentWidget},
its direct parent:
- \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 42
+ \snippet code/src_corelib_kernel_qobject.cpp 42
\sa findChildren()
*/
@@ -1538,15 +1538,15 @@ void QObject::killTimer(int id)
The following example shows how to find a list of child \l{QWidget}s of
the specified \c{parentWidget} named \c{widgetname}:
- \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 12
+ \snippet code/src_corelib_kernel_qobject.cpp 12
This example returns all \c{QPushButton}s that are children of \c{parentWidget}:
- \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 13
+ \snippet code/src_corelib_kernel_qobject.cpp 13
This example returns all \c{QPushButton}s that are immediate children of \c{parentWidget}:
- \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 43
+ \snippet code/src_corelib_kernel_qobject.cpp 43
\sa findChild()
*/
@@ -1791,7 +1791,7 @@ void QObjectPrivate::setParent_helper(QObject *o)
\fn void QObject::installEventFilter(QObject *filterObj)
Installs an event filter \a filterObj on this object. For example:
- \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 14
+ \snippet code/src_corelib_kernel_qobject.cpp 14
An event filter is an object that receives all events that are
sent to this object. The filter can either stop the event or
@@ -1806,11 +1806,11 @@ void QObjectPrivate::setParent_helper(QObject *o)
Here's a \c KeyPressEater class that eats the key presses of its
monitored objects:
- \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 15
+ \snippet code/src_corelib_kernel_qobject.cpp 15
And here's how to install it on two widgets:
- \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 16
+ \snippet code/src_corelib_kernel_qobject.cpp 16
The QShortcut class, for example, uses this technique to intercept
shortcut key presses.
@@ -1925,7 +1925,7 @@ void QObject::deleteLater()
Example:
- \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 17
+ \snippet code/src_corelib_kernel_qobject.cpp 17
\dots
See \l{Writing Source Code for Translation} for a detailed description of
@@ -1959,7 +1959,7 @@ void QObject::deleteLater()
escape sequences for specifying non-ASCII characters in string
literals to trUtf8(). For example:
- \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 20
+ \snippet code/src_corelib_kernel_qobject.cpp 20
\sa tr(), QApplication::translate(), {Internationalization with Qt}
*/
@@ -2153,7 +2153,7 @@ int QObject::senderSignalIndex() const
When calling this function, you can use the \c SIGNAL() macro to
pass a specific signal:
- \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 21
+ \snippet code/src_corelib_kernel_qobject.cpp 21
As the code snippet above illustrates, you can use this function
to avoid emitting a signal that nobody listens to.
@@ -2278,18 +2278,18 @@ static inline void check_and_warn_compat(const QMetaObject *sender, const QMetaM
You must use the \c SIGNAL() and \c SLOT() macros when specifying
the \a signal and the \a method, for example:
- \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 22
+ \snippet code/src_corelib_kernel_qobject.cpp 22
This example ensures that the label always displays the current
scroll bar value. Note that the signal and slots parameters must not
contain any variable names, only the type. E.g. the following would
not work and return false:
- \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 23
+ \snippet code/src_corelib_kernel_qobject.cpp 23
A signal can also be connected to another signal:
- \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 24
+ \snippet code/src_corelib_kernel_qobject.cpp 24
In this example, the \c MyWidget constructor relays a signal from
a private member variable, and makes it available under a name
@@ -2326,7 +2326,7 @@ static inline void check_and_warn_compat(const QMetaObject *sender, const QMetaM
scenes. If you try to use a queued connection and get the error
message
- \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 25
+ \snippet code/src_corelib_kernel_qobject.cpp 25
call qRegisterMetaType() to register the data type before you
establish the connection.
@@ -2575,27 +2575,27 @@ QMetaObject::Connection QObject::connect(const QObject *sender, const QMetaMetho
\list 1
\li Disconnect everything connected to an object's signals:
- \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 26
+ \snippet code/src_corelib_kernel_qobject.cpp 26
equivalent to the non-static overloaded function
- \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 27
+ \snippet code/src_corelib_kernel_qobject.cpp 27
\li Disconnect everything connected to a specific signal:
- \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 28
+ \snippet code/src_corelib_kernel_qobject.cpp 28
equivalent to the non-static overloaded function
- \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 29
+ \snippet code/src_corelib_kernel_qobject.cpp 29
\li Disconnect a specific receiver:
- \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 30
+ \snippet code/src_corelib_kernel_qobject.cpp 30
equivalent to the non-static overloaded function
- \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 31
+ \snippet code/src_corelib_kernel_qobject.cpp 31
\endlist
@@ -2847,7 +2847,7 @@ bool QObject::disconnect(const QObject *sender, const QMetaMethod &signal,
If you want to compare \a signal with a specific signal, use
QLatin1String and the \c SIGNAL() macro as follows:
- \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 32
+ \snippet code/src_corelib_kernel_qobject.cpp 32
If the signal contains multiple parameters or parameters that
contain spaces, call QMetaObject::normalizedSignature() on
@@ -3101,13 +3101,13 @@ bool QMetaObjectPrivate::disconnect(const QObject *sender, int signal_index,
Searches recursively for all child objects of the given \a object, and connects
matching signals from them to slots of \a object that follow the following form:
- \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 33
+ \snippet code/src_corelib_kernel_qobject.cpp 33
Let's assume our object has a child object of type QPushButton with
the \l{QObject::objectName}{object name} \c{button1}. The slot to catch the
button's \c{clicked()} signal would be:
- \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 34
+ \snippet code/src_corelib_kernel_qobject.cpp 34
\sa QObject::setObjectName()
*/
@@ -3722,7 +3722,7 @@ QDebug operator<<(QDebug dbg, const QObject *o) {
Example:
- \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 35
+ \snippet code/src_corelib_kernel_qobject.cpp 35
\sa QMetaObject::classInfo()
*/
@@ -3736,9 +3736,9 @@ QDebug operator<<(QDebug dbg, const QObject *o) {
Example:
- \snippet examples/tools/plugandpaintplugins/basictools/basictoolsplugin.h 1
+ \snippet tools/plugandpaintplugins/basictools/basictoolsplugin.h 1
\dots
- \snippet examples/tools/plugandpaintplugins/basictools/basictoolsplugin.h 3
+ \snippet tools/plugandpaintplugins/basictools/basictoolsplugin.h 3
See the \l{tools/plugandpaintplugins/basictools}{Plug & Paint
Basic Tools} example for details.
@@ -3755,7 +3755,7 @@ QDebug operator<<(QDebug dbg, const QObject *o) {
they have additional features accessible through the \l
{Meta-Object System}.
- \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 36
+ \snippet code/src_corelib_kernel_qobject.cpp 36
The property name and type and the \c READ function are required.
The type can be any type supported by QVariant, or it can be a
@@ -3765,7 +3765,7 @@ QDebug operator<<(QDebug dbg, const QObject *o) {
For example:
- \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 37
+ \snippet code/src_corelib_kernel_qobject.cpp 37
For more details about how to use this macro, and a more detailed
example of its use, see the discussion on \l {Qt's Property System}.
@@ -3782,7 +3782,7 @@ QDebug operator<<(QDebug dbg, const QObject *o) {
For example:
- \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 38
+ \snippet code/src_corelib_kernel_qobject.cpp 38
If you want to register an enum that is declared in another class,
the enum must be fully qualified with the name of the class
@@ -3804,12 +3804,12 @@ QDebug operator<<(QDebug dbg, const QObject *o) {
For example, in QLibrary, the \l{QLibrary::LoadHints}{LoadHints} flag is
declared in the following way:
- \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 39a
+ \snippet code/src_corelib_kernel_qobject.cpp 39a
The declaration of the flags themselves is performed in the public section
of the QLibrary class itself, using the \l Q_DECLARE_FLAGS() macro:
- \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 39b
+ \snippet code/src_corelib_kernel_qobject.cpp 39b
\note This macro takes care of registering individual flag values
with the meta-object system, so it is unnecessary to use Q_ENUMS()
@@ -3828,10 +3828,10 @@ QDebug operator<<(QDebug dbg, const QObject *o) {
For example:
- \snippet doc/src/snippets/signalsandslots/signalsandslots.h 1
+ \snippet signalsandslots/signalsandslots.h 1
\codeline
- \snippet doc/src/snippets/signalsandslots/signalsandslots.h 2
- \snippet doc/src/snippets/signalsandslots/signalsandslots.h 3
+ \snippet signalsandslots/signalsandslots.h 2
+ \snippet signalsandslots/signalsandslots.h 3
\note This macro requires the class to be a subclass of QObject. Use
Q_GADGET instead of Q_OBJECT to enable the meta object system's support
@@ -3927,7 +3927,7 @@ QDebug operator<<(QDebug dbg, const QObject *o) {
be invoked via the meta-object system. The macro is written before
the return type, as shown in the following example:
- \snippet snippets/qmetaobject-invokable/window.h Window class with invokable method
+ \snippet qmetaobject-invokable/window.h Window class with invokable method
The \c invokableMethod() function is marked up using Q_INVOKABLE, causing
it to be registered with the meta-object system and enabling it to be
@@ -3968,7 +3968,7 @@ void qDeleteInEventHandler(QObject *o)
Example:
- \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 44
+ \snippet code/src_corelib_kernel_qobject.cpp 44
This example ensures that the label always displays the current
line edit text.
@@ -4003,7 +4003,7 @@ void qDeleteInEventHandler(QObject *o)
scenes. If you try to use a queued connection and get the error
message
- \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 25
+ \snippet code/src_corelib_kernel_qobject.cpp 25
make sure to declare the argument type with Q_DECLARE_METATYPE
*/
@@ -4029,11 +4029,11 @@ void qDeleteInEventHandler(QObject *o)
Example:
- \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 45
+ \snippet code/src_corelib_kernel_qobject.cpp 45
If your compiler support C++11 lambda expressions, you can use them:
- \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 46
+ \snippet code/src_corelib_kernel_qobject.cpp 46
The connection will automatically disconnect if the sender is destroyed.
*/
@@ -4178,19 +4178,19 @@ bool QObject::disconnect(const QMetaObject::Connection &connection)
\list 1
\li Disconnect everything connected to an object's signals:
- \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 26
+ \snippet code/src_corelib_kernel_qobject.cpp 26
\li Disconnect everything connected to a specific signal:
- \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 47
+ \snippet code/src_corelib_kernel_qobject.cpp 47
\li Disconnect a specific receiver:
- \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 30
+ \snippet code/src_corelib_kernel_qobject.cpp 30
\li Disconnect a connection from one specific signal to a specific slot:
- \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 48
+ \snippet code/src_corelib_kernel_qobject.cpp 48
\endlist
diff --git a/src/corelib/kernel/qobjectcleanuphandler.cpp b/src/corelib/kernel/qobjectcleanuphandler.cpp
index 166a90a74f..f165ec96ca 100644
--- a/src/corelib/kernel/qobjectcleanuphandler.cpp
+++ b/src/corelib/kernel/qobjectcleanuphandler.cpp
@@ -121,7 +121,7 @@ void QObjectCleanupHandler::remove(QObject *object)
Returns true if this cleanup handler is empty or if all objects in
this cleanup handler have been destroyed; otherwise return false.
- \sa add() remove() clear()
+ \sa add(), remove(), clear()
*/
bool QObjectCleanupHandler::isEmpty() const
{
diff --git a/src/corelib/kernel/qpointer.cpp b/src/corelib/kernel/qpointer.cpp
index e0e14e5b79..cd88baf9bf 100644
--- a/src/corelib/kernel/qpointer.cpp
+++ b/src/corelib/kernel/qpointer.cpp
@@ -74,10 +74,10 @@
Example:
- \snippet doc/src/snippets/pointer/pointer.cpp 0
+ \snippet pointer/pointer.cpp 0
\dots
- \snippet doc/src/snippets/pointer/pointer.cpp 1
- \snippet doc/src/snippets/pointer/pointer.cpp 2
+ \snippet pointer/pointer.cpp 1
+ \snippet pointer/pointer.cpp 2
If the QLabel is deleted in the meantime, the \c label variable
will hold 0 instead of an invalid address, and the last line will
diff --git a/src/corelib/kernel/qsharedmemory.cpp b/src/corelib/kernel/qsharedmemory.cpp
index d8578a8059..50c24ba169 100644
--- a/src/corelib/kernel/qsharedmemory.cpp
+++ b/src/corelib/kernel/qsharedmemory.cpp
@@ -174,7 +174,7 @@ QSharedMemory::QSharedMemory(const QString &key, QObject *parent)
the shared memory segment, the detach() operation destroys the
shared memory segment.
- \sa detach() isAttached()
+ \sa detach(), isAttached()
*/
QSharedMemory::~QSharedMemory()
{
@@ -193,7 +193,7 @@ QSharedMemory::~QSharedMemory()
segment, it will \l {detach()} {detach} from it before setting the new key.
This function does not do an attach().
- \sa key() nativeKey() isAttached()
+ \sa key(), nativeKey(), isAttached()
*/
void QSharedMemory::setKey(const QString &key)
{
@@ -225,7 +225,7 @@ void QSharedMemory::setKey(const QString &key)
The application will not be portable if you set a native key.
- \sa nativeKey() key() isAttached()
+ \sa nativeKey(), key(), isAttached()
*/
void QSharedMemory::setNativeKey(const QString &key)
{
@@ -288,7 +288,7 @@ bool QSharedMemoryPrivate::initKey()
You can find the native, platform specific, key used by the operating system
by calling nativeKey().
- \sa setKey() setNativeKey()
+ \sa setKey(), setNativeKey()
*/
QString QSharedMemory::key() const
{
@@ -306,7 +306,7 @@ QString QSharedMemory::key() const
You can use the native key to access shared memory segments that have not
been created by Qt, or to grant shared memory access to non-Qt applications.
- \sa setKey() setNativeKey()
+ \sa setKey(), setNativeKey()
*/
QString QSharedMemory::nativeKey() const
{
@@ -363,7 +363,7 @@ bool QSharedMemory::create(int size, AccessMode mode)
Returns the size of the attached shared memory segment. If no shared
memory segment is attached, 0 is returned.
- \sa create() attach()
+ \sa create(), attach()
*/
int QSharedMemory::size() const
{
@@ -472,7 +472,7 @@ void *QSharedMemory::data()
the shared memory, and remember to release the lock with unlock()
after you are done.
- \sa attach() create()
+ \sa attach(), create()
*/
const void* QSharedMemory::constData() const
{
diff --git a/src/corelib/kernel/qsignalmapper.cpp b/src/corelib/kernel/qsignalmapper.cpp
index 27340020d8..c668047bd2 100644
--- a/src/corelib/kernel/qsignalmapper.cpp
+++ b/src/corelib/kernel/qsignalmapper.cpp
@@ -91,14 +91,14 @@ public:
signal, \c clicked(), which is emitted with the text of the button
that was clicked:
- \snippet doc/src/snippets/qsignalmapper/buttonwidget.h 0
- \snippet doc/src/snippets/qsignalmapper/buttonwidget.h 1
+ \snippet qsignalmapper/buttonwidget.h 0
+ \snippet qsignalmapper/buttonwidget.h 1
The only function that we need to implement is the constructor:
- \snippet doc/src/snippets/qsignalmapper/buttonwidget.cpp 0
- \snippet doc/src/snippets/qsignalmapper/buttonwidget.cpp 1
- \snippet doc/src/snippets/qsignalmapper/buttonwidget.cpp 2
+ \snippet qsignalmapper/buttonwidget.cpp 0
+ \snippet qsignalmapper/buttonwidget.cpp 1
+ \snippet qsignalmapper/buttonwidget.cpp 2
A list of texts is passed to the constructor. A signal mapper is
constructed and for each text in the list a QPushButton is
diff --git a/src/corelib/kernel/qsystemsemaphore.cpp b/src/corelib/kernel/qsystemsemaphore.cpp
index 0558f3cb59..70e75b54b9 100644
--- a/src/corelib/kernel/qsystemsemaphore.cpp
+++ b/src/corelib/kernel/qsystemsemaphore.cpp
@@ -79,7 +79,7 @@ QT_BEGIN_NAMESPACE
can use to use the same semaphore.
Example: Create a system semaphore
- \snippet doc/src/snippets/code/src_corelib_kernel_qsystemsemaphore.cpp 0
+ \snippet code/src_corelib_kernel_qsystemsemaphore.cpp 0
A typical application of system semaphores is for controlling access
to a circular buffer shared by a producer process and a consumer
@@ -283,13 +283,13 @@ bool QSystemSemaphore::acquire()
Example: Create a system semaphore having five resources; acquire
them all and then release them all.
- \snippet doc/src/snippets/code/src_corelib_kernel_qsystemsemaphore.cpp 1
+ \snippet code/src_corelib_kernel_qsystemsemaphore.cpp 1
This function can also "create" resources. For example, immediately
following the sequence of statements above, suppose we add the
statement:
- \snippet doc/src/snippets/code/src_corelib_kernel_qsystemsemaphore.cpp 2
+ \snippet code/src_corelib_kernel_qsystemsemaphore.cpp 2
Ten new resources are now guarded by the semaphore, in addition to
the five that already existed. You would not normally use this
diff --git a/src/corelib/kernel/qtimer.cpp b/src/corelib/kernel/qtimer.cpp
index 2131188439..048388d3c7 100644
--- a/src/corelib/kernel/qtimer.cpp
+++ b/src/corelib/kernel/qtimer.cpp
@@ -61,9 +61,9 @@ QT_BEGIN_NAMESPACE
Example for a one second (1000 millisecond) timer (from the
\l{widgets/analogclock}{Analog Clock} example):
- \snippet examples/widgets/analogclock/analogclock.cpp 4
- \snippet examples/widgets/analogclock/analogclock.cpp 5
- \snippet examples/widgets/analogclock/analogclock.cpp 6
+ \snippet widgets/analogclock/analogclock.cpp 4
+ \snippet widgets/analogclock/analogclock.cpp 5
+ \snippet widgets/analogclock/analogclock.cpp 6
From then on, the \c update() slot is called every second.
@@ -72,7 +72,7 @@ QT_BEGIN_NAMESPACE
QTimer::singleShot() function to call a slot after a specified
interval:
- \snippet doc/src/snippets/timers/timers.cpp 3
+ \snippet timers/timers.cpp 3
In multithreaded applications, you can use QTimer in any thread
that has an event loop. To start an event loop from a non-GUI
@@ -87,9 +87,9 @@ QT_BEGIN_NAMESPACE
been processed. This can be used to do heavy work while providing
a snappy user interface:
- \snippet doc/src/snippets/timers/timers.cpp 4
- \snippet doc/src/snippets/timers/timers.cpp 5
- \snippet doc/src/snippets/timers/timers.cpp 6
+ \snippet timers/timers.cpp 4
+ \snippet timers/timers.cpp 5
+ \snippet timers/timers.cpp 6
\c processOneThing() will from then on be called repeatedly. It
should be written in such a way that it always returns quickly
@@ -304,7 +304,7 @@ QT_END_INCLUDE_NAMESPACE
create a local QTimer object.
Example:
- \snippet doc/src/snippets/code/src_corelib_kernel_qtimer.cpp 0
+ \snippet code/src_corelib_kernel_qtimer.cpp 0
This sample program automatically terminates after 10 minutes
(600,000 milliseconds).
diff --git a/src/corelib/kernel/qtranslator.cpp b/src/corelib/kernel/qtranslator.cpp
index 892883bacd..c34a3acb70 100644
--- a/src/corelib/kernel/qtranslator.cpp
+++ b/src/corelib/kernel/qtranslator.cpp
@@ -338,7 +338,7 @@ public:
it via QObject::tr(). Here's the \c main() function from the
\l{linguist/hellotr}{Hello tr()} example:
- \snippet examples/linguist/hellotr/main.cpp 2
+ \snippet linguist/hellotr/main.cpp 2
Note that the translator must be created \e before the
application's widgets.
diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp
index 296b845469..c363be86c8 100644
--- a/src/corelib/kernel/qvariant.cpp
+++ b/src/corelib/kernel/qvariant.cpp
@@ -913,7 +913,7 @@ Q_CORE_EXPORT void QVariantPrivate::registerHandler(const int /* Modules::Names
Here is some example code to demonstrate the use of QVariant:
- \snippet doc/src/snippets/code/src_corelib_kernel_qvariant.cpp 0
+ \snippet code/src_corelib_kernel_qvariant.cpp 0
You can even store QList<QVariant> and QMap<QString, QVariant>
values in a variant, so you can easily construct arbitrarily
@@ -925,7 +925,7 @@ Q_CORE_EXPORT void QVariantPrivate::registerHandler(const int /* Modules::Names
have a defined type with no value set. However, note that QVariant
types can only be cast when they have had a value set.
- \snippet doc/src/snippets/code/src_corelib_kernel_qvariant.cpp 1
+ \snippet code/src_corelib_kernel_qvariant.cpp 1
QVariant can be extended to support other types than those
mentioned in the \l Type enum. See the \l QMetaType documentation
@@ -939,13 +939,13 @@ Q_CORE_EXPORT void QVariantPrivate::registerHandler(const int /* Modules::Names
toColor() function. Instead, you can use the QVariant::value() or
the qvariant_cast() template function. For example:
- \snippet doc/src/snippets/code/src_corelib_kernel_qvariant.cpp 2
+ \snippet code/src_corelib_kernel_qvariant.cpp 2
The inverse conversion (e.g., from QColor to QVariant) is
automatic for all data types supported by QVariant, including
GUI-related types:
- \snippet doc/src/snippets/code/src_corelib_kernel_qvariant.cpp 3
+ \snippet code/src_corelib_kernel_qvariant.cpp 3
\section1 Using canConvert() and convert() Consecutively
@@ -2551,7 +2551,7 @@ bool QVariant::convert(int targetTypeId)
}
/*!
- \fn convert(const int type, void *ptr) const
+ \fn bool QVariant::convert(const int type, void *ptr) const
\internal
Created for qvariant_cast() usage
*/
@@ -2695,7 +2695,7 @@ QDebug operator<<(QDebug dbg, const QVariant::Type p)
Example:
- \snippet doc/src/snippets/code/src_corelib_kernel_qvariant.cpp 4
+ \snippet code/src_corelib_kernel_qvariant.cpp 4
\sa value(), fromValue(), canConvert()
*/
@@ -2712,7 +2712,7 @@ QDebug operator<<(QDebug dbg, const QVariant::Type p)
Example:
- \snippet doc/src/snippets/code/src_corelib_kernel_qvariant.cpp 5
+ \snippet code/src_corelib_kernel_qvariant.cpp 5
\sa setValue(), fromValue(), canConvert()
*/
@@ -2724,7 +2724,7 @@ QDebug operator<<(QDebug dbg, const QVariant::Type p)
Example:
- \snippet doc/src/snippets/code/src_corelib_kernel_qvariant.cpp 6
+ \snippet code/src_corelib_kernel_qvariant.cpp 6
\sa convert()
*/
@@ -2736,7 +2736,7 @@ QDebug operator<<(QDebug dbg, const QVariant::Type p)
Example:
- \snippet doc/src/snippets/code/src_corelib_kernel_qvariant.cpp 7
+ \snippet code/src_corelib_kernel_qvariant.cpp 7
\note If you are working with custom types, you should use
the Q_DECLARE_METATYPE() macro to register your custom type.
@@ -2761,7 +2761,7 @@ QDebug operator<<(QDebug dbg, const QVariant::Type p)
For example, a QObject pointer can be stored in a variant with the
following code:
- \snippet doc/src/snippets/code/src_corelib_kernel_qvariant.cpp 8
+ \snippet code/src_corelib_kernel_qvariant.cpp 8
\sa QVariant::fromValue()
*/