summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/extractarchiveoperation.cpp
diff options
context:
space:
mode:
authorKatja Marttila <katja.marttila@qt.io>2018-12-18 07:44:20 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2018-12-18 07:44:20 +0000
commit72d55882da62de7f10b8cbca19281824fff9ebe4 (patch)
tree4817a8e7e9766e877cb54be216359c0b9509d056 /src/libs/installer/extractarchiveoperation.cpp
parent9215e91d7a0701d63e28e04d5f0984bfebd81dc0 (diff)
parentb4772841a90f8d9cf48416552703ba2b6a7c577b (diff)
Merge "Merge remote-tracking branch 'origin/3.0' into master"
Diffstat (limited to 'src/libs/installer/extractarchiveoperation.cpp')
-rw-r--r--src/libs/installer/extractarchiveoperation.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/libs/installer/extractarchiveoperation.cpp b/src/libs/installer/extractarchiveoperation.cpp
index c41f029e3..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 {
@@ -67,6 +68,11 @@ bool ExtractArchiveOperation::performOperation()
connect(runnable, &Runnable::finished, &receiver, &Receiver::runnableFinished,
Qt::QueuedConnection);
+ 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)) {
@@ -77,6 +83,8 @@ bool ExtractArchiveOperation::performOperation()
receiver.runnableFinished(true, QString());
}
+ setValue(QLatin1String("files"), m_files);
+
// TODO: Use backups for rollback, too? Doesn't work for uninstallation though.
// delete all backups we can delete right now, remember the rest
@@ -121,10 +129,7 @@ bool ExtractArchiveOperation::testOperation()
*/
void ExtractArchiveOperation::fileFinished(const QString &filename)
{
- QStringList files = value(QLatin1String("files")).toStringList();
- files.prepend(filename);
- setValue(QLatin1String("files"), files);
- emit outputTextChanged(QDir::toNativeSeparators(filename));
+ m_files.prepend(filename);
}
} // namespace QInstaller