mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 14:55:36 +08:00
When calling arg() on a QString constructed from a literal, use QStringLiteral.
This commit is contained in:
@@ -73,7 +73,7 @@ int main(int argc, char *argv[])
|
||||
port = cmdlineArgs.at(cmdlineArgs.length() - 1);
|
||||
}
|
||||
}
|
||||
QString addressTcp = QString("tcp:host=%1,port=%2").arg(ip, port);
|
||||
QString addressTcp = QStringLiteral("tcp:host=%1,port=%2").arg(ip, port);
|
||||
QString address(useSessionBusForServer ? "session" : addressTcp); // testing with real transfer
|
||||
|
||||
// Create a Testservice instance and register it with the session bus only if
|
||||
@@ -111,7 +111,7 @@ int main(int argc, char *argv[])
|
||||
if (mode.startsWith("l"))
|
||||
{
|
||||
ip = "127.0.0.1";
|
||||
addressTcp = QString("tcp:host=%1,port=%2").arg(ip, port);
|
||||
addressTcp = QStringLiteral("tcp:host=%1,port=%2").arg(ip, port);
|
||||
goto Menu;
|
||||
}
|
||||
if (mode.startsWith("i"))
|
||||
@@ -120,7 +120,7 @@ int main(int argc, char *argv[])
|
||||
if (p.length() > 1)
|
||||
{
|
||||
ip = p.at(1);
|
||||
addressTcp = QString("tcp:host=%1,port=%2").arg(ip, port);
|
||||
addressTcp = QStringLiteral("tcp:host=%1,port=%2").arg(ip, port);
|
||||
}
|
||||
goto Menu;
|
||||
}
|
||||
@@ -130,7 +130,7 @@ int main(int argc, char *argv[])
|
||||
if (p.length() > 1)
|
||||
{
|
||||
port = p.at(1);
|
||||
addressTcp = QString("tcp:host=%1,port=%2").arg(ip, port);
|
||||
addressTcp = QStringLiteral("tcp:host=%1,port=%2").arg(ip, port);
|
||||
}
|
||||
goto Menu;
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ namespace BlackSample
|
||||
|
||||
// The << operator is used to add the parameters for the slot
|
||||
const QDateTime dtnow = QDateTime::currentDateTimeUtc();
|
||||
const QString msg = QString("Con.: %1, message at %2").arg(connection.name(), dtnow.toString("MM/dd/yyyy @ hh:mm:ss"));
|
||||
const QString msg = QStringLiteral("Con.: %1, message at %2").arg(connection.name(), dtnow.toString("MM/dd/yyyy @ hh:mm:ss"));
|
||||
m << msg;
|
||||
|
||||
// We send this as a non-replying message. This is used for sending errors, replys, signals.
|
||||
|
||||
Reference in New Issue
Block a user