diff --git a/src/ProjectFileIO.cpp b/src/ProjectFileIO.cpp index f9fec8a38..4a17ba5de 100644 --- a/src/ProjectFileIO.cpp +++ b/src/ProjectFileIO.cpp @@ -19,6 +19,7 @@ Paul Licameli split from AudacityProject.cpp #include #include "ActiveProjects.h" +#include "CodeConversions.h" #include "DBConnection.h" #include "Project.h" #include "ProjectFileIORegistry.h" @@ -2316,7 +2317,8 @@ void ProjectFileIO::ShowError(wxWindow *parent, const TranslatableString &message, const wxString &helpPage) { - ShowExceptionDialog(parent, dlogTitle, message, helpPage, true, GetLastLog()); + ShowExceptionDialog(parent, dlogTitle, message, helpPage, true, + audacity::ToWString(GetLastLog())); } const TranslatableString &ProjectFileIO::GetLastError() const diff --git a/src/ProjectFileManager.cpp b/src/ProjectFileManager.cpp index 3d90ac14a..df1c4b09c 100644 --- a/src/ProjectFileManager.cpp +++ b/src/ProjectFileManager.cpp @@ -17,6 +17,7 @@ Paul Licameli split from AudacityProject.cpp #endif #include +#include "CodeConversions.h" #include "Legacy.h" #include "PlatformCompatibility.h" #include "Project.h" @@ -776,7 +777,7 @@ bool ProjectFileManager::OpenNewProject() XO("Error opening a new empty project"), "FAQ:Errors_opening_a_new_empty_project", true, - projectFileIO.GetLastLog()); + audacity::ToWString(projectFileIO.GetLastLog())); } return bOK; } diff --git a/src/widgets/ErrorDialog.cpp b/src/widgets/ErrorDialog.cpp index 3458922ba..a167401b4 100644 --- a/src/widgets/ErrorDialog.cpp +++ b/src/widgets/ErrorDialog.cpp @@ -33,6 +33,7 @@ #include #include "../AllThemeResources.h" +#include "CodeConversions.h" #include "../ShuttleGui.h" #include "../HelpText.h" #include "../Prefs.h" @@ -53,7 +54,7 @@ ErrorDialog::ErrorDialog( const TranslatableString & dlogTitle, const TranslatableString & message, const ManualPageID & helpPage, - const wxString & log, + const std::wstring & log, const bool Close, const bool modal) : wxDialogWrapper(parent, wxID_ANY, dlogTitle, wxDefaultPosition, wxDefaultSize, @@ -155,7 +156,7 @@ void ShowErrorDialog(wxWindow *parent, const TranslatableString &message, const ManualPageID &helpPage, const bool Close, - const wxString &log) + const std::wstring &log) { ErrorDialog dlog(parent, dlogTitle, message, helpPage, log, Close); dlog.CentreOnParent(); @@ -169,9 +170,11 @@ void ShowExceptionDialog( const wxString& log) { #ifndef HAS_SENTRY_REPORTING - ShowErrorDialog(parent, dlogTitle, message, helpPage, Close, log); + ShowErrorDialog(parent, dlogTitle, message, helpPage, Close, + audacity::ToWString(log)); #else - ShowErrorReportDialog(parent, dlogTitle, message, helpPage, log); + ShowErrorReportDialog(parent, dlogTitle, message, helpPage, + audacity::ToWString(log)); #endif // !HAS_SENTRY_REPORTING } @@ -181,7 +184,7 @@ void ShowModelessErrorDialog(wxWindow *parent, const TranslatableString &message, const ManualPageID &helpPage, const bool Close, - const wxString &log) + const std::wstring &log) { // ensure it has some parent. if( !parent ) diff --git a/src/widgets/ErrorDialog.h b/src/widgets/ErrorDialog.h index 77b7c35ee..ce5b69a65 100644 --- a/src/widgets/ErrorDialog.h +++ b/src/widgets/ErrorDialog.h @@ -14,6 +14,7 @@ +#include #include #include // to inherit #include "wxPanelWrapper.h" // to inherit @@ -29,7 +30,7 @@ public: const TranslatableString & dlogTitle, const TranslatableString & message, const ManualPageID & helpPage, - const wxString & log, + const std::wstring & log, const bool Close = true, const bool modal = true); virtual ~ErrorDialog(){} @@ -52,7 +53,7 @@ void ShowErrorDialog(wxWindow *parent, const TranslatableString &message, const ManualPageID &helpPage, bool Close = true, - const wxString &log = {}); + const std::wstring &log = {}); /// Displays an error dialog, possibly allowing to send error report. AUDACITY_DLL_API @@ -67,7 +68,7 @@ void ShowModelessErrorDialog(wxWindow *parent, const TranslatableString &message, const ManualPageID &helpPage, bool Close = true, - const wxString &log = {}); + const std::wstring &log = {}); #include // to inherit