wxUnivGtk
Nerijus Baliunas <[email protected]>
| Newsgroups | gmane.mail.mahogany.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello,
When building M with wxunivgtk I got these warnings and error:
wxWindows/include/wx/univ/inpcons.h:43: warning: 'class wxInputConsumer' has virtual functions but non-virtual destructor
wxWindows/include/wx/univ/combobox.h:70: warning: 'class wxComboPopup' has virtual functions but non-virtual destructor
.src/modules/HtmlViewer.cpp: In member function 'void HtmlViewer::EmulateKeyPress(int)':
wxWindows/include/wx/univ/window.h:212: error: 'void wxWindow::OnChar(wxKeyEvent&)' is protected
.src/modules/HtmlViewer.cpp:1207: error: within this context
Vadim, could you please apply the attached patch to wxWindows/include/wx?
Regards,
Nerijus
P.S. I get a crash when running M, posting just in case someone wants
to look at it:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1216350528 (LWP 4428)]
0xb7cd0be4 in wxScrollHelper::HandleOnSize (this=0x85127c0)
at ../wxWindows/src/generic/scrlwing.cpp:981
981 wxSize size = m_targetWindow->GetBestVirtualSize();
(gdb) bt
#0 0xb7cd0be4 in wxScrollHelper::HandleOnSize (this=0x85127c0)
at ../wxWindows/src/generic/scrlwing.cpp:981
#1 0xb7cd2bdc in wxScrollHelperEvtHandler::ProcessEvent (this=0x850e9e8, event=@0xbfffee3c)
at ../wxWindows/src/generic/scrlwing.cpp:223
#2 0xb7bf837c in wxTextCtrl::Create (this=0x85125c8, parent=0x850d650, id=-1,
value=@0xbffff05c, pos=@0x83b7200, size=@0x83b7c70, style=2097168, validator=@0x83abb78,
name=@0xbfffef2c) at ../wxWindows/src/univ/textctrl.cpp:740
#3 0x080fb1de in wxTextCtrl (this=0x85125c8, parent=0x850d650, id=-1, value=@0xbffff05c,
pos=@0x83b7200, size=@0x83b7c70, style=2097168, validator=@0x83abb78, name=@0xbfffef2c)
at textctrl.h:92
#4 0xb7bc5f3e in wxComboTextCtrl (this=0x85125c8, combo=0x8512040, value=@0xbffff05c,
style=16, validator=@0x83abb78) at ../wxWindows/src/univ/combobox.cpp:467
#5 0xb7bc60cb in wxComboControl::Create (this=0x8512040, parent=0x850d650, id=4998,
value=@0xbffff05c, pos=@0x83b7200, size=@0x83b7c70, style=134217744,
validator=@0x83abb78, name=@0xbffff0f4) at ../wxWindows/src/univ/combobox.cpp:249
#6 0xb7bc6e3a in wxComboBox::Create (this=0x8512040, parent=0x850d650, id=4998,
value=@0xbffff05c, pos=@0x83b7200, size=@0x83b7c70, n=8, choices=0x851201c, style=16,
validator=@0x83abb78, name=@0xbffff0f4) at ../wxWindows/src/univ/combobox.cpp:704
#7 0xb7bc4765 in wxChoice::Create (this=0x8512040, parent=0x850d650, id=4998,
pos=@0x83b7200, size=@0x83b7c70, n=8, choices=0x851201c, validator=@0x83abb78,
name=@0xbffff0f4) at ../wxWindows/src/univ/choice.cpp:81
#8 0x0815d76b in wxChoice (this=0x8512040, parent=0x850d650, id=4998, pos=@0x83b7200,
size=@0x83b7c70, n=8, choices=0x851201c, style=0, validator=@0x83abb78, name=@0xbffff0f4)
at choice.h:35
#9 0x0815f67b in wxIdentCombo (this=0x8512040, parent=0x850d650, count=8, choices=0x851201c)
at .src/gui/wxMDialogs.cpp:2996
#10 0x0815ac6c in CreateIdentCombo (parent=0x850d650) at .src/gui/wxMDialogs.cpp:3076
#11 0x08160940 in CreateMToolbar (parent=0x84446c8, frameId=WXFRAME_MAIN)
at .src/gui/wxMenuDefs.cpp:755
#12 0x08142db3 in wxMainFrame (this=0x84446c8, iname=@0xbffff25c, parent=0x0)
at .src/gui/wxMainFrame.cpp:627
#13 0x08147fa9 in wxMApp::CreateTopLevelFrame (this=0x83eaf10) at .src/gui/wxMApp.cpp:1177
#14 0x080b6974 in MAppBase::OnStartup (this=0x83eaf74) at .src/classes/MApplication.cpp:597
#15 0x0814a9e9 in wxMApp::OnInit (this=0x83eaf10) at .src/gui/wxMApp.cpp:1085
#16 0x0814d0cc in wxAppConsole::CallOnInit (this=0x83eaf10) at app.h:87
#17 0xb7917adf in wxEntry (argc=@0xbffff450, argv=0xbffff4d4)
at ../wxWindows/src/common/init.cpp:401
#18 0x08147017 in main (argc=1, argv=0xbffff4d4) at .src/gui/wxMApp.cpp:342
univ.diff
(application/octet-stream, 1.3 KB)
diff -u univ.orig/combobox.h univ/combobox.h
--- univ.orig/combobox.h 2005-02-27 15:09:42.000000000 +0200
+++ univ/combobox.h 2005-05-09 03:55:13.836788696 +0300
@@ -87,6 +87,9 @@
protected:
wxComboControl *m_combo;
+
+ // virtual dtor
+ virtual ~wxComboPopup() { }
};
// ----------------------------------------------------------------------------
diff -u univ.orig/inpcons.h univ/inpcons.h
--- univ.orig/inpcons.h 2004-05-25 16:11:20.000000000 +0300
+++ univ/inpcons.h 2005-05-09 03:53:26.076170800 +0300
@@ -76,6 +76,9 @@
// input processor (never deleted, the theme deletes it itself)
wxInputHandler *m_inputHandler;
+
+ // virtual dtor
+ virtual ~wxInputConsumer() { }
};
diff -u univ.orig/window.h univ/window.h
--- univ.orig/window.h 2005-03-18 00:24:34.000000000 +0200
+++ univ/window.h 2005-05-09 03:59:53.380291624 +0300
@@ -110,6 +110,8 @@
// NB: all menu related functions are implemented in menu.cpp
#if wxUSE_MENUS
+ void OnChar(wxKeyEvent& event);
+
virtual bool DoPopupMenu(wxMenu *menu, int x, int y);
// this is wxUniv-specific private method to be used only by wxMenu
@@ -209,7 +211,6 @@
#endif // wxUSE_ACCEL
#if wxUSE_MENUS
- void OnChar(wxKeyEvent& event);
void OnKeyUp(wxKeyEvent& event);
#endif // wxUSE_MENUS