diff options
author | Topi Reinio <topi.reinio@qt.io> | 2021-05-28 12:58:33 +0200 |
---|---|---|
committer | Topi Reiniƶ <topi.reinio@qt.io> | 2021-06-01 11:44:43 +0000 |
commit | bee6f9168689b0b3659f9f13da2cb5ba2d7e01f4 (patch) | |
tree | 49e3b7d845caf24af990bde7f51f9257f0caa969 /src | |
parent | 96afaf41ca30fc77f92b0ad01e65c767a944354a (diff) |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/doc/include/QtCoreDoc | 2 | ||||
-rw-r--r-- | src/corelib/doc/include/jni.h | 2 | ||||
-rw-r--r-- | src/corelib/doc/qtcore.qdocconf | 1 | ||||
-rw-r--r-- | src/corelib/kernel/qmath.qdoc | 8 | ||||
-rw-r--r-- | src/corelib/kernel/qproperty.cpp | 33 | ||||
-rw-r--r-- | src/corelib/platform/android/qandroidextras.cpp | 3 | ||||
-rw-r--r-- | src/corelib/tools/qhash.cpp | 1 |
7 files changed, 15 insertions, 35 deletions
diff --git a/src/corelib/doc/include/QtCoreDoc b/src/corelib/doc/include/QtCoreDoc new file mode 100644 index 0000000000..3dc7ce46e5 --- /dev/null +++ b/src/corelib/doc/include/QtCoreDoc @@ -0,0 +1,2 @@ +#include <QtCore/QtCore> +#include "../../platform/android/qandroidextras_p.h" diff --git a/src/corelib/doc/include/jni.h b/src/corelib/doc/include/jni.h index 09186969dd..03b289a229 100644 --- a/src/corelib/doc/include/jni.h +++ b/src/corelib/doc/include/jni.h @@ -58,5 +58,7 @@ struct _jclass; typedef _jclass* jclass; struct _jobject; typedef _jobject* jobject; +typedef int jint; +typedef int jmethodID; typedef void* JavaVM; #endif diff --git a/src/corelib/doc/qtcore.qdocconf b/src/corelib/doc/qtcore.qdocconf index 3699bc84c3..750c5d2762 100644 --- a/src/corelib/doc/qtcore.qdocconf +++ b/src/corelib/doc/qtcore.qdocconf @@ -5,6 +5,7 @@ project = QtCore description = Qt Core Reference Documentation version = $QT_VERSION +moduleheader = QtCoreDoc includepaths += ./include examplesinstallpath = corelib diff --git a/src/corelib/kernel/qmath.qdoc b/src/corelib/kernel/qmath.qdoc index 13655bcc11..f8d1f2c0f7 100644 --- a/src/corelib/kernel/qmath.qdoc +++ b/src/corelib/kernel/qmath.qdoc @@ -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. diff --git a/src/corelib/kernel/qproperty.cpp b/src/corelib/kernel/qproperty.cpp index 259586bf44..86a8285bc1 100644 --- a/src/corelib/kernel/qproperty.cpp +++ b/src/corelib/kernel/qproperty.cpp @@ -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. @@ -1188,31 +1188,6 @@ QString QPropertyBindingError::description() const */ /*! - \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) Associates the value of this property with the provided \a newBinding diff --git a/src/corelib/platform/android/qandroidextras.cpp b/src/corelib/platform/android/qandroidextras.cpp index 8d1b41bf80..91e737e914 100644 --- a/src/corelib/platform/android/qandroidextras.cpp +++ b/src/corelib/platform/android/qandroidextras.cpp @@ -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. diff --git a/src/corelib/tools/qhash.cpp b/src/corelib/tools/qhash.cpp index 743093bc4e..38c3f9cef6 100644 --- a/src/corelib/tools/qhash.cpp +++ b/src/corelib/tools/qhash.cpp @@ -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 |