Commit 0ebb1756 authored by Jan Grulich's avatar Jan Grulich

Openconnect: make sure we accept the dialog

BUG:380299
parent a3df0adb
......@@ -253,7 +253,13 @@ void OpenconnectAuthWidget::readSecrets()
void OpenconnectAuthWidget::acceptDialog()
{
QDialog *dialog = qobject_cast<QDialog*>(parentWidget());
// Find top-level widget as this should be the QDialog itself
QWidget *widget = parentWidget();
while (widget->parentWidget() != nullptr) {
widget = widget->parentWidget();
}
QDialog *dialog = qobject_cast<QDialog*>(widget);
if (dialog) {
dialog->accept();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment