clean: remove useless code

This commit is contained in:
Xiao YiFang 2023-03-22 22:56:23 +08:00 committed by xiaoyifang
parent ad087b1031
commit 0536b75761

View file

@ -516,15 +516,12 @@ void EpwingDictionary::getArticleText( uint32_t articleAddress, QString & headwo
class EpwingArticleRequest: public Dictionary::DataRequest class EpwingArticleRequest: public Dictionary::DataRequest
{ {
friend class EpwingArticleRequestRunnable;
wstring word; wstring word;
vector< wstring > alts; vector< wstring > alts;
EpwingDictionary & dict; EpwingDictionary & dict;
bool ignoreDiacritics; bool ignoreDiacritics;
QAtomicInt isCancelled; QAtomicInt isCancelled;
QSemaphore hasExited;
QFuture< void > f; QFuture< void > f;
public: public:
@ -535,8 +532,6 @@ public:
word( word_ ), alts( alts_ ), dict( dict_ ), ignoreDiacritics( ignoreDiacritics_ ) word( word_ ), alts( alts_ ), dict( dict_ ), ignoreDiacritics( ignoreDiacritics_ )
{ {
f = QtConcurrent::run( [ this ]() { this->run(); } ); f = QtConcurrent::run( [ this ]() { this->run(); } );
// QThreadPool::globalInstance()->start(
// new EpwingArticleRequestRunnable( *this, hasExited ) );
} }
void run(); void run();
@ -554,7 +549,6 @@ public:
{ {
isCancelled.ref(); isCancelled.ref();
f.waitForFinished(); f.waitForFinished();
// hasExited.acquire();
} }
}; };