mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-24 08:34:08 +00:00
fix save file progress dialog never close bug
This commit is contained in:
parent
e45f466a9d
commit
748bafd43b
|
@ -3444,7 +3444,7 @@ void MainWindow::on_saveArticle_triggered()
|
||||||
if ( fileName.isEmpty() )
|
if ( fileName.isEmpty() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
vector< pair< QUrl, QString > > downloadResources = vector< pair< QUrl, QString > >();
|
vector< pair< QUrl, QString > > downloadResources;
|
||||||
view->toHtml([=] (QString &html) mutable {
|
view->toHtml([=] (QString &html) mutable {
|
||||||
QFile file( fileName );
|
QFile file( fileName );
|
||||||
if ( !file.open( QIODevice::WriteOnly ) )
|
if ( !file.open( QIODevice::WriteOnly ) )
|
||||||
|
@ -3516,7 +3516,7 @@ void MainWindow::on_saveArticle_triggered()
|
||||||
progressDialog->show();
|
progressDialog->show();
|
||||||
|
|
||||||
file.write( html.toUtf8() );
|
file.write( html.toUtf8() );
|
||||||
progressDialog->setValue( 1 );
|
progressDialog->perform();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue