opt: remove useless code

remove epwingrequestrunnable class
This commit is contained in:
Xiao YiFang 2022-09-12 20:26:54 +08:00
parent 73d3d43c33
commit 003c36d745

View file

@ -429,28 +429,6 @@ void EpwingDictionary::getArticleText( uint32_t articleAddress, QString & headwo
/// EpwingDictionary::getArticle()
class EpwingArticleRequest;
class EpwingArticleRequestRunnable: public QRunnable
{
EpwingArticleRequest & r;
QSemaphore & hasExited;
public:
EpwingArticleRequestRunnable( EpwingArticleRequest & r_,
QSemaphore & hasExited_ ): r( r_ ),
hasExited( hasExited_ )
{}
~EpwingArticleRequestRunnable()
{
hasExited.release();
}
virtual void run();
};
class EpwingArticleRequest: public Dictionary::DataRequest
{
friend class EpwingArticleRequestRunnable;
@ -476,7 +454,7 @@ public:
// new EpwingArticleRequestRunnable( *this, hasExited ) );
}
void run(); // Run from another thread by EpwingArticleRequestRunnable
void run();
void getBuiltInArticle(wstring const & word_, QVector< int > & pages,
QVector< int > & offsets,
@ -495,11 +473,6 @@ public:
}
};
void EpwingArticleRequestRunnable::run()
{
r.run();
}
void EpwingArticleRequest::run()
{
if ( Utils::AtomicInt::loadAcquire( isCancelled ) )