diff options
author | Neil <nyamatongwe@gmail.com> | 2021-03-17 13:34:55 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2021-03-17 13:34:55 +1100 |
commit | 7fbe52f835688967a6079582ed8839cb55d0f9ea (patch) | |
tree | 0dc8c1b28dd541c84c7dd10114618be930a0afdd | |
parent | 907c32f8149ec13c39c90424cfed018b2b1eac87 (diff) | |
download | scintilla-mirror-7fbe52f835688967a6079582ed8839cb55d0f9ea.tar.gz |
Make Window argument to Menu::Show const as that avoids warnings and the Window
is not altered by showing a menu.
-rw-r--r-- | cocoa/PlatCocoa.mm | 2 | ||||
-rwxr-xr-x | gtk/PlatGTK.cxx | 2 | ||||
-rw-r--r-- | qt/ScintillaEditBase/PlatQt.cpp | 2 | ||||
-rw-r--r-- | src/Platform.h | 2 | ||||
-rw-r--r-- | win32/PlatWin.cxx | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/cocoa/PlatCocoa.mm b/cocoa/PlatCocoa.mm index eb7a93ef1..be9ee23cd 100644 --- a/cocoa/PlatCocoa.mm +++ b/cocoa/PlatCocoa.mm @@ -2032,7 +2032,7 @@ void Menu::Destroy() noexcept { //-------------------------------------------------------------------------------------------------- -void Menu::Show(Point, Window &) { +void Menu::Show(Point, const Window &) { // Cocoa menus are handled a bit differently. We only create the menu. The framework // takes care to show it properly. } diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx index e3820aec4..b9b9ab029 100755 --- a/gtk/PlatGTK.cxx +++ b/gtk/PlatGTK.cxx @@ -1930,7 +1930,7 @@ static void MenuPositionFunc(GtkMenu *, gint *x, gint *y, gboolean *, gpointer u } #endif -void Menu::Show(Point pt, Window &w) { +void Menu::Show(Point pt, const Window &w) { GtkMenu *widget = static_cast<GtkMenu *>(mid); gtk_widget_show_all(GTK_WIDGET(widget)); #if GTK_CHECK_VERSION(3,22,0) diff --git a/qt/ScintillaEditBase/PlatQt.cpp b/qt/ScintillaEditBase/PlatQt.cpp index 4bdd04778..9ea1d88f5 100644 --- a/qt/ScintillaEditBase/PlatQt.cpp +++ b/qt/ScintillaEditBase/PlatQt.cpp @@ -1125,7 +1125,7 @@ void Menu::Destroy() noexcept } mid = nullptr; } -void Menu::Show(Point pt, Window & /*w*/) +void Menu::Show(Point pt, const Window & /*w*/) { QMenu *menu = static_cast<QMenu *>(mid); menu->exec(QPoint(pt.x, pt.y)); diff --git a/src/Platform.h b/src/Platform.h index 0ea086393..778c9a810 100644 --- a/src/Platform.h +++ b/src/Platform.h @@ -317,7 +317,7 @@ public: MenuID GetID() const noexcept { return mid; } void CreatePopUp(); void Destroy() noexcept; - void Show(Point pt, Window &w); + void Show(Point pt, const Window &w); }; #if defined(__clang__) diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx index b73e7145e..63c5a30ab 100644 --- a/win32/PlatWin.cxx +++ b/win32/PlatWin.cxx @@ -3404,7 +3404,7 @@ void Menu::Destroy() noexcept { mid = 0; } -void Menu::Show(Point pt, Window &w) { +void Menu::Show(Point pt, const Window &w) { ::TrackPopupMenu(static_cast<HMENU>(mid), TPM_RIGHTBUTTON, static_cast<int>(pt.x - 4), static_cast<int>(pt.y), 0, HwndFromWindow(w), nullptr); |