Doxygen: arguments and methods with the same names
-
Slightly off topic, I realise, but I wanted to ask if anybody knows how to prevent doxygen producing links to methods from function arguments with the same name.
For example: in this documentation,QModelIndex buddy (const QModelIndex &index)
theindex
argument is made into a link to the totally unrelatedindex(int row, int column, const QModelIndex &parent
method. Do you know how to prevent this? -
-
-
-
Are you putting the method signature in the documentation or do you let Doxygen do that automatically ?
-
In the exameple above I have :
In header:
explicit TransposeProxyModel(QObject* parent = Q_NULLPTR); QModelIndex buddy(const QModelIndex &index) const Q_DECL_OVERRIDE;
in source:
/*! Constructs a new proxy model with the given \a parent. \param parent The Qt parent object */ TransposeProxyModel::TransposeProxyModel(QObject* parent) {/*some nasty implementation*/} /*! \reimp */ QModelIndex TransposeProxyModel::buddy(const QModelIndex &index) const { /*some nasty implementation*/ }
So the links are totally auto-generated
-
@VRonin said in Doxygen: arguments and methods with the same names:
\param parent The Qt parent object
in the link i've posted before the it's mentioned with
@param
, maybe this results in a different behavior?Also you can explicitly declare the function the documentation belongs to using \fn. Maybe then you can apply the workaround of @SGaist
-
Apparently this is a known bug: https://stackoverflow.com/questions/51212831/doxygen-arguments-and-methods-with-the-same-names