summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/installationmanager.cpp9
-rw-r--r--src/installationmanager.h1
2 files changed, 9 insertions, 1 deletions
diff --git a/src/installationmanager.cpp b/src/installationmanager.cpp
index 4b433899..a99a07e1 100644
--- a/src/installationmanager.cpp
+++ b/src/installationmanager.cpp
@@ -444,7 +444,7 @@ void InstallationManager::updateProgressFile(QString const &fileName)
void InstallationManager::doProgressUpdate(float percentage)
{
if (m_InstallationProgress != nullptr) {
- m_InstallationProgress->setValue(static_cast<int>(percentage * 100.0));
+ QMetaObject::invokeMethod(this, "setProgressValue", Qt::QueuedConnection, Q_ARG(int, static_cast<int>(percentage * 100.0)));
if (m_InstallationProgress->wasCanceled()) {
m_ArchiveHandler->cancel();
@@ -453,6 +453,13 @@ void InstallationManager::doProgressUpdate(float percentage)
}
}
+void InstallationManager::setProgressValue(int percentage)
+{
+ if (m_InstallationProgress != nullptr) {
+ m_InstallationProgress->setValue(percentage);
+ }
+}
+
void InstallationManager::doProgressFileUpdate(QString const fileName)
{
if (m_InstallationProgress != nullptr) {
diff --git a/src/installationmanager.h b/src/installationmanager.h
index 84ccd1a4..851390a7 100644
--- a/src/installationmanager.h
+++ b/src/installationmanager.h
@@ -186,6 +186,7 @@ private slots:
void doProgressUpdate(float percentage);
void doProgressFileUpdate(const QString fileName);
+ void setProgressValue(int percentage);
private: