From 188f67556c9af04726fd8fab42717b837ab967cc Mon Sep 17 00:00:00 2001 From: ngn999 Date: Mon, 28 Mar 2022 11:24:27 +0800 Subject: [PATCH] no memory problem --- mainwindow.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mainwindow.cc b/mainwindow.cc index 3663eafb..a01622f2 100644 --- a/mainwindow.cc +++ b/mainwindow.cc @@ -3444,7 +3444,6 @@ void MainWindow::on_saveArticle_triggered() if ( fileName.isEmpty() ) return; - vector< pair< QUrl, QString > > downloadResources; view->toHtml([=] (QString &html) mutable { QFile file( fileName ); if ( !file.open( QIODevice::WriteOnly ) ) @@ -3490,6 +3489,7 @@ void MainWindow::on_saveArticle_triggered() QRegExp rx1( "\"((?:bres|gico|gdau|qrcx|gdvideo)://[^\"]+)\"" ); QRegExp rx2( "'((?:bres|gico|gdau|qrcx|gdvideo)://[^']+)'" ); set< QByteArray > resourceIncluded; + vector< pair< QUrl, QString > > downloadResources; filterAndCollectResources( html, rx1, "\"", folder, resourceIncluded, downloadResources ); filterAndCollectResources( html, rx2, "'", folder, resourceIncluded, downloadResources );