diff options
author | Niels Weber <niels.weber@digia.com> | 2013-02-22 14:11:23 +0100 |
---|---|---|
committer | Niels Weber <niels.weber@digia.com> | 2013-02-22 14:42:26 +0100 |
commit | 4af5c850bdb2111f170372c9b1433ed0b9cce2b3 (patch) | |
tree | 49c1af83f8a0f6dc9833f8bf8b93c56d93be175a /tools | |
parent | 3ac3f88dff64e4e9ab96300d841dc63f954bd67f (diff) |
Some String fixes.
Change-Id: I58e00fe25f4b423b0c3517eff4f160706792ed6d
Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/common/repositorygen.cpp | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/tools/common/repositorygen.cpp b/tools/common/repositorygen.cpp index 733323a79..6bdc52b49 100644 --- a/tools/common/repositorygen.cpp +++ b/tools/common/repositorygen.cpp @@ -95,7 +95,7 @@ void QInstallerTools::compressMetaDirectories(const QString &repoDir) QFile tmp(tmpTarget); const QString finalTarget = absPath + QLatin1String("/") + fn; if (!tmp.rename(finalTarget)) { - throw QInstaller::Error(QString::fromLatin1("Could not move file from \"%1\" to \"%2\"").arg(tmpTarget, + throw QInstaller::Error(QString::fromLatin1("Could not move file from '%1' to '%2'").arg(tmpTarget, finalTarget)); } } @@ -157,7 +157,7 @@ void QInstallerTools::generateMetaDataDirectory(const QString &outDir, const QSt int col = 0; int line = 0; if (!packageXml.setContent(&file, &errMsg, &line, &col)) { - throw QInstaller::Error(QString::fromLatin1("Could not parse \"%1\": line: %2, column: %3: %4 (%5)") + throw QInstaller::Error(QString::fromLatin1("Could not parse '%1': line: %2, column: %3: %4 (%5)") .arg(packageXmlPath, QString::number(line), QString::number(col), errMsg, it->name)); } const QDomNode package = packageXml.firstChildElement(QLatin1String("Package")); @@ -250,7 +250,7 @@ void QInstallerTools::generateMetaDataDirectory(const QString &outDir, const QSt root.appendChild(update); if (!QDir(metapath).mkpath(it->name)) - throw QInstaller::Error(QString::fromLatin1("Could not create directory \"%1\".").arg(it->name)); + throw QInstaller::Error(QString::fromLatin1("Could not create directory '%1'.").arg(it->name)); // copy scripts const QString script = package.firstChildElement(QLatin1String("Script")).text(); @@ -266,7 +266,7 @@ void QInstallerTools::generateMetaDataDirectory(const QString &outDir, const QSt static QScriptEngine testScriptEngine; testScriptEngine.evaluate(scriptContent, scriptFile.fileName()); if (testScriptEngine.hasUncaughtException()) { - throw QInstaller::Error(QString::fromLatin1("Exception while loading the component script: \"%1\"") + throw QInstaller::Error(QString::fromLatin1("Exception while loading the component script: '%1'") .arg(QInstaller::uncaughtExceptionString(&testScriptEngine, scriptFile.fileName()))); } @@ -281,7 +281,7 @@ void QInstallerTools::generateMetaDataDirectory(const QString &outDir, const QSt QString toLocation(QString::fromLatin1("%1/%2/%3").arg(metapath, it->name, script)); if (!scriptFile.copy(toLocation)) { qDebug() << "failed!"; - throw QInstaller::Error(QString::fromLatin1("Could not copy the script \"%1\" to its target location \"%2\".") + throw QInstaller::Error(QString::fromLatin1("Could not copy the script '%1' to its target location '%2'.") .arg(fromLocation, toLocation)); } else { qDebug() << "\tdone."; @@ -299,8 +299,8 @@ void QInstallerTools::generateMetaDataDirectory(const QString &outDir, const QSt const QDir dir(QString::fromLatin1("%1/meta").arg(it->directory)); const QStringList uis = dir.entryList(QStringList(node.toElement().text()), QDir::Files); if (uis.isEmpty()) { - throw QInstaller::Error(QString::fromLatin1("Couldn't find any user interface matching %1 while " - "copying user interfaces of %2.").arg(node.toElement().text(), it->name)); + throw QInstaller::Error(QString::fromLatin1("Couldn't find any user interface matching '%1' while " + "copying user interfaces of '%2'.").arg(node.toElement().text(), it->name)); } for (QStringList::const_iterator ui = uis.begin(); ui != uis.end(); ++ui) { @@ -309,8 +309,8 @@ void QInstallerTools::generateMetaDataDirectory(const QString &outDir, const QSt if (!QFile::copy(QString::fromLatin1("%1/meta/%2").arg(it->directory, *ui), QString::fromLatin1("%1/%2/%3").arg(metapath, it->name, *ui))) { qDebug() << "failed!"; - throw QInstaller::Error(QString::fromLatin1("Could not copy the UI file %1 to its target " - "location %2.").arg(*ui, it->name)); + throw QInstaller::Error(QString::fromLatin1("Could not copy the UI file '%1' to its target " + "location '%2'.").arg(*ui, it->name)); } else { qDebug() << "done"; } @@ -334,8 +334,8 @@ void QInstallerTools::generateMetaDataDirectory(const QString &outDir, const QSt const QDir dir(QString::fromLatin1("%1/meta").arg(it->directory)); const QStringList qms = dir.entryList(QStringList(node.toElement().text()), QDir::Files); if (qms.isEmpty()) { - throw QInstaller::Error(QString::fromLatin1("Could not find any translation file matching \"%1\" " - "while copying translations of \"%2\".").arg(node.toElement().text(), it->name)); + throw QInstaller::Error(QString::fromLatin1("Could not find any translation file matching '%1' " + "while copying translations of '%2'.").arg(node.toElement().text(), it->name)); } for (QStringList::const_iterator qm = qms.begin(); qm != qms.end(); ++qm) { @@ -344,8 +344,8 @@ void QInstallerTools::generateMetaDataDirectory(const QString &outDir, const QSt if (!QFile::copy(QString::fromLatin1("%1/meta/%2").arg(it->directory, *qm), QString::fromLatin1("%1/%2/%3").arg(metapath, it->name, *qm))) { qDebug() << "failed!"; - throw QInstaller::Error(QString::fromLatin1("Could not copy the translation \"%1\" to its " - "target location \"%2\".").arg(*qm, it->name)); + throw QInstaller::Error(QString::fromLatin1("Could not copy the translation '%1' to its " + "target location '%2'.").arg(*qm, it->name)); } else { qDebug() << "done"; } @@ -369,16 +369,16 @@ void QInstallerTools::generateMetaDataDirectory(const QString &outDir, const QSt const QString &sourceFile = QString::fromLatin1("%1/meta/%2").arg(it->directory).arg(licenseFile); if (!QFile::exists(sourceFile)) { - throw QInstaller::Error(QString::fromLatin1("Could not find any license matching \"%1\" while " - "copying license files of %2.").arg(licenseFile, it->name)); + throw QInstaller::Error(QString::fromLatin1("Could not find any license matching '%1' while " + "copying license files of '%2'.").arg(licenseFile, it->name)); } qDebug() << "\tCopying associated license file" << licenseFile << "into the meta package..."; if (!QFile::copy(sourceFile, QString::fromLatin1("%1/%2/%3") .arg(metapath, it->name, licenseFile))) { qDebug() << "failed!"; - throw QInstaller::Error(QString::fromLatin1("Could not copy the license file \"%1\" to its " - "target location %2.").arg(licenseFile, it->name)); + throw QInstaller::Error(QString::fromLatin1("Could not copy the license file '%1' to its " + "target location '%2'.").arg(licenseFile, it->name)); } else { qDebug() << "done."; } @@ -441,13 +441,13 @@ PackageInfoVector QInstallerTools::createListOfPackages(const QString &packagesD if (!filteredPackages.contains(it->fileName())) continue; } - qDebug() << QString::fromLatin1("\tfound subdirectory \"%1\"").arg(it->fileName()); + qDebug() << QString::fromLatin1("\tfound subdirectory '%1'").arg(it->fileName()); // because the filter is QDir::Dirs - filename means the name of the subdirectory if (it->fileName().contains(QLatin1Char('-'))) { if (ignoreInvalidPackages) continue; - throw QInstaller::Error(QString::fromLatin1("Component \"%1\" can't contain '-'. This is not allowed, because " - "it is used as the separator between the component name and the version number internally.") + 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())); } @@ -456,7 +456,7 @@ PackageInfoVector QInstallerTools::createListOfPackages(const QString &packagesD if (!fileInfo.exists()) { if (ignoreInvalidPackages) continue; - throw QInstaller::Error(QString::fromLatin1("Component \"%1\" does not contain a package " + throw QInstaller::Error(QString::fromLatin1("Component '%1' does not contain a package " "description (meta/package.xml is missing).").arg(it->fileName())); } @@ -469,7 +469,7 @@ PackageInfoVector QInstallerTools::createListOfPackages(const QString &packagesD if (!doc.setContent(&file, &error, &errorLine, &errorColumn)) { if (ignoreInvalidPackages) continue; - throw QInstaller::Error(QString::fromLatin1("Component package description in \"%1\" is invalid. " + throw QInstaller::Error(QString::fromLatin1("Component package description in '%1' is invalid. " "Error at line: %2, column: %3 -> %4").arg(fileInfo.absoluteFilePath(), QString::number(errorLine), QString::number(errorColumn), error)); } @@ -477,15 +477,15 @@ PackageInfoVector QInstallerTools::createListOfPackages(const QString &packagesD const QDomElement packageElement = doc.firstChildElement(QLatin1String("Package")); const QString name = packageElement.firstChildElement(QLatin1String("Name")).text(); if (!name.isEmpty() && name != it->fileName()) { - qWarning() << QString::fromLatin1("The <Name> tag in the \"%1\" is ignored - the installer uses the " - "path element right before the \"meta\" (\"%2\").").arg(fileInfo.absoluteFilePath(), it->fileName()); + qWarning() << QString::fromLatin1("The <Name> tag in the '%1' is ignored - the installer uses the " + "path element right before the 'meta' ('%2').").arg(fileInfo.absoluteFilePath(), it->fileName()); } const QString releaseDate = packageElement.firstChildElement(QLatin1String("ReleaseDate")).text(); if (releaseDate.isEmpty() || (!QDate::fromString(releaseDate, Qt::ISODate).isValid())) { if (ignoreInvalidPackages) continue; - throw QInstaller::Error(QString::fromLatin1("Release date for %1 is invalid! <ReleaseDate>%2" + throw QInstaller::Error(QString::fromLatin1("Release date for '%1' is invalid! <ReleaseDate>%2" "</ReleaseDate>. Supported format: YYYY-MM-DD").arg(fileInfo.absoluteFilePath(), releaseDate)); } @@ -495,7 +495,7 @@ PackageInfoVector QInstallerTools::createListOfPackages(const QString &packagesD if (!QRegExp(QLatin1String("[0-9]+((\\.|-)[0-9]+)*")).exactMatch(info.version)) { if (ignoreInvalidPackages) continue; - throw QInstaller::Error(QString::fromLatin1("Component version for %1 is invalid! <Version>%2</Version>") + throw QInstaller::Error(QString::fromLatin1("Component version for '%1' is invalid! <Version>%2</Version>") .arg(fileInfo.absoluteFilePath(), info.version)); } info.dependencies = packageElement.firstChildElement(QLatin1String("Dependencies")).text() @@ -573,7 +573,7 @@ void QInstallerTools::compressMetaDirectories(const QString &repoDir, const QStr 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)); + throw QInstaller::Error(QString::fromLatin1("Could not move '%1' to '%2'").arg(tmpTarget, finalTarget)); } QInstaller::openForWrite(&existingUpdatesXml, existingUpdatesXml.fileName()); @@ -591,7 +591,7 @@ void QInstallerTools::copyComponentData(const QString &packageDir, const QString const QString namedRepoDir = QString::fromLatin1("%1/%2").arg(repoDir, name); if (!QDir().mkpath(namedRepoDir)) { - throw QInstaller::Error(QString::fromLatin1("Could not create repository folder for component %1") + throw QInstaller::Error(QString::fromLatin1("Could not create repository folder for component '%1'") .arg(name)); } @@ -605,10 +605,10 @@ void QInstallerTools::copyComponentData(const QString &packageDir, const QString if (Lib7z::isSupportedArchive(absoluteEntryFilePath)) { QFile tmp(absoluteEntryFilePath); QString target = QString::fromLatin1("%1/%3%2").arg(namedRepoDir, entry, info.version); - qDebug() << QString::fromLatin1("Copying archive from %1 to %2").arg(tmp.fileName(), + 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(), + throw QInstaller::Error(QString::fromLatin1("Could not copy '%1' to '%2': %3").arg(tmp.fileName(), target, tmp.errorString())); } compressedFiles.append(target); |