Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-12897

Problem when using QtConcurrent::run with members functions.

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 4.7.0
    • Core: QtConcurrent
    • None
    • Window 7 64bit with Visual studio 2010.

    Description

      In Qt reference documentation,there was a topic about QtConcurrent::run 's Additional API Features
      I've tried to use QtConcurrent::run with members functions,
      however,when i compile the example below,i get the compiler error.It seems that there's no matching function for call QtConcurrent::run().

      // call 'QStringList QString::split(const QString &sep, SplitBehavior behavior, Qt::CaseSensitivity cs) const' in a separate thread
      QString string ="win7,linux";
      QFuture<QStringList> future = QtConcurrent::run(string, &QString::split, QString(", "), QString::KeepEmptyParts, Qt::CaseSensitive);
      QStringList result = future.result();

      Please give me some suggestions,

      Thanks in advance.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              earthdomain Earth Domain (Inactive)
              stevetom SteveTom
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes