summaryrefslogtreecommitdiffstats
path: root/installerbuilder/common
diff options
context:
space:
mode:
Diffstat (limited to 'installerbuilder/common')
-rw-r--r--installerbuilder/common/binaryformatengine.cpp4
-rw-r--r--installerbuilder/common/fileutils.cpp2
-rw-r--r--installerbuilder/common/repositorygen.cpp28
-rw-r--r--installerbuilder/common/utils.cpp2
4 files changed, 18 insertions, 18 deletions
diff --git a/installerbuilder/common/binaryformatengine.cpp b/installerbuilder/common/binaryformatengine.cpp
index 47a9784b3..4060cf66c 100644
--- a/installerbuilder/common/binaryformatengine.cpp
+++ b/installerbuilder/common/binaryformatengine.cpp
@@ -88,8 +88,8 @@ void BinaryFormatEngine::setArchive(const QString &file)
{
m_fileNamePath = file;
- static const QChar sep = QChar::fromLatin1('/');
- static const QString prefix = QString::fromLatin1("installer://");
+ static const QChar sep = QLatin1Char('/');
+ static const QString prefix = QLatin1String("installer://");
Q_ASSERT(file.toLower().startsWith(prefix));
// cut the prefix
diff --git a/installerbuilder/common/fileutils.cpp b/installerbuilder/common/fileutils.cpp
index 725efc5c3..de7e4e1cf 100644
--- a/installerbuilder/common/fileutils.cpp
+++ b/installerbuilder/common/fileutils.cpp
@@ -405,7 +405,7 @@ QString QInstaller::createTemporaryDirectory(const QString &templ)
QTemporaryFile f(t);
if (!f.open())
throw Error(QObject::tr("Could not create temporary folder for template %1: %2").arg(t, f.errorString()));
- const QString path = f.fileName() + QString::fromLatin1("meta");
+ const QString path = f.fileName() + QLatin1String("meta");
verbose() << "Creating meta data directory at " << path << std::endl;
QInstaller::mkpath(path);
diff --git a/installerbuilder/common/repositorygen.cpp b/installerbuilder/common/repositorygen.cpp
index 13521c10e..4d85d1329 100644
--- a/installerbuilder/common/repositorygen.cpp
+++ b/installerbuilder/common/repositorygen.cpp
@@ -97,7 +97,7 @@ static QVector<PackageInfo> collectAvailablePackages(const QString &packagesDire
QString::number(errorColumn), errorMessage));
}
- const QString name = doc.firstChildElement(QString::fromLatin1("Package"))
+ const QString name = doc.firstChildElement(QLatin1String("Package"))
.firstChildElement(QLatin1String("Name")).text();
if (name != it->fileName()) {
verbose() << std::endl;
@@ -107,15 +107,15 @@ static QVector<PackageInfo> collectAvailablePackages(const QString &packagesDire
PackageInfo info;
info.name = name;
- info.version = doc.firstChildElement(QString::fromLatin1("Package")).
- firstChildElement(QString::fromLatin1("Version")).text();
+ info.version = doc.firstChildElement(QLatin1String("Package")).
+ firstChildElement(QLatin1String("Version")).text();
if (!QRegExp(QLatin1String("[0-9]+((\\.|-)[0-9]+)*")).exactMatch(info.version)) {
verbose() << std::endl;
throw QInstaller::Error(QObject::tr("Component version for %1 is invalid! <Version>%2</version>")
.arg(it->fileName(), info.version));
}
- info.dependencies = doc.firstChildElement(QString::fromLatin1("Package")).
- firstChildElement(QString::fromLatin1("Dependencies")).text().split(QRegExp(QLatin1String("\\b(,|, )\\b")),
+ info.dependencies = doc.firstChildElement(QLatin1String("Package")).
+ firstChildElement(QLatin1String("Dependencies")).text().split(QRegExp(QLatin1String("\\b(,|, )\\b")),
QString::SkipEmptyParts);
info.directory = it->filePath();
dict.push_back(info);
@@ -141,7 +141,7 @@ static PackageInfo findMatchingPackage(const QString &name, const QVector<Packag
QRegExp compEx(QLatin1String("([<=>]+)(.*)"));
const QString comparator = compEx.exactMatch(version)
- ? compEx.cap(1) : QString::fromLatin1("=");
+ ? compEx.cap(1) : QLatin1String("=");
version = compEx.exactMatch(version) ? compEx.cap(2) : version;
const bool allowEqual = comparator.contains(QLatin1Char('='));
@@ -168,7 +168,7 @@ static PackageInfo findMatchingPackage(const QString &name, const QVector<Packag
static bool packageHasPrefix(const PackageInfo &package, const QString &prefix)
{
return package.name.startsWith(prefix)
- && package.name.mid(prefix.length(), 1) == QString::fromLatin1(".");
+ && package.name.mid(prefix.length(), 1) == QLatin1String(".");
}
/**
@@ -393,11 +393,11 @@ void QInstaller::generateMetaDataDirectory(const QString &outDir, const QString
if (node.isComment())
continue;
const QString key = node.nodeName();
- if (key == QString::fromLatin1("UserInterfaces"))
+ if (key == QLatin1String("UserInterfaces"))
continue;
- if (key == QString::fromLatin1("Translations"))
+ if (key == QLatin1String("Translations"))
continue;
- if (key == QString::fromLatin1("Licenses"))
+ if (key == QLatin1String("Licenses"))
continue;
const QString value = node.toElement().text();
QDomElement element = doc.createElement(key);
@@ -499,7 +499,7 @@ void QInstaller::generateMetaDataDirectory(const QString &outDir, const QString
QStringList userinterfaces;
for (int i = 0; i < uiNodes.count(); ++i) {
const QDomNode node = uiNodes.at(i);
- if (node.nodeName() != QString::fromLatin1("UserInterface"))
+ if (node.nodeName() != QLatin1String("UserInterface"))
continue;
const QDir dir(QString::fromLatin1("%1/meta").arg(it->directory));
@@ -525,7 +525,7 @@ void QInstaller::generateMetaDataDirectory(const QString &outDir, const QString
}
if (!userinterfaces.isEmpty()) {
- update.appendChild(doc.createElement(QString::fromLatin1("UserInterfaces")))
+ update.appendChild(doc.createElement(QLatin1String("UserInterfaces")))
.appendChild(doc.createTextNode(userinterfaces.join(QChar::fromLatin1(','))));
}
@@ -534,7 +534,7 @@ void QInstaller::generateMetaDataDirectory(const QString &outDir, const QString
QStringList translations;
for (int i = 0; i < qmNodes.count(); ++i) {
const QDomNode node = qmNodes.at(i);
- if (node.nodeName() != QString::fromLatin1("Translation"))
+ if (node.nodeName() != QLatin1String("Translation"))
continue;
const QDir dir(QString::fromLatin1("%1/meta").arg(it->directory));
@@ -560,7 +560,7 @@ void QInstaller::generateMetaDataDirectory(const QString &outDir, const QString
}
if (!translations.isEmpty()) {
- update.appendChild(doc.createElement(QString::fromLatin1("Translations")))
+ update.appendChild(doc.createElement(QLatin1String("Translations")))
.appendChild(doc.createTextNode(translations.join(QChar::fromLatin1(','))));
}
diff --git a/installerbuilder/common/utils.cpp b/installerbuilder/common/utils.cpp
index d99c2d279..350a48593 100644
--- a/installerbuilder/common/utils.cpp
+++ b/installerbuilder/common/utils.cpp
@@ -194,7 +194,7 @@ QInstaller::VerboseWriter::~VerboseWriter()
if (output.open(QIODevice::ReadWrite | QIODevice::Append)) {
QString logInfo;
logInfo += QLatin1String("*************************************");
- logInfo += QString::fromLatin1("Invoked:") + QDateTime::currentDateTime().toString();
+ logInfo += QLatin1String("Invoked:") + QDateTime::currentDateTime().toString();
output.write(logInfo.toLocal8Bit());
output.write(preFileBuffer.data());
output.close();