The \fn commands were not recognized by clang-qdoc because
the template stuff was missing from the \fn commands. This
update adds the correct template text and parameters.
Change-Id: If45465880933174f1481a8be292474be191cfd45
Reviewed-by: Martin Smith <martin.smith@qt.io>
This update corrects many qdoc warnings in qglobal.cpp caused by
incomplete \fn commands. It also corrects many undocumented parameter
errors caused by clang's requirement that the formal parameter names
be the same in both the declaration in the include file and the \fn
command.
Some formal parameter names were changed in the declarations in the
header file.
Change-Id: I4cd38f30461c585b97ec11923cdbc81a41fe00b8
Reviewed-by: Martin Smith <martin.smith@qt.io>
There were four dummy declarations for struct QMetaObject that were
needed by old qdoc to allow documentation of some very complicated
function signatures that old qdoc could not parse. clangqdoc can now
parse these signatures, but, unfortunately, old qdoc is still used to
parse \fn commands in .cpp and .qdoc files, so the dummy declarations
are still needed in struct QMetaObject. However, clangqdoc now
sees that two of the four dummy declarations are actually duplicates
of the other two, and then old qdoc complains when it can't find all
four of the function nodes, when it parses the four \fn commands.
This update removes the duplicate dummy declarations and the two
redundant \fn comments. The remaining two \fn comments are
updated accordingly.
This change also moves a couple of qdoc comments so they are located
with the function definitions that they are documenting.
Change-Id: I85e2492ba0380b01c3700b3dc7db0913d6429701
Reviewed-by: Martin Smith <martin.smith@qt.io>
All of QLocalePrivate::codeToLanguage()'s legacy codes were
two-letter, so duplicated a "third letter is 0" check; pulling it out
in front of them all will get any three-letter code more promptly to
the final fall-back, while saving the two-letter codes repetition of
the check.
Change-Id: I8ee81a526adaa7b24c11c1de7a1750d87deb5fb3
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
The documentation claims that function objects just work with
map-reduce. They work for the map function, but not for the reduce
function. Making them work for the reduce function was deemed
too complex for questionable benefit, so this patch explains
the situation and provides a work-around.
Task-number: QTBUG-22710
Change-Id: I7f706468e36031bc261234310d331001b96e5137
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
Reviewed-by: Nico Vertriest <nico.vertriest@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
- There was a typo
- It has not been limited to the 4D mouse for some time now
- The Apple Pencil now supports rotation too
Change-Id: I96e20a56491fbcb80e19dc39d0b48b543217aa24
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
It was superseded by begin()/end() in Qt 5.8.
The eventual removal of rects() will allow greater flexibility
in the implementation's choice of data structure (std::vector,
e.g., or QVarLengthArray).
Remove all traces of rects() from the documentation. This means
we need to copy information previously contained in the rects()
docs to functions which previously just referred to rects(), in
particular the begin()/end() familiy of functions.
Change-Id: I90809809783252f7c552f24b4841f1e965580284
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Use being()/end() instead.
These were the last remaining uses of QRegion::rects() within qtbase.
Change-Id: I264beb6f660968f40eecbbee2260341fca94ddb5
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
The introduction of begin()/end() actually made most tests
that still use rects() duplicates. Keep them, though, for
test coverage (rects() takes a very different code path
from begin()/end()), but, under the assumption that Qt at
some point will default to built with deprecated APIs dis-
abled, make the test compile with disabled deprecated API.
Port some checks that still used rects() to begin()/end().
Change-Id: Ia7da80f0cd6ef69693f54a474924683624a2c3eb
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Add the command line switch added in change
184c5470f534119b27c1a4caec29d699aba9c234 on qtdeclarative to the
help output of the qmltestrunner application.
Change-Id: I9f42719500e0039afa6a5b0f1f365611855229b3
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
I don't know when it ceased to be needed, but QRegion no longer
does anything fancy with QVector.
Change-Id: I1bdfefc84724c379fab76dada35575666144df12
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Use begin()/end() instead.
The old code extracted the rects from the region, then checked for a 'complex'
region (by comparing the number of rectangles against 10), and replacing the
region with the bounding rect if it was too complex. It then went on to adjust
the rectangle list it had gotten from the original region to match the new.
Simply delay getting the rectangles until after we have modified the region.
Since there are many member function calls in-between, take a copy of the
region to iterate over later, rather than relying on the region to be left
untouched by all the code in-between.
Change-Id: I49ddf4d545520ab435ab6b89eec3d24cf371823e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Use begin()/end() instead.
In QXcbShmImage::flushPixmap(), instead of gettings different rects(),
depending on a bool parameter, just call yourself again with the
modified QRegion, which we can then just iterate over.
Change-Id: I6d4f7c6e4e5d2a24520716847ca9331bf39337c8
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
... between QXcbWindow and QxcbShmImage.
Replaces one QRegion::rects() call (to be deprecated), fixes potential overflows
that QXcbShmImage did not handle, but QXcbWindow did, and saves ~1KiB of text size.
Change-Id: I55d37021164feefe0cb3e60bd6d22b1976a6467b
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Use begin()/end()/rectCount() instead, which don't require QRegionPrivate
::vectorize() calls.
In QPaintEngineEx::clip(), the rectCount() == 1 case called clip(QRect), but
forgot to return, causing another clip(QVectorPath) call with the same
arguments. Fixed.
Change-Id: Ife33112fc8006ed4bdff6409e2b8465ce7acb9d1
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Drop the useless copy 'r' of 'region', reuse 'r' for the rects in 'region',
to clean up the region handling in verifyColor().
Change-Id: I8e159976b4b0152823be864488d2ef25d7cb0078
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Wrap std::free() in a function object, to avoid having to carry around
state (the function pointer) inside unique_ptr objects. This shrinks
unique_ptrs back to sizeof(void*).
Change-Id: I32a711192c5485dc04e3b36a1ddabf02d1e9d4f9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
This update corrects many qdoc warnings in qsharedpointer.cpp and
qshareddata.cpp caused by incomplete \fn commands. Template stuff
was added to the \fn commands.
Change-Id: Ic10bcf04477d5f3d5380aeb1e58050a88f03005a
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
This update corrects several uses of #ifdef macros
that needed updating because qdoc now uses clang to
parse header files.
Change-Id: I285efa4629a1a5d5bcbfaf701eeafbd0e9f1e43e
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
It is only ever called after the constructor, so merge the code
Change-Id: I5c75a2cd367af401b41920f51754a64dc6c6eb40
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
It is only ever called after the constructor so merge the code
Change-Id: I381165ad90c85342e5db3c16327d729388b71fb2
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
It's only ever called after the constructor so merge its code to the constructor
Change-Id: Icca88764f725b9aeaa08ee7387da8885be247fba
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
And move it's code to the only place it is called, the QUnixPrintWidget constructor,
that means we can remove the if that checks if propertiesDialog is not null since
at that stage we know it is null
Change-Id: I81cdaa0505fa6fe64a45c7d1f5c3e277400cbbf7
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
In Qt 5.4 these envvars were replaced with categorized logging
59ba84d31c. This is not a public
API, the log output is useful mostly for developers and it can
still be used via QT_LOGGING_RULES, so there is no good reason
to keep the old envvars around. By using QT_LOGGING_RULES, we
can access even more xinput2 logs than is available via
QT_XCB_DEBUG_XINPUT*.
Change-Id: I2b12b8696043bc8bf8310f49f0cdc2ba1b8708ba
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
This change supplies several missing class qualifiers for
parameter types and function return types.
Change-Id: I569026e4da0948902fcc13557003d3748b85dd82
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
This update corrects about 200 qdoc warnings caused by incomplete
\fn commands for member functions of template classes. It can be
used as an example of how to fix \fn commands that suddenly cause
qdoc warnings now that qdoc uses clang to parse the \fn commands.
For example, with the old qdoc, we had this \fn command, which the
old qdoc handled correctly:
\fn QAtomicInteger::operator T() const
For the new clang-based qdoc, this \fn command must be written this way:
\fn template <typename T> QAtomicInteger<T>::operator T() const
However, the documentation generated by the clang-based qdoc looks the
same as it did in the old qdoc.
Change-Id: I7803b3b7ec7c6b8b3cc1be789bc36921438f527e
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Use begin()/end() instead.
Drop the special handling of rectCount() == 1, since with begin()/end(),
we no longer take the hit of creating a QVector just to be able to return
it from rects().
Change-Id: I19ebc38267951c80bc71aa9d2b5df7403d710064
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
A few parameter types in \fn commands were not
qualified with their class name. They had to be
qualified because they were in a base class of
the class being documented.
Change-Id: Ic0b43be689d17a0a539ee977c0db6e20eb05d5fe
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Prioritize CoreText over Fontconfig since the former is the
native one on macOS, and any other native font DB on its
respective platform. We introduce a new 'fontconfig' option
to allow using Fontconfig instead. This works similarly to
'freetype' overriding the default font engine on Windows. A
propos of which, 'freetype' now does the same on macOS.
Change-Id: Ic8168820d1d01fddc2f26e046abb65b8ab765f89
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
These errors resulted from clang parsing function
declarations for functions that were not meant to
be documented. Here they are hidden from clang
with #ifndef Q_CLANG_QDOC
Change-Id: I256b49830b63188bf0a685cb393d469f2f2ca315
Reviewed-by: Martin Smith <martin.smith@qt.io>
There are two fake classes in qendian.h that exist only documenting
a lot of operator functions, but now that clang is being used to parse
all C++ code, when a class is a template class, clangqdoc must see its
template stuff to recognize template type T, for example. Hence, this
update adds template<typename T> to some fake class declarations used
only for documentation purposes. ie, inside #ifdef Q_CLANG_QDOC.
Change-Id: I1988b77cd7f3bb97067e7107dd00de34770e9fed
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
This change updates the \fn commands in the endian
functions, which are template-based. clangqdoc now
parses these \fn commands and expects to see all the
template stuff in the signatures.
Change-Id: I94c1aba8d710c97b8d41184d64b5341c88ece297
Reviewed-by: Martin Smith <martin.smith@qt.io>
The \fn commands were not recognized by clang-qdoc because
the template stuff was missing from the \fn commands. This
update adds the correct template text and parameters.
Change-Id: I920d9cc4bef710f276267a34b6b9d49f7412adb0
Reviewed-by: Martin Smith <martin.smith@qt.io>
For ibus-hangul, it needs ForwardKeyEvent signal to fix
the commit issue.
[ChangeLog][plugins][ibus] Support ForwardKeyEvent signal
Change-Id: If41e75bed9ec4e3126db05c8ece4a51d2bc3c3fd
Reviewed-by: Takao Fujiwara <takao.fujiwara1@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
The macros Q_GLOBAL_STATIC(Type, VariableName) and
Q_GLOBAL_STATIC_WITH_ARGS(Type, VariableName, Arguments)
were documented in qglobal.cpp, but both qdoc comments
were marked \internal. More recent documentation for the
macros also exists in qglobalstatic.qdoc, and the qdoc
comments there are not marked \internal. clang-qdoc
reports errors indicating that both macros havew been
documented in two places. This update removes the older
comments that are marked \internal.
Change-Id: I1c319b831d705d86eb4142b9963dbf56edc72772
Reviewed-by: Martin Smith <martin.smith@qt.io>
This change updates the \fn commands in QGenericMatrix
clangqdoc now parses these \fn commands and expects to see
all the template stuff in the signatures.
Change-Id: Icf815606f98271aae1959adc633e918e7f241aa0
Reviewed-by: Martin Smith <martin.smith@qt.io>
_q_canWrite() unconditionally disabled the write notifier before the
writing, and might have enabled it again afterwards. This caused
unnecessary processing in the event dispatcher and could result in
extra system calls.
Actually setting the state at the moment when the write buffer size
is determined is enough.
Change-Id: I81f9ec27d95a5a9bdb83cc6a842b6ae95f002b96
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Clang needs to see declarations for GLclampf, GLSizei,
and GLboolean.
Change-Id: Id1c1310e4877b32bb8fc2e6d4f743999842b3f06
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
When Q_CLANG_QDOC is defined, ensure that the following openGL
types are defined:
typedef int GLint;
typedef int GLsizei;
typedef unsigned int GLuint;
typedef unsigned int GLenum;
typedef unsigned int GLbitfield;
typedef float GLfloat;
typedef float GLclampf;
typedef bool GLboolean;
typedef void GLvoid;
typedef char GLchar;
Running clangqdoc with these on macOS fixed over 500 qdoc errors!
There were also some functions that declared the parameter list as void.
It was also shown as void in the \fn command for each function in the
.cpp file, which is wrong. When the function is declared in the header
as int func(void), it should just be \fn int classname::func() in the
.cpp file.
Change-Id: I6489d499f0830e5ba97c085ed5dadfad5affecb7
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Two of the three functions were for functions that
should not be documented. The third was a function
protected by #ifndef Q_OS_DARWIN, which required a
test of Q_CLANG_QDOC in the header and cpp files.
Change-Id: Id2ab3e4f2ea896dc628a622de2e80a19c18eb9fe
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Some member functions of QImage were upgraded to use ref qualifiers,
but the documentation wasn't updated correctly to account for this.
This change update the documentation for those member functions to
show the ref qualifiers in the documentation.
Change-Id: I0ff4011e9d0251062d5616d69e9dda6bdbc1c136
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
This update surrounds some #defines with #ifndef Q_CLANG_QDOC
because they define some names that conflict with formal parameter
names. Otherwise, clang starts replacing formal parameter names
with $27 etc, when qdoc runs, and that causes trouble for qdoc.
The change also replaces one use of Q_QDOC with Q_CLANG_QDOC.
Change-Id: I6e93bf1e0d30d7590280b6f18f0e694556050685
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
A use of Q_QDOC is changed to Q_CLANG_QDOC.
A misspelled std type name is corrected.
A few extraneous ';' are removed.
Change-Id: Ic49f64a3b97f645268a8ecbbca5f0eef0456bb33
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>