From b5222307af591c5360a64ffa311bde4a61af97d6 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 19 Oct 2016 16:37:53 +0200 Subject: [PATCH] Fix some qdoc-warnings qtbase/src/corelib/kernel/qdeadlinetimer.cpp:343: warning: Cannot find 'setPreciseRemainingTime(...)' in '\fn' void QDeadlineTimer::setPreciseRemainingTime(qint64 secs, unsigned nsecs, Qt::TimerType type) qtbase/src/corelib/kernel/qdeadlinetimer.cpp:459: warning: Overrides a previous doc qtbase/src/corelib/kernel/qelapsedtimer.cpp:86: warning: Unknown command '\ref' qtbase/src/corelib/global/qglobal.cpp:1184: warning: Undocumented enum item 'MV_WATCHOS_2_2' in QSysInfo::MacVersion qtbase/src/corelib/global/qglobal.cpp:1184: warning: Undocumented enum item 'MV_WATCHOS_3_0' in QSysInfo::MacVersion qtbase/src/corelib/global/qglobal.cpp:1184: warning: Undocumented enum item 'MV_WATCHOS' in QSysInfo::MacVersion qtbase/src/corelib/global/qglobal.cpp:1184: warning: Undocumented enum item 'MV_WATCHOS_2_1' in QSysInfo::MacVersion qtbase/src/corelib/global/qglobal.cpp:1184: warning: Undocumented enum item 'MV_WATCHOS_2_0' in QSysInfo::MacVersion qtbase/src/corelib/kernel/qdeadlinetimer.cpp:175: warning: Missing parameter name qtbase/src/corelib/kernel/qdeadlinetimer.cpp:175: warning: No such parameter 'ForeverConstant' in QDeadlineTimer::QDeadlineTimer() qtbase/src/corelib/kernel/qdeadlinetimer.h:156: warning: No documentation for 'QDeadlineTimer::remainingTimeAsDuration()' qtbase/src/gui/painting/qcolor.cpp:796: warning: Undocumented parameter 'name' in QColor::QColor() qtbase/src/gui/painting/qcolor.cpp:802: warning: Undocumented parameter 'name' in QColor::QColor() Some errors in QDeadlineTimer remain due to qdoc not fully supporting templates. Change-Id: Ie7afd91c48048748eeda23c32056583c31fd7490 Reviewed-by: Nico Vertriest Reviewed-by: Jake Petroules --- src/corelib/global/qglobal.cpp | 6 ++++++ src/corelib/kernel/qdeadlinetimer.cpp | 25 ++++--------------------- src/corelib/kernel/qelapsedtimer.cpp | 2 +- src/gui/painting/qcolor.cpp | 8 ++++++++ 4 files changed, 19 insertions(+), 22 deletions(-) diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index d06acb83b2b..6efdc4c22cc 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -1244,6 +1244,12 @@ bool qSharedBuild() Q_DECL_NOTHROW \value MV_TVOS_9_2 tvOS 9.2 \value MV_TVOS_10_0 tvOS 10.0 + \value MV_WATCHOS watchOS (any) + \value MV_WATCHOS_2_0 watchOS 2.0 + \value MV_WATCHOS_2_1 watchOS 2.1 + \value MV_WATCHOS_2_2 watchOS 2.2 + \value MV_WATCHOS_3_0 watchOS 3.0 + \value MV_None Not a Darwin operating system \sa WinVersion diff --git a/src/corelib/kernel/qdeadlinetimer.cpp b/src/corelib/kernel/qdeadlinetimer.cpp index 17a74b22d7f..d670637d53b 100644 --- a/src/corelib/kernel/qdeadlinetimer.cpp +++ b/src/corelib/kernel/qdeadlinetimer.cpp @@ -173,9 +173,9 @@ Q_DECL_CONST_FUNCTION static inline QPair toSecsAndNSecs(qint64 */ /*! - \fn QDeadlineTimer::QDeadlineTimer(ForeverConstant, Qt::TimerType timerType) + \fn QDeadlineTimer::QDeadlineTimer(ForeverConstant foreverConstant, Qt::TimerType timerType) - QDeadlineTimer objects created with parameter \a ForeverConstant never expire. + QDeadlineTimer objects created with parameter \a foreverConstant never expire. For such objects, remainingTime() will return -1, deadline() will return the maximum value, and isForever() will return true. @@ -295,7 +295,7 @@ void QDeadlineTimer::setRemainingTime(qint64 msecs, Qt::TimerType timerType) Q_D parameters are zero, this QDeadlineTimer will be marked as expired. The timer type for this QDeadlineTimer object will be set to the specified - \a type. + \a timerType. \sa setRemainingTime(), hasExpired(), isForever(), remainingTime() */ @@ -341,24 +341,7 @@ void QDeadlineTimer::setPreciseRemainingTime(qint64 secs, qint64 nsecs, Qt::Time */ /*! - \fn void QDeadlineTimer::setPreciseRemainingTime(qint64 secs, unsigned nsecs, Qt::TimerType type) - - Sets the remaining time for this QDeadlineTimer object to \a secs seconds - and \a nsecs nanoseconds from now, if \a secs is a positive value. If both - values are zero, this QDeadlineTimer object will be marked as expired, - whereas if \a secs is -1, it will set it to never expire. - - If value of \a nsecs is more than 1 billion nanoseconds (1 second), this - function will adjust \a secs accordingly. - - The timer type for this QDeadlineTimer object will be set to the specified \a type. - - \sa setRemainingTime(), hasExpired(), isForever(), remainingTime() -*/ - -/*! - \overload - \fn Duration QDeadlineTimer::remainingTime() const + \fn std::chrono::nanoseconds remainingTimeAsDuration() const Returns a \c{std::chrono::duration} object of type \c{Duration} containing the remaining time in this QDeadlineTimer, if it still has time left. If diff --git a/src/corelib/kernel/qelapsedtimer.cpp b/src/corelib/kernel/qelapsedtimer.cpp index 5e9d1317ac8..e578b5b8b38 100644 --- a/src/corelib/kernel/qelapsedtimer.cpp +++ b/src/corelib/kernel/qelapsedtimer.cpp @@ -83,7 +83,7 @@ QT_BEGIN_NAMESPACE \snippet qelapsedtimer/main.cpp 2 - It is often more convenient to use \ref{QDeadlineTimer} in this case, which + It is often more convenient to use \l{QDeadlineTimer} in this case, which counts towards a timeout in the future instead of tracking elapsed time. \section1 Reference Clocks diff --git a/src/gui/painting/qcolor.cpp b/src/gui/painting/qcolor.cpp index e3dbf663e15..6a8091bf8b3 100644 --- a/src/gui/painting/qcolor.cpp +++ b/src/gui/painting/qcolor.cpp @@ -795,12 +795,20 @@ QColor::QColor(Spec spec) Q_DECL_NOTHROW /*! \fn QColor::QColor(const char *name) + + Constructs a named color in the same way as setNamedColor() using + the given \a name. + \overload \sa setNamedColor(), name(), isValid() */ /*! \fn QColor::QColor(QLatin1String name) + + Constructs a named color in the same way as setNamedColor() using + the given \a name. + \overload \since 5.8 \sa setNamedColor(), name(), isValid()