Remove MSVC6 support.
Don't support this compiler any more, this allows to get rid of tons of MSVC6-specific workarounds, in particular we can now use Bind() and natural template functions calls in the library code. Also remove MSVC6 project and solution files and don't generate them when bakefile_gen is ran any more (removing the remaining occurrences of msvc6prj from the bakefiles results in weird bake-time errors, so it's simpler to just leave them there). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76532 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -36,13 +36,8 @@ public:
|
||||
};
|
||||
|
||||
typedef void (wxEvtHandler::*MyEventFunction)(MyEvent&);
|
||||
#ifndef wxHAS_EVENT_BIND
|
||||
#define MyEventHandler(func) wxEVENT_HANDLER_CAST(MyEventFunction, func)
|
||||
#else
|
||||
#define MyEventHandler(func) &func
|
||||
#endif
|
||||
#define EVT_MYEVENT(func) \
|
||||
wx__DECLARE_EVT0(MyEventType, MyEventHandler(func))
|
||||
wx__DECLARE_EVT0(MyEventType, &func)
|
||||
|
||||
class AnotherEvent : public wxEvent
|
||||
{
|
||||
@@ -136,9 +131,7 @@ BEGIN_EVENT_TABLE(MyClassWithEventTable, wxEvtHandler)
|
||||
EVT_IDLE(MyClassWithEventTable::OnIdle)
|
||||
|
||||
EVT_MYEVENT(MyClassWithEventTable::OnMyEvent)
|
||||
#ifdef wxHAS_EVENT_BIND
|
||||
EVT_MYEVENT(MyClassWithEventTable::OnEvent)
|
||||
#endif
|
||||
|
||||
// this shouldn't compile:
|
||||
//EVT_MYEVENT(MyClassWithEventTable::OnIdle)
|
||||
@@ -163,7 +156,6 @@ private:
|
||||
CPPUNIT_TEST( LegacyConnect );
|
||||
CPPUNIT_TEST( DisconnectWildcard );
|
||||
CPPUNIT_TEST( AutoDisconnect );
|
||||
#ifdef wxHAS_EVENT_BIND
|
||||
CPPUNIT_TEST( BindFunction );
|
||||
CPPUNIT_TEST( BindStaticMethod );
|
||||
CPPUNIT_TEST( BindFunctor );
|
||||
@@ -172,14 +164,12 @@ private:
|
||||
CPPUNIT_TEST( BindFunctionUsingBaseEvent );
|
||||
CPPUNIT_TEST( BindNonHandler );
|
||||
CPPUNIT_TEST( InvalidBind );
|
||||
#endif // wxHAS_EVENT_BIND
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
|
||||
void BuiltinConnect();
|
||||
void LegacyConnect();
|
||||
void DisconnectWildcard();
|
||||
void AutoDisconnect();
|
||||
#ifdef wxHAS_EVENT_BIND
|
||||
void BindFunction();
|
||||
void BindStaticMethod();
|
||||
void BindFunctor();
|
||||
@@ -188,7 +178,6 @@ private:
|
||||
void BindFunctionUsingBaseEvent();
|
||||
void BindNonHandler();
|
||||
void InvalidBind();
|
||||
#endif // wxHAS_EVENT_BIND
|
||||
|
||||
|
||||
// these member variables exceptionally don't use "m_" prefix because
|
||||
@@ -218,7 +207,6 @@ void EvtHandlerTestCase::BuiltinConnect()
|
||||
handler.Connect(wxEVT_IDLE, (wxObjectEventFunction)(wxEventFunction)&MyHandler::OnIdle);
|
||||
handler.Disconnect(wxEVT_IDLE, (wxObjectEventFunction)(wxEventFunction)&MyHandler::OnIdle);
|
||||
|
||||
#ifdef wxHAS_EVENT_BIND
|
||||
handler.Bind(wxEVT_IDLE, GlobalOnIdle);
|
||||
handler.Unbind(wxEVT_IDLE, GlobalOnIdle);
|
||||
|
||||
@@ -231,7 +219,6 @@ void EvtHandlerTestCase::BuiltinConnect()
|
||||
|
||||
handler.Bind(wxEVT_IDLE, &MyHandler::StaticOnIdle);
|
||||
handler.Unbind(wxEVT_IDLE, &MyHandler::StaticOnIdle);
|
||||
#endif // wxHAS_EVENT_BIND
|
||||
}
|
||||
|
||||
void EvtHandlerTestCase::LegacyConnect()
|
||||
@@ -279,8 +266,6 @@ void EvtHandlerTestCase::AutoDisconnect()
|
||||
CPPUNIT_ASSERT(!source.Disconnect(wxID_ANY, wxEVT_IDLE));
|
||||
}
|
||||
|
||||
#ifdef wxHAS_EVENT_BIND
|
||||
|
||||
void EvtHandlerTestCase::BindFunction()
|
||||
{
|
||||
// function tests
|
||||
@@ -474,5 +459,3 @@ void EvtHandlerTestCase::InvalidBind()
|
||||
myHandler.Bind(MyEventType, &MyHandler::OnMyEvent, &mySink);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif // wxHAS_EVENT_BIND
|
||||
|
Reference in New Issue
Block a user