From f73fb6424bd5712dcd96820726de7997ebc2f6f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Mon, 6 Jan 2020 12:14:13 -0500 Subject: [PATCH] Const qualify copy --- indra/llui/lleditmenuhandler.h | 2 +- indra/llui/lllineeditor.cpp | 2 +- indra/llui/lllineeditor.h | 2 +- indra/llui/llscrolllistctrl.cpp | 2 +- indra/llui/llscrolllistctrl.h | 2 +- indra/llui/lltexteditor.cpp | 2 +- indra/llui/lltexteditor.h | 6 +++--- indra/newview/llfolderview.cpp | 2 +- indra/newview/llfolderview.h | 2 +- indra/newview/llviewermedia.cpp | 2 +- indra/newview/llviewermedia.h | 2 +- 11 files changed, 13 insertions(+), 13 deletions(-) diff --git a/indra/llui/lleditmenuhandler.h b/indra/llui/lleditmenuhandler.h index d72283cd9..966ab352e 100644 --- a/indra/llui/lleditmenuhandler.h +++ b/indra/llui/lleditmenuhandler.h @@ -49,7 +49,7 @@ public: virtual void cut() {}; virtual BOOL canCut() const { return FALSE; } - virtual void copy() {}; + virtual void copy() const {}; virtual BOOL canCopy() const { return FALSE; } virtual void paste() {}; diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp index 189317342..dd2954c11 100644 --- a/indra/llui/lllineeditor.cpp +++ b/indra/llui/lllineeditor.cpp @@ -1119,7 +1119,7 @@ BOOL LLLineEditor::canCopy() const // copy selection to clipboard -void LLLineEditor::copy() +void LLLineEditor::copy() const { if( canCopy() ) { diff --git a/indra/llui/lllineeditor.h b/indra/llui/lllineeditor.h index 440407cd8..ec002a452 100644 --- a/indra/llui/lllineeditor.h +++ b/indra/llui/lllineeditor.h @@ -107,7 +107,7 @@ public: virtual void cut(); virtual BOOL canCut() const; - virtual void copy(); + void copy() const override final; virtual BOOL canCopy() const; virtual void paste(); diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index 72c61f819..76b7cfc21 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -2874,7 +2874,7 @@ LLView* LLScrollListCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFac // LLEditMenuHandler functions // virtual -void LLScrollListCtrl::copy() +void LLScrollListCtrl::copy() const { std::string buffer; for (auto item : getAllSelected()) diff --git a/indra/llui/llscrolllistctrl.h b/indra/llui/llscrolllistctrl.h index cda539b53..aa9ec150a 100644 --- a/indra/llui/llscrolllistctrl.h +++ b/indra/llui/llscrolllistctrl.h @@ -322,7 +322,7 @@ public: virtual void scrollToShowSelected(); // LLEditMenuHandler functions - virtual void copy(); + void copy() const override final; virtual BOOL canCopy() const; virtual void cut(); virtual BOOL canCut() const; diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index b78051a5e..826821bf2 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -2216,7 +2216,7 @@ BOOL LLTextEditor::canCopy() const } // copy selection to clipboard -void LLTextEditor::copy(bool raw) +void LLTextEditor::copy(bool raw) const { if( !canCopy() ) { diff --git a/indra/llui/lltexteditor.h b/indra/llui/lltexteditor.h index 692e43147..6ce91abb7 100644 --- a/indra/llui/lltexteditor.h +++ b/indra/llui/lltexteditor.h @@ -129,9 +129,9 @@ public: virtual BOOL canRedo() const; virtual void cut(); virtual BOOL canCut() const; - void copy(bool raw); - void copyRaw() { copy(true); } - virtual void copy() { copy(false); } + void copy(bool raw) const; + void copyRaw() const { copy(true); } + void copy() const override final { copy(false); } virtual BOOL canCopy() const; virtual void paste(); virtual BOOL canPaste() const; diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index a8223bec4..eff97ca85 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -1333,7 +1333,7 @@ BOOL LLFolderView::canCopy() const } // copy selected item -void LLFolderView::copy() +void LLFolderView::copy() const { // *NOTE: total hack to clear the inventory clipboard LLInventoryClipboard::instance().reset(); diff --git a/indra/newview/llfolderview.h b/indra/newview/llfolderview.h index 848787632..a0a41f44e 100644 --- a/indra/newview/llfolderview.h +++ b/indra/newview/llfolderview.h @@ -191,7 +191,7 @@ public: // Copy & paste virtual BOOL canCopy() const; - virtual void copy(); + virtual void copy() const override final; virtual BOOL canCut() const; virtual void cut(); diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 9676acf0c..55faa3479 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -3529,7 +3529,7 @@ LLViewerMediaImpl::canCut() const //////////////////////////////////////////////////////////////////////////////// // virtual void -LLViewerMediaImpl::copy() +LLViewerMediaImpl::copy() const { LLPluginClassMedia* mMediaSource = getMediaPlugin(); if (mMediaSource) diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index 14dc08fae..400bbd175 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -339,7 +339,7 @@ public: /*virtual*/ void cut() override; /*virtual*/ BOOL canCut() const override; - /*virtual*/ void copy() override; + /*virtual*/ void copy() const override final; /*virtual*/ BOOL canCopy() const override; /*virtual*/ void paste() override;