diff options
author | Daniel Teske <daniel.teske@digia.com> | 2012-09-20 14:42:57 +0200 |
---|---|---|
committer | Daniel Teske <daniel.teske@digia.com> | 2012-09-28 12:49:57 +0200 |
commit | 733d5612fb7c1558ad0e28ebe2e2dd93477d07ed (patch) | |
tree | 0fa4c3d357a931ac11ba0afb4641fd36eeaa77b4 /src/plugins/valgrind | |
parent | d7993c717d08e2884963340d9017156b54b44c05 (diff) | |
download | qt-creator-733d5612fb7c1558ad0e28ebe2e2dd93477d07ed.tar.gz |
Change and Clone kit functionality
Change-Id: Ibdab8d9076d2f9c002cb69ad81809929c8697355
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Diffstat (limited to 'src/plugins/valgrind')
-rw-r--r-- | src/plugins/valgrind/valgrindsettings.cpp | 14 | ||||
-rw-r--r-- | src/plugins/valgrind/valgrindsettings.h | 2 |
2 files changed, 16 insertions, 0 deletions
diff --git a/src/plugins/valgrind/valgrindsettings.cpp b/src/plugins/valgrind/valgrindsettings.cpp index fa7ff9f1d6..062d79c825 100644 --- a/src/plugins/valgrind/valgrindsettings.cpp +++ b/src/plugins/valgrind/valgrindsettings.cpp @@ -326,6 +326,13 @@ void ValgrindGlobalSettings::fromMap(const QVariantMap &map) setIfPresent(map, QLatin1String(callgrindShortenTemplates), &m_shortenTemplates); } +AbstractAnalyzerSubConfig *ValgrindGlobalSettings::clone() +{ + ValgrindGlobalSettings *other = new ValgrindGlobalSettings; + other->fromMap(toMap()); + return other; +} + QVariantMap ValgrindGlobalSettings::toMap() const { QVariantMap map = ValgrindBaseSettings::toMap(); @@ -459,6 +466,13 @@ void ValgrindProjectSettings::fromMap(const QVariantMap &map) setIfPresent(map, removedSuppressionFilesC, &m_disabledGlobalSuppressionFiles); } +AbstractAnalyzerSubConfig *ValgrindProjectSettings::clone() +{ + ValgrindProjectSettings *other = new ValgrindProjectSettings; + other->fromMap(toMap()); + return other; +} + QVariantMap ValgrindProjectSettings::toMap() const { QVariantMap map = ValgrindBaseSettings::toMap(); diff --git a/src/plugins/valgrind/valgrindsettings.h b/src/plugins/valgrind/valgrindsettings.h index f835abc84e..2c19fd6261 100644 --- a/src/plugins/valgrind/valgrindsettings.h +++ b/src/plugins/valgrind/valgrindsettings.h @@ -175,6 +175,7 @@ public: QVariantMap toMap() const; QVariantMap defaults() const; void fromMap(const QVariantMap &map); + virtual AbstractAnalyzerSubConfig *clone(); /* * Global memcheck settings @@ -232,6 +233,7 @@ public: QVariantMap toMap() const; QVariantMap defaults() const; void fromMap(const QVariantMap &map); + virtual AbstractAnalyzerSubConfig *clone(); /** * Per-project memcheck settings, saves a diff to the global suppression files list |