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.
This commit is contained in:
Vadim Zeitlin
2018-03-17 17:17:05 +01:00
parent aee46e075f
commit b97ea90f4f
4 changed files with 12 additions and 6 deletions

View File

@@ -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