Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. German
  4. clang-tidy Warnungen bei VSCode
Forum Updated to NodeBB v4.3 + New Features

clang-tidy Warnungen bei VSCode

Scheduled Pinned Locked Moved Unsolved German
3 Posts 2 Posters 106 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • msauer751M Offline
    msauer751M Offline
    msauer751
    wrote last edited by
    #1

    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

    Pl45m4P 1 Reply Last reply
    0
    • msauer751M msauer751

      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

      Pl45m4P Offline
      Pl45m4P Offline
      Pl45m4
      wrote last edited by
      #2

      @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?


      If debugging is the process of removing software bugs, then programming must be the process of putting them in.

      ~E. W. Dijkstra

      msauer751M 1 Reply Last reply
      0
      • Pl45m4P Pl45m4

        @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?

        msauer751M Offline
        msauer751M Offline
        msauer751
        wrote last edited by
        #3

        @Pl45m4
        Ja ist eingebunden. Allerdings bekomme ich dort von clang-tidy ein file not found. Das ganze läst sich aber fehlerfrei compilieren.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved