Make wxDataViewCtrlBase::CreateDataObject() static

This function doesn't need to be virtual as it's not meant to be
overridden in, but just called from the derived classes. In fact, it
doesn't even have to be a member function at all, but leave it in the
class for now to avoid having to create a new header just for it, but
make it static.

Also add a comment explaining what is it for and what it does.
This commit is contained in:
Vadim Zeitlin
2021-12-10 19:31:24 +01:00
parent cd555f9ff5
commit 352923dc8d
2 changed files with 5 additions and 2 deletions

View File

@@ -806,11 +806,13 @@ protected:
virtual void DoSetIndent() = 0;
#if wxUSE_DRAG_AND_DROP
virtual wxDataObject* CreateDataObject(const wxVector<wxDataFormat>& formats);
// Helper function which can be used by DoEnableDropTarget() implementations
// in the derived classes: return a composite data object supporting the
// given formats or null if the vector is empty.
static wxDataObject* CreateDataObject(const wxVector<wxDataFormat>& formats);
virtual bool DoEnableDropTarget(const wxVector<wxDataFormat>& WXUNUSED(formats))
{ return false; }
#endif // wxUSE_DRAG_AND_DROP
// Just expand this item assuming it is already shown, i.e. its parent has