[Development] Bug in qdoc or in component between chair and keyboard?
Lincoln Ramsay
a1291762 at gmail.com
Thu Sep 27 05:02:57 CEST 2012
On 27/09/12 11:58, Thiago A. CorrĂȘa wrote:
> I've submitted this changeset:
> https://codereview.qt-project.org/#change,35790 and qdoc complains
> about an override in documentation. Basically, the two
> QSqlQuery::value signatures are identical except that one is a
> template method and the other is a simple method returning QVariant.
> Shouldn't qdoc handle this? Or is it my fault that I'm missing something?
As far as I know, qdoc does not understand templates at all. Since it
doesn't consider the return type, the two functions look exactly the
same to it.
You can hide one from it using:
#ifndef Q_QDOC
// hidden from qdoc
#endif
And then in the documentation for the other, mention the templated and
non-templated options.
eg.
Note that this function can also be called using a template to avoid
wrapping the returned value in QVariant.
\code
SomeType x = func().value<SomeType>();
SomeType x = func<SomeType>();
\endcode
--
Link
More information about the Development
mailing list