refs #937 Resolved clazy warnings: unnecessary memory allocation.

This commit is contained in:
Mathew Sutcliffe
2017-04-17 00:03:33 +01:00
parent fce1513dae
commit b7f69c6887
26 changed files with 52 additions and 51 deletions

View File

@@ -72,7 +72,7 @@ namespace BlackSample
void ServiceTool::dataTransferTestClient(const QString &address)
{
// send data as P2P to server (this can be session bus, too, but usually is P2P)
const bool sb = (address.toLower().startsWith("session"));
const bool sb = address.startsWith("session", Qt::CaseInsensitive);
QDBusConnection connection = sb ?
QDBusConnection::sessionBus() :
QDBusConnection::connectToPeer(address, "p2pConnection");
@@ -91,6 +91,8 @@ namespace BlackSample
QTextStream qtin(stdin);
QTextStream qtout(stdout);
const QList<double> list { 1.0, 2.0, 3.0 };
while (true)
{
QDBusMessage m = QDBusMessage::createSignal(
@@ -115,8 +117,6 @@ namespace BlackSample
qtout << "Send string via interface " << msg << endl;
// a list
QList<double> list;
list << 1.0 << 2.0 << 3.0;
testServiceInterface.receiveList(list);
qtout << "Send list via interface " << list.size() << endl;