Explorar el Código

[iOS] clear focus in launcher only when something has focus

Andrey Filipenkov hace 3 años
padre
commit
796845d173
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      launcher/mainwindow_moc.cpp

+ 2 - 1
launcher/mainwindow_moc.cpp

@@ -92,7 +92,8 @@ MainWindow::MainWindow(QWidget * parent)
 
 	connect(ui->tabSelectList, &QListWidget::currentRowChanged, [this](int i) {
 #ifdef Q_OS_IOS
-		qApp->focusWidget()->clearFocus();
+		if(auto widget = qApp->focusWidget())
+			widget->clearFocus();
 #endif
 		ui->tabListWidget->setCurrentIndex(i);
 	});