forked from qt-creator/qt-creator
Replace QLatin1String("x") with QLatin1Char('x') where possible
Change-Id: I2f90c8ae7b5e968b9de882833f8661ab540a9232 Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -125,43 +125,43 @@ void NamePrettyPrinter::visit(const OperatorNameId *name)
|
|||||||
_name += QLatin1String("delete[]");
|
_name += QLatin1String("delete[]");
|
||||||
break;
|
break;
|
||||||
case OperatorNameId::PlusOp:
|
case OperatorNameId::PlusOp:
|
||||||
_name += QLatin1String("+");
|
_name += QLatin1Char('+');
|
||||||
break;
|
break;
|
||||||
case OperatorNameId::MinusOp:
|
case OperatorNameId::MinusOp:
|
||||||
_name += QLatin1String("-");
|
_name += QLatin1Char('-');
|
||||||
break;
|
break;
|
||||||
case OperatorNameId::StarOp:
|
case OperatorNameId::StarOp:
|
||||||
_name += QLatin1String("*");
|
_name += QLatin1Char('*');
|
||||||
break;
|
break;
|
||||||
case OperatorNameId::SlashOp:
|
case OperatorNameId::SlashOp:
|
||||||
_name += QLatin1String("/");
|
_name += QLatin1Char('/');
|
||||||
break;
|
break;
|
||||||
case OperatorNameId::PercentOp:
|
case OperatorNameId::PercentOp:
|
||||||
_name += QLatin1String("%");
|
_name += QLatin1Char('%');
|
||||||
break;
|
break;
|
||||||
case OperatorNameId::CaretOp:
|
case OperatorNameId::CaretOp:
|
||||||
_name += QLatin1String("^");
|
_name += QLatin1Char('^');
|
||||||
break;
|
break;
|
||||||
case OperatorNameId::AmpOp:
|
case OperatorNameId::AmpOp:
|
||||||
_name += QLatin1String("&");
|
_name += QLatin1Char('&');
|
||||||
break;
|
break;
|
||||||
case OperatorNameId::PipeOp:
|
case OperatorNameId::PipeOp:
|
||||||
_name += QLatin1String("|");
|
_name += QLatin1Char('|');
|
||||||
break;
|
break;
|
||||||
case OperatorNameId::TildeOp:
|
case OperatorNameId::TildeOp:
|
||||||
_name += QLatin1String("~");
|
_name += QLatin1Char('~');
|
||||||
break;
|
break;
|
||||||
case OperatorNameId::ExclaimOp:
|
case OperatorNameId::ExclaimOp:
|
||||||
_name += QLatin1String("!");
|
_name += QLatin1Char('!');
|
||||||
break;
|
break;
|
||||||
case OperatorNameId::EqualOp:
|
case OperatorNameId::EqualOp:
|
||||||
_name += QLatin1String("=");
|
_name += QLatin1Char('=');
|
||||||
break;
|
break;
|
||||||
case OperatorNameId::LessOp:
|
case OperatorNameId::LessOp:
|
||||||
_name += QLatin1String("<");
|
_name += QLatin1Char('<');
|
||||||
break;
|
break;
|
||||||
case OperatorNameId::GreaterOp:
|
case OperatorNameId::GreaterOp:
|
||||||
_name += QLatin1String(">");
|
_name += QLatin1Char('>');
|
||||||
break;
|
break;
|
||||||
case OperatorNameId::PlusEqualOp:
|
case OperatorNameId::PlusEqualOp:
|
||||||
_name += QLatin1String("+=");
|
_name += QLatin1String("+=");
|
||||||
@@ -224,7 +224,7 @@ void NamePrettyPrinter::visit(const OperatorNameId *name)
|
|||||||
_name += QLatin1String("--");
|
_name += QLatin1String("--");
|
||||||
break;
|
break;
|
||||||
case OperatorNameId::CommaOp:
|
case OperatorNameId::CommaOp:
|
||||||
_name += QLatin1String(",");
|
_name += QLatin1Char(',');
|
||||||
break;
|
break;
|
||||||
case OperatorNameId::ArrowStarOp:
|
case OperatorNameId::ArrowStarOp:
|
||||||
_name += QLatin1String("->*");
|
_name += QLatin1String("->*");
|
||||||
|
@@ -320,7 +320,7 @@ void TypePrettyPrinter::prependSpaceBeforeIndirection(const FullySpecifiedType &
|
|||||||
const bool elementIsConstPointerOrReference = elementTypeIsPointerOrReference && type.isConst();
|
const bool elementIsConstPointerOrReference = elementTypeIsPointerOrReference && type.isConst();
|
||||||
const bool shouldBindToLeftSpecifier = _overview->starBindFlags & Overview::BindToLeftSpecifier;
|
const bool shouldBindToLeftSpecifier = _overview->starBindFlags & Overview::BindToLeftSpecifier;
|
||||||
if (elementIsConstPointerOrReference && ! shouldBindToLeftSpecifier)
|
if (elementIsConstPointerOrReference && ! shouldBindToLeftSpecifier)
|
||||||
_text.prepend(QLatin1String(" "));
|
_text.prepend(QLatin1Char(' '));
|
||||||
}
|
}
|
||||||
|
|
||||||
void TypePrettyPrinter::prependSpaceAfterIndirection(bool hasName)
|
void TypePrettyPrinter::prependSpaceAfterIndirection(bool hasName)
|
||||||
@@ -340,7 +340,7 @@ void TypePrettyPrinter::prependSpaceAfterIndirection(bool hasName)
|
|||||||
const bool case3 = ! hasCvSpecifier && ! shouldBindToIdentifier
|
const bool case3 = ! hasCvSpecifier && ! shouldBindToIdentifier
|
||||||
&& ! _isIndirectionToArrayOrFunction && _text.size() && _text.at(0).isLetter();
|
&& ! _isIndirectionToArrayOrFunction && _text.size() && _text.at(0).isLetter();
|
||||||
if (case1 || case2 || case3)
|
if (case1 || case2 || case3)
|
||||||
_text.prepend(QLatin1String(" "));
|
_text.prepend(QLatin1Char(' '));
|
||||||
}
|
}
|
||||||
|
|
||||||
void TypePrettyPrinter::visit(PointerType *type)
|
void TypePrettyPrinter::visit(PointerType *type)
|
||||||
|
@@ -95,7 +95,7 @@ QString FakeMetaEnum::describe(int baseIndent) const
|
|||||||
res += QString::number(m_values.value(i, -1));
|
res += QString::number(m_values.value(i, -1));
|
||||||
}
|
}
|
||||||
res += newLine;
|
res += newLine;
|
||||||
res += QLatin1String("}");
|
res += QLatin1Char('}');
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -195,7 +195,7 @@ QString FakeMetaMethod::describe(int baseIndent) const
|
|||||||
res += QLatin1String(" ");
|
res += QLatin1String(" ");
|
||||||
res += pName;
|
res += pName;
|
||||||
}
|
}
|
||||||
res += QLatin1String("]");
|
res += QLatin1Char(']');
|
||||||
res += newLine;
|
res += newLine;
|
||||||
res += QLatin1String(" parameterTypes:[");
|
res += QLatin1String(" parameterTypes:[");
|
||||||
foreach (const QString &pType, parameterTypes()) {
|
foreach (const QString &pType, parameterTypes()) {
|
||||||
@@ -203,9 +203,9 @@ QString FakeMetaMethod::describe(int baseIndent) const
|
|||||||
res += QLatin1String(" ");
|
res += QLatin1String(" ");
|
||||||
res += pType;
|
res += pType;
|
||||||
}
|
}
|
||||||
res += QLatin1String("]");
|
res += QLatin1Char(']');
|
||||||
res += newLine;
|
res += newLine;
|
||||||
res += QLatin1String("}");
|
res += QLatin1Char('}');
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -281,7 +281,7 @@ QString FakeMetaProperty::describe(int baseIndent) const
|
|||||||
res += QLatin1String(" isWritable:");
|
res += QLatin1String(" isWritable:");
|
||||||
res += isWritable();
|
res += isWritable();
|
||||||
res += newLine;
|
res += newLine;
|
||||||
res += QLatin1String("}");
|
res += QLatin1Char('}');
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -485,7 +485,7 @@ QString FakeMetaObject::describe(bool printDetails, int baseIndent) const
|
|||||||
if (!printDetails)
|
if (!printDetails)
|
||||||
return res;
|
return res;
|
||||||
QString newLine = QString::fromLatin1("\n") + QString::fromLatin1(" ").repeated(baseIndent);
|
QString newLine = QString::fromLatin1("\n") + QString::fromLatin1(" ").repeated(baseIndent);
|
||||||
res += QLatin1String("{");
|
res += QLatin1Char('{');
|
||||||
res += newLine;
|
res += newLine;
|
||||||
res += QLatin1String("className:");
|
res += QLatin1String("className:");
|
||||||
res += className();
|
res += className();
|
||||||
@@ -518,7 +518,7 @@ QString FakeMetaObject::describe(bool printDetails, int baseIndent) const
|
|||||||
res += QLatin1String(" ");
|
res += QLatin1String(" ");
|
||||||
res += e.describe(baseIndent + 2);
|
res += e.describe(baseIndent + 2);
|
||||||
}
|
}
|
||||||
res += QLatin1String("]");
|
res += QLatin1Char(']');
|
||||||
|
|
||||||
res += newLine;
|
res += newLine;
|
||||||
res += QLatin1String("enums:[");
|
res += QLatin1String("enums:[");
|
||||||
@@ -528,7 +528,7 @@ QString FakeMetaObject::describe(bool printDetails, int baseIndent) const
|
|||||||
res += QLatin1String(" ");
|
res += QLatin1String(" ");
|
||||||
res += e.describe(baseIndent + 2);
|
res += e.describe(baseIndent + 2);
|
||||||
}
|
}
|
||||||
res += QLatin1String("]");
|
res += QLatin1Char(']');
|
||||||
|
|
||||||
res += newLine;
|
res += newLine;
|
||||||
res += QLatin1String("properties:[");
|
res += QLatin1String("properties:[");
|
||||||
@@ -538,7 +538,7 @@ QString FakeMetaObject::describe(bool printDetails, int baseIndent) const
|
|||||||
res += QLatin1String(" ");
|
res += QLatin1String(" ");
|
||||||
res += prop.describe(baseIndent + 2);
|
res += prop.describe(baseIndent + 2);
|
||||||
}
|
}
|
||||||
res += QLatin1String("]");
|
res += QLatin1Char(']');
|
||||||
res += QLatin1String("methods:[");
|
res += QLatin1String("methods:[");
|
||||||
for (int iMethod = 0; iMethod < methodOffset() ; ++ iMethod) {
|
for (int iMethod = 0; iMethod < methodOffset() ; ++ iMethod) {
|
||||||
FakeMetaMethod m = method(methodOffset() + iMethod);
|
FakeMetaMethod m = method(methodOffset() + iMethod);
|
||||||
@@ -546,9 +546,9 @@ QString FakeMetaObject::describe(bool printDetails, int baseIndent) const
|
|||||||
res += QLatin1String(" ");
|
res += QLatin1String(" ");
|
||||||
m.describe(baseIndent + 2);
|
m.describe(baseIndent + 2);
|
||||||
}
|
}
|
||||||
res += QLatin1String("]");
|
res += QLatin1Char(']');
|
||||||
res += newLine;
|
res += newLine;
|
||||||
res += QLatin1String("}");
|
res += QLatin1Char('}');
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -590,7 +590,7 @@ QString FakeMetaObject::Export::describe(int baseIndent) const
|
|||||||
res += QLatin1String(" isValid:");
|
res += QLatin1String(" isValid:");
|
||||||
res += QString::number(isValid());
|
res += QString::number(isValid());
|
||||||
res += newLine;
|
res += newLine;
|
||||||
res += QLatin1String("}");
|
res += QLatin1Char('}');
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -266,7 +266,7 @@ void ContextPaneWidgetRectangle::timerEvent(QTimerEvent *event)
|
|||||||
str += QLatin1String("color: ") + QLatin1String("\"") + stop.second.name() + QLatin1String("\";\n");
|
str += QLatin1String("color: ") + QLatin1String("\"") + stop.second.name() + QLatin1String("\";\n");
|
||||||
str += QLatin1String("}\n");
|
str += QLatin1String("}\n");
|
||||||
}
|
}
|
||||||
str += QLatin1String("}");
|
str += QLatin1Char('}');
|
||||||
emit propertyChanged(QLatin1String("gradient"), str);
|
emit propertyChanged(QLatin1String("gradient"), str);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -379,7 +379,7 @@ int QmlJSIndenter::indentForContinuationLine()
|
|||||||
*/
|
*/
|
||||||
if (!isContinuationLine())
|
if (!isContinuationLine())
|
||||||
return indentOfLine(*yyLine);
|
return indentOfLine(*yyLine);
|
||||||
} else if (isContinuationLine() || yyLine->endsWith(QLatin1String(","))) {
|
} else if (isContinuationLine() || yyLine->endsWith(QLatin1Char(','))) {
|
||||||
/*
|
/*
|
||||||
We have
|
We have
|
||||||
|
|
||||||
|
@@ -200,25 +200,25 @@ QString PropertyInfo::toString() const
|
|||||||
}
|
}
|
||||||
if (isWriteable()) {
|
if (isWriteable()) {
|
||||||
if (join)
|
if (join)
|
||||||
res += QLatin1String("|");
|
res += QLatin1Char('|');
|
||||||
res += QLatin1String("Writeable");
|
res += QLatin1String("Writeable");
|
||||||
join = true;
|
join = true;
|
||||||
}
|
}
|
||||||
if (isList()) {
|
if (isList()) {
|
||||||
if (join)
|
if (join)
|
||||||
res += QLatin1String("|");
|
res += QLatin1Char('|');
|
||||||
res += QLatin1String("ListType");
|
res += QLatin1String("ListType");
|
||||||
join = true;
|
join = true;
|
||||||
}
|
}
|
||||||
if (canBePointer()) {
|
if (canBePointer()) {
|
||||||
if (join)
|
if (join)
|
||||||
res += QLatin1String("|");
|
res += QLatin1Char('|');
|
||||||
res += QLatin1String("Pointer");
|
res += QLatin1String("Pointer");
|
||||||
join = true;
|
join = true;
|
||||||
}
|
}
|
||||||
if (canBeValue()) {
|
if (canBeValue()) {
|
||||||
if (join)
|
if (join)
|
||||||
res += QLatin1String("|");
|
res += QLatin1Char('|');
|
||||||
res += QLatin1String("Value");
|
res += QLatin1String("Value");
|
||||||
join = true;
|
join = true;
|
||||||
}
|
}
|
||||||
|
@@ -563,7 +563,7 @@ bool LineInfo::isUnfinishedLine()
|
|||||||
unf = true;
|
unf = true;
|
||||||
|
|
||||||
// ### This only checks one line back.
|
// ### This only checks one line back.
|
||||||
} else if (readLine() && yyLine->endsWith(QLatin1String(";")) && hasUnclosedParenOrBracket()) {
|
} else if (readLine() && yyLine->endsWith(QLatin1Char(';')) && hasUnclosedParenOrBracket()) {
|
||||||
/*
|
/*
|
||||||
Exception:
|
Exception:
|
||||||
|
|
||||||
|
@@ -324,7 +324,7 @@ void PluginDumper::qmlPluginTypeDumpDone(int exitCode)
|
|||||||
CppQmlTypesLoader::BuiltinObjects objectsList;
|
CppQmlTypesLoader::BuiltinObjects objectsList;
|
||||||
QList<ModuleApiInfo> moduleApis;
|
QList<ModuleApiInfo> moduleApis;
|
||||||
CppQmlTypesLoader::parseQmlTypeDescriptions(output, &objectsList, &moduleApis, &error, &warning,
|
CppQmlTypesLoader::parseQmlTypeDescriptions(output, &objectsList, &moduleApis, &error, &warning,
|
||||||
QLatin1String("<dump of ") + libraryPath + QLatin1String(">"));
|
QLatin1String("<dump of ") + libraryPath + QLatin1Char('>'));
|
||||||
if (exitCode == 0) {
|
if (exitCode == 0) {
|
||||||
if (!error.isEmpty()) {
|
if (!error.isEmpty()) {
|
||||||
libraryInfo.setPluginTypeInfoStatus(LibraryInfo::DumpError,
|
libraryInfo.setPluginTypeInfoStatus(LibraryInfo::DumpError,
|
||||||
|
@@ -119,7 +119,7 @@ QString QrcParser::normalizedQrcFilePath(const QString &path) {
|
|||||||
while (endPrefix + 1 < path.size() && path.at(endPrefix+1) == QLatin1Char('/'))
|
while (endPrefix + 1 < path.size() && path.at(endPrefix+1) == QLatin1Char('/'))
|
||||||
++endPrefix;
|
++endPrefix;
|
||||||
normPath = path.right(path.size()-endPrefix);
|
normPath = path.right(path.size()-endPrefix);
|
||||||
if (!normPath.startsWith(QLatin1String("/")))
|
if (!normPath.startsWith(QLatin1Char('/')))
|
||||||
normPath.insert(0, QLatin1Char('/'));
|
normPath.insert(0, QLatin1Char('/'));
|
||||||
return normPath;
|
return normPath;
|
||||||
}
|
}
|
||||||
|
@@ -99,7 +99,7 @@ SftpFileSystemModel::SftpFileSystemModel(QObject *parent)
|
|||||||
: QAbstractItemModel(parent), d(new SftpFileSystemModelPrivate)
|
: QAbstractItemModel(parent), d(new SftpFileSystemModelPrivate)
|
||||||
{
|
{
|
||||||
d->sshConnection = 0;
|
d->sshConnection = 0;
|
||||||
d->rootDirectory = QLatin1String("/");
|
d->rootDirectory = QLatin1Char('/');
|
||||||
d->rootNode = 0;
|
d->rootNode = 0;
|
||||||
d->statJobId = SftpInvalidJob;
|
d->statJobId = SftpInvalidJob;
|
||||||
}
|
}
|
||||||
|
@@ -172,7 +172,7 @@ bool FileNameValidatingLineEdit::validateFileNameExtension(const QString &fileNa
|
|||||||
// file extension
|
// file extension
|
||||||
if (!requiredExtensions.isEmpty()) {
|
if (!requiredExtensions.isEmpty()) {
|
||||||
foreach (const QString &requiredExtension, requiredExtensions) {
|
foreach (const QString &requiredExtension, requiredExtensions) {
|
||||||
QString extension = QLatin1String(".") + requiredExtension;
|
QString extension = QLatin1Char('.') + requiredExtension;
|
||||||
if (fileName.endsWith(extension, Qt::CaseSensitive) && extension.count() < fileName.count())
|
if (fileName.endsWith(extension, Qt::CaseSensitive) && extension.count() < fileName.count())
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@@ -70,7 +70,7 @@ struct NewClassWidgetPrivate {
|
|||||||
};
|
};
|
||||||
|
|
||||||
NewClassWidgetPrivate:: NewClassWidgetPrivate() :
|
NewClassWidgetPrivate:: NewClassWidgetPrivate() :
|
||||||
m_headerExtension(QLatin1String("h")),
|
m_headerExtension(QLatin1Char('h')),
|
||||||
m_sourceExtension(QLatin1String("cpp")),
|
m_sourceExtension(QLatin1String("cpp")),
|
||||||
m_formExtension(QLatin1String("ui")),
|
m_formExtension(QLatin1String("ui")),
|
||||||
m_valid(false),
|
m_valid(false),
|
||||||
|
@@ -46,7 +46,7 @@ void CommentDefinition::setStyle(Style style)
|
|||||||
multiLineEnd = QLatin1String("*/");
|
multiLineEnd = QLatin1String("*/");
|
||||||
break;
|
break;
|
||||||
case HashStyle:
|
case HashStyle:
|
||||||
singleLine = QLatin1String("#");
|
singleLine = QLatin1Char('#');
|
||||||
multiLineStart.clear();
|
multiLineStart.clear();
|
||||||
multiLineEnd.clear();
|
multiLineEnd.clear();
|
||||||
break;
|
break;
|
||||||
|
@@ -1250,7 +1250,7 @@ void AndroidConfigurations::load()
|
|||||||
int major = -1;
|
int major = -1;
|
||||||
int minor = -1;
|
int minor = -1;
|
||||||
foreach (const QString &version, allVersions) {
|
foreach (const QString &version, allVersions) {
|
||||||
QStringList parts = version.split(QLatin1String("."));
|
QStringList parts = version.split(QLatin1Char('.'));
|
||||||
if (parts.size() != 2) // not interested in 1.7.0_u21
|
if (parts.size() != 2) // not interested in 1.7.0_u21
|
||||||
continue;
|
continue;
|
||||||
bool okMajor, okMinor;
|
bool okMajor, okMinor;
|
||||||
|
@@ -260,7 +260,7 @@ void AndroidSettingsWidget::check(AndroidSettingsWidget::Mode mode)
|
|||||||
m_ndkState = Error;
|
m_ndkState = Error;
|
||||||
m_ndkErrorMessage = tr("\"%1\" does not seem to be an Android NDK top folder.")
|
m_ndkErrorMessage = tr("\"%1\" does not seem to be an Android NDK top folder.")
|
||||||
.arg(m_androidConfig.ndkLocation().toUserOutput());
|
.arg(m_androidConfig.ndkLocation().toUserOutput());
|
||||||
} else if (platformPath.toString().contains(QLatin1String(" "))) {
|
} else if (platformPath.toString().contains(QLatin1Char(' '))) {
|
||||||
m_ndkState = Error;
|
m_ndkState = Error;
|
||||||
m_ndkErrorMessage = tr("The Android NDK cannot be installed into a path with spaces.");
|
m_ndkErrorMessage = tr("The Android NDK cannot be installed into a path with spaces.");
|
||||||
} else {
|
} else {
|
||||||
|
@@ -102,7 +102,7 @@ DebuggerStartParameters BareMetalRunControlFactory::startParameters(const BareMe
|
|||||||
if (device->sshParameters().host.startsWith(QLatin1Char('|'))) //gdb pipe mode enabled
|
if (device->sshParameters().host.startsWith(QLatin1Char('|'))) //gdb pipe mode enabled
|
||||||
params.remoteChannel = device->sshParameters().host;
|
params.remoteChannel = device->sshParameters().host;
|
||||||
else
|
else
|
||||||
params.remoteChannel = device->sshParameters().host + QLatin1String(":") + QString::number(device->sshParameters().port);
|
params.remoteChannel = device->sshParameters().host + QLatin1Char(':') + QString::number(device->sshParameters().port);
|
||||||
params.remoteSetupNeeded = false; // qml stuff, not needed
|
params.remoteSetupNeeded = false; // qml stuff, not needed
|
||||||
params.commandsAfterConnect = device->gdbInitCommands().toLatin1();
|
params.commandsAfterConnect = device->gdbInitCommands().toLatin1();
|
||||||
params.commandsForReset = device->gdbResetCommands().toLatin1();
|
params.commandsForReset = device->gdbResetCommands().toLatin1();
|
||||||
|
@@ -138,7 +138,7 @@ Command ClangFormat::command(int offset, int length) const
|
|||||||
} else {
|
} else {
|
||||||
command.addOption(QLatin1String("-style={")
|
command.addOption(QLatin1String("-style={")
|
||||||
+ m_settings->style(m_settings->customStyle()).remove(QLatin1Char('\n'))
|
+ m_settings->style(m_settings->customStyle()).remove(QLatin1Char('\n'))
|
||||||
+ QLatin1String("}"));
|
+ QLatin1Char('}'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (offset != -1) {
|
if (offset != -1) {
|
||||||
|
@@ -383,7 +383,7 @@ void CompletionProposalsBuilder::concatChunksForObjectiveCMessage(const CXComple
|
|||||||
}
|
}
|
||||||
const QString text = Internal::getQString(clang_getCompletionChunkText(cxString, index), false);
|
const QString text = Internal::getQString(clang_getCompletionChunkText(cxString, index), false);
|
||||||
if (chunkKind == CXCompletionChunk_ResultType) {
|
if (chunkKind == CXCompletionChunk_ResultType) {
|
||||||
hintPrefix += QLatin1String("(");
|
hintPrefix += QLatin1Char('(');
|
||||||
hintPrefix += text.toHtmlEscaped();
|
hintPrefix += text.toHtmlEscaped();
|
||||||
hintPrefix += QLatin1String(") ");
|
hintPrefix += QLatin1String(") ");
|
||||||
indentBonus += 3 + text.length();
|
indentBonus += 3 + text.length();
|
||||||
|
@@ -294,7 +294,7 @@ void CXPrettyPrinter::writeCompletionContexts(CXCodeCompleteResults *results)
|
|||||||
|
|
||||||
foreach (const QString &line, lines) {
|
foreach (const QString &line, lines) {
|
||||||
writeLineEnd();
|
writeLineEnd();
|
||||||
m_printed += line + QLatin1String(",");
|
m_printed += line + QLatin1Char(',');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -381,7 +381,7 @@ void CXPrettyPrinter::writeCompletionAnnotationJson(const CXCompletionString &st
|
|||||||
|
|
||||||
void CXPrettyPrinter::writeDiagnosticJson(const CXDiagnostic &diag)
|
void CXPrettyPrinter::writeDiagnosticJson(const CXDiagnostic &diag)
|
||||||
{
|
{
|
||||||
m_printed += QLatin1String("{");
|
m_printed += QLatin1Char('{');
|
||||||
m_indent += 4;
|
m_indent += 4;
|
||||||
writeLineEnd();
|
writeLineEnd();
|
||||||
|
|
||||||
@@ -410,7 +410,7 @@ void CXPrettyPrinter::writeDiagnosticJson(const CXDiagnostic &diag)
|
|||||||
writeFixItJson(diag, i);
|
writeFixItJson(diag, i);
|
||||||
writeLineEnd();
|
writeLineEnd();
|
||||||
}
|
}
|
||||||
m_printed += QLatin1String("]");
|
m_printed += QLatin1Char(']');
|
||||||
writeLineEnd();
|
writeLineEnd();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -448,7 +448,7 @@ void CXPrettyPrinter::writeDiagnosticJson(const CXDiagnostic &diag)
|
|||||||
}
|
}
|
||||||
m_indent -= 4;
|
m_indent -= 4;
|
||||||
writeLineEnd();
|
writeLineEnd();
|
||||||
m_printed += QLatin1String("]");
|
m_printed += QLatin1Char(']');
|
||||||
}
|
}
|
||||||
|
|
||||||
// children
|
// children
|
||||||
@@ -465,12 +465,12 @@ void CXPrettyPrinter::writeDiagnosticJson(const CXDiagnostic &diag)
|
|||||||
}
|
}
|
||||||
m_indent -= 4;
|
m_indent -= 4;
|
||||||
writeLineEnd();
|
writeLineEnd();
|
||||||
m_printed += QLatin1String("]");
|
m_printed += QLatin1Char(']');
|
||||||
}
|
}
|
||||||
|
|
||||||
m_indent -= 4;
|
m_indent -= 4;
|
||||||
writeLineEnd();
|
writeLineEnd();
|
||||||
m_printed += QLatin1String("}");
|
m_printed += QLatin1Char('}');
|
||||||
}
|
}
|
||||||
|
|
||||||
void CXPrettyPrinter::writeFixItJson(const CXDiagnostic &diag, unsigned i)
|
void CXPrettyPrinter::writeFixItJson(const CXDiagnostic &diag, unsigned i)
|
||||||
@@ -483,7 +483,7 @@ void CXPrettyPrinter::writeFixItJson(const CXDiagnostic &diag, unsigned i)
|
|||||||
m_printed += text;
|
m_printed += text;
|
||||||
m_printed += QLatin1String("\', range: ");
|
m_printed += QLatin1String("\', range: ");
|
||||||
writeRangeJson(range);
|
writeRangeJson(range);
|
||||||
m_printed += QLatin1String("}");
|
m_printed += QLatin1Char('}');
|
||||||
}
|
}
|
||||||
|
|
||||||
void CXPrettyPrinter::writeRangeJson(const CXSourceRange &range)
|
void CXPrettyPrinter::writeRangeJson(const CXSourceRange &range)
|
||||||
@@ -531,7 +531,7 @@ void CXPrettyPrinter::writeLocationJson(const CXSourceLocation &location)
|
|||||||
|
|
||||||
m_printed += QLatin1String("line: ");
|
m_printed += QLatin1String("line: ");
|
||||||
m_printed += QString::number(loc.line());
|
m_printed += QString::number(loc.line());
|
||||||
m_printed += QLatin1String(",");
|
m_printed += QLatin1Char(',');
|
||||||
writeLineEnd();
|
writeLineEnd();
|
||||||
|
|
||||||
m_printed += QLatin1String("column: ");
|
m_printed += QLatin1String("column: ");
|
||||||
@@ -539,7 +539,7 @@ void CXPrettyPrinter::writeLocationJson(const CXSourceLocation &location)
|
|||||||
|
|
||||||
m_indent -= 4;
|
m_indent -= 4;
|
||||||
writeLineEnd();
|
writeLineEnd();
|
||||||
m_printed += QLatin1String("}");
|
m_printed += QLatin1Char('}');
|
||||||
}
|
}
|
||||||
|
|
||||||
void CXPrettyPrinter::writeLineEnd()
|
void CXPrettyPrinter::writeLineEnd()
|
||||||
|
@@ -96,7 +96,7 @@ QVariant TreeItemModel::data(const QModelIndex &index, int role) const
|
|||||||
QString name(inf.name());
|
QString name(inf.name());
|
||||||
|
|
||||||
if (!inf.type().isEmpty())
|
if (!inf.type().isEmpty())
|
||||||
name += QLatin1String(" ") + inf.type();
|
name += QLatin1Char(' ') + inf.type();
|
||||||
|
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
@@ -403,7 +403,7 @@ QString ClearCasePlugin::ccViewRoot(const QString &directory) const
|
|||||||
if (HostOsInfo::isWindowsHost())
|
if (HostOsInfo::isWindowsHost())
|
||||||
root = getDriveLetterOfPath(directory);
|
root = getDriveLetterOfPath(directory);
|
||||||
else
|
else
|
||||||
root = QLatin1String("/");
|
root = QLatin1Char('/');
|
||||||
}
|
}
|
||||||
|
|
||||||
return QDir::fromNativeSeparators(root);
|
return QDir::fromNativeSeparators(root);
|
||||||
|
@@ -100,7 +100,7 @@ bool PatchTool::runPatch(const QByteArray &input, const QString &workingDirector
|
|||||||
args << QLatin1String("-R");
|
args << QLatin1String("-R");
|
||||||
MessageManager::write(QApplication::translate("Core::PatchTool", "Executing in %1: %2 %3").
|
MessageManager::write(QApplication::translate("Core::PatchTool", "Executing in %1: %2 %3").
|
||||||
arg(QDir::toNativeSeparators(workingDirectory),
|
arg(QDir::toNativeSeparators(workingDirectory),
|
||||||
QDir::toNativeSeparators(patch), args.join(QLatin1String(" "))));
|
QDir::toNativeSeparators(patch), args.join(QLatin1Char(' '))));
|
||||||
patchProcess.start(patch, args);
|
patchProcess.start(patch, args);
|
||||||
if (!patchProcess.waitForStarted()) {
|
if (!patchProcess.waitForStarted()) {
|
||||||
MessageManager::write(QApplication::translate("Core::PatchTool", "Unable to launch \"%1\": %2").arg(patch, patchProcess.errorString()));
|
MessageManager::write(QApplication::translate("Core::PatchTool", "Unable to launch \"%1\": %2").arg(patch, patchProcess.errorString()));
|
||||||
|
@@ -62,7 +62,7 @@ QString TestDataDir::directory(const QString &subdir, bool clean) const
|
|||||||
{
|
{
|
||||||
QString path = m_directory;
|
QString path = m_directory;
|
||||||
if (!subdir.isEmpty())
|
if (!subdir.isEmpty())
|
||||||
path += QLatin1String("/") + subdir;
|
path += QLatin1Char('/') + subdir;
|
||||||
if (clean)
|
if (clean)
|
||||||
path = QDir::cleanPath(path);
|
path = QDir::cleanPath(path);
|
||||||
maybeAppendSlash(&path);
|
maybeAppendSlash(&path);
|
||||||
|
@@ -71,7 +71,7 @@ static QString getUserFilePath(const QString &proposalFileName)
|
|||||||
if (!resourceDir.exists(QLatin1String("externaltools")))
|
if (!resourceDir.exists(QLatin1String("externaltools")))
|
||||||
resourceDir.mkpath(QLatin1String("externaltools"));
|
resourceDir.mkpath(QLatin1String("externaltools"));
|
||||||
const QFileInfo fi(proposalFileName);
|
const QFileInfo fi(proposalFileName);
|
||||||
const QString &suffix = QLatin1String(".") + fi.completeSuffix();
|
const QString &suffix = QLatin1Char('.') + fi.completeSuffix();
|
||||||
const QString &newFilePath = ICore::userResourcePath()
|
const QString &newFilePath = ICore::userResourcePath()
|
||||||
+ QLatin1String("/externaltools/") + fi.baseName();
|
+ QLatin1String("/externaltools/") + fi.baseName();
|
||||||
int count = 0;
|
int count = 0;
|
||||||
|
@@ -319,7 +319,7 @@ void VariableChooserPrivate::handleItemActivated(QListWidgetItem *item)
|
|||||||
*/
|
*/
|
||||||
void VariableChooserPrivate::insertVariable(const QString &variable)
|
void VariableChooserPrivate::insertVariable(const QString &variable)
|
||||||
{
|
{
|
||||||
const QString &text = QLatin1String("%{") + variable + QLatin1String("}");
|
const QString &text = QLatin1String("%{") + variable + QLatin1Char('}');
|
||||||
if (m_lineEdit) {
|
if (m_lineEdit) {
|
||||||
m_lineEdit->insert(text);
|
m_lineEdit->insert(text);
|
||||||
m_lineEdit->activateWindow();
|
m_lineEdit->activateWindow();
|
||||||
|
@@ -247,7 +247,7 @@ IVersionControl* VcsManager::findVersionControlForDirectory(const QString &input
|
|||||||
// Make sure we an absolute path:
|
// Make sure we an absolute path:
|
||||||
QString directory = QDir(inputDirectory).absolutePath();
|
QString directory = QDir(inputDirectory).absolutePath();
|
||||||
#ifdef WITH_TESTS
|
#ifdef WITH_TESTS
|
||||||
if (directory[0].isLetter() && directory.indexOf(QLatin1String(":") + QLatin1String(TEST_PREFIX)) == 1)
|
if (directory[0].isLetter() && directory.indexOf(QLatin1Char(':') + QLatin1String(TEST_PREFIX)) == 1)
|
||||||
directory = directory.mid(2);
|
directory = directory.mid(2);
|
||||||
#endif
|
#endif
|
||||||
VcsManagerPrivate::VcsInfo *cachedData = d->findInCache(directory);
|
VcsManagerPrivate::VcsInfo *cachedData = d->findInCache(directory);
|
||||||
@@ -634,7 +634,7 @@ void CorePlugin::testVcsManager()
|
|||||||
foreach (const QString &result, results) {
|
foreach (const QString &result, results) {
|
||||||
// qDebug() << "Expecting:" << result;
|
// qDebug() << "Expecting:" << result;
|
||||||
|
|
||||||
QStringList split = result.split(QLatin1String(":"));
|
QStringList split = result.split(QLatin1Char(':'));
|
||||||
QCOMPARE(split.count(), 4);
|
QCOMPARE(split.count(), 4);
|
||||||
QVERIFY(split.at(3) == QLatin1String("*") || split.at(3) == QLatin1String("-"));
|
QVERIFY(split.at(3) == QLatin1String("*") || split.at(3) == QLatin1String("-"));
|
||||||
|
|
||||||
|
@@ -3165,7 +3165,7 @@ public:
|
|||||||
if (m_funcReturn) {
|
if (m_funcReturn) {
|
||||||
funcDef.append(QLatin1String("\nreturn ")
|
funcDef.append(QLatin1String("\nreturn ")
|
||||||
+ m_relevantDecls.at(0).first
|
+ m_relevantDecls.at(0).first
|
||||||
+ QLatin1String(";"));
|
+ QLatin1Char(';'));
|
||||||
funcCall.prepend(m_relevantDecls.at(0).second + QLatin1String(" = "));
|
funcCall.prepend(m_relevantDecls.at(0).second + QLatin1String(" = "));
|
||||||
}
|
}
|
||||||
funcDef.append(QLatin1String("\n}\n\n"));
|
funcDef.append(QLatin1String("\n}\n\n"));
|
||||||
@@ -4537,7 +4537,7 @@ public:
|
|||||||
} else {
|
} else {
|
||||||
QString textFuncDecl = fromFile->textOf(m_funcDef);
|
QString textFuncDecl = fromFile->textOf(m_funcDef);
|
||||||
textFuncDecl.truncate(startPosition - fromFile->startOf(m_funcDef));
|
textFuncDecl.truncate(startPosition - fromFile->startOf(m_funcDef));
|
||||||
textFuncDecl = textFuncDecl.trimmed() + QLatin1String(";");
|
textFuncDecl = textFuncDecl.trimmed() + QLatin1Char(';');
|
||||||
headerTarget.replace(fromFile->range(m_funcDef), textFuncDecl);
|
headerTarget.replace(fromFile->range(m_funcDef), textFuncDecl);
|
||||||
}
|
}
|
||||||
fromFile->setChangeSet(headerTarget);
|
fromFile->setChangeSet(headerTarget);
|
||||||
|
@@ -162,7 +162,7 @@ QString CdbSymbolPathListEditor::symbolPath(const QString &cacheDir,
|
|||||||
return QLatin1String(symbolCachePrefixC) + QDir::toNativeSeparators(cacheDir);
|
return QLatin1String(symbolCachePrefixC) + QDir::toNativeSeparators(cacheDir);
|
||||||
QString s = QLatin1String(symbolServerPrefixC);
|
QString s = QLatin1String(symbolServerPrefixC);
|
||||||
if (!cacheDir.isEmpty())
|
if (!cacheDir.isEmpty())
|
||||||
s += QDir::toNativeSeparators(cacheDir) + QLatin1String("*");
|
s += QDir::toNativeSeparators(cacheDir) + QLatin1Char('*');
|
||||||
s += QLatin1String(symbolServerPostfixC);
|
s += QLatin1String(symbolServerPostfixC);
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
@@ -123,7 +123,7 @@ QString StackFrame::toToolTip() const
|
|||||||
showDistributionNote = true;
|
showDistributionNote = true;
|
||||||
}
|
}
|
||||||
if (!Utils::HostOsInfo::isWindowsHost() && showDistributionNote) {
|
if (!Utils::HostOsInfo::isWindowsHost() && showDistributionNote) {
|
||||||
str << QLatin1String(" ") <<
|
str << QLatin1Char(' ') <<
|
||||||
tr("Note that most distributions ship debug information "
|
tr("Note that most distributions ship debug information "
|
||||||
"in separate packages.");
|
"in separate packages.");
|
||||||
}
|
}
|
||||||
|
@@ -185,7 +185,7 @@ bool GenericProject::addFiles(const QStringList &filePaths)
|
|||||||
foreach (const QString &path, toAdd) {
|
foreach (const QString &path, toAdd) {
|
||||||
QString relative = dir.relativeFilePath(path);
|
QString relative = dir.relativeFilePath(path);
|
||||||
if (relative.isEmpty())
|
if (relative.isEmpty())
|
||||||
relative = QLatin1String(".");
|
relative = QLatin1Char('.');
|
||||||
m_rawProjectIncludePaths.append(relative);
|
m_rawProjectIncludePaths.append(relative);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -169,7 +169,7 @@ Core::GeneratedFiles GenericProjectWizard::generateFiles(const QWizard *w,
|
|||||||
if (! thisDir.entryList(nameFilters, QDir::Files).isEmpty()) {
|
if (! thisDir.entryList(nameFilters, QDir::Files).isEmpty()) {
|
||||||
QString relative = dir.relativeFilePath(path);
|
QString relative = dir.relativeFilePath(path);
|
||||||
if (relative.isEmpty())
|
if (relative.isEmpty())
|
||||||
relative = QLatin1String(".");
|
relative = QLatin1Char('.');
|
||||||
includePaths.append(relative);
|
includePaths.append(relative);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -193,7 +193,7 @@ void BranchDialog::checkout()
|
|||||||
const QString currentBranch = m_model->fullName(m_model->currentBranch());
|
const QString currentBranch = m_model->fullName(m_model->currentBranch());
|
||||||
const QString nextBranch = m_model->fullName(idx);
|
const QString nextBranch = m_model->fullName(idx);
|
||||||
const QString popMessageStart = QCoreApplication::applicationName() +
|
const QString popMessageStart = QCoreApplication::applicationName() +
|
||||||
QLatin1String(" ") + nextBranch + QLatin1String("-AutoStash ");
|
QLatin1Char(' ') + nextBranch + QLatin1String("-AutoStash ");
|
||||||
|
|
||||||
BranchCheckoutDialog branchCheckoutDialog(this, currentBranch, nextBranch);
|
BranchCheckoutDialog branchCheckoutDialog(this, currentBranch, nextBranch);
|
||||||
GitClient *gitClient = GitPlugin::instance()->gitClient();
|
GitClient *gitClient = GitPlugin::instance()->gitClient();
|
||||||
|
@@ -145,7 +145,7 @@ void GerritParameters::fromSettings(const QSettings *s)
|
|||||||
port = s->value(rootKey + QLatin1String(portKeyC), QVariant(int(defaultPort))).toInt();
|
port = s->value(rootKey + QLatin1String(portKeyC), QVariant(int(defaultPort))).toInt();
|
||||||
portFlag = s->value(rootKey + QLatin1String(portFlagKeyC), QLatin1String(defaultPortFlag)).toString();
|
portFlag = s->value(rootKey + QLatin1String(portFlagKeyC), QLatin1String(defaultPortFlag)).toString();
|
||||||
savedQueries = s->value(rootKey + QLatin1String(savedQueriesKeyC), QString()).toString()
|
savedQueries = s->value(rootKey + QLatin1String(savedQueriesKeyC), QString()).toString()
|
||||||
.split(QLatin1String(","));
|
.split(QLatin1Char(','));
|
||||||
https = s->value(rootKey + QLatin1String(httpsKeyC), QVariant(true)).toBool();
|
https = s->value(rootKey + QLatin1String(httpsKeyC), QVariant(true)).toBool();
|
||||||
if (ssh.isEmpty())
|
if (ssh.isEmpty())
|
||||||
ssh = detectSsh();
|
ssh = detectSsh();
|
||||||
|
@@ -526,7 +526,7 @@ QString GerritPlugin::findLocalRepository(QString project, const QString &branch
|
|||||||
QScopedPointer<QRegExp> branchRegexp;
|
QScopedPointer<QRegExp> branchRegexp;
|
||||||
if (!branch.isEmpty() && branch != QLatin1String("master")) {
|
if (!branch.isEmpty() && branch != QLatin1String("master")) {
|
||||||
QString branchPattern = branch;
|
QString branchPattern = branch;
|
||||||
branchPattern.replace(QLatin1String("."), QLatin1String("[\\.-_]?"));
|
branchPattern.replace(QLatin1Char('.'), QLatin1String("[\\.-_]?"));
|
||||||
const QString pattern = QLatin1Char('^') + project
|
const QString pattern = QLatin1Char('^') + project
|
||||||
+ QLatin1String("[-_]?")
|
+ QLatin1String("[-_]?")
|
||||||
+ branchPattern + QLatin1Char('$');
|
+ branchPattern + QLatin1Char('$');
|
||||||
|
@@ -138,7 +138,7 @@ bool RemoteHelpFilter::restoreState(const QByteArray &state)
|
|||||||
|
|
||||||
QString value;
|
QString value;
|
||||||
in >> value;
|
in >> value;
|
||||||
m_remoteUrls = value.split(QLatin1String("^"), QString::SkipEmptyParts);
|
m_remoteUrls = value.split(QLatin1Char('^'), QString::SkipEmptyParts);
|
||||||
|
|
||||||
QString shortcut;
|
QString shortcut;
|
||||||
in >> shortcut;
|
in >> shortcut;
|
||||||
|
@@ -165,7 +165,7 @@ void IosConfigurations::updateAutomaticKitList()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (unique) break;
|
if (unique) break;
|
||||||
displayName = baseDisplayName + QLatin1String("-") + QString::number(iVers);
|
displayName = baseDisplayName + QLatin1Char('-') + QString::number(iVers);
|
||||||
}
|
}
|
||||||
toolchain->setDisplayName(displayName);
|
toolchain->setDisplayName(displayName);
|
||||||
toolchain->setPlatformCodeGenFlags(p.backendFlags);
|
toolchain->setPlatformCodeGenFlags(p.backendFlags);
|
||||||
@@ -306,7 +306,7 @@ void IosConfigurations::updateAutomaticKitList()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (unique) break;
|
if (unique) break;
|
||||||
displayName = baseDisplayName + QLatin1String("-") + QString::number(iVers);
|
displayName = baseDisplayName + QLatin1Char('-') + QString::number(iVers);
|
||||||
}
|
}
|
||||||
kitAtt->setUnexpandedDisplayName(displayName);
|
kitAtt->setUnexpandedDisplayName(displayName);
|
||||||
}
|
}
|
||||||
|
@@ -320,7 +320,7 @@ QString IosRunConfiguration::disabledReason() const
|
|||||||
IDevice::ConstPtr availDev = dm->deviceAt(idev);
|
IDevice::ConstPtr availDev = dm->deviceAt(idev);
|
||||||
if (!availDev.isNull() && availDev->type() == Constants::IOS_DEVICE_TYPE) {
|
if (!availDev.isNull() && availDev->type() == Constants::IOS_DEVICE_TYPE) {
|
||||||
if (availDev->deviceState() == IDevice::DeviceReadyToUse) {
|
if (availDev->deviceState() == IDevice::DeviceReadyToUse) {
|
||||||
validDevName += QLatin1String(" ");
|
validDevName += QLatin1Char(' ');
|
||||||
validDevName += availDev->displayName();
|
validDevName += availDev->displayName();
|
||||||
} else if (availDev->deviceState() == IDevice::DeviceConnected) {
|
} else if (availDev->deviceState() == IDevice::DeviceConnected) {
|
||||||
hasConncetedDev = true;
|
hasConncetedDev = true;
|
||||||
|
@@ -48,7 +48,7 @@ static const char * const FILE_PATTERN = "(<command line>|([A-Za-z]:)?[^:]+\\.[^
|
|||||||
ClangParser::ClangParser() :
|
ClangParser::ClangParser() :
|
||||||
m_commandRegExp(QLatin1String("^clang(\\+\\+)?: +(fatal +)?(warning|error|note): (.*)$")),
|
m_commandRegExp(QLatin1String("^clang(\\+\\+)?: +(fatal +)?(warning|error|note): (.*)$")),
|
||||||
m_inLineRegExp(QLatin1String("^In (.*) included from (.*):(\\d+):$")),
|
m_inLineRegExp(QLatin1String("^In (.*) included from (.*):(\\d+):$")),
|
||||||
m_messageRegExp(QLatin1String("^") + QLatin1String(FILE_PATTERN) + QLatin1String("(:(\\d+):\\d+|\\((\\d+)\\) *): +(fatal +)?(error|warning|note): (.*)$")),
|
m_messageRegExp(QLatin1Char('^') + QLatin1String(FILE_PATTERN) + QLatin1String("(:(\\d+):\\d+|\\((\\d+)\\) *): +(fatal +)?(error|warning|note): (.*)$")),
|
||||||
m_summaryRegExp(QLatin1String("^\\d+ (warnings?|errors?)( and \\d (warnings?|errors?))? generated.$")),
|
m_summaryRegExp(QLatin1String("^\\d+ (warnings?|errors?)( and \\d (warnings?|errors?))? generated.$")),
|
||||||
m_codesignRegExp(QLatin1String("^Code ?Sign error: (.*)$")),
|
m_codesignRegExp(QLatin1String("^Code ?Sign error: (.*)$")),
|
||||||
m_expectSnippet(false)
|
m_expectSnippet(false)
|
||||||
|
@@ -78,7 +78,7 @@ QVariantMap DeployConfiguration::toMap() const
|
|||||||
{
|
{
|
||||||
QVariantMap map(ProjectConfiguration::toMap());
|
QVariantMap map(ProjectConfiguration::toMap());
|
||||||
map.insert(QLatin1String(BUILD_STEP_LIST_COUNT), 1);
|
map.insert(QLatin1String(BUILD_STEP_LIST_COUNT), 1);
|
||||||
map.insert(QLatin1String(BUILD_STEP_LIST_PREFIX) + QLatin1String("0"), m_stepList->toMap());
|
map.insert(QLatin1String(BUILD_STEP_LIST_PREFIX) + QLatin1Char('0'), m_stepList->toMap());
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -105,7 +105,7 @@ bool DeployConfiguration::fromMap(const QVariantMap &map)
|
|||||||
int maxI = map.value(QLatin1String(BUILD_STEP_LIST_COUNT), 0).toInt();
|
int maxI = map.value(QLatin1String(BUILD_STEP_LIST_COUNT), 0).toInt();
|
||||||
if (maxI != 1)
|
if (maxI != 1)
|
||||||
return false;
|
return false;
|
||||||
QVariantMap data = map.value(QLatin1String(BUILD_STEP_LIST_PREFIX) + QLatin1String("0")).toMap();
|
QVariantMap data = map.value(QLatin1String(BUILD_STEP_LIST_PREFIX) + QLatin1Char('0')).toMap();
|
||||||
if (!data.isEmpty()) {
|
if (!data.isEmpty()) {
|
||||||
delete m_stepList;
|
delete m_stepList;
|
||||||
m_stepList = new BuildStepList(this, data);
|
m_stepList = new BuildStepList(this, data);
|
||||||
|
@@ -513,7 +513,7 @@ void ProjectExplorerPlugin::testDeviceManager()
|
|||||||
dev3->setDisplayName(dev->displayName());
|
dev3->setDisplayName(dev->displayName());
|
||||||
mgr->addDevice(dev3);
|
mgr->addDevice(dev3);
|
||||||
QCOMPARE(mgr->deviceAt(mgr->deviceCount() - 1)->displayName(),
|
QCOMPARE(mgr->deviceAt(mgr->deviceCount() - 1)->displayName(),
|
||||||
QString(dev3->displayName() + QLatin1String("2")));
|
QString(dev3->displayName() + QLatin1Char('2')));
|
||||||
QCOMPARE(deviceAddedSpy.count(), 1);
|
QCOMPARE(deviceAddedSpy.count(), 1);
|
||||||
QCOMPARE(deviceRemovedSpy.count(), 0);
|
QCOMPARE(deviceRemovedSpy.count(), 0);
|
||||||
QCOMPARE(deviceUpdatedSpy.count(), 0);
|
QCOMPARE(deviceUpdatedSpy.count(), 0);
|
||||||
|
@@ -75,7 +75,7 @@ void SelectableFilesModel::startParsing(const QString &baseDir)
|
|||||||
m_baseDir = baseDir;
|
m_baseDir = baseDir;
|
||||||
// Build a tree in a future
|
// Build a tree in a future
|
||||||
m_rootForFuture = new Tree;
|
m_rootForFuture = new Tree;
|
||||||
m_rootForFuture->name = QLatin1String("/");
|
m_rootForFuture->name = QLatin1Char('/');
|
||||||
m_rootForFuture->parent = 0;
|
m_rootForFuture->parent = 0;
|
||||||
m_rootForFuture->fullPath = baseDir;
|
m_rootForFuture->fullPath = baseDir;
|
||||||
m_rootForFuture->isDir = true;
|
m_rootForFuture->isDir = true;
|
||||||
|
@@ -56,7 +56,7 @@ static QString generateSuffix(const QString &alt1, const QString &alt2)
|
|||||||
if (suffix.isEmpty())
|
if (suffix.isEmpty())
|
||||||
suffix = alt2;
|
suffix = alt2;
|
||||||
suffix.replace(QRegExp(QLatin1String("[^a-zA-Z0-9_.-]")), QString(QLatin1Char('_'))); // replace fishy characters:
|
suffix.replace(QRegExp(QLatin1String("[^a-zA-Z0-9_.-]")), QString(QLatin1Char('_'))); // replace fishy characters:
|
||||||
if (!suffix.startsWith(QLatin1String(".")))
|
if (!suffix.startsWith(QLatin1Char('.')))
|
||||||
suffix.prepend(QLatin1Char('.'));
|
suffix.prepend(QLatin1Char('.'));
|
||||||
return suffix;
|
return suffix;
|
||||||
}
|
}
|
||||||
@@ -924,7 +924,7 @@ QList<FileName> SettingsAccessor::settingsFiles(const QString &suffix) const
|
|||||||
const Utils::FileName baseName = project()->projectFilePath();
|
const Utils::FileName baseName = project()->projectFilePath();
|
||||||
QFileInfo fi = baseName.toFileInfo();
|
QFileInfo fi = baseName.toFileInfo();
|
||||||
QDir dir = QDir(fi.absolutePath());
|
QDir dir = QDir(fi.absolutePath());
|
||||||
QString filter = fi.fileName() + suffix + QLatin1String("*");
|
QString filter = fi.fileName() + suffix + QLatin1Char('*');
|
||||||
|
|
||||||
QFileInfoList list = dir.entryInfoList(QStringList() << filter, QDir::Files);
|
QFileInfoList list = dir.entryInfoList(QStringList() << filter, QDir::Files);
|
||||||
|
|
||||||
@@ -966,14 +966,14 @@ Utils::FileName SettingsAccessor::backupName(const QVariantMap &data) const
|
|||||||
QString backupName = defaultFileName(m_userSuffix);
|
QString backupName = defaultFileName(m_userSuffix);
|
||||||
const QByteArray oldEnvironmentId = environmentIdFromMap(data);
|
const QByteArray oldEnvironmentId = environmentIdFromMap(data);
|
||||||
if (!oldEnvironmentId.isEmpty() && oldEnvironmentId != creatorId())
|
if (!oldEnvironmentId.isEmpty() && oldEnvironmentId != creatorId())
|
||||||
backupName += QLatin1String(".") + QString::fromLatin1(oldEnvironmentId).mid(1, 7);
|
backupName += QLatin1Char('.') + QString::fromLatin1(oldEnvironmentId).mid(1, 7);
|
||||||
const int oldVersion = versionFromMap(data);
|
const int oldVersion = versionFromMap(data);
|
||||||
if (oldVersion != currentVersion()) {
|
if (oldVersion != currentVersion()) {
|
||||||
VersionUpgrader *upgrader = d->upgrader(oldVersion);
|
VersionUpgrader *upgrader = d->upgrader(oldVersion);
|
||||||
if (upgrader)
|
if (upgrader)
|
||||||
backupName += QLatin1String(".") + upgrader->backupExtension();
|
backupName += QLatin1Char('.') + upgrader->backupExtension();
|
||||||
else
|
else
|
||||||
backupName += QLatin1String(".") + QString::number(oldVersion);
|
backupName += QLatin1Char('.') + QString::number(oldVersion);
|
||||||
}
|
}
|
||||||
return Utils::FileName::fromString(backupName);
|
return Utils::FileName::fromString(backupName);
|
||||||
}
|
}
|
||||||
|
@@ -80,7 +80,7 @@ QVariantMap DefaultPropertyProvider::properties(const ProjectExplorer::Kit *k, c
|
|||||||
if (targetAbi.wordWidth() == 64) {
|
if (targetAbi.wordWidth() == 64) {
|
||||||
switch (targetAbi.architecture()) {
|
switch (targetAbi.architecture()) {
|
||||||
case ProjectExplorer::Abi::X86Architecture:
|
case ProjectExplorer::Abi::X86Architecture:
|
||||||
architecture.append(QLatin1String("_"));
|
architecture.append(QLatin1Char('_'));
|
||||||
// fall through
|
// fall through
|
||||||
case ProjectExplorer::Abi::ArmArchitecture:
|
case ProjectExplorer::Abi::ArmArchitecture:
|
||||||
case ProjectExplorer::Abi::MipsArchitecture:
|
case ProjectExplorer::Abi::MipsArchitecture:
|
||||||
|
@@ -481,7 +481,7 @@ void QbsBuildStepConfigWidget::updateState()
|
|||||||
|
|
||||||
QString command = QLatin1String("qbs build ");
|
QString command = QLatin1String("qbs build ");
|
||||||
command += QString::fromLatin1("--settings-dir ")
|
command += QString::fromLatin1("--settings-dir ")
|
||||||
+ QDir::toNativeSeparators(Core::ICore::userResourcePath()) + QLatin1String(" ");
|
+ QDir::toNativeSeparators(Core::ICore::userResourcePath()) + QLatin1Char(' ');
|
||||||
if (m_step->dryRun())
|
if (m_step->dryRun())
|
||||||
command += QLatin1String("--dry-run ");
|
command += QLatin1String("--dry-run ");
|
||||||
if (m_step->keepGoing())
|
if (m_step->keepGoing())
|
||||||
|
@@ -312,7 +312,7 @@ void QbsInstallStepConfigWidget::updateState()
|
|||||||
|
|
||||||
QString command = QLatin1String("qbs install ");
|
QString command = QLatin1String("qbs install ");
|
||||||
command += QString::fromLatin1("--settings-dir ")
|
command += QString::fromLatin1("--settings-dir ")
|
||||||
+ QDir::toNativeSeparators(Core::ICore::userResourcePath()) + QLatin1String(" ");
|
+ QDir::toNativeSeparators(Core::ICore::userResourcePath()) + QLatin1Char(' ');
|
||||||
if (m_step->dryRun())
|
if (m_step->dryRun())
|
||||||
command += QLatin1String("--dry-run ");
|
command += QLatin1String("--dry-run ");
|
||||||
if (m_step->keepGoing())
|
if (m_step->keepGoing())
|
||||||
|
@@ -157,7 +157,7 @@ QList<Core::GeneratedFile> PluginGenerator::generatePlugin(const GenerationPara
|
|||||||
if (wo.sourceType == PluginOptions::WidgetOptions::LinkLibrary)
|
if (wo.sourceType == PluginOptions::WidgetOptions::LinkLibrary)
|
||||||
widgetLibraries.insert(QLatin1String("-l") + wo.widgetLibrary);
|
widgetLibraries.insert(QLatin1String("-l") + wo.widgetLibrary);
|
||||||
else
|
else
|
||||||
widgetProjects.insert(QLatin1String("include(") + wo.widgetProjectFile + QLatin1String(")"));
|
widgetProjects.insert(QLatin1String("include(") + wo.widgetProjectFile + QLatin1Char(')'));
|
||||||
pluginIncludes += QLatin1String("#include \"") + wo.pluginHeaderFile + QLatin1String("\"\n");
|
pluginIncludes += QLatin1String("#include \"") + wo.pluginHeaderFile + QLatin1String("\"\n");
|
||||||
pluginAdditions +=
|
pluginAdditions +=
|
||||||
QLatin1String(" m_widgets.append(new ") + wo.pluginClassName + QLatin1String("(this));\n");
|
QLatin1String(" m_widgets.append(new ") + wo.pluginClassName + QLatin1String("(this));\n");
|
||||||
|
@@ -52,7 +52,7 @@ AbstractGeneratedFileInfo::AbstractGeneratedFileInfo()
|
|||||||
}
|
}
|
||||||
|
|
||||||
const QString AbstractMobileApp::CFileComment(QLatin1String("//"));
|
const QString AbstractMobileApp::CFileComment(QLatin1String("//"));
|
||||||
const QString AbstractMobileApp::ProFileComment(QLatin1String("#"));
|
const QString AbstractMobileApp::ProFileComment(QLatin1Char('#'));
|
||||||
const QString AbstractMobileApp::DeploymentPriFileName(QLatin1String("deployment.pri"));
|
const QString AbstractMobileApp::DeploymentPriFileName(QLatin1String("deployment.pri"));
|
||||||
const QString AbstractMobileApp::FileChecksum(QLatin1String("checksum"));
|
const QString AbstractMobileApp::FileChecksum(QLatin1String("checksum"));
|
||||||
const QString AbstractMobileApp::FileStubVersion(QLatin1String("version"));
|
const QString AbstractMobileApp::FileStubVersion(QLatin1String("version"));
|
||||||
|
@@ -135,7 +135,7 @@ void BlackBerryDeviceConfigurationWizardSetupPage::onDeviceDetected(
|
|||||||
{
|
{
|
||||||
QString displayName(deviceName);
|
QString displayName(deviceName);
|
||||||
if (displayName != hostName)
|
if (displayName != hostName)
|
||||||
displayName.append(QLatin1String(" (")).append(hostName).append(QLatin1String(")"));
|
displayName.append(QLatin1String(" (")).append(hostName).append(QLatin1Char(')'));
|
||||||
|
|
||||||
QListWidgetItem *device = createDeviceListItem(displayName, Autodetected);
|
QListWidgetItem *device = createDeviceListItem(displayName, Autodetected);
|
||||||
device->setData(DeviceNameRole, displayName);
|
device->setData(DeviceNameRole, displayName);
|
||||||
|
@@ -90,7 +90,7 @@ const QString BlackBerryDeviceListDetector::readProcessLine()
|
|||||||
void BlackBerryDeviceListDetector::processData(const QString &line)
|
void BlackBerryDeviceListDetector::processData(const QString &line)
|
||||||
{
|
{
|
||||||
// line format is: deviceName,deviceHostNameOrIP,deviceType,versionIfSimulator
|
// line format is: deviceName,deviceHostNameOrIP,deviceType,versionIfSimulator
|
||||||
QStringList list = line.split(QLatin1String(","));
|
QStringList list = line.split(QLatin1Char(','));
|
||||||
if (list.count() == 4)
|
if (list.count() == 4)
|
||||||
emit deviceDetected (list[0], list[1], QLatin1String("Simulator") == list[2]);
|
emit deviceDetected (list[0], list[1], QLatin1String("Simulator") == list[2]);
|
||||||
}
|
}
|
||||||
|
@@ -254,7 +254,7 @@ ProjectExplorer::FolderNode::AddNewInformation ResourceTopLevelNode::addNewInfor
|
|||||||
{
|
{
|
||||||
QString name = tr("%1 Prefix: %2")
|
QString name = tr("%1 Prefix: %2")
|
||||||
.arg(QFileInfo(path()).fileName())
|
.arg(QFileInfo(path()).fileName())
|
||||||
.arg(QLatin1String("/"));
|
.arg(QLatin1Char('/'));
|
||||||
|
|
||||||
int p = -1;
|
int p = -1;
|
||||||
if (priority(files)) { // images/* and qml/js mimetypes
|
if (priority(files)) { // images/* and qml/js mimetypes
|
||||||
|
@@ -110,7 +110,7 @@ QString AutoCompleter::autoComplete(QTextCursor &cursor, const QString &textToIn
|
|||||||
|
|
||||||
if (m_surroundWithEnabled && cursor.hasSelection()) {
|
if (m_surroundWithEnabled && cursor.hasSelection()) {
|
||||||
if (textToInsert == QLatin1String("("))
|
if (textToInsert == QLatin1String("("))
|
||||||
return cursor.selectedText() + QLatin1String(")");
|
return cursor.selectedText() + QLatin1Char(')');
|
||||||
if (textToInsert == QLatin1String("{")) {
|
if (textToInsert == QLatin1String("{")) {
|
||||||
//If the text span multiple lines, insert on different lines
|
//If the text span multiple lines, insert on different lines
|
||||||
QString str = cursor.selectedText();
|
QString str = cursor.selectedText();
|
||||||
@@ -119,20 +119,20 @@ QString AutoCompleter::autoComplete(QTextCursor &cursor, const QString &textToIn
|
|||||||
str = (str.startsWith(QChar::ParagraphSeparator) ? QString() : QString(QChar::ParagraphSeparator)) +
|
str = (str.startsWith(QChar::ParagraphSeparator) ? QString() : QString(QChar::ParagraphSeparator)) +
|
||||||
str;
|
str;
|
||||||
if (str.endsWith(QChar::ParagraphSeparator))
|
if (str.endsWith(QChar::ParagraphSeparator))
|
||||||
str += QLatin1String("}") + QString(QChar::ParagraphSeparator);
|
str += QLatin1Char('}') + QString(QChar::ParagraphSeparator);
|
||||||
else
|
else
|
||||||
str += QString(QChar::ParagraphSeparator) + QLatin1String("}");
|
str += QString(QChar::ParagraphSeparator) + QLatin1Char('}');
|
||||||
} else {
|
} else {
|
||||||
str += QLatin1String("}");
|
str += QLatin1Char('}');
|
||||||
}
|
}
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
if (textToInsert == QLatin1String("["))
|
if (textToInsert == QLatin1String("["))
|
||||||
return cursor.selectedText() + QLatin1String("]");
|
return cursor.selectedText() + QLatin1Char(']');
|
||||||
if (textToInsert == QLatin1String("\""))
|
if (textToInsert == QLatin1String("\""))
|
||||||
return cursor.selectedText() + QLatin1String("\"");
|
return cursor.selectedText() + QLatin1Char('"');
|
||||||
if (textToInsert == QLatin1String("'"))
|
if (textToInsert == QLatin1String("'"))
|
||||||
return cursor.selectedText() + QLatin1String("'");
|
return cursor.selectedText() + QLatin1Char('\'');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!m_autoParenthesesEnabled)
|
if (!m_autoParenthesesEnabled)
|
||||||
|
@@ -84,7 +84,7 @@ bool ValgrindRunControl::startEngine()
|
|||||||
|
|
||||||
const AnalyzerStartParameters &sp = startParameters();
|
const AnalyzerStartParameters &sp = startParameters();
|
||||||
#if VALGRIND_DEBUG_OUTPUT
|
#if VALGRIND_DEBUG_OUTPUT
|
||||||
emit outputReceived(tr("Valgrind options: %1").arg(toolArguments().join(QLatin1String(" "))), DebugFormat);
|
emit outputReceived(tr("Valgrind options: %1").arg(toolArguments().join(QLatin1Char(' '))), DebugFormat);
|
||||||
emit outputReceived(tr("Working directory: %1").arg(sp.workingDirectory), DebugFormat);
|
emit outputReceived(tr("Working directory: %1").arg(sp.workingDirectory), DebugFormat);
|
||||||
emit outputReceived(tr("Command line arguments: %1").arg(sp.debuggeeArgs), DebugFormat);
|
emit outputReceived(tr("Command line arguments: %1").arg(sp.debuggeeArgs), DebugFormat);
|
||||||
#endif
|
#endif
|
||||||
|
@@ -103,7 +103,7 @@ SystemPreprocessor::SystemPreprocessor(bool verbose)
|
|||||||
= Utils::Environment::systemEnvironment().searchInPath(i.key());
|
= Utils::Environment::systemEnvironment().searchInPath(i.key());
|
||||||
if (!executablePath.isEmpty()) {
|
if (!executablePath.isEmpty()) {
|
||||||
m_compiler = i.key();
|
m_compiler = i.key();
|
||||||
m_compilerArguments = i.value().split(QLatin1String(" "), QString::SkipEmptyParts);
|
m_compilerArguments = i.value().split(QLatin1Char(' '), QString::SkipEmptyParts);
|
||||||
m_compilerArguments
|
m_compilerArguments
|
||||||
<< QDir::toNativeSeparators(QLatin1String(PATH_PREPROCESSOR_CONFIG));
|
<< QDir::toNativeSeparators(QLatin1String(PATH_PREPROCESSOR_CONFIG));
|
||||||
break;
|
break;
|
||||||
|
@@ -124,7 +124,7 @@ bool AddDebuggerOperation::setArguments(const QStringList &args)
|
|||||||
if (next.isNull())
|
if (next.isNull())
|
||||||
return false;
|
return false;
|
||||||
++i; // skip next
|
++i; // skip next
|
||||||
m_abis = next.split(QLatin1String(","));
|
m_abis = next.split(QLatin1Char(','));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -153,7 +153,7 @@ QStringList FindKeyOperation::findKey(const QVariant &in, const QString &key, co
|
|||||||
} else if (in.type() == QVariant::List) {
|
} else if (in.type() == QVariant::List) {
|
||||||
QVariantList list = in.toList();
|
QVariantList list = in.toList();
|
||||||
for (int pos = 0; pos < list.count(); ++pos) {
|
for (int pos = 0; pos < list.count(); ++pos) {
|
||||||
QString pfx = prefix + QLatin1Char('[') + QString::number(pos) + QLatin1String("]");
|
QString pfx = prefix + QLatin1Char('[') + QString::number(pos) + QLatin1Char(']');
|
||||||
result.append(findKey(list.at(pos), key, pfx));
|
result.append(findKey(list.at(pos), key, pfx));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -162,7 +162,7 @@ QStringList FindValueOperation::findValue(const QVariant &in, const QVariant &va
|
|||||||
} else if (in.type() == QVariant::List) {
|
} else if (in.type() == QVariant::List) {
|
||||||
QVariantList list = in.toList();
|
QVariantList list = in.toList();
|
||||||
for (int pos = 0; pos < list.count(); ++pos) {
|
for (int pos = 0; pos < list.count(); ++pos) {
|
||||||
QString pfx = prefix + QLatin1Char('[') + QString::number(pos) + QLatin1String("]");
|
QString pfx = prefix + QLatin1Char('[') + QString::number(pos) + QLatin1Char(']');
|
||||||
result.append(findValue(list.at(pos), value, pfx));
|
result.append(findValue(list.at(pos), value, pfx));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user