diff --git a/plugins/mobilehotspot/mobilehotspotwidget.cpp b/plugins/mobilehotspot/mobilehotspotwidget.cpp index 0a3c12b5..665510b3 100644 --- a/plugins/mobilehotspot/mobilehotspotwidget.cpp +++ b/plugins/mobilehotspot/mobilehotspotwidget.cpp @@ -291,11 +291,10 @@ void MobileHotspotWidget::onApLineEditTextEdit(QString text) for ( ; i < text.length(); ++i) { count += text.mid(i,1).toLocal8Bit().length(); if (count > AP_NAME_MAX_LENGTH) { - break; + m_apNameLine->setText(text.left(i)); + return; } } - - m_apNameLine->setText(text.left(i)); } void MobileHotspotWidget::onPwdTextChanged()