diff options
Diffstat (limited to 'src/libs/installer/extractarchiveoperation.cpp')
-rw-r--r-- | src/libs/installer/extractarchiveoperation.cpp | 13 |
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 |