diff options
author | Tim Jenssen <tim.jenssen@nokia.com> | 2011-03-18 13:34:39 +0100 |
---|---|---|
committer | kh1 <qt-info@nokia.com> | 2011-03-18 17:22:43 +0100 |
commit | bc6d91a2d14b17fec69827ccbe71f8b7fbf24830 (patch) | |
tree | b58c834e1b902ef3933c9d21676e2109ddfdb804 /installerbuilder/libinstaller | |
parent | 8ff9e0b54d5606f5e8120a4dccb60ee61b60f015 (diff) |
fix a crash and added some more output to operation errors
Diffstat (limited to 'installerbuilder/libinstaller')
-rw-r--r-- | installerbuilder/libinstaller/qinstaller.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/installerbuilder/libinstaller/qinstaller.cpp b/installerbuilder/libinstaller/qinstaller.cpp index 04f905e08..a03d96f3a 100644 --- a/installerbuilder/libinstaller/qinstaller.cpp +++ b/installerbuilder/libinstaller/qinstaller.cpp @@ -504,8 +504,9 @@ void Installer::installComponent(Component* comp, double progressOperationSize) const QMessageBox::StandardButton button = MessageBoxHandler::warning(MessageBoxHandler::currentBestSuitParent(), QLatin1String("installationErrorWithRetry"), tr("Installer Error"), - tr("Error during installation process:\n%1").arg(operation->errorString()), - QMessageBox::Retry | QMessageBox::Ignore | QMessageBox::Cancel, QMessageBox::Retry); + tr("Error during installation process (%1):\n%2").arg(comp->name(), + operation->errorString()), QMessageBox::Retry | QMessageBox::Ignore | QMessageBox::Cancel, + QMessageBox::Retry); if (button == QMessageBox::Retry) ok = InstallerPrivate::performOperationThreaded(operation); @@ -1395,11 +1396,11 @@ void Installer::createComponents(const QList<KDUpdater::Update*> &updates, isUpdate = isUpdate && isInstalled; if (newPackageForUpdater) { - d->m_updaterComponents.push_back(component.take()); + d->m_updaterComponents.push_back(component.data()); d->m_componentHash[newComponentName] = tmpComponent; components.insert(newComponentName, component.data()); } else { - components.insert(newComponentName, component.take()); + components.insert(newComponentName, component.data()); } if ((isPackageManager() || isUpdater()) && (isUpdate || newPackageForUpdater)) { @@ -1412,6 +1413,7 @@ void Installer::createComponents(const QList<KDUpdater::Update*> &updates, qCritical("Could not register component! Component with identifier %s already " "registered", qPrintable(newComponentName)); } + component.take(); } } |