Details
-
Bug
-
Resolution: Won't Do
-
P4: Low
-
None
-
6.5.3
-
None
Description
Trying to upgrade to QT 6 on a project of mine, I am getting errors like this:
/usr/include/qt6/QtCore/qcontainerfwd.h:34:7: error: conflicting declaration 'using QStringList = class QList<QString>'
in files with forward declarations for <QStringList>, see for example the sample minimal project I attached.
Now, I noticed that in that header the definition is guarded by a Q_QDOC conditional:
#ifndef Q_QDOC template<typename T> using QVector = QList<T>; using QStringList = QList<QString>; class QByteArray; using QByteArrayList = QList<QByteArray>; #else template<typename T> class QVector; class QStringList; class QByteArrayList; #endif
but I don't know why the two branches get a different definition; however, I am not compiling Qt with QDOC so this seems to be relevant.
Can you tell me if this is an actual QT bug (maybe your builds are usually done WITH QDOC and this path does not get often tested) or I missed some documentation that says in Qt 6 you are not supposed to use simple forward declarations like:
class QStringList;
in a header?