forked from qt-creator/qt-creator
Android: Modernize
modernize-use-auto modernize-use-nullptr modernize-use-override modernize-use-using modernize-use-equals-default modernize-use-transparent-functors Change-Id: I6c9e567edf16cf436c0e0c1239b40f74574a1096 Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
This commit is contained in:
committed by
Vikas Pachdha
parent
02a759d4f5
commit
be5c228e5b
@@ -57,7 +57,7 @@ AvdDialog::AvdDialog(int minApiLevel, AndroidSdkManager *sdkManager, const QStri
|
||||
m_avdDialog.abiComboBox->addItems(QStringList(targetArch));
|
||||
}
|
||||
|
||||
QRegExpValidator *v = new QRegExpValidator(m_allowedNameChars, this);
|
||||
auto v = new QRegExpValidator(m_allowedNameChars, this);
|
||||
m_avdDialog.nameLineEdit->setValidator(v);
|
||||
m_avdDialog.nameLineEdit->installEventFilter(this);
|
||||
|
||||
@@ -155,7 +155,7 @@ void AvdDialog::updateApiLevelComboBox()
|
||||
bool AvdDialog::eventFilter(QObject *obj, QEvent *event)
|
||||
{
|
||||
if (obj == m_avdDialog.nameLineEdit && event->type() == QEvent::KeyPress) {
|
||||
QKeyEvent *ke = static_cast<QKeyEvent *>(event);
|
||||
auto ke = static_cast<QKeyEvent *>(event);
|
||||
const QString key = ke->text();
|
||||
if (!key.isEmpty() && !m_allowedNameChars.exactMatch(key)) {
|
||||
QPoint position = m_avdDialog.nameLineEdit->parentWidget()->mapToGlobal(m_avdDialog.nameLineEdit->geometry().bottomLeft());
|
||||
|
||||
Reference in New Issue
Block a user