summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkh1 <qt-info@nokia.com>2011-08-10 13:30:42 +0200
committerkh1 <qt-info@nokia.com>2011-08-10 13:40:29 +0200
commit82fc10f5f4d40dbbf1549b57db75b655216a7057 (patch)
tree57bb6181a0ad59834c5d08b419395d36d1527596
parent6d98312b46d4b65dd71e3169fbad520a07503aaa (diff)
Some style changes.
-rw-r--r--installerbuilder/libinstaller/packagemanagercore_p.cpp25
1 files changed, 12 insertions, 13 deletions
diff --git a/installerbuilder/libinstaller/packagemanagercore_p.cpp b/installerbuilder/libinstaller/packagemanagercore_p.cpp
index 042b6da00..4ac504b96 100644
--- a/installerbuilder/libinstaller/packagemanagercore_p.cpp
+++ b/installerbuilder/libinstaller/packagemanagercore_p.cpp
@@ -312,30 +312,28 @@ bool PackageManagerCorePrivate::appendComponentsToInstall(const QList<Component*
QList<Component*> notAppendedComponents; //for example components with unresolved dependencies
foreach (Component *currentComponent, components){
if (m_toInstallComponentIds.contains(currentComponent->name())) {
- QString errorMessage = QString(QLatin1String(
- "Recursion detected component(%1) already added with reason: %2.")).arg(
- currentComponent->name(), installReason(currentComponent));
+ const QString errorMessage = QString::fromLatin1("Recursion detected component(%1) already added "
+ "with reason: %2.").arg(currentComponent->name(), installReason(currentComponent));
verbose() << qPrintable(errorMessage) << std::endl;
- Q_ASSERT_X(!m_toInstallComponentIds.contains(currentComponent->name()),
- Q_FUNC_INFO,
- qPrintable(errorMessage));
+ Q_ASSERT_X(!m_toInstallComponentIds.contains(currentComponent->name()), Q_FUNC_INFO,
+ qPrintable(errorMessage));
return false;
}
- if (currentComponent->dependencies().isEmpty()) {
+ if (currentComponent->dependencies().isEmpty())
realAppendToInstallComponents(currentComponent);
- } else {
+ else
notAppendedComponents.append(currentComponent);
- }
}
+
bool allComponentsAdded = true;
- foreach (Component* currentComponent, notAppendedComponents) {
+ foreach (Component *currentComponent, notAppendedComponents)
allComponentsAdded &= appendComponentToInstall(currentComponent);
- }
+
QList<Component*> foundAutoDependOnList;
if (allComponentsAdded) {
- //this means notAppendedComponents are empty, so all regular dependencies are resolved
- //now we are looking for auto depend on components
+ // This means notAppendedComponents is empty, so all regular dependencies are resolved. Now we are
+ // looking for auto depend on components.
foreach (Component* currentComponent, m_core->availableComponents()) {
if (!currentComponent->isInstalled()
&& !m_toInstallComponentIds.contains(currentComponent->name())
@@ -345,6 +343,7 @@ bool PackageManagerCorePrivate::appendComponentsToInstall(const QList<Component*
}
}
}
+
if (!foundAutoDependOnList.isEmpty())
return appendComponentsToInstall(foundAutoDependOnList);
return allComponentsAdded;