aboutsummaryrefslogtreecommitdiffstats
path: root/src/app/qbs
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@petroules.com>2014-01-08 14:36:16 -0500
committerJake Petroules <jake.petroules@petroules.com>2014-01-14 17:41:47 +0100
commit49a051bd4b320aff32066181932dc27a4eea63c5 (patch)
treea8f5c6e56bb275d2ae8c83179065623385d1395a /src/app/qbs
parentcf706560d394e582a897d2a69e79ce5740d2459d (diff)
Prepare for using QT_NO_CAST_FROM/TO_ASCII.
Change-Id: Ib39e49e896cbddf5a5bd851088500991d962355a Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Diffstat (limited to 'src/app/qbs')
-rw-r--r--src/app/qbs/parser/commandlineparser.cpp6
-rw-r--r--src/app/qbs/status.cpp28
2 files changed, 21 insertions, 13 deletions
diff --git a/src/app/qbs/parser/commandlineparser.cpp b/src/app/qbs/parser/commandlineparser.cpp
index 69f56e7dd..54d3cddf8 100644
--- a/src/app/qbs/parser/commandlineparser.cpp
+++ b/src/app/qbs/parser/commandlineparser.cpp
@@ -408,7 +408,7 @@ QString CommandLineParser::CommandLineParserPrivate::generalHelp() const
QStringList toolNames = QbsTool::allToolNames();
toolNames.sort();
if (!toolNames.isEmpty()) {
- help.append('\n').append(Tr::tr("Auxiliary commands:\n"));
+ help.append(QLatin1Char('\n')).append(Tr::tr("Auxiliary commands:\n"));
foreach (const QString &toolName, toolNames) {
help.append(QLatin1String(" ")).append(toolName);
const QString whitespace = QString(rhsIndentation - 2 - toolName.count(),
@@ -550,10 +550,10 @@ void CommandLineParser::CommandLineParserPrivate::setupLogLevel()
QString CommandLineParser::CommandLineParserPrivate::propertyName(const QString &aCommandLineName) const
{
// Make fully-qualified, ie "platform" -> "qbs.platform"
- if (aCommandLineName.contains("."))
+ if (aCommandLineName.contains(QLatin1Char('.')))
return aCommandLineName;
else
- return "qbs." + aCommandLineName;
+ return QLatin1String("qbs.") + aCommandLineName;
}
} // namespace qbs
diff --git a/src/app/qbs/status.cpp b/src/app/qbs/status.cpp
index 60358ea22..66f980bd2 100644
--- a/src/app/qbs/status.cpp
+++ b/src/app/qbs/status.cpp
@@ -44,21 +44,29 @@ namespace qbs {
static QList<QRegExp> createIgnoreList(const QString &projectRootPath)
{
QList<QRegExp> ignoreRegularExpressionList;
- ignoreRegularExpressionList.append(QRegExp(projectRootPath + "/build.*"));
- ignoreRegularExpressionList.append(QRegExp("*.qbs", Qt::CaseSensitive, QRegExp::Wildcard));
- ignoreRegularExpressionList.append(QRegExp("*.pro", Qt::CaseSensitive, QRegExp::Wildcard));
- ignoreRegularExpressionList.append(QRegExp("*Makefile", Qt::CaseSensitive, QRegExp::Wildcard));
- ignoreRegularExpressionList.append(QRegExp("*.so*", Qt::CaseSensitive, QRegExp::Wildcard));
- ignoreRegularExpressionList.append(QRegExp("*.o", Qt::CaseSensitive, QRegExp::Wildcard));
- QString ignoreFilePath = projectRootPath + "/.qbsignore";
+ ignoreRegularExpressionList.append(QRegExp(projectRootPath + QLatin1String("/build.*")));
+ ignoreRegularExpressionList.append(QRegExp(QLatin1String("*.qbs"),
+ Qt::CaseSensitive, QRegExp::Wildcard));
+ ignoreRegularExpressionList.append(QRegExp(QLatin1String("*.pro"),
+ Qt::CaseSensitive, QRegExp::Wildcard));
+ ignoreRegularExpressionList.append(QRegExp(QLatin1String("*Makefile"),
+ Qt::CaseSensitive, QRegExp::Wildcard));
+ ignoreRegularExpressionList.append(QRegExp(QLatin1String("*.so*"),
+ Qt::CaseSensitive, QRegExp::Wildcard));
+ ignoreRegularExpressionList.append(QRegExp(QLatin1String("*.o"),
+ Qt::CaseSensitive, QRegExp::Wildcard));
+ QString ignoreFilePath = projectRootPath + QLatin1String("/.qbsignore");
QFile ignoreFile(ignoreFilePath);
if (ignoreFile.open(QFile::ReadOnly)) {
QList<QByteArray> ignoreTokenList = ignoreFile.readAll().split('\n');
- foreach (const QString &token, ignoreTokenList) {
- if (token.left(1) == "/")
- ignoreRegularExpressionList.append(QRegExp(projectRootPath + token + ".*", Qt::CaseSensitive, QRegExp::RegExp2));
+ foreach (const QByteArray &btoken, ignoreTokenList) {
+ const QString token = QString::fromLatin1(btoken);
+ if (token.left(1) == QLatin1String("/"))
+ ignoreRegularExpressionList.append(QRegExp(projectRootPath
+ + token + QLatin1String(".*"),
+ Qt::CaseSensitive, QRegExp::RegExp2));
else if (!token.isEmpty())
ignoreRegularExpressionList.append(QRegExp(token, Qt::CaseSensitive, QRegExp::RegExp2));