wxWidgets/include/wx/qt/msgdlg.h
Mariano Reingart 9f009d128f Fix SIGSEGV due bad pointer in wxMessageDialog (wxQT)
m_qtWindow should be used instead of m_qtMessageBox (removed). If not, PostCreation() cannot call wxMessageDialog::GetHandle() as it is virtual (and it is called from the ctor), so it fails to set the base window pointer, raising a SIGSEGV in wxWindow::DoSetSize (for more info, see architecture in docs)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78312 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-24 19:19:27 +00:00

32 lines
943 B
C++

/////////////////////////////////////////////////////////////////////////////
// Name: wx/qt/msgdlg.h
// Author: Peter Most, Javier Torres
// Copyright: (c) Peter Most, Javier Torres
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_QT_MSGDLG_H_
#define _WX_QT_MSGDLG_H_
#include "wx/msgdlg.h"
#include <QtWidgets/QMessageBox>
class WXDLLIMPEXP_CORE wxMessageDialog : public wxMessageDialogBase
{
public:
wxMessageDialog(wxWindow *parent, const wxString& message,
const wxString& caption = wxMessageBoxCaptionStr,
long style = wxOK|wxCENTRE,
const wxPoint& pos = wxDefaultPosition);
virtual ~wxMessageDialog();
// Reimplemented to translate return codes from Qt to wx
virtual int ShowModal();
virtual QMessageBox *GetHandle() const;
};
#endif // _WX_QT_MSGDLG_H_