Michael_BJFU
23rd July 2012, 08:15
I want to use QFutureInterface, but its doc is not provided in Qt Assistant. So I have to use the Qt Creator source to have a look at how it is used.
The codes look like these:
static void find_helper(QFutureInterface<Usage> &future,
const CppModelManagerInterface::WorkingCopy workingCopy,
const LookupContext context,
CppFindReferences *findRefs,
Symbol *symbol){....}
const CppModelManagerInterface::WorkingCopy workingCopy = _modelManager->workingCopy();
QFuture<Usage> result;
result = QtConcurrent::run(&find_helper, workingCopy,
parameters.context, this, parameters.symbol);
Note that the first parameter is not provided by the caller!!!Just like the pointer "this". Why ? When I write a code snippet like that, it complied error.
Can Anyone help me ? Thanks.
The codes look like these:
static void find_helper(QFutureInterface<Usage> &future,
const CppModelManagerInterface::WorkingCopy workingCopy,
const LookupContext context,
CppFindReferences *findRefs,
Symbol *symbol){....}
const CppModelManagerInterface::WorkingCopy workingCopy = _modelManager->workingCopy();
QFuture<Usage> result;
result = QtConcurrent::run(&find_helper, workingCopy,
parameters.context, this, parameters.symbol);
Note that the first parameter is not provided by the caller!!!Just like the pointer "this". Why ? When I write a code snippet like that, it complied error.
Can Anyone help me ? Thanks.