diff options
| author | Rémi Verschelde <rverschelde@gmail.com> | 2020-02-21 23:26:13 +0100 |
|---|---|---|
| committer | Rémi Verschelde <rverschelde@gmail.com> | 2020-02-28 14:24:09 +0100 |
| commit | f742dabafee7f54e1b77148d547e2031d7cc535e (patch) | |
| tree | 5aab3c9c4b9aca10d190a7efa600afb8c7aef213 /scene/gui/popup_menu.cpp | |
| parent | 01afc442c73661df677c2b93f4037a21992ee45b (diff) | |
| download | redot-engine-f742dabafee7f54e1b77148d547e2031d7cc535e.tar.gz | |
Signals: Manually port most of remaining connect_compat uses
It's tedious work...
Some can't be ported as they depend on private or protected methods
of different classes, which is not supported by callable_mp (even if
it's a class inherited by the current one).
Diffstat (limited to 'scene/gui/popup_menu.cpp')
| -rw-r--r-- | scene/gui/popup_menu.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp index 2d2ae7aac1..c80a8b5f03 100644 --- a/scene/gui/popup_menu.cpp +++ b/scene/gui/popup_menu.cpp @@ -29,6 +29,7 @@ /*************************************************************************/ #include "popup_menu.h" + #include "core/os/input.h" #include "core/os/keyboard.h" #include "core/os/os.h" @@ -1233,7 +1234,7 @@ void PopupMenu::_ref_shortcut(Ref<ShortCut> p_sc) { if (!shortcut_refcount.has(p_sc)) { shortcut_refcount[p_sc] = 1; - p_sc->connect_compat("changed", this, "update"); + p_sc->connect("changed", callable_mp((CanvasItem *)this, &CanvasItem::update)); } else { shortcut_refcount[p_sc] += 1; } @@ -1244,7 +1245,7 @@ void PopupMenu::_unref_shortcut(Ref<ShortCut> p_sc) { ERR_FAIL_COND(!shortcut_refcount.has(p_sc)); shortcut_refcount[p_sc]--; if (shortcut_refcount[p_sc] == 0) { - p_sc->disconnect_compat("changed", this, "update"); + p_sc->disconnect("changed", callable_mp((CanvasItem *)this, &CanvasItem::update)); shortcut_refcount.erase(p_sc); } } |
