summaryrefslogtreecommitdiffstats
path: root/installerbuilder/libinstaller/packagemanagercore.cpp
diff options
context:
space:
mode:
authorTim Jenssen <tim.jenssen@nokia.com>2011-07-26 18:48:59 +0200
committerTim Jenssen <tim.jenssen@nokia.com>2011-07-27 14:26:08 +0200
commit9d43d3f36a6869fe6e9711d441677830d5d54ace (patch)
tree771f7e0c11b1b23b72eedcc1f945c4642fb5808a /installerbuilder/libinstaller/packagemanagercore.cpp
parent308dc03e51cbfe66506b93e6b37c8429a971eb27 (diff)
enable ,<space> and , as seperator in stringlist values
Reviewed-By: Niels Weber
Diffstat (limited to 'installerbuilder/libinstaller/packagemanagercore.cpp')
-rw-r--r--installerbuilder/libinstaller/packagemanagercore.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/installerbuilder/libinstaller/packagemanagercore.cpp b/installerbuilder/libinstaller/packagemanagercore.cpp
index c69afc67e..77cbb8f4b 100644
--- a/installerbuilder/libinstaller/packagemanagercore.cpp
+++ b/installerbuilder/libinstaller/packagemanagercore.cpp
@@ -363,7 +363,7 @@ void PackageManagerCore::installSelectedComponents()
"version of: %1").arg(currentComponent->name()));
if ((isUpdater() || isPackageManager()) && currentComponent->removeBeforeUpdate()) {
QString replacesAsString = currentComponent->value(scReplaces);
- QStringList possibleNames(replacesAsString.split(QLatin1Char(','), QString::SkipEmptyParts));
+ QStringList possibleNames(replacesAsString.split(QRegExp(QLatin1String("\\b(,|, )\\b")), QString::SkipEmptyParts));
possibleNames.append(currentComponent->name());
// undo all operations done by this component upon installation
@@ -963,7 +963,7 @@ QList<Component*> PackageManagerCore::missingDependencies(const Component *compo
// if (runMode() == UpdaterMode)
// allComponents += d->m_updaterComponentsDeps;
-// const QStringList dependencies = component->value(scDependencies).split(QChar::fromLatin1(','),
+// const QStringList dependencies = component->value(scDependencies).split(QRegExp(QLatin1String("\\b(,|, )\\b")),
// QString::SkipEmptyParts);
// QList<Component*> result;
@@ -1000,7 +1000,7 @@ QList<Component*> PackageManagerCore::missingDependencies(const Component *compo
QList<Component*> PackageManagerCore::dependencies(const Component *component, QStringList &missingComponents) const
{
QList<Component*> result;
- const QStringList dependencies = component->value(scDependencies).split(QChar::fromLatin1(','),
+ const QStringList dependencies = component->value(scDependencies).split(QRegExp(QLatin1String("\\b(,|, )\\b")),
QString::SkipEmptyParts);
foreach (const QString &dependency, dependencies) {
@@ -1487,7 +1487,8 @@ bool PackageManagerCore::updateComponentData(struct Data &data, Component *compo
if (!data.installedPackages->contains(name)) {
const QString replaces = data.package->data(scReplaces).toString();
if (!replaces.isEmpty()) {
- const QStringList components = replaces.split(QLatin1Char(','), QString::SkipEmptyParts);
+ const QStringList components = replaces.split(QRegExp(QLatin1String("\\b(,|, )\\b")),
+ QString::SkipEmptyParts);
foreach (const QString &componentName, components) {
if (data.installedPackages->contains(componentName)) {
if (data.runMode == AllMode) {
@@ -1637,7 +1638,8 @@ bool PackageManagerCore::fetchUpdaterPackages(const PackagesList &remotes, const
bool isValidUpdate = locals.contains(name);
if (!isValidUpdate && !replaces.isEmpty()) {
- const QStringList possibleNames = replaces.split(QLatin1String(","), QString::SkipEmptyParts);
+ const QStringList possibleNames = replaces.split(QRegExp(QLatin1String("\\b(,|, )\\b")),
+ QString::SkipEmptyParts);
foreach (const QString &possibleName, possibleNames)
isValidUpdate |= locals.contains(possibleName);
}