summaryrefslogtreecommitdiff
path: root/src/manager-lib/installationtask.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/manager-lib/installationtask.cpp')
-rw-r--r--src/manager-lib/installationtask.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/manager-lib/installationtask.cpp b/src/manager-lib/installationtask.cpp
index 06e10ac9..7cdd2555 100644
--- a/src/manager-lib/installationtask.cpp
+++ b/src/manager-lib/installationtask.cpp
@@ -321,6 +321,13 @@ void InstallationTask::checkExtractedFile(const QString &file) Q_DECL_NOEXCEPT_E
}
if (m_foundIcon && m_foundInfo) {
+ bool doubleInstallation = false;
+ QMetaObject::invokeMethod(PackageManager::instance(), [this, &doubleInstallation]() {
+ doubleInstallation = PackageManager::instance()->isPackageInstallationActive(m_packageId);
+ }, Qt::BlockingQueuedConnection);
+ if (doubleInstallation)
+ throw Exception(Error::Package, "Cannot install the same package %1 multiple times in parallel").arg(m_packageId);
+
qCDebug(LogInstaller) << "emit taskRequestingInstallationAcknowledge" << id() << "for package" << m_package->id();
// this is a temporary just for the signal emission below