summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamarque V. Souza <[email protected]>2017-05-04 09:36:49 -0300
committerLamarque V. Souza <[email protected]>2017-05-04 09:36:49 -0300
commit2c6b059626dedd1ae82fb06f0d6f8737dae8e5b5 (patch)
treef2de8af34a5e9d0b6ac9231e129d09a35dd4f0c8
parentf1e39c5458e6fde4e586a64f13ad9f354e219339 (diff)
Workaround to fix PasswordDialog's focus.
REVIEW: 130109 BUG: 379279 FIXED-IN: 5.9.6
-rw-r--r--kded/passworddialog.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/kded/passworddialog.cpp b/kded/passworddialog.cpp
index 18c686f..5db577c 100644
--- a/kded/passworddialog.cpp
+++ b/kded/passworddialog.cpp
@@ -93,7 +93,7 @@ void PasswordDialog::initializeUi()
QString connectionLabel;
UiUtils::iconAndTitleForConnectionSettingsType(m_connectionSettings->connectionType(), connectionLabel);
- m_ui->password->setFocus();
+ setFocusProxy(m_ui->password);
setWindowTitle(i18n("%1 password dialog", connectionLabel));
} else {
NetworkManager::VpnSetting::Ptr vpnSetting = m_connectionSettings->setting(Setting::Vpn).dynamicCast<VpnSetting>();
@@ -126,6 +126,9 @@ void PasswordDialog::initializeUi()
QAbstractButton *button = m_ui->buttonBox->button(QDialogButtonBox::Ok);
m_ui->buttonBox->removeButton(button);
}
+
+ setFocusProxy(m_vpnWidget);
+ m_vpnWidget->setFocus(Qt::OtherFocusReason);
} else {
qCWarning(PLASMA_NM) << error << ", serviceType == " << serviceType;
m_hasError = true;
@@ -134,6 +137,9 @@ void PasswordDialog::initializeUi()
}
}
}
+
+ // Workaround to force m_ui->password to get focus.
+ focusNextChild();
}
bool PasswordDialog::hasError() const