Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Undeclared Identifier
Qt 6.11 is out! See what's new in the release blog

Undeclared Identifier

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 2.3k Views 1 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.
  • saeedhardanS Offline
    saeedhardanS Offline
    saeedhardan
    wrote on last edited by
    #1

    hi all ,
    can someone please take a look at the picture and explain what is the problem .
    !http://i62.tinypic.com/13zv9s1.png(Error Code)!

    App_num and App_char are classes defined in signatures.h which is included .
    EHT is a template tree and also included .
    the code above was working fine until i decided to move it in a separate thread , and now i get this problem .

    thanks

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      First thing i see is that you are including the header in itself, which is a bad idea.

      Without seeing signatures.h, no way to know

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • saeedhardanS Offline
        saeedhardanS Offline
        saeedhardan
        wrote on last edited by
        #3

        this is part of signatures.h (because its kinda big and this is the relevant part ) .

        @
        #include <QWidget>
        #include <QStandardItemModel>
        #include "acs_session.h"
        #include "file_browser.h"
        #include "EHT.h"
        #include "libssh/libssh.h"
        #include <string>
        #include <list>
        #include <QString>
        #include <QByteArray>
        #include <ctype.h>
        #include "edit_sig_w.h"
        #include "read_clear_thread.h"

        @

        @
        class App{
        public:
        App(){}
        ~App(){}

        std::string ID;
        std::string name;
        std::string description;
        
        std::list<Signature> signatures_list;
        

        };

        class App_num:public App{
        public:
        bool operator<(const App_num& e)const{
        if(ID.compare(e.ID) < 0){
        return true;
        }
        return false;
        }
        };
        class App_char:public App{
        public:
        bool operator<(const App_char& e)const{
        if(name.compare(e.name) < 0){
        return true;
        }
        return false;
        }
        };
        @

        @
        namespace Ui {
        class Signatures;
        }
        class Signatures : public QWidget
        {
        Q_OBJECT

        public:
        explicit Signatures(QWidget *parent = 0);
        void set_acs_session(ACS_session session);
        ~Signatures();

        private slots:
        void on_clear_browse_clicked();
        void on_sqlite_browse_clicked();
        void read_path();

        void on_install_clear_clicked();
        
        void on_id_search_textChanged(const QString &arg1);
        
        void on_name_search_textChanged(const QString &arg1);
        
        void on_tableView_doubleClicked(const QModelIndex &index);
        
        void on_pushButton_clicked();
        
        void update_clear_progress(int percentage);
        

        private:
        Ui::Signatures *ui;
        ACS_session acs_session;
        File_browser browser_w;
        EHT<App_num> app_num_tree;
        EHT<App_char> app_name_tree;
        QStandardItemModel *model;
        QStandardItemModel *sig_model;
        bool clear_installed;
        bool sqlite_installed;

        Edit_sig_w edit_w;
        Read_clear_thread read_clear;
        int do_remote_processes(ssh_session session,std::string command);
        

        };
        @

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          What was your original working code ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          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