RemoteLinux: Use toMap() and fromMap() to serialize device info.

One more step towards extracting an abstract base device class.
Note that the device settings now go into a dedicated file, like
the Qt version and toolchain information, and no longer into the
QtCreator.ini file. Reading the "old style" settings is still
supported.

Change-Id: Ic4766420930c1ab650d72068d3f6d188aa9c203b
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
This commit is contained in:
Christian Kandeler
2012-03-02 18:09:59 +01:00
parent 709f24b0e0
commit 0d079a6339
4 changed files with 161 additions and 63 deletions

View File

@@ -38,6 +38,7 @@
#include <QString>
#include <QStringList>
#include <QVariantHash>
#include <QVariantMap>
#include <QWizard>
QT_BEGIN_NAMESPACE
@@ -90,10 +91,12 @@ public:
static const Id InvalidId;
static Ptr create();
static Ptr create(const QString &name, const QString &osType, DeviceType deviceType,
const Utils::PortList &freePorts, const Utils::SshConnectionParameters &sshParams,
const QVariantHash &attributes = QVariantHash(), Origin origin = ManuallyAdded);
private:
LinuxDeviceConfiguration();
LinuxDeviceConfiguration(const QString &name, const QString &osType, DeviceType deviceType,
const Utils::PortList &freePorts, const Utils::SshConnectionParameters &sshParams,
const QVariantHash &attributes, Origin origin);
@@ -109,7 +112,9 @@ private:
void setDisplayName(const QString &name);
void setInternalId(Id id);
void setDefault(bool isDefault);
void save(QSettings &settings) const;
void fromMap(const QVariantMap &map);
QVariantMap toMap() const;
Internal::LinuxDeviceConfigurationPrivate *d;
};