diff options
author | kh1 <karsten.heimrich@nokia.com> | 2012-03-13 21:07:12 +0100 |
---|---|---|
committer | Karsten Heimrich <karsten.heimrich@nokia.com> | 2012-03-13 21:08:56 +0100 |
commit | c2ca2d0e19fdd9ecfb1f11f799b19fee517cd4ad (patch) | |
tree | 9b35c9f889e74551ef7b862febd901f913e2670d | |
parent | aea0e0669ac2778680c0966651bdc8d010d40067 (diff) |
Remove superfluous functions after 9dfa0c6e and compile error.
Remove the enclosing namespace, fixes explicit qualification
in declaration compile error. Strange that this works on Windows.
Change-Id: I5cd4b8328cbdb8471e4be242e38b7894288781e0
Reviewed-by: Karsten Heimrich <karsten.heimrich@nokia.com>
-rw-r--r-- | installerbuilder/common/repositorygen.cpp | 41 |
1 files changed, 1 insertions, 40 deletions
diff --git a/installerbuilder/common/repositorygen.cpp b/installerbuilder/common/repositorygen.cpp index e3ee55169..79c444f5c 100644 --- a/installerbuilder/common/repositorygen.cpp +++ b/installerbuilder/common/repositorygen.cpp @@ -45,12 +45,7 @@ #include <iostream> -namespace QInstallerTools { - -static bool operator==(const PackageInfo &lhs, const PackageInfo &rhs) -{ - return lhs.name == rhs.name && lhs.version == rhs.version; -} +using namespace QInstallerTools; void QInstallerTools::printRepositoryGenOptions() { @@ -66,38 +61,6 @@ void QInstallerTools::printRepositoryGenOptions() std::cout << " --ignore-invalid-packages Ignore all invalid packages instead of aborting." << std::endl; } -/*! - Returns PackageInfo of package with right name and version -*/ -static PackageInfo findMatchingPackage(const QString &name, const PackageInfoVector &available) -{ - const QString id = name.contains(QChar::fromLatin1('-')) - ? name.section(QChar::fromLatin1('-'), 0, 0) : name; - QString version = name.contains(QChar::fromLatin1('-')) - ? name.section(QChar::fromLatin1('-'), 1, -1) : QString(); - - QRegExp compEx(QLatin1String("([<=>]+)(.*)")); - const QString comparator = compEx.exactMatch(version) ? compEx.cap(1) : QLatin1String("="); - version = compEx.exactMatch(version) ? compEx.cap(2) : version; - - const bool allowEqual = comparator.contains(QLatin1Char('=')); - const bool allowLess = comparator.contains(QLatin1Char('<')); - const bool allowMore = comparator.contains(QLatin1Char('>')); - - for (PackageInfoVector::const_iterator it = available.begin(); it != available.end(); ++it) { - if (it->name != id) - continue; - if (allowEqual && (version.isEmpty() || it->version == version)) - return *it; - if (allowLess && KDUpdater::compareVersion(version, it->version) > 0) - return *it; - if (allowMore && KDUpdater::compareVersion(version, it->version) < 0) - return *it; - } - - return PackageInfo(); -} - void QInstallerTools::compressDirectory(const QStringList &paths, const QString &archivePath) { foreach (const QString &path, paths) { @@ -655,5 +618,3 @@ void QInstallerTools::copyComponentData(const QString &packageDir, const QString } } } - -} // namespace QInstallerTools |