From 3fc2ee048d6b937017b56104061ad1fff08de09a Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Fri, 24 May 2013 16:05:33 +0000 Subject: [PATCH] Add wxRTTI for the wxFileSystemWatcherEvent class git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74048 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/fswatcher.h | 4 +++- interface/wx/fswatcher.h | 2 +- src/common/fswatchercmn.cpp | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/include/wx/fswatcher.h b/include/wx/fswatcher.h index 964b37bd2a..ebbf146734 100644 --- a/include/wx/fswatcher.h +++ b/include/wx/fswatcher.h @@ -78,7 +78,7 @@ wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_BASE, wxEVT_FSWATCHER, class WXDLLIMPEXP_BASE wxFileSystemWatcherEvent: public wxEvent { public: - wxFileSystemWatcherEvent(int changeType, int watchid = wxID_ANY) : + wxFileSystemWatcherEvent(int changeType = 0, int watchid = wxID_ANY) : wxEvent(watchid, wxEVT_FSWATCHER), m_changeType(changeType) { @@ -179,6 +179,8 @@ protected: wxFileName m_path; wxFileName m_newPath; wxString m_errorMsg; +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxFileSystemWatcherEvent) }; typedef void (wxEvtHandler::*wxFileSystemWatcherEventFunction) diff --git a/interface/wx/fswatcher.h b/interface/wx/fswatcher.h index 5857d69260..fde8902515 100644 --- a/interface/wx/fswatcher.h +++ b/interface/wx/fswatcher.h @@ -157,7 +157,7 @@ public: class wxFileSystemWatcherEvent : public wxEvent { public: - wxFileSystemWatcherEvent(int changeType, int watchid = wxID_ANY); + wxFileSystemWatcherEvent(int changeType = 0, int watchid = wxID_ANY); wxFileSystemWatcherEvent(int changeType, const wxString& errorMsg, int watchid = wxID_ANY); wxFileSystemWatcherEvent(int changeType, diff --git a/src/common/fswatchercmn.cpp b/src/common/fswatchercmn.cpp index 51d9d578f8..a417a82ee7 100644 --- a/src/common/fswatchercmn.cpp +++ b/src/common/fswatchercmn.cpp @@ -62,6 +62,8 @@ static wxString GetFSWEventChangeTypeName(int type) // wxFileSystemWatcherEvent implementation // ============================================================================ +IMPLEMENT_DYNAMIC_CLASS(wxFileSystemWatcherEvent, wxEvent); + wxString wxFileSystemWatcherEvent::ToString() const { return wxString::Format("FSW_EVT type=%d (%s) path='%s'", m_changeType, -- 2.47.2