aboutsummaryrefslogtreecommitdiffstats
path: root/tools/qmljs
diff options
context:
space:
mode:
authorAnton Kudryavtsev <a.kudryavtsev@netris.ru>2016-08-15 13:30:48 +0300
committerAnton Kudryavtsev <a.kudryavtsev@netris.ru>2016-08-22 16:44:33 +0000
commit457bb7a465fc51995fc5ffaa4a1d8a341528d0c4 (patch)
tree0747b80cb5cc3744308ddc699bae42e751a9238e /tools/qmljs
parent97c4ae41f268b3a128285761858e0eb9f6fec27d (diff)
tools: use const (and const APIs) more
For CoW types, prefer const methods to avoid needless detach()ing. Change-Id: If9018391c001eba3b4b2061d06c4caa8136811ab Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tools/qmljs')
-rw-r--r--tools/qmljs/qmljs.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/qmljs/qmljs.cpp b/tools/qmljs/qmljs.cpp
index 964afc265b..44ff37b925 100644
--- a/tools/qmljs/qmljs.cpp
+++ b/tools/qmljs/qmljs.cpp
@@ -145,22 +145,22 @@ int main(int argc, char *argv[])
bool runAsQml = false;
if (!args.isEmpty()) {
- if (args.first() == QLatin1String("--jit")) {
+ if (args.constFirst() == QLatin1String("--jit")) {
mode = use_masm;
args.removeFirst();
}
- if (args.first() == QLatin1String("--interpret")) {
+ if (args.constFirst() == QLatin1String("--interpret")) {
mode = use_moth;
args.removeFirst();
}
- if (args.first() == QLatin1String("--qml")) {
+ if (args.constFirst() == QLatin1String("--qml")) {
runAsQml = true;
args.removeFirst();
}
- if (args.first() == QLatin1String("--help")) {
+ if (args.constFirst() == QLatin1String("--help")) {
std::cerr << "Usage: qmljs [|--jit|--interpret|--qml] file..." << std::endl;
return EXIT_SUCCESS;
}