forked from qt-creator/qt-creator
Do not use the fromAscii() and toAscii() functions.
They are deprecated in Qt 5. Use fromLatin1() and toLatin1() instead. In Qt 5, these always do the same thing as their "Ascii" counterparts. The same goes for Qt 4, provided QTextCodec::setCodecForCStrings has not been set, which it hasn't. Change-Id: I04edeb376762b6671eff8156094f0d5e2cb8e1ea Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This commit is contained in:
@@ -85,7 +85,7 @@ void AndroidRunner::checkPID()
|
||||
qint64 pid = -1;
|
||||
QList<QByteArray> procs = psProc.readAll().split('\n');
|
||||
foreach (const QByteArray &proc, procs) {
|
||||
if (proc.trimmed().endsWith(m_packageName.toAscii())) {
|
||||
if (proc.trimmed().endsWith(m_packageName.toLatin1())) {
|
||||
QRegExp rx(QLatin1String("(\\d+)"));
|
||||
if (rx.indexIn(QLatin1String(proc), proc.indexOf(' ')) > 0) {
|
||||
pid = rx.cap(1).toLongLong();
|
||||
@@ -259,7 +259,7 @@ void AndroidRunner::logcatReadStandardOutput()
|
||||
m_logcat += m_adbLogcatProcess.readAllStandardOutput();
|
||||
bool keepLastLine = m_logcat.endsWith('\n');
|
||||
QByteArray line;
|
||||
QByteArray pid(QString::fromLatin1("%1):").arg(m_processPID).toAscii());
|
||||
QByteArray pid(QString::fromLatin1("%1):").arg(m_processPID).toLatin1());
|
||||
foreach (line, m_logcat.split('\n')) {
|
||||
if (!line.contains(pid))
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user