X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5e6e278dc129b31a0aa3ce5d9eda41c0dc5e1fe7..c29c95fe24973b94fd724db767193171ca7c513d:/interface/wx/debugrpt.h?ds=sidebyside diff --git a/interface/wx/debugrpt.h b/interface/wx/debugrpt.h index 7a3a73b9d7..77686c1ded 100644 --- a/interface/wx/debugrpt.h +++ b/interface/wx/debugrpt.h @@ -3,7 +3,7 @@ // Purpose: interface of wxDebugReport* // Author: wxWidgets team // RCS-ID: $Id$ -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// /** @@ -67,6 +67,44 @@ public: */ wxDebugReportCompress(); + /** + Set the directory where the debug report should be generated. + + By default, the debug report is generated under user temporary files + directory. This is usually fine if it is meant to be processed in some + way (e.g. automatically uploaded to a remote server) but if the user is + asked to manually upload or send the report, it may be more convenient + to generate it in e.g. the users home directory and this function + allows to do this. + + Notice that it should be called before wxDebugReport::Process() or it + has no effect. + + @param dir + The full path to an existing directory where the debug report file + should be generated. + + @since 2.9.1 + */ + void SetCompressedFileDirectory(const wxString& dir); + + /** + Set the base name of the generated debug report file. + + This function is similar to SetCompressedFileDirectory() but allows to + change the base name of the file. Notice that the file extension will + always be @c .zip. + + By default, a unique name constructed from wxApp::GetAppName(), the + current process id and the current date and time is used. + + @param name + The base name (i.e. without extension) of the file. + + @since 2.9.1 + */ + void SetCompressedFileBaseName(const wxString& name); + /** Returns the full path of the compressed file (empty if creation failed). @@ -182,9 +220,11 @@ public: /** Add another file to the report. If @a filename is an absolute path, it is copied to a file in the debug report directory with the same name. - Otherwise the file should already exist in this directory - @a description only exists to be displayed to the user in the report - summary shown by wxDebugReportPreview. + Otherwise the file will be searched in the temporary directory returned + by GetDirectory(). + + The argument @a description only exists to be displayed to the user in + the report summary shown by wxDebugReportPreview. @see GetDirectory(), AddText() */ @@ -213,7 +253,7 @@ public: /** Retrieves the name (relative to GetDirectory()) and the description of the file with the given index. If @a n is greater than or equal to the - number of filse, @false is returned. + number of files, then @false is returned. */ bool GetFile(size_t n, wxString* name, wxString* desc) const;