|
发表于 2006-11-13 15:40:13
|
显示全部楼层
找到文件tothread.cpp,编辑里边的内容,找到
#define THREAD_ASSERT(x) if((x)!=0) { \
throw (qApp->translate("toThread","Thread function \"%1\" failed.").arg(QString::fromLatin1( #x ))); }
void toThread::initAttr()
{
//create the thread detached, so everything is cleaned up
//after it's finished.
修改成如下:
#define THREAD_ASSERT(x) if((x)!=0) { \
throw (qApp->translate("toThread","Thread function \"%1\" failed.").arg(QString::fromLatin1( #x ))); }
void *toThreadStartWrapper(void *t); //增加的代码
void toThread::initAttr()
{
//create the thread detached, so everything is cleaned up
//after it's finished.
保存。(不改在make是会出现如下错误:
tothread.cpp: In member function ‘void toThread::start()’:
tothread.cpp:190: error: ‘toThreadStartWrapper’ was not declared in this scope
tothread.cpp: In member function ‘void toThread::startAsync()’:
tothread.cpp:199: error: ‘toThreadStartWrapper’ was not declared in this scope
make[1]: *** [tora-tothread.o] Error 1
make[1]: Leaving directory `/home/yht/Downloads/tora-1.3.21'
make: *** [all] Error 2) |
|