diff options
author | Katja Marttila <katja.marttila@qt.io> | 2018-12-05 10:25:00 +0200 |
---|---|---|
committer | Katja Marttila <katja.marttila@qt.io> | 2018-12-05 09:35:18 +0000 |
commit | 19b0bb9c9ecaf5ba17fd08a6aad2e143a7965c3f (patch) | |
tree | 0a19914adbe0da67ffbe87553deab24570d2d34f /src/libs/installer/extractarchiveoperation.cpp | |
parent | 6fa963006558d0481a0dc4bf4194aa46675fd23e (diff) |
Due to bug in QTextDocument (QTBUG-65865), installer will crash if it
will write a lot of logs to 'Details View' in 'PerformInstallationPage'.
Fixed so that instead of writing all extracted filenames to log, write
only the name of package which is extracted. This will reduce the huge
amount of log written and thus prevents the 'Bad allocation' crash.
Task-number: QTIFW-1242
Change-Id: I98ff0df25bcc10d0f7bb79d6c4010665b5e2ac51
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
Diffstat (limited to 'src/libs/installer/extractarchiveoperation.cpp')
-rw-r--r-- | src/libs/installer/extractarchiveoperation.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libs/installer/extractarchiveoperation.cpp b/src/libs/installer/extractarchiveoperation.cpp index 128327855..12608a0d1 100644 --- a/src/libs/installer/extractarchiveoperation.cpp +++ b/src/libs/installer/extractarchiveoperation.cpp @@ -30,6 +30,7 @@ #include <QEventLoop> #include <QThreadPool> +#include <QFileInfo> namespace QInstaller { @@ -69,6 +70,9 @@ bool ExtractArchiveOperation::performOperation() m_files.clear(); + QFileInfo fileInfo(archivePath); + emit outputTextChanged(tr("Extracting \"%1\"").arg(fileInfo.fileName())); + QEventLoop loop; connect(&receiver, &Receiver::finished, &loop, &QEventLoop::quit); if (QThreadPool::globalInstance()->tryStart(runnable)) { @@ -126,7 +130,6 @@ bool ExtractArchiveOperation::testOperation() void ExtractArchiveOperation::fileFinished(const QString &filename) { m_files.prepend(filename); - emit outputTextChanged(QDir::toNativeSeparators(filename)); } } // namespace QInstaller |