🐞 fix(设备搜索): 将点击设备的ip发送给后端进行连接请求
This commit is contained in:
parent
126d980465
commit
51414b5e29
|
@ -37,6 +37,7 @@ void ConnectInterface::initUI()
|
|||
m_searchWin = new SearchDeviceWin(this);
|
||||
m_searchWin->setMinimumSize(STACKENWIN_W, STACKENWIN_H);
|
||||
connect(m_searchWin, &SearchDeviceWin::sigContinueSearch, this, &ConnectInterface::sigContinueSearch);
|
||||
connect(m_searchWin, &SearchDeviceWin::sigItemInfo, this, &ConnectInterface::sigConnectAddress);
|
||||
m_mobileConnectWin = new MobileConnectWin(this);
|
||||
connect(m_mobileConnectWin, &MobileConnectWin::sigUSBconnectBtnClicked, this,
|
||||
&ConnectInterface::sigUSBconnectBtnClicked);
|
||||
|
|
|
@ -33,6 +33,7 @@ Q_SIGNALS:
|
|||
void sigUSBconnectBtnClicked();
|
||||
void sigConnectAddress(QString address);
|
||||
void sigContinueSearch();
|
||||
void sigItemInfo(QString);
|
||||
|
||||
private:
|
||||
void initUI();
|
||||
|
|
|
@ -121,10 +121,7 @@ void SearchDeviceWin::setItemInfo(const QMap<QString, KMobileCommon::DiscoveryDe
|
|||
connect(searchDeviceItem, &SearchDeviceItem::clicked, this, [=]() {
|
||||
QString itemIP = searchDeviceItem->getItemIp();
|
||||
KMobileCommon::DiscoveryDeviceInfo itemDeviceInfo = searchDeviceItem->getItemDeviceInfo();
|
||||
|
||||
qInfo() << "device item clicked" << itemIP << itemDeviceInfo.uuid << itemDeviceInfo.ip
|
||||
<< itemDeviceInfo.port << itemDeviceInfo.deviceName << itemDeviceInfo.deviceType;
|
||||
Q_EMIT sigItemInfo(itemDeviceInfo);
|
||||
Q_EMIT sigItemInfo(itemDeviceInfo.ip);
|
||||
});
|
||||
it++;
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ public:
|
|||
void moveSearchBtn();
|
||||
|
||||
Q_SIGNALS:
|
||||
void sigItemInfo(KMobileCommon::DiscoveryDeviceInfo deviceInfo);
|
||||
void sigItemInfo(QString);
|
||||
void sigContinueSearch();
|
||||
void sigInitDeviceFinish();
|
||||
void sigDeviceCode(QString);
|
||||
|
|
Loading…
Reference in New Issue