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

Problem when using QtConcurrent::run with members functions.__NEW__Please not close this without clarify it.

    XMLWordPrintable

Details

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

    Description

      Please not close this Issue without clarify it.

      when use something like this, it working:
      QString string2 ="win7,linux";
      QFuture<void> future=QtConcurrent::run(string2,&QString::resize,100);
      ...

      but it could not work with QString::split.

      You can find a analogous example in Qt Assistant with search condition: <QtConcurrentRun> - Asynchronous Run

      and there's a topic about " Additional API Features Using Member Functions "

      and it's same as what i write:

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

      but this isn't working.

      so why it work with QString::resize not with QString::split

      because QString::split is an overload functions and resize is not?

      and why the Qt Assistant use an not working split as an example?

      Maybe i got something wrong, i'm really looking forward your answer!

      Thanks.

      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