Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Undeclared Identifier

    General and Desktop
    2
    4
    1492
    Loading More Posts
    • 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.
    • saeedhardan
      saeedhardan last edited by

      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 Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        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 Reply Quote 0
        • saeedhardan
          saeedhardan last edited by

          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 Reply Quote 0
          • SGaist
            SGaist Lifetime Qt Champion last edited by

            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 Reply Quote 0
            • First post
              Last post