diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2018-10-08 14:39:28 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2018-10-10 08:33:17 +0000 |
commit | b84ba427f87c5f08f5f01430a032cc657314149d (patch) | |
tree | 3d592ec01bceb985032a43b4a61473dcf45c096b /src/plugins | |
parent | dba4d7f6695cf0350d2173d9670415129ad994de (diff) | |
download | qt-creator-b84ba427f87c5f08f5f01430a032cc657314149d.tar.gz |
UserFileAccessor: Remove unused helper functions
Amends b6c9879f41.
Change-Id: Iae5034a5afa47c671c5f9de5167b0566784bab37
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/projectexplorer/userfileaccessor.cpp | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/src/plugins/projectexplorer/userfileaccessor.cpp b/src/plugins/projectexplorer/userfileaccessor.cpp index a20000ea79..e47e9a2dc7 100644 --- a/src/plugins/projectexplorer/userfileaccessor.cpp +++ b/src/plugins/projectexplorer/userfileaccessor.cpp @@ -152,47 +152,6 @@ Q_DECLARE_TYPEINFO(HandlerNode, Q_MOVABLE_TYPE); QT_END_NAMESPACE -static HandlerNode buildHandlerNodes(const char * const **keys) -{ - HandlerNode ret; - while (const char *rname = *(*keys)++) { - QString name = QLatin1String(rname); - if (name.endsWith('.')) { - HandlerNode sub = buildHandlerNodes(keys); - foreach (const QString &key, name.split('|')) - ret.children.insert(key, sub); - } else { - ret.strings.insert(name); - } - } - return ret; -} - -static QVariantMap processHandlerNodes(const HandlerNode &node, const QVariantMap &map, - QVariant (*handler)(const QVariant &var)) -{ - QVariantMap result; - QMapIterator<QString, QVariant> it(map); - while (it.hasNext()) { - it.next(); - const QString &key = it.key(); - if (node.strings.contains(key)) { - result.insert(key, handler(it.value())); - goto handled; - } - if (it.value().type() == QVariant::Map) - for (QHash<QString, HandlerNode>::ConstIterator subit = node.children.constBegin(); - subit != node.children.constEnd(); ++subit) - if (key.startsWith(subit.key())) { - result.insert(key, processHandlerNodes(subit.value(), it.value().toMap(), handler)); - goto handled; - } - result.insert(key, it.value()); - handled: ; - } - return result; -} - // -------------------------------------------------------------------- // Helpers: // -------------------------------------------------------------------- |