DebuggerItem: Make sure DebuggerItems have an Id

The default constructor now sets an id on debuggerItem. fromMap was
removed and a new constructor (taking a const QVariantMap &) was
added in place of that.

There are no more friends on the DebuggerItem class since those were
only necessary to make sure the item has an Id when it gets added.

Change-Id: Ia1a6c9ffea67a8e0a1e5685ef93f67df8686d4c9
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
Tobias Hunger
2013-10-25 12:18:36 +02:00
parent 1567f4729f
commit c2705f1595
3 changed files with 24 additions and 36 deletions

View File

@@ -50,13 +50,13 @@ class DEBUGGER_EXPORT DebuggerItem
{
public:
DebuggerItem();
DebuggerItem(const QVariantMap &data);
bool canClone() const { return true; }
bool isValid() const;
QString engineTypeName() const;
QVariantMap toMap() const;
void fromMap(const QVariantMap &data);
void reinitializeFromFile();
QVariant id() const { return m_id; }
@@ -83,10 +83,6 @@ public:
QStringList abiNames() const;
private:
friend class Debugger::Internal::DebuggerItemModel;
friend class DebuggerItemManager;
void setId(const QVariant &id);
QVariant m_id;
QString m_displayName;
DebuggerEngineType m_engineType;