mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-24 04:24:09 +00:00
Full-text search: Reduce max thread count
This commit is contained in:
parent
e333a03d7c
commit
3b2df81b3d
|
@ -146,6 +146,9 @@ FullTextSearchDialog::FullTextSearchDialog( QWidget * parent,
|
||||||
ui.setupUi( this );
|
ui.setupUi( this );
|
||||||
|
|
||||||
ftsThreadPool.setExpiryTimeout( -1 );
|
ftsThreadPool.setExpiryTimeout( -1 );
|
||||||
|
int threads = ftsThreadPool.maxThreadCount();
|
||||||
|
if( threads > 1 )
|
||||||
|
ftsThreadPool.setMaxThreadCount( threads - 1 );
|
||||||
|
|
||||||
setAttribute( Qt::WA_DeleteOnClose, false );
|
setAttribute( Qt::WA_DeleteOnClose, false );
|
||||||
setWindowFlags( windowFlags() & ~Qt::WindowContextHelpButtonHint );
|
setWindowFlags( windowFlags() & ~Qt::WindowContextHelpButtonHint );
|
||||||
|
|
Loading…
Reference in a new issue