doc: Fix remaining clang parsing errors in QtTest

This update also corrects all the remaining qdoc warnings
in the mnodule.

Change-Id: I1cea2cb1dd515d075a1e49a52ca78fc407c3a324
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
This commit is contained in:
Martin Smith 2018-01-15 15:57:12 +01:00
parent 0a3061e871
commit 52d761e60a
7 changed files with 81 additions and 27 deletions

View File

@ -172,13 +172,13 @@ private:
This enumeration specifies how QAbstractItemModelTester should report
a failure when it tests a QAbstractItemModel subclass.
\value FailureReportingMode::QtTest The failures will be reported through
\value QtTest The failures will be reported through
QtTest's logging mechanism.
\value FailureReportingMode::Warning The failures will be reported as
\value Warning The failures will be reported as
warning messages in the \c{qt.modeltest} logging category.
\value FailureReportingMode::Fatal A failure will cause immediate and
\value Fatal A failure will cause immediate and
abnormal program termination. The reason for the failure will be reported
using \c{qFatal()}.
*/
@ -296,7 +296,7 @@ void QAbstractItemModelTesterPrivate::runAllTests()
data();
}
/*!
/*
nonDestructiveBasicTest tries to call a number of the basic functions (not all)
to make sure the model doesn't outright segfault, testing the functions that makes sense.
*/
@ -322,7 +322,7 @@ void QAbstractItemModelTesterPrivate::nonDestructiveBasicTest()
model->roleNames();
}
/*!
/*
Tests model's implementation of QAbstractItemModel::rowCount(),
columnCount() and hasChildren().
@ -364,7 +364,7 @@ void QAbstractItemModelTesterPrivate::rowAndColumnCount()
// rowCount() / columnCount() are tested more extensively in checkChildren()
}
/*!
/*
Tests model's implementation of QAbstractItemModel::hasIndex()
*/
void QAbstractItemModelTesterPrivate::hasIndex()
@ -388,7 +388,7 @@ void QAbstractItemModelTesterPrivate::hasIndex()
// but this catches the big mistakes
}
/*!
/*
Tests model's implementation of QAbstractItemModel::index()
*/
void QAbstractItemModelTesterPrivate::index()
@ -411,7 +411,7 @@ void QAbstractItemModelTesterPrivate::index()
// but this catches the big mistakes
}
/*!
/*
Tests model's implementation of QAbstractItemModel::parent()
*/
void QAbstractItemModelTesterPrivate::parent()
@ -461,7 +461,7 @@ void QAbstractItemModelTesterPrivate::parent()
checkChildren(QModelIndex());
}
/*!
/*
Called from the parent() test.
A model that returns an index of parent X should also return X when asking
@ -560,7 +560,7 @@ void QAbstractItemModelTesterPrivate::checkChildren(const QModelIndex &parent, i
}
}
/*!
/*
Tests model's implementation of QAbstractItemModel::data()
*/
void QAbstractItemModelTesterPrivate::data()
@ -612,7 +612,7 @@ void QAbstractItemModelTesterPrivate::data()
return;
}
/*!
/*
Store what is about to be inserted to make sure it actually happens
\sa rowsInserted()
@ -633,7 +633,7 @@ void QAbstractItemModelTesterPrivate::rowsAboutToBeInserted(const QModelIndex &p
insert.push(c);
}
/*!
/*
Confirm that what was said was going to happen actually did
\sa rowsAboutToBeInserted()
@ -685,7 +685,7 @@ void QAbstractItemModelTesterPrivate::layoutChanged()
changing.clear();
}
/*!
/*
Store what is about to be inserted to make sure it actually happens
\sa rowsRemoved()
@ -706,7 +706,7 @@ void QAbstractItemModelTesterPrivate::rowsAboutToBeRemoved(const QModelIndex &pa
remove.push(c);
}
/*!
/*
Confirm that what was said was going to happen actually did
\sa rowsAboutToBeRemoved()

View File

@ -106,7 +106,9 @@ static void initPerf()
}
}
/*!
// This class does not exist in the API so it's qdoc comment marker was removed.
/*
\class QBenchmarkPerfEvents
\brief The Linux perf events benchmark backend

View File

@ -96,7 +96,8 @@ public:
initArgs(mo->method(sigIndex), obj);
}
#ifdef Q_QDOC
#ifdef Q_CLANG_QDOC
template <typename PointerToMemberFunction>
QSignalSpy(const QObject *object, PointerToMemberFunction signal);
#else
template <typename Func>
@ -136,7 +137,7 @@ public:
sig = signalMetaMethod.methodSignature();
initArgs(mo->method(sigIndex), obj);
}
#endif // Q_QDOC
#endif // Q_CLANG_QDOC
inline bool isValid() const { return !sig.isEmpty(); }
inline QByteArray signal() const { return sig; }

View File

@ -72,7 +72,7 @@
\snippet code/doc_src_qsignalspy.cpp 4
*/
/*! \fn QSignalSpy::QSignalSpy(const QObject *object, PointerToMemberFunction signal)
/*! \fn template <typename PointerToMemberFunction> QSignalSpy::QSignalSpy(const QObject *object, PointerToMemberFunction signal)
\since 5.4
Constructs a new QSignalSpy that listens for emissions of the \a signal

View File

@ -113,7 +113,7 @@ template<> inline char *toString(const QRegion &region)
return qstrdup(result.constData());
}
#ifndef QT_NO_VECTOR2D
#if !defined(QT_NO_VECTOR2D) || defined(Q_CLANG_QDOC)
template<> inline char *toString(const QVector2D &v)
{
QByteArray result = "QVector2D(" + QByteArray::number(double(v.x())) + ", "
@ -121,7 +121,7 @@ template<> inline char *toString(const QVector2D &v)
return qstrdup(result.constData());
}
#endif // !QT_NO_VECTOR2D
#ifndef QT_NO_VECTOR3D
#if !defined(QT_NO_VECTOR3D) || defined(Q_CLANG_QDOC)
template<> inline char *toString(const QVector3D &v)
{
QByteArray result = "QVector3D(" + QByteArray::number(double(v.x())) + ", "
@ -129,7 +129,7 @@ template<> inline char *toString(const QVector3D &v)
return qstrdup(result.constData());
}
#endif // !QT_NO_VECTOR3D
#ifndef QT_NO_VECTOR4D
#if !defined(QT_NO_VECTOR4D) || defined(Q_CLANG_QDOC)
template<> inline char *toString(const QVector4D &v)
{
QByteArray result = "QVector4D(" + QByteArray::number(double(v.x())) + ", "

View File

@ -877,7 +877,42 @@
*/
/*!
\fn char *QTest::toString(const T &value)
\fn template <typename T1, typename T2> char *QTest::toString(const QPair<T1, T2> &pair)
\overload
\since 5.11
Returns a textual representation of the \a pair.
*/
/*!
\fn template <typename T1, typename T2> char *QTest::toString(const std::pair<T1, T2> &pair)
\overload
\since 5.11
Returns a textual representation of the \a pair.
*/
/*!
\fn char *QTest::toString(const QVector2D &v)
\overload
\since 5.11
Returns a textual representation of the 2D vector \a v.
*/
/*!
\fn char *QTest::toString(const QVector3D &v)
\overload
\since 5.11
Returns a textual representation of the 3D vector \a v.
*/
/*!
\fn char *QTest::toString(const QVector4D &v)
\overload
\since 5.11
Returns a textual representation of the 4D vector \a v.
*/
/*!
\fn template<typename T> char *QTest::toString(const T &value)
Returns a textual representation of \a value. This function is used by
\l QCOMPARE() to output verbose information in case of a test failure.
@ -927,6 +962,22 @@
Returns a string containing \c{nullptr}.
*/
/*!
\fn char *QTest::toString(const QStringView &string)
\overload
\since 5.11
Returns a textual representation of the given \a string.
*/
/*!
\fn char *QTest::toString(const QUuid &uuid)
\overload
\since 5.11
Returns a textual representation of the given \a uuid.
*/
/*!
\fn char *QTest::toString(const QString &string)
\overload
@ -1075,7 +1126,7 @@
\sa QTest::qSleep(), QSignalSpy::wait()
*/
/*! \fn void QTest::qWaitFor(Functor predicate, int timeout)
/*! \fn template <typename Functor> bool QTest::qWaitFor(Functor predicate, int timeout)
Waits for \a timeout milliseconds or until the \a predicate returns true.

View File

@ -205,13 +205,13 @@ private:
QWindow *targetWindow;
QTouchDevice *device;
bool commitWhenDestroyed;
#ifdef QT_WIDGETS_LIB
friend QTouchEventSequence touchEvent(QWidget *, QTouchDevice*, bool);
#if defined(QT_WIDGETS_LIB) || defined(Q_CLANG_QDOC)
friend QTouchEventSequence touchEvent(QWidget *widget, QTouchDevice *device, bool autoCommit);
#endif
friend QTouchEventSequence touchEvent(QWindow *, QTouchDevice*, bool);
friend QTouchEventSequence touchEvent(QWindow *window, QTouchDevice *device, bool autoCommit);
};
#ifdef QT_WIDGETS_LIB
#if defined(QT_WIDGETS_LIB) || defined(Q_CLANG_QDOC)
inline
QTouchEventSequence touchEvent(QWidget *widget,
QTouchDevice *device,