Fix wxGTK wxHyperlinkCtrl compilation problem with g++ 5.2

Make wxHyperlinkCtrl ctors non-inline to work around an error about incomplete
wxHyperlinkCtrlColData in the inline ctor body with this compiler (but not
with g++ 4.9 nor 5.3, somehow).

Closes #17089.
This commit is contained in:
Vadim Zeitlin
2016-03-07 19:41:58 +01:00
parent 6ac52b3bab
commit 6f80021950
2 changed files with 21 additions and 9 deletions

View File

@@ -27,22 +27,18 @@ class WXDLLIMPEXP_ADV wxHyperlinkCtrl : public wxGenericHyperlinkCtrl
{
typedef wxGenericHyperlinkCtrl base_type;
public:
// Default constructor (for two-step construction).
wxHyperlinkCtrl() { }
// Constructor.
// Constructors (notice that they can't be defined inline for this class
// because of m_colData which uses incomplete wxHyperlinkCtrlColData).
wxHyperlinkCtrl();
wxHyperlinkCtrl(wxWindow *parent,
wxWindowID id,
const wxString& label, const wxString& url,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxHL_DEFAULT_STYLE,
const wxString& name = wxHyperlinkCtrlNameStr)
{
(void)Create(parent, id, label, url, pos, size, style, name);
}
const wxString& name = wxHyperlinkCtrlNameStr);
~wxHyperlinkCtrl();
virtual ~wxHyperlinkCtrl();
// Creation function (for two-step construction).
bool Create(wxWindow *parent,

View File

@@ -110,6 +110,22 @@ public:
// wxHyperlinkCtrl
// ----------------------------------------------------------------------------
wxHyperlinkCtrl::wxHyperlinkCtrl()
{
}
wxHyperlinkCtrl::wxHyperlinkCtrl(wxWindow *parent,
wxWindowID id,
const wxString& label,
const wxString& url,
const wxPoint& pos,
const wxSize& size,
long style,
const wxString& name)
{
(void)Create(parent, id, label, url, pos, size, style, name);
}
wxHyperlinkCtrl::~wxHyperlinkCtrl()
{
#ifndef __WXGTK3__