Fix bug 39000 show prefix of long ssid folowed by ellipsis

This commit is contained in:
crrs666 2021-03-23 16:58:14 +08:00
parent 7203eb1a9e
commit a0030396d8
1 changed files with 8 additions and 1 deletions

View File

@ -225,7 +225,14 @@ void OneLancForm::setTopItem(bool isSelected)
//设置网络名称
void OneLancForm::setName(QString ssid, QString transSsid, QString uuid, QString interface)
{
ui->lbName->setText(ssid);
//处理过长SSID
QString displayName;
if(ssid.length() > 23){
displayName = ssid.mid(0, 20) + "...";
}else{
displayName = ssid;
}
ui->lbName->setText(displayName);
ssidName = ssid;
m_sConnectType = transSsid;
uuidName = uuid;