clang-tidy Warnungen bei VSCode
-
Hallo zusammen,
aktuell verwende ich VSCode zum schreiben meiner Qt Programme. Allerdings bekomme ich hier jedemenge clang-tidy Warnungen, die sich mir nicht so ganz erschließen:
Variable has incomplete type 'class Q_DECL_IMPORT'
Bei meiner Klassendefinition:
class SKLIBSHARED_EXPORT SelSpielTable : public QAbstractTableModel { Q_OBJECT enum TableRoles { TableDataRole = Qt::UserRole + 1, }; constexpr static int ColCount {7}; public: explicit SelSpielTable(QObject *parentArg = nullptr); ~SelSpielTable(); int rowCount(const QModelIndex & = QModelIndex()) const override; int columnCount(const QModelIndex & = QModelIndex()) const override; QVariant data(const QModelIndex &, int) const override; QVariant headerData(int, Qt::Orientation, int) const override; QHash<int, QByteArray> roleNames() const override; void addListe(const QJsonObject &, QList<struct StructTischSpieler>); void clearListe(); QList<int16_t> getAktStand(); QList<int16_t> getStand(uint16_t); Q_INVOKABLE QVariant get_display_data(const QModelIndex &index); Q_SIGNALS: private: QList<QList<int16_t>> table; QList<struct StructTischSpieler> spieler; };
Wobei ich davor die Definition SKLIBSHARED_EXPORT mit einer Include Datei einbinde:
#if defined(SKLIB_LIBRARY) # define SKLIBSHARED_EXPORT Q_DECL_EXPORT #else # define SKLIBSHARED_EXPORT Q_DECL_IMPORT #endif
Hat einer eine Idee, wo da das Problem liegen könnte?
Danke für eure Hilfe.
gruss
martin -
Hallo zusammen,
aktuell verwende ich VSCode zum schreiben meiner Qt Programme. Allerdings bekomme ich hier jedemenge clang-tidy Warnungen, die sich mir nicht so ganz erschließen:
Variable has incomplete type 'class Q_DECL_IMPORT'
Bei meiner Klassendefinition:
class SKLIBSHARED_EXPORT SelSpielTable : public QAbstractTableModel { Q_OBJECT enum TableRoles { TableDataRole = Qt::UserRole + 1, }; constexpr static int ColCount {7}; public: explicit SelSpielTable(QObject *parentArg = nullptr); ~SelSpielTable(); int rowCount(const QModelIndex & = QModelIndex()) const override; int columnCount(const QModelIndex & = QModelIndex()) const override; QVariant data(const QModelIndex &, int) const override; QVariant headerData(int, Qt::Orientation, int) const override; QHash<int, QByteArray> roleNames() const override; void addListe(const QJsonObject &, QList<struct StructTischSpieler>); void clearListe(); QList<int16_t> getAktStand(); QList<int16_t> getStand(uint16_t); Q_INVOKABLE QVariant get_display_data(const QModelIndex &index); Q_SIGNALS: private: QList<QList<int16_t>> table; QList<struct StructTischSpieler> spieler; };
Wobei ich davor die Definition SKLIBSHARED_EXPORT mit einer Include Datei einbinde:
#if defined(SKLIB_LIBRARY) # define SKLIBSHARED_EXPORT Q_DECL_EXPORT #else # define SKLIBSHARED_EXPORT Q_DECL_IMPORT #endif
Hat einer eine Idee, wo da das Problem liegen könnte?
Danke für eure Hilfe.
gruss
martin@msauer751 said in clang-tidy Warnungen bei VSCode:
Wobei ich davor die Definition SKLIBSHARED_EXPORT mit einer Include Datei einbinde:
Hast du
#include <QtCore/QtGlobal>
in der Datei drin um die Macros zu kennen? -
@msauer751 said in clang-tidy Warnungen bei VSCode:
Wobei ich davor die Definition SKLIBSHARED_EXPORT mit einer Include Datei einbinde:
Hast du
#include <QtCore/QtGlobal>
in der Datei drin um die Macros zu kennen?