Qt: Fix a deprecated warning

warning: 'parentWidget' is deprecated: Use parent() with qobject_cast()
instead [-Wdeprecated-declarations]
This commit is contained in:
Stig Bjørlykke 2022-11-05 15:01:00 +01:00 committed by A Wireshark GitLab Utility
parent f4965d5dec
commit 16afad10fb
1 changed files with 1 additions and 1 deletions

View File

@ -118,7 +118,7 @@ public:
}
void showUatDialog() {
UatDialog *uat_dlg = new UatDialog(parentWidget(), prefs_get_uat_value(pref_));
UatDialog *uat_dlg = new UatDialog(qobject_cast<QWidget*>(parent()), prefs_get_uat_value(pref_));
connect(uat_dlg, SIGNAL(destroyed(QObject*)), mainApp, SLOT(flushAppSignals()));
uat_dlg->setWindowModality(Qt::ApplicationModal);
uat_dlg->setAttribute(Qt::WA_DeleteOnClose);