added AddText() function (trivial wrapper around AddFile()), use it in debug rpt preview
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33452 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -258,6 +258,21 @@ void wxDebugReport::AddFile(const wxString& name, const wxString& description)
|
||||
m_descriptions.Add(description);
|
||||
}
|
||||
|
||||
bool
|
||||
wxDebugReport::AddText(const wxString& name,
|
||||
const wxString& text,
|
||||
const wxString& description)
|
||||
{
|
||||
wxFileName fn(GetDirectory(), name);
|
||||
wxFFile file(fn.GetFullPath(), _T("w"));
|
||||
if ( !file.IsOpened() || !file.Write(text) )
|
||||
return false;
|
||||
|
||||
AddFile(name, description);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void wxDebugReport::RemoveFile(const wxString& name)
|
||||
{
|
||||
const int n = m_files.Index(name);
|
||||
|
Reference in New Issue
Block a user