diff options
author | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2017-08-11 12:16:57 +0200 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2018-09-14 13:49:42 +0000 |
commit | ebd3d246804f4951c6e518889e1560bae47b348c (patch) | |
tree | 38f40481c74c53e22c671751e31c8ce79729ecd8 /src/linguist/shared/qmakebuiltins.cpp | |
parent | cc29e32a018b4f1120924387c15ed33f57dd97d7 (diff) |
qmake: make more use of ProString built-ins
saves some noisy toQString() uses.
Change-Id: I62a9e2725c4baabac311124d19c7d8b40f54c8f7
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from qtbase/ce5e6876d4a191087969134e489db99cf167ca69)
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/linguist/shared/qmakebuiltins.cpp')
-rw-r--r-- | src/linguist/shared/qmakebuiltins.cpp | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/src/linguist/shared/qmakebuiltins.cpp b/src/linguist/shared/qmakebuiltins.cpp index 970a250d7..8ece3edb4 100644 --- a/src/linguist/shared/qmakebuiltins.cpp +++ b/src/linguist/shared/qmakebuiltins.cpp @@ -1780,13 +1780,12 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateBuiltinConditional( if (args.count() >= 3) { const auto opts = split_value_list(args.at(2).toQStringRef()); for (const ProString &opt : opts) { - opt.toQString(m_tmp3); - if (m_tmp3 == QLatin1String("append")) { + if (opt == QLatin1String("append")) { mode = QIODevice::Append; - } else if (m_tmp3 == QLatin1String("exe")) { + } else if (opt == QLatin1String("exe")) { exe = true; } else { - evalError(fL1S("write_file(): invalid flag %1.").arg(m_tmp3)); + evalError(fL1S("write_file(): invalid flag %1.").arg(opt.toQString(m_tmp3))); return ReturnFalse; } } @@ -1824,21 +1823,20 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateBuiltinConditional( if (args.count() >= 2) { const auto opts = split_value_list(args.at(1).toQStringRef()); for (const ProString &opt : opts) { - opt.toQString(m_tmp3); - if (m_tmp3 == QLatin1String("transient")) { + if (opt == QLatin1String("transient")) { persist = false; - } else if (m_tmp3 == QLatin1String("super")) { + } else if (opt == QLatin1String("super")) { target = TargetSuper; - } else if (m_tmp3 == QLatin1String("stash")) { + } else if (opt == QLatin1String("stash")) { target = TargetStash; - } else if (m_tmp3 == QLatin1String("set")) { + } else if (opt == QLatin1String("set")) { mode = CacheSet; - } else if (m_tmp3 == QLatin1String("add")) { + } else if (opt == QLatin1String("add")) { mode = CacheAdd; - } else if (m_tmp3 == QLatin1String("sub")) { + } else if (opt == QLatin1String("sub")) { mode = CacheSub; } else { - evalError(fL1S("cache(): invalid flag %1.").arg(m_tmp3)); + evalError(fL1S("cache(): invalid flag %1.").arg(opt.toQString(m_tmp3))); return ReturnFalse; } } |