summaryrefslogtreecommitdiffstats
path: root/tools/common
diff options
context:
space:
mode:
authorkh1 <karsten.heimrich@digia.com>2013-03-25 13:44:16 +0100
committerKarsten Heimrich <karsten.heimrich@digia.com>2013-03-25 14:18:45 +0100
commitd1f3e120a58b6c8c48741d2af623544e5ee43ded (patch)
tree5818c0f6a17532552d6306355f965073c10deb9b /tools/common
parenta7722385c3ef521352953393702acbe452ba96eb (diff)
Adjust to match coding guidelines.
Change-Id: I1904dc6bd8706b7cf93d67cad497becbe480f1f2 Reviewed-by: Niels Weber <niels.weber@digia.com>
Diffstat (limited to 'tools/common')
-rw-r--r--tools/common/repositorygen.cpp19
1 files changed, 10 insertions, 9 deletions
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 {