diff --git a/src/frontend/list-items/wlanlistitem.cpp b/src/frontend/list-items/wlanlistitem.cpp index 6b0526c0..abab6661 100644 --- a/src/frontend/list-items/wlanlistitem.cpp +++ b/src/frontend/list-items/wlanlistitem.cpp @@ -232,6 +232,12 @@ void WlanListItem::initWlanUI() m_pwdLineEdit = new QLineEdit(m_pwdFrame); m_pwdLineEdit->setAttribute(Qt::WA_InputMethodEnabled, false); + m_pwdLineEdit->setContextMenuPolicy(Qt::NoContextMenu); + + QRegExp rx("^[A-Za-z0-9`~!@#$%^&*()_-+=<>,.\\\/]+$"); + QRegExpValidator *latitude = new QRegExpValidator(rx, this); + m_pwdLineEdit->setValidator(latitude); + m_pwdLineEdit->installEventFilter(this); connect(m_pwdLineEdit, &QLineEdit::textChanged, this, &WlanListItem::onPwdEditorTextChanged); m_pwdLineEdit->setFixedHeight(PWD_AREA_HEIGHT);