forked from qt-creator/qt-creator
RemoteLinux: Serialize the "disconnected" state
Otherwise permanently unreachable devices will keep causing annoying delays after every restart. Change-Id: I85c6fd0a6964c7f25e4b61b8eb092fc606b146ad Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
@@ -58,6 +58,8 @@ using namespace Utils;
|
||||
|
||||
namespace RemoteLinux {
|
||||
|
||||
const char DisconnectedKey[] = "Disconnected";
|
||||
|
||||
const QByteArray s_pidMarker = "__qtc";
|
||||
|
||||
static Q_LOGGING_CATEGORY(linuxDeviceLog, "qtc.remotelinux.device", QtWarningMsg);
|
||||
@@ -1063,6 +1065,19 @@ LinuxDevice::LinuxDevice()
|
||||
}});
|
||||
}
|
||||
|
||||
void LinuxDevice::fromMap(const Utils::Store &map)
|
||||
{
|
||||
IDevice::fromMap(map);
|
||||
d->m_disconnected = map.value(DisconnectedKey, false).toBool();
|
||||
}
|
||||
|
||||
Store LinuxDevice::toMap() const
|
||||
{
|
||||
Store map = IDevice::toMap();
|
||||
map.insert(DisconnectedKey, d->m_disconnected);
|
||||
return map;
|
||||
}
|
||||
|
||||
void LinuxDevice::_setOsType(Utils::OsType osType)
|
||||
{
|
||||
qCDebug(linuxDeviceLog) << "Setting OS type to" << osType << "for" << displayName();
|
||||
|
@@ -55,6 +55,9 @@ public:
|
||||
protected:
|
||||
LinuxDevice();
|
||||
|
||||
void fromMap(const Utils::Store &map) override;
|
||||
Utils::Store toMap() const override;
|
||||
|
||||
void _setOsType(Utils::OsType osType);
|
||||
|
||||
class LinuxDevicePrivate *d;
|
||||
|
Reference in New Issue
Block a user