From d1f3e120a58b6c8c48741d2af623544e5ee43ded Mon Sep 17 00:00:00 2001 From: kh1 Date: Mon, 25 Mar 2013 13:44:16 +0100 Subject: Adjust to match coding guidelines. Change-Id: I1904dc6bd8706b7cf93d67cad497becbe480f1f2 Reviewed-by: Niels Weber --- tools/common/repositorygen.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'tools') diff --git a/tools/common/repositorygen.cpp b/tools/common/repositorygen.cpp index 616ea931c..e25af0dd6 100644 --- a/tools/common/repositorygen.cpp +++ b/tools/common/repositorygen.cpp @@ -416,8 +416,7 @@ PackageInfoVector QInstallerTools::createListOfPackages(const QString &packagesD bool ignoreInvalidPackages = qApp->arguments().contains(QString::fromLatin1("--ignore-invalid-packages")); PackageInfoVector dict; - const QFileInfoList entries = QDir(packagesDirectory) - .entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot); + const QFileInfoList entries = QDir(packagesDirectory).entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot); for (QFileInfoList::const_iterator it = entries.begin(); it != entries.end(); ++it) { if (filterType == Exclude) { if (filteredPackages.contains(it->fileName())) @@ -431,9 +430,9 @@ PackageInfoVector QInstallerTools::createListOfPackages(const QString &packagesD if (it->fileName().contains(QLatin1Char('-'))) { if (ignoreInvalidPackages) continue; - throw QInstaller::Error(QString::fromLatin1("Component '%1' mustn't contain '-'. This is not allowed, because " - "dashes are used as the separator between the component name and the version number internally.") - .arg(it->fileName())); + throw QInstaller::Error(QString::fromLatin1("Component '%1' mustn't contain '-'. This is not " + "allowed, because dashes are used as the separator between the component name and the " + "version number internally.").arg(it->fileName())); } QFile file(QString::fromLatin1("%1/meta/package.xml").arg(it->filePath())); @@ -557,8 +556,10 @@ void QInstallerTools::compressMetaDirectories(const QString &repoDir, const QStr const QByteArray sha1Sum = QInstaller::calculateHash(&tmp, QCryptographicHash::Sha1); writeSHA1ToNodeWithName(doc, elements, sha1Sum, path); const QString finalTarget = absPath + QLatin1String("/") + fn; - if (!tmp.rename(finalTarget)) - throw QInstaller::Error(QString::fromLatin1("Could not move '%1' to '%2'").arg(tmpTarget, finalTarget)); + if (!tmp.rename(finalTarget)) { + throw QInstaller::Error(QString::fromLatin1("Could not move '%1' to '%2'").arg(tmpTarget, + finalTarget)); + } } QInstaller::openForWrite(&existingUpdatesXml, existingUpdatesXml.fileName()); @@ -593,8 +594,8 @@ void QInstallerTools::copyComponentData(const QString &packageDir, const QString qDebug() << QString::fromLatin1("Copying archive from '%1' to '%2'").arg(tmp.fileName(), target); if (!tmp.copy(target)) { - throw QInstaller::Error(QString::fromLatin1("Could not copy '%1' to '%2': %3").arg(tmp.fileName(), - target, tmp.errorString())); + throw QInstaller::Error(QString::fromLatin1("Could not copy '%1' to '%2': %3") + .arg(tmp.fileName(), target, tmp.errorString())); } compressedFiles.append(target); } else { -- cgit v1.2.3