forked from qt-creator/qt-creator
Replace QString::fromLocal8Bit("") calls
Calling fromLocal8Bit() for literals is wrong, since that depends ont the user's environment. We use latin1 strings exclusively in Qt. Change-Id: I0cd0986787ea630425773672d3a892fbd0f0a77a Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -218,7 +218,7 @@ void SshChannelManager::removeChannel(ChannelIterator it)
|
||||
const int removeCount = m_sessions.remove(it.value());
|
||||
if (removeCount != 1) {
|
||||
throw SshClientException(SshInternalError,
|
||||
QString::fromLocal8Bit("Internal error: Unexpected session count %1 for channel.")
|
||||
QString::fromLatin1("Internal error: Unexpected session count %1 for channel.")
|
||||
.arg(removeCount));
|
||||
}
|
||||
m_channels.erase(it);
|
||||
|
||||
@@ -68,7 +68,7 @@ bool NameDemanglerPrivate::demangle(const QString &mangledName)
|
||||
if (m_parseState.m_pos != m_parseState.m_mangledName.size())
|
||||
throw ParseException(QLatin1String("Unconsumed input"));
|
||||
if (m_parseState.m_parseStack.count() != 1) {
|
||||
throw ParseException(QString::fromLocal8Bit("There are %1 elements on the parse stack; "
|
||||
throw ParseException(QString::fromLatin1("There are %1 elements on the parse stack; "
|
||||
"expected one.").arg(m_parseState.m_parseStack.count()));
|
||||
}
|
||||
|
||||
@@ -78,11 +78,11 @@ bool NameDemanglerPrivate::demangle(const QString &mangledName)
|
||||
m_demangledName = QLatin1String(m_parseState.stackTop()->toByteArray());
|
||||
success = true;
|
||||
} catch (const ParseException &p) {
|
||||
m_errorString = QString::fromLocal8Bit("Parse error at index %1 of mangled name '%2': %3.")
|
||||
m_errorString = QString::fromLatin1("Parse error at index %1 of mangled name '%2': %3.")
|
||||
.arg(m_parseState.m_pos).arg(mangledName, p.error);
|
||||
success = false;
|
||||
} catch (const InternalDemanglerException &e) {
|
||||
m_errorString = QString::fromLocal8Bit("Internal demangler error at function %1, file %2, "
|
||||
m_errorString = QString::fromLatin1("Internal demangler error at function %1, file %2, "
|
||||
"line %3").arg(e.func, e.file).arg(e.line);
|
||||
success = false;
|
||||
}
|
||||
|
||||
@@ -1180,7 +1180,7 @@ void OperatorNameNode::parse()
|
||||
} else if (id == "az") {
|
||||
m_type = AlignofExprType;
|
||||
} else {
|
||||
throw ParseException(QString::fromLocal8Bit("Invalid operator encoding '%1'")
|
||||
throw ParseException(QString::fromLatin1("Invalid operator encoding '%1'")
|
||||
.arg(QString::fromLocal8Bit(id)));
|
||||
}
|
||||
}
|
||||
@@ -1912,7 +1912,7 @@ void TemplateParamNode::parse()
|
||||
}
|
||||
}
|
||||
if (!isConversionOperator) {
|
||||
throw ParseException(QString::fromLocal8Bit("Invalid template parameter index %1")
|
||||
throw ParseException(QString::fromLatin1("Invalid template parameter index %1")
|
||||
.arg(m_index));
|
||||
}
|
||||
} else {
|
||||
@@ -2486,7 +2486,7 @@ void TypeNode::parse()
|
||||
= DEMANGLER_CAST(TemplateParamNode, MY_CHILD_AT(0));
|
||||
if (templateParamNode->childCount() == 0) {
|
||||
if (templateParamNode->index() >= parseState()->templateParamCount()) {
|
||||
throw ParseException(QString::fromLocal8Bit("Invalid template parameter "
|
||||
throw ParseException(QString::fromLatin1("Invalid template parameter "
|
||||
"index %1 in forwarding").arg(templateParamNode->index()));
|
||||
}
|
||||
templateParamNode->addChild(parseState()
|
||||
|
||||
@@ -90,7 +90,7 @@ void QnxDebugSupport::startExecution()
|
||||
setState(StartingRemoteProcess);
|
||||
|
||||
if (m_useQmlDebugger)
|
||||
m_engine->startParameters().processArgs += QString::fromLocal8Bit(" -qmljsdebugger=port:%1,block").arg(m_qmlPort);
|
||||
m_engine->startParameters().processArgs += QString::fromLatin1(" -qmljsdebugger=port:%1,block").arg(m_qmlPort);
|
||||
|
||||
QStringList arguments;
|
||||
if (m_useCppDebugger)
|
||||
|
||||
@@ -140,7 +140,7 @@ void RemoteLinuxAnalyzeSupport::startExecution()
|
||||
connect(runner, SIGNAL(reportError(QString)), SLOT(handleAppRunnerError(QString)));
|
||||
|
||||
const QStringList args = arguments()
|
||||
<< QString::fromLocal8Bit("-qmljsdebugger=port:%1,block").arg(d->qmlPort);
|
||||
<< QString::fromLatin1("-qmljsdebugger=port:%1,block").arg(d->qmlPort);
|
||||
runner->setWorkingDirectory(workingDirectory());
|
||||
runner->setEnvironment(environment());
|
||||
runner->start(device(), remoteFilePath(), args);
|
||||
|
||||
@@ -130,7 +130,7 @@ void RemoteLinuxCheckForFreeDiskSpaceService::doDeploy()
|
||||
d->processRunner = new QSsh::SshRemoteProcessRunner;
|
||||
connect(d->processRunner, SIGNAL(processClosed(int)), SLOT(handleProcessFinished()));
|
||||
connect(d->processRunner, SIGNAL(readyReadStandardError()), SLOT(handleStdErr()));
|
||||
const QString command = QString::fromLocal8Bit("df -k %1 |tail -n 1 |sed 's/ */ /g' "
|
||||
const QString command = QString::fromLatin1("df -k %1 |tail -n 1 |sed 's/ */ /g' "
|
||||
"|cut -d ' ' -f 4").arg(d->pathToCheck);
|
||||
d->processRunner->run(command.toUtf8(), deviceConfiguration()->sshParameters());
|
||||
}
|
||||
|
||||
@@ -248,7 +248,7 @@ void tst_PluginSpec::loadLibrary()
|
||||
QVERIFY(spec->resolveDependencies(QList<PluginSpec *>()));
|
||||
QVERIFY2(spec->loadLibrary(), qPrintable(spec->errorString));
|
||||
QVERIFY(spec->plugin != 0);
|
||||
QVERIFY(QString::fromLocal8Bit(spec->plugin->metaObject()->className()) == QString::fromLocal8Bit("MyPlugin::MyPluginImpl"));
|
||||
QVERIFY(QLatin1String(spec->plugin->metaObject()->className()) == QLatin1String("MyPlugin::MyPluginImpl"));
|
||||
QCOMPARE(spec->state, PluginSpec::Loaded);
|
||||
QVERIFY(!spec->hasError);
|
||||
QCOMPARE(spec->plugin->pluginSpec(), ps);
|
||||
|
||||
@@ -284,7 +284,7 @@ void RemoteProcessTest::handleConnected()
|
||||
{
|
||||
Q_ASSERT(m_state == TestingIoDevice);
|
||||
|
||||
m_catProcess = m_sshConnection->createRemoteProcess(QString::fromLocal8Bit("/bin/cat").toUtf8());
|
||||
m_catProcess = m_sshConnection->createRemoteProcess(QString::fromLatin1("/bin/cat").toUtf8());
|
||||
connect(m_catProcess.data(), SIGNAL(started()), SLOT(handleProcessStarted()));
|
||||
connect(m_catProcess.data(), SIGNAL(closed(int)), SLOT(handleProcessClosed(int)));
|
||||
m_started = false;
|
||||
|
||||
Reference in New Issue
Block a user