Explorar o código

[iOS] prevent keyboard appearing automatically after switching tab in launcher

Andrey Filipenkov %!s(int64=3) %!d(string=hai) anos
pai
achega
d1d274382c
Modificáronse 1 ficheiros con 6 adicións e 2 borrados
  1. 6 2
      launcher/mainwindow_moc.cpp

+ 6 - 2
launcher/mainwindow_moc.cpp

@@ -84,8 +84,12 @@ MainWindow::MainWindow(QWidget * parent)
 	ui->tabListWidget->setCurrentIndex(0);
 	ui->settingsView->setDisplayList();
 
-	connect(ui->tabSelectList, SIGNAL(currentRowChanged(int)),
-		ui->tabListWidget, SLOT(setCurrentIndex(int)));
+	connect(ui->tabSelectList, &QListWidget::currentRowChanged, [this](int i) {
+#ifdef Q_OS_IOS
+		qApp->focusWidget()->clearFocus();
+#endif
+		ui->tabListWidget->setCurrentIndex(i);
+	});
 
 	if(settings["launcher"]["updateOnStartup"].Bool())
 		UpdateDialog::showUpdateDialog(false);