Changeset View
Changeset View
Standalone View
Standalone View
RemoteControl/RemoteConnection.cpp
Show First 20 Lines • Show All 99 Lines • ▼ Show 20 Line(s) | 91 | if (m_state == WaitingForData) { | |||
---|---|---|---|---|---|
100 | buffer.open(QIODevice::ReadOnly); | 100 | buffer.open(QIODevice::ReadOnly); | ||
101 | QDataStream stream(&buffer); | 101 | QDataStream stream(&buffer); | ||
102 | qint32 id; | 102 | qint32 id; | ||
103 | stream >> id; | 103 | stream >> id; | ||
104 | 104 | | |||
105 | std::unique_ptr<RemoteCommand> command = RemoteCommand::create(static_cast<CommandType>(id)); | 105 | std::unique_ptr<RemoteCommand> command = RemoteCommand::create(static_cast<CommandType>(id)); | ||
106 | command->decode(stream); | 106 | command->decode(stream); | ||
107 | protocolDebug() << qPrintable(QTime::currentTime().toString(QString::fromUtf8("hh:mm:ss.zzz"))) | 107 | protocolDebug() << qPrintable(QTime::currentTime().toString(QString::fromUtf8("hh:mm:ss.zzz"))) | ||
108 | << ": Received " << qPrintable(id); | 108 | << ": Received " << id; | ||
109 | 109 | | |||
110 | emit gotCommand(*command); | 110 | emit gotCommand(*command); | ||
111 | } | 111 | } | ||
112 | } | 112 | } | ||
113 | } | 113 | } | ||
114 | 114 | | |||
115 | 115 | | |||
116 | 116 | | |||
117 | 117 | | |||
118 | 118 | | |||
119 | 119 | |