diff options
5 files changed, 14 insertions, 12 deletions
diff --git a/installerbuilder/common/repositorygen.cpp b/installerbuilder/common/repositorygen.cpp index 35e61cbe4..7c77817e7 100644 --- a/installerbuilder/common/repositorygen.cpp +++ b/installerbuilder/common/repositorygen.cpp @@ -111,7 +111,7 @@ static QVector<PackageInfo> collectAvailablePackages(const QString& packagesDire info.version = doc.firstChildElement(QString::fromLatin1("Package")). firstChildElement(QString::fromLatin1("Version")).text(); info.dependencies = doc.firstChildElement(QString::fromLatin1("Package")). - firstChildElement(QString::fromLatin1("Dependencies")).text().split(QLatin1String(","), + firstChildElement(QString::fromLatin1("Dependencies")).text().split(QRegExp(QLatin1String("\\b(,|, )\\b")), QString::SkipEmptyParts); info.directory = it->filePath(); dict.push_back(info); diff --git a/installerbuilder/libinstaller/3rdparty/kdtools/KDUpdater/kdupdaterpackagesinfo.cpp b/installerbuilder/libinstaller/3rdparty/kdtools/KDUpdater/kdupdaterpackagesinfo.cpp index f597669a0..706e2d343 100644 --- a/installerbuilder/libinstaller/3rdparty/kdtools/KDUpdater/kdupdaterpackagesinfo.cpp +++ b/installerbuilder/libinstaller/3rdparty/kdtools/KDUpdater/kdupdaterpackagesinfo.cpp @@ -510,7 +510,7 @@ void PackagesInfo::PackagesInfoData::addPackageFrom(const QDomElement& packageE) else if( childNodeE.tagName() == QLatin1String( "Size" ) ) info.uncompressedSize = childNodeE.text().toULongLong(); else if( childNodeE.tagName() == QLatin1String( "Dependencies" ) ) - info.dependencies = childNodeE.text().split( QLatin1String( "," ) ); + info.dependencies = childNodeE.text().split( QRegExp(QLatin1String("\\b(,|, )\\b")), QString::SkipEmptyParts ); else if( childNodeE.tagName() == QLatin1String( "ForcedInstallation" ) ) info.forcedInstallation = childNodeE.text().toLower() == QLatin1String( "true" ) ? true : false; else if( childNodeE.tagName() == QLatin1String( "LastUpdateDate" ) ) diff --git a/installerbuilder/libinstaller/3rdparty/kdtools/KDUpdater/kdupdaterupdatefinder.cpp b/installerbuilder/libinstaller/3rdparty/kdtools/KDUpdater/kdupdaterupdatefinder.cpp index 8d34586e8..551a81f46 100644 --- a/installerbuilder/libinstaller/3rdparty/kdtools/KDUpdater/kdupdaterupdatefinder.cpp +++ b/installerbuilder/libinstaller/3rdparty/kdtools/KDUpdater/kdupdaterupdatefinder.cpp @@ -499,7 +499,7 @@ QList<KDUpdater::UpdateInfo> KDUpdater::UpdateFinder::Private::applicableUpdates QLatin1String( "," )); // Catch hold of app names contained updatesInfo->applicationName() - QStringList apps = appName.split(QLatin1String( "," ), QString::SkipEmptyParts); + QStringList apps = appName.split(QRegExp(QLatin1String("\\b(,|, )\\b")), QString::SkipEmptyParts); appNameIndex = apps.indexOf(this->application->applicationName()); // If the application appName isnt one of the app names, then diff --git a/installerbuilder/libinstaller/component.cpp b/installerbuilder/libinstaller/component.cpp index 533607357..62e6364d4 100644 --- a/installerbuilder/libinstaller/component.cpp +++ b/installerbuilder/libinstaller/component.cpp @@ -166,12 +166,12 @@ void Component::loadDataFromPackage(const Package &package) setLocalTempPath(QInstaller::pathFromUrl(package.sourceInfo().url)); const QStringList uis = package.data(QLatin1String("UserInterfaces")).toString() - .split(QString::fromLatin1(","), QString::SkipEmptyParts); + .split(QRegExp(QLatin1String("\\b(,|, )\\b")), QString::SkipEmptyParts); if (!uis.isEmpty()) loadUserInterfaces(QDir(QString::fromLatin1("%1/%2").arg(localTempPath(), name())), uis); const QStringList qms = package.data(QLatin1String("Translations")).toString() - .split(QString::fromLatin1(","), QString::SkipEmptyParts); + .split(QRegExp(QLatin1String("\\b(,|, )\\b")), QString::SkipEmptyParts); if (!qms.isEmpty()) loadTranslations(QDir(QString::fromLatin1("%1/%2").arg(localTempPath(), name())), qms); @@ -909,7 +909,7 @@ void Component::setSelected(bool selected) */ QStringList Component::dependencies() const { - return value(scDependencies).split(QLatin1Char(','), QString::SkipEmptyParts); + return value(scDependencies).split(QRegExp(QLatin1String("\\b(,|, )\\b")), QString::SkipEmptyParts); } /*! @@ -934,7 +934,7 @@ bool Component::isAutoDependOn() const verbose() << "value from script is not valid " << std::endl; return false; } - QStringList autoDependOnDependencyList = value(scAutoDependOn).split(QLatin1Char(','), + QStringList autoDependOnDependencyList = value(scAutoDependOn).split(QRegExp(QLatin1String("\\b(,|, )\\b")), QString::SkipEmptyParts); if (autoDependOnDependencyList.isEmpty()) return false; 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); } |