🐞 fix(设备搜索): 将点击设备的ip发送给后端进行连接请求

This commit is contained in:
huheng@kylinos.cn 2022-10-12 08:19:22 +08:00
parent 126d980465
commit 51414b5e29
4 changed files with 4 additions and 5 deletions

View File

@ -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);

View File

@ -33,6 +33,7 @@ Q_SIGNALS:
void sigUSBconnectBtnClicked();
void sigConnectAddress(QString address);
void sigContinueSearch();
void sigItemInfo(QString);
private:
void initUI();

View File

@ -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++;
}

View File

@ -34,7 +34,7 @@ public:
void moveSearchBtn();
Q_SIGNALS:
void sigItemInfo(KMobileCommon::DiscoveryDeviceInfo deviceInfo);
void sigItemInfo(QString);
void sigContinueSearch();
void sigInitDeviceFinish();
void sigDeviceCode(QString);