Test Class
TestQDoc::Test
TestCPP
TestCPP Reference Documentation
A class in a namespace.
This class was introduced in Qt 2.0.
Header
Test
Since
Qt 2.0
CMake
find_package(Qt6 REQUIRED COMPONENTS QDocTest)
target_link_libraries(mytarget PRIVATE Qt6::QDocTest)
qmake
QT += testcpp
Inherited By
TestQDoc::TestDerived
Group
Test is part of testgroupTest C++ Types
Detailed Description
Member Type Documentation
Test::SomeType
SomeType
public
active
unspecified
A typedef.
Member Function Documentation
[protected] void Test::overload()
[protected, since Test 1.2] void Test::overload(bool b)
Overloads that share a documentation comment, optionally taking a parameter b.
[noexcept default] Test::Test()
Test
default
constructor
Test() = default
public
active
unspecified
Default constructor.
void (*)(bool) Test::funcPtr(bool b, const char *s)
void (*)(bool)
funcPtr
bool
b
const char *
s
plain
void (*)(bool) funcPtr(bool b, const char *s)
public
active
unspecified
Returns a pointer to a function that takes a boolean. Uses b and s.
void Test::inlineFunction()
inlineFunction
plain
void inlineFunction()
public
active
unspecified
An inline function, documented using the \fn QDoc command.
void Test::methodWithEmDashInItsDocs()
methodWithEmDashInItsDocs
plain
void methodWithEmDashInItsDocs()
public
active
unspecified
This method has em dashes in its documentation—as you'll find represented by --- in the sources—here and there. The important bit to note is that when passed e.g. to the \c command, the three hyphens are processed as input to the command and not replaced by an em dash.
-----------------------------------------------------------------------
People can still add a bunch of dashes, though, without QDoc replacing them all with a series of em dashes.
—You can also start a new paragraph with an em dash, if you want to.
See Also
See also
methodWithEnDashInItsDocs
void Test::methodWithEnDashInItsDocs()
methodWithEnDashInItsDocs
plain
void methodWithEnDashInItsDocs()
public
active
unspecified
This method has en dashes in its documentation – as you'll find represented by -- in the sources – here and there. The important bit to note is that when passed e.g. to the \c command, the two hyphens are processed as input to the command and not replaced by an en dash. This also applies to code blocks, where otherwise, the decrement operator would get completely borked:
for (int i = 42; i > 0; --i)
// Do something cool during countdown.
...as it would be silly if this would output –i instead of --i.
-----------------------------------------------------------------------
It still allows people to add a bunch of dashes, though, without replacing them all with a series of en dashes. Of course, they might want to use the \hr command instead, like this:
– You can also start a new paragraph with an en dash, if you want to.
See Also
See also
methodWithEnDashInItsDocs
int Test::someFunction(int, int v = 0)
int
someFunction
int
int
v
0
plain
int someFunction(int, int v)
public
active
unspecified
Function that takes a parameter v. Also returns the value of v.
void Test::someFunctionDefaultArg(int i, bool b = false)
someFunctionDefaultArg
int
i
bool
b
false
plain
void someFunctionDefaultArg(int i, bool b)
public
active
unspecified
Function that takes a parameter i and b.
[virtual] void Test::virtualFun()
virtual
virtualFun
plain
void virtualFun()
public
active
unspecified
Function that must be reimplemented.
[noexcept default] TestQDoc::Test &Test::operator=(TestQDoc::Test &&other)
TestQDoc::Test &
operator=
TestQDoc::Test &&
other
default
move-assign
TestQDoc::Test & operator=(TestQDoc::Test &&other) = default
public
active
unspecified
Move-assigns other.
Related Non-Members
bool operator==(const TestQDoc::Test &lhs, const TestQDoc::Test &rhs)
bool
operator==
const TestQDoc::Test &
lhs
const TestQDoc::Test &
rhs
plain
bool operator==(const TestQDoc::Test &lhs, const TestQDoc::Test &rhs)
public
active
unspecified
Returns true if lhs and rhs are equal.
Macro Documentation
[since Test 1.1] QDOCTEST_MACRO2(int &x)
QDOCTEST_MACRO2
int &
x
macrowithparams
QDOCTEST_MACRO2(int &x)
public
active
unspecified
A macro with argument x.
This macro was introduced in Test 1.1.
Obsolete Members for Test
The following members of class Test are deprecated. We strongly advise against using them in new code.
Obsolete Member Function Documentation
TestQDoc::Test &Test::operator++()
TestQDoc::Test &Test::operator--()
This function is deprecated. We strongly advise against using it in new code.
void Test::anotherObsoleteMember()
anotherObsoleteMember
plain
void anotherObsoleteMember()
public
deprecated
unspecified
This function is deprecated. We strongly advise against using it in new code.
Use obsoleteMember() instead.
void Test::deprecatedMember()
deprecatedMember
plain
void deprecatedMember()
public
deprecated
unspecified
This function is deprecated since 6.0. We strongly advise against using it in new code.
Use someFunction() instead.
void Test::obsoleteMember()
obsoleteMember
plain
void obsoleteMember()
public
deprecated
unspecified
This function is deprecated. We strongly advise against using it in new code.
Use someFunction() instead.