diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2022-11-05 15:01:00 +0100 |
---|---|---|
committer | A Wireshark GitLab Utility <gerald+gitlab-utility@wireshark.org> | 2022-11-06 22:33:25 +0000 |
commit | 16afad10fbd8bd0ef8a94d049c23f2a39f6045ab (patch) | |
tree | facbb9eb7d0677a2390ef9c70c5aa3c76381e713 | |
parent | f4965d5deca0163b2a9b5aa1873b9271689fbd11 (diff) |
Qt: Fix a deprecated warning
warning: 'parentWidget' is deprecated: Use parent() with qobject_cast()
instead [-Wdeprecated-declarations]
-rw-r--r-- | ui/qt/protocol_preferences_menu.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/qt/protocol_preferences_menu.cpp b/ui/qt/protocol_preferences_menu.cpp index 031f2805cb..0a16522b3f 100644 --- a/ui/qt/protocol_preferences_menu.cpp +++ b/ui/qt/protocol_preferences_menu.cpp @@ -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); |