MCPcopy Create free account
hub / github.com/KangLin/RabbitRemoteControl / event

Method event

Plugins/SSH/BackendSSH.cpp:141–162  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

139}
140
141bool CBackendSSH::event(QEvent *event)
142{
143 switch (event->type()) {
144 case TERMWIDGET_EVENT_TYPE:
145 {
146 QEventTerminal *d = (QEventTerminal*)event;
147 if(m_pChannelSSH && d->m_Data.length() > 0) {
148 qint64 nRet = m_pChannelSSH->write(d->m_Data.data(), d->m_Data.length());
149 Q_UNUSED(nRet);
150 //qDebug(log) << "Write data to ssh channel:" << nRet << d->m_Data.length();
151 } else {
152 //qDebug(log) << "m_pChannelSSH && len <= 0";
153 }
154 break;
155 }
156 default:
157 return QObject::event(event);
158 }
159
160 event->accept();
161 return true;
162}
163
164int CBackendSSH::WakeUp()
165{

Callers

nothing calls this directly

Calls 3

writeMethod · 0.80
dataMethod · 0.45
acceptMethod · 0.45

Tested by

no test coverage detected