From 3fb84dfc0cac56d184a894e9ec819d91e4319605 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 20 Jan 2019 03:19:32 +0100 Subject: [PATCH] Make wxToolBar::GetQToolBar() non-virtual and mark it as private This method has no reason to be virtual. Also move it to the end of the class public section and document that it's not part of the public API. See https://github.com/wxWidgets/wxWidgets/pull/1140 --- include/wx/qt/toolbar.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/wx/qt/toolbar.h b/include/wx/qt/toolbar.h index c3978ce42c..6b3c38e42a 100644 --- a/include/wx/qt/toolbar.h +++ b/include/wx/qt/toolbar.h @@ -39,7 +39,6 @@ public: const wxString& name = wxToolBarNameStr); virtual wxToolBarToolBase *FindToolForPosition(wxCoord x, wxCoord y) const wxOVERRIDE; - virtual QToolBar *GetQToolBar() const { return m_qtToolBar; } virtual void SetWindowStyleFlag( long style ) wxOVERRIDE; @@ -62,6 +61,9 @@ public: const wxString& label) wxOVERRIDE; QWidget *GetHandle() const wxOVERRIDE; + // Private, only used by wxFrame. + QToolBar *GetQToolBar() const { return m_qtToolBar; } + protected: QActionGroup* GetActionGroup(size_t pos); virtual bool DoInsertTool(size_t pos, wxToolBarToolBase *tool) wxOVERRIDE;