Convert wxFSW_EVENT_{WARNING,ERROR} to string correctly.
Previously these types were not handled at all, resulting in asserts. See #14834. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72986 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -537,6 +537,10 @@ static wxString GetFSWEventChangeTypeName(int changeType)
|
|||||||
return "ACCESS";
|
return "ACCESS";
|
||||||
case wxFSW_EVENT_ATTRIB: // Currently this is wxGTK-only
|
case wxFSW_EVENT_ATTRIB: // Currently this is wxGTK-only
|
||||||
return "ATTRIBUTE";
|
return "ATTRIBUTE";
|
||||||
|
case wxFSW_EVENT_WARNING:
|
||||||
|
return "WARNING";
|
||||||
|
case wxFSW_EVENT_ERROR:
|
||||||
|
return "ERROR";
|
||||||
}
|
}
|
||||||
|
|
||||||
return "INVALID_TYPE";
|
return "INVALID_TYPE";
|
||||||
|
@@ -42,6 +42,10 @@ static wxString GetFSWEventChangeTypeName(int type)
|
|||||||
return "ACCESS";
|
return "ACCESS";
|
||||||
case wxFSW_EVENT_ATTRIB: // Currently this is wxGTK-only
|
case wxFSW_EVENT_ATTRIB: // Currently this is wxGTK-only
|
||||||
return "ATTRIBUTE";
|
return "ATTRIBUTE";
|
||||||
|
case wxFSW_EVENT_WARNING:
|
||||||
|
return "WARNING";
|
||||||
|
case wxFSW_EVENT_ERROR:
|
||||||
|
return "ERROR";
|
||||||
}
|
}
|
||||||
|
|
||||||
// should never be reached!
|
// should never be reached!
|
||||||
|
@@ -261,7 +261,7 @@ protected:
|
|||||||
// check out for error/warning condition
|
// check out for error/warning condition
|
||||||
if (flags & wxFSW_EVENT_WARNING || flags & wxFSW_EVENT_ERROR)
|
if (flags & wxFSW_EVENT_WARNING || flags & wxFSW_EVENT_ERROR)
|
||||||
{
|
{
|
||||||
wxString errMsg = GetErrorDescription(Watcher2NativeFlags(flags));
|
wxString errMsg = GetErrorDescription(nativeFlags);
|
||||||
wxFileSystemWatcherEvent event(flags, errMsg);
|
wxFileSystemWatcherEvent event(flags, errMsg);
|
||||||
SendEvent(event);
|
SendEvent(event);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user