aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/corelib/tools/scripttools.cpp
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@qt.io>2017-10-24 08:40:54 -0700
committerJake Petroules <jake.petroules@qt.io>2017-11-14 18:24:18 +0000
commitb5613da1391789fe661063ab9d30850aa96efd59 (patch)
treed38dba0aefb774dd32268ec94bea5ddc0c9cea0d /src/lib/corelib/tools/scripttools.cpp
parentf40667f6fb026fa1747a1e330d6e397bf79435c7 (diff)
STL compatibility: use front() instead of first()
This is a simple find and replace with manual sanity check. Change-Id: I82f0eb38b6a5a3b75a4ed38d97bdb6ce164d09b3 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/lib/corelib/tools/scripttools.cpp')
-rw-r--r--src/lib/corelib/tools/scripttools.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/corelib/tools/scripttools.cpp b/src/lib/corelib/tools/scripttools.cpp
index 7f094f9bb..adf930cf0 100644
--- a/src/lib/corelib/tools/scripttools.cpp
+++ b/src/lib/corelib/tools/scripttools.cpp
@@ -49,9 +49,9 @@ namespace Internal {
void setConfigProperty(QVariantMap &cfg, const QStringList &name, const QVariant &value)
{
if (name.length() == 1) {
- cfg.insert(name.first(), value);
+ cfg.insert(name.front(), value);
} else {
- QVariant &subCfg = cfg[name.first()];
+ QVariant &subCfg = cfg[name.front()];
QVariantMap subCfgMap = subCfg.toMap();
setConfigProperty(subCfgMap, name.mid(1), value);
subCfg = subCfgMap;
@@ -61,9 +61,9 @@ void setConfigProperty(QVariantMap &cfg, const QStringList &name, const QVariant
QVariant getConfigProperty(const QVariantMap &cfg, const QStringList &name)
{
if (name.length() == 1)
- return cfg.value(name.first());
+ return cfg.value(name.front());
else
- return getConfigProperty(cfg.value(name.first()).toMap(), name.mid(1));
+ return getConfigProperty(cfg.value(name.front()).toMap(), name.mid(1));
}
TemporaryGlobalObjectSetter::TemporaryGlobalObjectSetter(const QScriptValue &object)