forked from qt-creator/qt-creator
Analyzer: Move setIfPresent helper function close to the only user
Change-Id: I8d99fe6438e4d954ad44403ac4a34f7e85a7f021 Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
@@ -39,16 +39,6 @@
|
|||||||
|
|
||||||
namespace Analyzer {
|
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.
|
* 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)
|
void ValgrindBaseSettings::fromMap(const QVariantMap &map)
|
||||||
{
|
{
|
||||||
// General
|
// General
|
||||||
|
Reference in New Issue
Block a user