From b5613da1391789fe661063ab9d30850aa96efd59 Mon Sep 17 00:00:00 2001 From: Jake Petroules Date: Tue, 24 Oct 2017 08:40:54 -0700 Subject: 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 --- src/lib/corelib/tools/scripttools.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/lib/corelib/tools/scripttools.cpp') 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) -- cgit v1.2.3