summaryrefslogtreecommitdiffstats
path: root/src/widgets/graphicsview/qgraph_p.h
diff options
context:
space:
mode:
authorAlexander Volkov <a.volkov@rusbitech.ru>2017-01-06 22:02:50 +0300
committerAlexander Volkov <a.volkov@rusbitech.ru>2017-01-12 17:54:28 +0000
commitdcec1420ea9d7e90bbd7f37be15d8e61eaf35d23 (patch)
tree950020aadfc183963a5668263ef302d8d6b0e6de /src/widgets/graphicsview/qgraph_p.h
parent8f469e4a19feb77758fb5d3c7120ba93cf32cd7d (diff)
Use QString::asprintf(), QStringBuilder, and the multi-arg overload of QString::arg()
... instead of sequential .arg(const QString &) callings. It saves memory allocations and prevents unexpected results if replacing strings contain place markers. Found with clazy's qstring-arg check. Change-Id: I3912275a6e11c6fb7559ff5623f2e8cde9b7f07a Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/widgets/graphicsview/qgraph_p.h')
-rw-r--r--src/widgets/graphicsview/qgraph_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/graphicsview/qgraph_p.h b/src/widgets/graphicsview/qgraph_p.h
index b0bf3c91c9..b42d4cf2e3 100644
--- a/src/widgets/graphicsview/qgraph_p.h
+++ b/src/widgets/graphicsview/qgraph_p.h
@@ -250,7 +250,7 @@ public:
}
strVertices += QString::fromLatin1("\"%1\" [label=\"%2\"]\n").arg(v->toString()).arg(v->toString());
}
- return QString::fromLatin1("%1\n%2\n").arg(strVertices).arg(edges);
+ return QString::fromLatin1("%1\n%2\n").arg(strVertices, edges);
}
#endif