Fix non-needed usage of QString's fromLocal8Bit() and fromUtf8()

QString::fromLocal8Bit() and QString::fromUtf8() are much more slower
than an obvious QString::fromLatin1() and QLatin1String(), so this
commit changes some places where these functions are really not
needed.

QString::fromLatin1() is used in case if QString object is used
immediately (something like QString::fromLatin1().arg()),
QLatin1String is used otherwise like in other places (for example,
QPixmap(QLatin1String("..."))) - to allow to use default QString
constructor and work with QT_NO_CAST_FROM_ASCII.

Change-Id: Ib6eb1c61e9cb35c7c5b7569fea77c5e41d32621a
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
Denis Mingulov
2012-01-30 16:39:10 +02:00
committed by hjk
parent 2f27c73c8e
commit a36d587ccf
24 changed files with 50 additions and 50 deletions

View File

@@ -201,13 +201,13 @@ void AbstractRemoteLinuxDebugSupport::startExecution()
const QString &remoteExe = runner()->remoteExecutable();
QString args = runner()->arguments();
if (d->qmlDebugging) {
args += QString(QLatin1String(" -qmljsdebugger=port:%1,block"))
args += QString::fromLatin1(" -qmljsdebugger=port:%1,block")
.arg(d->qmlPort);
}
const QString remoteCommandLine = (d->qmlDebugging && !d->cppDebugging)
? QString::fromLocal8Bit("%1 %2 %3").arg(runner()->commandPrefix()).arg(remoteExe).arg(args)
: QString::fromLocal8Bit("%1 gdbserver :%2 %3 %4").arg(runner()->commandPrefix())
? QString::fromLatin1("%1 %2 %3").arg(runner()->commandPrefix()).arg(remoteExe).arg(args)
: QString::fromLatin1("%1 gdbserver :%2 %3 %4").arg(runner()->commandPrefix())
.arg(d->gdbServerPort).arg(remoteExe).arg(args);
connect(runner(), SIGNAL(remoteProcessFinished(qint64)),
SLOT(handleRemoteProcessFinished(qint64)));