I am trying to get a basic program implementing QtConcurrent to work. Found a lot of sites with similar problems, but none of their solutions worked for me so far.
My code:
void Setup::addOne(int &i)
{
++i;
}
void Setup::Test()
{
QList<int> list;
list.append(1);
QtConcurrent::map(list, &Setup::addOne);
}
Trying to build it shows the following error:
C2064: term does not evaluate to a function taking 1 arguments
The error refers to the following lines in qtconcurrentmapkernel.h:
bool runIteration(Iterator it, int, void *)
{
map(*it);
return false;
}
I am working with Qt5. Thank you for your help.