forked from qt-creator/qt-creator
ProjectEplorer: Base ToolChain on AspectContainer
Similar approach as done with ProjectConfiguration Change-Id: Ia5e1d464b7c5c64d7a12ee12c7673ff453f24390 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -246,6 +246,8 @@ ToolChain *ToolChain::clone() const
|
||||
|
||||
void ToolChain::toMap(QVariantMap &result) const
|
||||
{
|
||||
AspectContainer::toMap(result);
|
||||
|
||||
QString idToSave = d->m_typeId.toString() + QLatin1Char(':') + QString::fromUtf8(id());
|
||||
result.insert(QLatin1String(ID_KEY), idToSave);
|
||||
result.insert(QLatin1String(DISPLAY_NAME_KEY), displayName());
|
||||
@@ -353,6 +355,8 @@ void ToolChain::setTypeDisplayName(const QString &typeName)
|
||||
|
||||
bool ToolChain::fromMap(const QVariantMap &data)
|
||||
{
|
||||
AspectContainer::fromMap(data);
|
||||
|
||||
d->m_displayName = data.value(QLatin1String(DISPLAY_NAME_KEY)).toString();
|
||||
|
||||
// make sure we have new style ids:
|
||||
|
@@ -12,6 +12,7 @@
|
||||
#include "task.h"
|
||||
#include "toolchaincache.h"
|
||||
|
||||
#include <utils/aspects.h>
|
||||
#include <utils/cpplanguage_details.h>
|
||||
#include <utils/environment.h>
|
||||
#include <utils/fileutils.h>
|
||||
@@ -60,7 +61,7 @@ public:
|
||||
// ToolChain (documentation inside)
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
class PROJECTEXPLORER_EXPORT ToolChain
|
||||
class PROJECTEXPLORER_EXPORT ToolChain : public Utils::AspectContainer
|
||||
{
|
||||
public:
|
||||
enum Detection {
|
||||
|
Reference in New Issue
Block a user