summaryrefslogtreecommitdiff
path: root/indra/llui/llfolderviewmodel.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/llfolderviewmodel.h')
-rw-r--r--indra/llui/llfolderviewmodel.h18
1 files changed, 6 insertions, 12 deletions
diff --git a/indra/llui/llfolderviewmodel.h b/indra/llui/llfolderviewmodel.h
index 093e213be3..c5e027d314 100644
--- a/indra/llui/llfolderviewmodel.h
+++ b/indra/llui/llfolderviewmodel.h
@@ -172,7 +172,7 @@ public:
virtual BOOL removeItem() = 0;
virtual void removeBatch(std::vector<LLFolderViewModelItem*>& batch) = 0;
- virtual BOOL isItemCopyable() const = 0;
+ virtual bool isItemCopyable(bool can_copy_as_link = true) const = 0;
virtual BOOL copyToClipboard() const = 0;
virtual BOOL cutToClipboard() = 0;
virtual bool isCutToClipboard() { return false; };
@@ -419,21 +419,15 @@ public:
mFilter(filter)
{}
- virtual ~LLFolderViewModel()
- {
- delete mSorter;
- mSorter = NULL;
- delete mFilter;
- mFilter = NULL;
- }
+ virtual ~LLFolderViewModel() {}
virtual SortType& getSorter() { return *mSorter; }
virtual const SortType& getSorter() const { return *mSorter; }
- virtual void setSorter(const SortType& sorter) { mSorter = new SortType(sorter); requestSortAll(); }
+ virtual void setSorter(const SortType& sorter) { mSorter.reset(new SortType(sorter)); requestSortAll(); }
virtual FilterType& getFilter() { return *mFilter; }
virtual const FilterType& getFilter() const { return *mFilter; }
- virtual void setFilter(const FilterType& filter) { mFilter = new FilterType(filter); }
+ virtual void setFilter(const FilterType& filter) { mFilter.reset(new FilterType(filter)); }
// By default, we assume the content is available. If a network fetch mechanism is implemented for the model,
// this method needs to be overloaded and return the relevant fetch status.
@@ -471,8 +465,8 @@ public:
}
protected:
- SortType* mSorter;
- FilterType* mFilter;
+ std::unique_ptr<SortType> mSorter;
+ std::unique_ptr<FilterType> mFilter;
};
#endif // LLFOLDERVIEWMODEL_H