Doc: QtCore: Fix documentation issues

* Add module header wrapper that loads the real QtCore header and
    qandroidextras_p.h to generate docs for those types
  * Add missing dummy typedefs to doc/include/jni.h
  * Use the correct \namespace name (QtAndroidPrivate) and mark it
    as \preliminary
  * Add missing 'const' specifier for Q[Untyped]Bindable methods
  * Drop documentation for removed method QProperty::markDirty()
  * qmath.h: Fix \fn commands for qFloor(), qCeil()
  * QHashSeed: Drop incorrect usage of \relates

Fixes: QTBUG-93942
Task-number: QTBUG-93995
Change-Id: If76b5aa4b79a64add3cb6275eac82ec44ef10319
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
This commit is contained in:
Topi Reinio 2021-05-28 12:58:33 +02:00 committed by Topi Reiniö
parent 96afaf41ca
commit bee6f91686
7 changed files with 15 additions and 35 deletions

View File

@ -0,0 +1,2 @@
#include <QtCore/QtCore>
#include "../../platform/android/qandroidextras_p.h"

View File

@ -58,5 +58,7 @@ struct _jclass;
typedef _jclass* jclass;
struct _jobject;
typedef _jobject* jobject;
typedef int jint;
typedef int jmethodID;
typedef void* JavaVM;
#endif

View File

@ -5,6 +5,7 @@ project = QtCore
description = Qt Core Reference Documentation
version = $QT_VERSION
moduleheader = QtCoreDoc
includepaths += ./include
examplesinstallpath = corelib

View File

@ -54,8 +54,8 @@
*/
/*!
\fn int qCeil(qreal v)
Return the ceiling of the value \a v.
\fn template <typename T> int qCeil(T v)
Returns the ceiling of the value \a v.
The ceiling is the smallest integer that is not less than \a v.
For example, if \a v is 41.2, then the ceiling is 42.
@ -65,8 +65,8 @@
*/
/*!
\fn int qFloor(qreal v)
Return the floor of the value \a v.
\fn template <typename T> int qFloor(T v)
Returns the floor of the value \a v.
The floor is the largest integer that is not greater than \a v.
For example, if \a v is 41.2, then the floor is 41.

View File

@ -927,7 +927,7 @@ QString QPropertyBindingError::description() const
*/
/*!
\fn QUntypedPropertyBinding QUntypedBindable::makeBinding(const QPropertyBindingSourceLocation &location)
\fn QUntypedPropertyBinding QUntypedBindable::makeBinding(const QPropertyBindingSourceLocation &location) const
Creates a binding returning the underlying properties' value, using a specified source \a location.
*/
@ -940,7 +940,7 @@ QString QPropertyBindingError::description() const
*/
/*!
\fn template<typename Functor> QPropertyChangeHandler<Functor> QUntypedBindable::onValueChanged(Functor f)
\fn template<typename Functor> QPropertyChangeHandler<Functor> QUntypedBindable::onValueChanged(Functor f) const
Installs \a f as a change handler. Whenever the underlying property changes, \a f will be called, as
long as the returned \c QPropertyChangeHandler and the property are kept alive.
@ -950,7 +950,7 @@ QString QPropertyBindingError::description() const
*/
/*!
\fn template<typename Functor> QPropertyChangeHandler<Functor> QUntypedBindable::subscribe(Functor f)
\fn template<typename Functor> QPropertyChangeHandler<Functor> QUntypedBindable::subscribe(Functor f) const
Behaves like a call to \a f followed by \c onValueChanged(f),
@ -1027,7 +1027,7 @@ QString QPropertyBindingError::description() const
*/
/*!
\fn template<typename T> QPropertyBinding<T> QBindable<T>::makeBinding(const QPropertyBindingSourceLocation &location)
\fn template<typename T> QPropertyBinding<T> QBindable<T>::makeBinding(const QPropertyBindingSourceLocation &location) const
Constructs a binding evaluating to the underlying property's value, using a specified source
\a location.
@ -1187,31 +1187,6 @@ QString QPropertyBindingError::description() const
this property is read.
*/
/*!
\fn template <typename T> void QProperty<T>::markDirty()
Programatically sets the property dirty. Any binding which depends on it will
be notified.
This can be useful for properties which do not only depend on bindable properties,
but also on non-bindable properties or some other state.
For example, assume we have a \c Circle class, with a non-bindable \c radius property
and a corresponding \c radiusChanged signal. We now want to create a property for a
cylinders volume, based on a height \c QProperty and an instance of Circle. To ensure
that the volume changes, we can call setDirty in a slot connected to radiusChanged.
\code
Circle circle;
QProperty<double> height;
QProperty<double> volume;
volume.setBinding([&]() {return height * std::pi_v<double> * circle.radius() * circle.radius()};
QOBject::connect(&circle, &Circle::radiusChanged, [&](){volume.markDirty();});
\endcode
\note Binding to a QObjectBindableProperty's signal does not make sense in general. Bindings
across bindable properties get marked dirty automatically.
*/
/*!
\fn template <typename T> QPropertyBinding<T> QProperty<T>::setBinding(const QPropertyBinding<T> &newBinding)

View File

@ -811,7 +811,8 @@ QJniObject QAndroidIntent::handle() const
/*!
\namespace QtAndroid
\namespace QtAndroidPrivate
\preliminary
\inmodule QtCore
\since 6.2
\brief The QtAndroid namespace provides miscellaneous functions to aid Android development.

View File

@ -780,7 +780,6 @@ static size_t qt_initialize_qhash_seed()
/*!
\class QHashSeed
\relates QHash
\since 6.2
The QHashSeed class is used to convey the QHash seed. This is used