Commit a710f7f8 authored by hjk's avatar hjk

Analyzer: Move setIfPresent helper function close to the only user

Change-Id: I8d99fe6438e4d954ad44403ac4a34f7e85a7f021
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
parent 2890242d
......@@ -39,16 +39,6 @@
namespace Analyzer {
/**
* Utility function to set @p val if @p key is present in @p map.
*/
template <typename T> void setIfPresent(const QVariantMap &map, const QString &key, T *val)
{
if (!map.contains(key))
return;
*val = map.value(key).template value<T>();
}
/**
* Subclass this to add configuration to your analyzer tool.
*
......
......@@ -76,6 +76,15 @@ namespace Internal {
//
//////////////////////////////////////////////////////////////////
/**
* Utility function to set @p val if @p key is present in @p map.
*/
template <typename T> void setIfPresent(const QVariantMap &map, const QString &key, T *val)
{
if (map.contains(key))
*val = map.value(key).template value<T>();
}
void ValgrindBaseSettings::fromMap(const QVariantMap &map)
{
// General
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment