implemented missing copy constructor (needed for non trivial member)
corrected warnings when compiling with -Wall -W git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15429 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
9497b1f716
commit
3475a005d6
@ -187,8 +187,11 @@ private:
|
|||||||
|
|
||||||
class WXDLLEXPORT wxListItem : public wxObject
|
class WXDLLEXPORT wxListItem : public wxObject
|
||||||
{
|
{
|
||||||
|
wxListItem& operator=(const wxListItem& item);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxListItem();
|
wxListItem();
|
||||||
|
wxListItem(const wxListItem& item);
|
||||||
~wxListItem() { delete m_attr; }
|
~wxListItem() { delete m_attr; }
|
||||||
|
|
||||||
// resetting
|
// resetting
|
||||||
@ -361,12 +364,23 @@ class WXDLLEXPORT wxListEvent : public wxNotifyEvent
|
|||||||
public:
|
public:
|
||||||
wxListEvent(wxEventType commandType = wxEVT_NULL, int id = 0)
|
wxListEvent(wxEventType commandType = wxEVT_NULL, int id = 0)
|
||||||
: wxNotifyEvent(commandType, id)
|
: wxNotifyEvent(commandType, id)
|
||||||
{
|
, m_code(0)
|
||||||
m_code = 0;
|
, m_oldItemIndex(0)
|
||||||
m_itemIndex =
|
, m_itemIndex(0)
|
||||||
m_oldItemIndex = 0;
|
, m_col(0)
|
||||||
m_col = 0;
|
, m_pointDrag()
|
||||||
}
|
, m_item()
|
||||||
|
{ }
|
||||||
|
|
||||||
|
wxListEvent(const wxListEvent& event)
|
||||||
|
: wxNotifyEvent(event)
|
||||||
|
, m_code(event.m_code)
|
||||||
|
, m_oldItemIndex(event.m_oldItemIndex)
|
||||||
|
, m_itemIndex(event.m_itemIndex)
|
||||||
|
, m_col(event.m_col)
|
||||||
|
, m_pointDrag(event.m_pointDrag)
|
||||||
|
, m_item(event.m_item)
|
||||||
|
{ }
|
||||||
|
|
||||||
int GetCode() const { return m_code; }
|
int GetCode() const { return m_code; }
|
||||||
long GetIndex() const { return m_itemIndex; }
|
long GetIndex() const { return m_itemIndex; }
|
||||||
|
@ -4499,6 +4499,24 @@ wxListItem::wxListItem()
|
|||||||
Clear();
|
Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wxListItem::wxListItem(const wxListItem& item)
|
||||||
|
: wxObject()
|
||||||
|
, m_mask(item.m_mask)
|
||||||
|
, m_itemId(item.m_itemId)
|
||||||
|
, m_col(item.m_col)
|
||||||
|
, m_state(item.m_state)
|
||||||
|
, m_stateMask(item.m_stateMask)
|
||||||
|
, m_text(item.m_text)
|
||||||
|
, m_image(item.m_image)
|
||||||
|
, m_data(item.m_data)
|
||||||
|
, m_format(item.m_format)
|
||||||
|
, m_width(item.m_width)
|
||||||
|
, m_attr(NULL)
|
||||||
|
{
|
||||||
|
// copy list item attributes
|
||||||
|
m_attr = new wxListItemAttr(*item.GetAttributes());
|
||||||
|
}
|
||||||
|
|
||||||
void wxListItem::Clear()
|
void wxListItem::Clear()
|
||||||
{
|
{
|
||||||
m_mask = 0;
|
m_mask = 0;
|
||||||
@ -5099,7 +5117,7 @@ bool wxListCtrl::SortItems( wxListCtrlCompare fn, long data )
|
|||||||
// event handlers
|
// event handlers
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
void wxListCtrl::OnSize(wxSizeEvent& event)
|
void wxListCtrl::OnSize(wxSizeEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
if ( !m_mainWin )
|
if ( !m_mainWin )
|
||||||
return;
|
return;
|
||||||
@ -5243,19 +5261,19 @@ void wxListCtrl::SetFocus()
|
|||||||
// virtual list control support
|
// virtual list control support
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
wxString wxListCtrl::OnGetItemText(long item, long col) const
|
wxString wxListCtrl::OnGetItemText(long WXUNUSED(item), long WXUNUSED(col)) const
|
||||||
{
|
{
|
||||||
// this is a pure virtual function, in fact - which is not really pure
|
// this is a pure virtual function, in fact - which is not really pure
|
||||||
// because the controls which are not virtual don't need to implement it
|
// because the controls which are not virtual don't need to implement it
|
||||||
wxFAIL_MSG( _T("not supposed to be called") );
|
wxFAIL_MSG( _T("wxListCtrl::OnGetItemText not supposed to be called") );
|
||||||
|
|
||||||
return wxEmptyString;
|
return wxEmptyString;
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxListCtrl::OnGetItemImage(long item) const
|
int wxListCtrl::OnGetItemImage(long WXUNUSED(item)) const
|
||||||
{
|
{
|
||||||
// same as above
|
// same as above
|
||||||
wxFAIL_MSG( _T("not supposed to be called") );
|
wxFAIL_MSG( _T("wxListCtrl::OnGetItemImage not supposed to be called") );
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user