From 6ad64a5d692e49c7da05124d1679f6faa4b0e558 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 16 Sep 2016 01:34:32 +0200 Subject: [PATCH] Make wxTreeEvent::GetToolTip() const This is not very important because this function is only used by wxWidgets itself but it's still wrong to have a non-const trivial accessor like this. See #17661. --- include/wx/treebase.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/wx/treebase.h b/include/wx/treebase.h index f7513bb2ab..3c75616d22 100644 --- a/include/wx/treebase.h +++ b/include/wx/treebase.h @@ -229,9 +229,9 @@ public: bool IsEditCancelled() const { return m_editCancelled; } void SetEditCanceled(bool editCancelled) { m_editCancelled = editCancelled; } - // Set the tooltip for the item (for EVT\_TREE\_ITEM\_GETTOOLTIP events) + // Set the tooltip for the item (for EVT_TREE_ITEM_GETTOOLTIP events) void SetToolTip(const wxString& toolTip) { m_label = toolTip; } - wxString GetToolTip() { return m_label; } + wxString GetToolTip() const { return m_label; } private: // not all of the members are used (or initialized) for all events