Status

<Unknown command>contentspageQDoc Manual

These commands are for indicating that a documented element has some special status. The element could be marked as about to be made obsolete, or that it is simply not to be included in the public interface. The \since command is for specifying the version number in which a function or class first appeared. The \qmlabstract command is for marking a QML type as an abstract base class.

   

\abstract and \qmlabstract

\abstract is a synonym for the \qmlabstract command. Add this command to the \qmltype comment for a QML type when that type is meant to be used only as an abstract base type. When a QML type is abstract, it means that the QML type that can't be instantiated. Instead, the properties in its public API are included in the public properties list on the reference page for each QML type that inherits the abstract QML type. The properties are documented as if they are properties of the inheriting QML type.

Normally, when a QML type is marked with \qmlabstract, it is also marked with \internal so that its reference page is not generated. It the abstract QML type is not marked internal, it will have a reference page in the documentation.

 

\default

The \default command is for marking a QML property as the default property. The word default is displayed in the documentation of the property.

 
Sélectionnez
/ *!
    \qmlproperty list&lt;Change&gt; State::changes
    This property holds the changes to apply for this state.
    \default

    By default these changes are applied against the default state. If the state
    extends another state, then the changes are applied against the state being
    extended.
* /

See how QDoc renders this property on the reference page for the State type.

 

\dontdocument

The \dontdocument command is only used in a dontdocument.qdoc file for a particular module. This file specifies publically declared classes or structs that are not meant to be documented. QDoc will not print warnings about missing \class comments for these classes and structs.

Below you will find the \dontdocument command in the dontdocument.qdoc for widgets:

 
Sélectionnez
/ *!
   \dontdocument (QTypeInfo QMetaTypeId)
* /
 

\obsolete

The \obsolete command is for indicating that a function is being deprecated, and it should no longer be used in new code. There is no guarantee for how long it will remain in the library.

The command must stand on its own line.

When generating the reference documentation for a class, QDoc will create and link to a separate page documenting its obsolete functions. Usually an equivalent function is provided as an alternative.

 
Sélectionnez
/ *!
    \fn MyClass::MyObsoleteFunction
    \obsolete

    Use MyNewFunction() instead.
* /

QDoc renders this in myclass-obsolete.html as:

Obsolete Members for MyClass

The following class members are obsolete. They are provided to keep old source code working. We strongly advise against using them in new code.

...

  • void MyObsoleteFunction() (obsolete)

  • ...


Member Function Documentation

void MyObsoleteFunction ()

Use MyNewFunction() instead.

...

 

\internal

The \internal command indicates that the referenced function is not part of the public interface.

The command must stand on its own line.

QDoc ignores the documentation as well as the documented item, when generating the associated class reference documentation.

 
Sélectionnez