Commit ebfbe935 authored by Jan Grulich's avatar Jan Grulich

Openconnect: make sure we accept the dialog

parent 0355bee0
......@@ -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) {
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