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:
Alessandro Portale
2018-07-25 12:19:15 +02:00
committed by Vikas Pachdha
parent 02a759d4f5
commit be5c228e5b
42 changed files with 153 additions and 176 deletions

View File

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