mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-28 03:44:07 +00:00
no memory problem
This commit is contained in:
parent
748bafd43b
commit
188f67556c
|
@ -3444,7 +3444,6 @@ void MainWindow::on_saveArticle_triggered()
|
||||||
if ( fileName.isEmpty() )
|
if ( fileName.isEmpty() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
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 ) )
|
||||||
|
@ -3490,6 +3489,7 @@ void MainWindow::on_saveArticle_triggered()
|
||||||
QRegExp rx1( "\"((?:bres|gico|gdau|qrcx|gdvideo)://[^\"]+)\"" );
|
QRegExp rx1( "\"((?:bres|gico|gdau|qrcx|gdvideo)://[^\"]+)\"" );
|
||||||
QRegExp rx2( "'((?:bres|gico|gdau|qrcx|gdvideo)://[^']+)'" );
|
QRegExp rx2( "'((?:bres|gico|gdau|qrcx|gdvideo)://[^']+)'" );
|
||||||
set< QByteArray > resourceIncluded;
|
set< QByteArray > resourceIncluded;
|
||||||
|
vector< pair< QUrl, QString > > downloadResources;
|
||||||
|
|
||||||
filterAndCollectResources( html, rx1, "\"", folder, resourceIncluded, downloadResources );
|
filterAndCollectResources( html, rx1, "\"", folder, resourceIncluded, downloadResources );
|
||||||
filterAndCollectResources( html, rx2, "'", folder, resourceIncluded, downloadResources );
|
filterAndCollectResources( html, rx2, "'", folder, resourceIncluded, downloadResources );
|
||||||
|
|
Loading…
Reference in a new issue