From b97ea90f4fe1a1635bb51f233bab780d7f2f77e0 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 17 Mar 2018 17:17:05 +0100 Subject: [PATCH] Add default value for MakeConfigFileName() 2nd argument Make it possible to call wxStandardPaths::MakeConfigFileName() without explicitly specifying the convention to use, to make it conform to the documentation (previously this only worked when calling the wxStandardPathsBase version of the method). Closes #18106. --- include/wx/msw/stdpaths.h | 3 ++- include/wx/osx/cocoa/stdpaths.h | 3 ++- include/wx/stdpaths.h | 9 ++++++--- include/wx/unix/stdpaths.h | 3 ++- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/include/wx/msw/stdpaths.h b/include/wx/msw/stdpaths.h index 3f733bc67f..154ab40e97 100644 --- a/include/wx/msw/stdpaths.h +++ b/include/wx/msw/stdpaths.h @@ -30,7 +30,8 @@ public: virtual wxString GetPluginsDir() const wxOVERRIDE; virtual wxString GetUserDir(Dir userDir) const wxOVERRIDE; virtual wxString MakeConfigFileName(const wxString& basename, - ConfigFileConv conv) const wxOVERRIDE; + ConfigFileConv conv = ConfigFileConv_Ext + ) const wxOVERRIDE; // MSW-specific methods diff --git a/include/wx/osx/cocoa/stdpaths.h b/include/wx/osx/cocoa/stdpaths.h index c77713da12..1500c88dc9 100644 --- a/include/wx/osx/cocoa/stdpaths.h +++ b/include/wx/osx/cocoa/stdpaths.h @@ -33,7 +33,8 @@ public: ResourceCat category = ResourceCat_None) const wxOVERRIDE; virtual wxString GetUserDir(Dir userDir) const wxOVERRIDE; virtual wxString MakeConfigFileName(const wxString& basename, - ConfigFileConv conv) const wxOVERRIDE; + ConfigFileConv conv = ConfigFileConv_Ext + ) const wxOVERRIDE; protected: // Ctor is protected, use wxStandardPaths::Get() instead of instantiating diff --git a/include/wx/stdpaths.h b/include/wx/stdpaths.h index bbb5b72dcd..e7ce24bec4 100644 --- a/include/wx/stdpaths.h +++ b/include/wx/stdpaths.h @@ -252,9 +252,12 @@ public: virtual wxString GetUserDataDir() const { return m_prefix; } virtual wxString GetPluginsDir() const { return m_prefix; } virtual wxString GetUserDir(Dir WXUNUSED(userDir)) const { return m_prefix; } - virtual wxString MakeConfigFileName(const wxString& basename, - ConfigFileConv WXUNUSED(conv)) const - { return m_prefix + wxS("/") + basename; } + virtual wxString + MakeConfigFileName(const wxString& basename, + ConfigFileConv WXUNUSED(conv) = ConfigFileConv_Ext) const + { + return m_prefix + wxS("/") + basename; + } protected: // Ctor is protected because wxStandardPaths::Get() should always be used diff --git a/include/wx/unix/stdpaths.h b/include/wx/unix/stdpaths.h index e67d9c6ea2..c6400326d4 100644 --- a/include/wx/unix/stdpaths.h +++ b/include/wx/unix/stdpaths.h @@ -50,7 +50,8 @@ public: virtual wxString GetUserDir(Dir userDir) const wxOVERRIDE; #endif virtual wxString MakeConfigFileName(const wxString& basename, - ConfigFileConv conv) const wxOVERRIDE; + ConfigFileConv conv = ConfigFileConv_Ext + ) const wxOVERRIDE; protected: // Ctor is protected, use wxStandardPaths::Get() instead of instantiating