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. [SOLVED] QtConcurrent::run function call missing argument list
QtWS25 Last Chance

[SOLVED] QtConcurrent::run function call missing argument list

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 2.1k Views
  • 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 JKSH
    #1

    Hi ,
    i have a class Signatures , inside it i have two functions , both are private slots :

    • void Signatures::on_install_clear_clicked()
    • void Signatures::parse_clear_file(EHT_wrapper<App>* apps,QString path)

    and i have a signal part :
    signals:
    void line_read(int);

    from on_install_clear_clicked i call to parse_clear_file using :

    void Signatures::on_install_clear_clicked(){
    QFuture<void> future = QtConcurrent::run(this->parse_clear_file,this->app,this->clear_path);
    }

    both app and clear_path are private members of Signatures class
    the function parse_clear_file also emits a signal line_read(int) in the Signatures class .

    when i compile the above i get like 42 errors they start like :
    signatures.cpp:403: error: C3867: 'Signatures::parse_clear_file': function call missing argument list; use '&Signatures::parse_clear_file' to create a pointer to member
    signatures.cpp:403: error: C2039: 'app' : is not a member of 'Signatures'
    signatures.cpp:403: error: C2780: 'QFuture<T> QtConcurrent::run(const Class ,T (__thiscall Class:: )(Param1,Param2,Param3,Param4,Param5) const,const Arg1 &,const Arg2 &,const Arg3 &,const Arg4 &,const Arg5 &)' : expects 7 arguments - 2 provided

    1 Reply Last reply
    0
    • Chris KawaC Online
      Chris KawaC Online
      Chris Kawa
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Should be something more like this:

      QFuture<void> future = QtConcurrent::run(this, &Signatures::parse_clear_file, app, clear_path);
      
      1 Reply Last reply
      0
      • saeedhardanS Offline
        saeedhardanS Offline
        saeedhardan
        wrote on last edited by
        #3

        Yes thanks that worked .

        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