From 25f49256ac6682a358e461036ec64aad1b26e353 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 6 Jun 2009 23:34:05 +0000 Subject: [PATCH] return wxStandardPaths, not wxStandardPathsBase, from wxStandardPathsBase::Get() to allow calling platform-specific methods on it if necessary git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60935 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/apptrait.h | 4 ++-- include/wx/stdpaths.h | 4 +++- include/wx/unix/apptrait.h | 2 +- interface/wx/stdpaths.h | 2 +- src/common/stdpbase.cpp | 4 ++-- src/osx/core/utilsexc_cf.cpp | 2 +- 6 files changed, 10 insertions(+), 8 deletions(-) diff --git a/include/wx/apptrait.h b/include/wx/apptrait.h index 4775f4b9de..52c815bf13 100644 --- a/include/wx/apptrait.h +++ b/include/wx/apptrait.h @@ -25,7 +25,7 @@ class WXDLLIMPEXP_FWD_BASE wxLog; class WXDLLIMPEXP_FWD_BASE wxMessageOutput; class WXDLLIMPEXP_FWD_BASE wxObject; class WXDLLIMPEXP_FWD_CORE wxRendererNative; -class WXDLLIMPEXP_FWD_BASE wxStandardPathsBase; +class WXDLLIMPEXP_FWD_BASE wxStandardPaths; class WXDLLIMPEXP_FWD_BASE wxString; class WXDLLIMPEXP_FWD_BASE wxTimer; class WXDLLIMPEXP_FWD_BASE wxTimerImpl; @@ -75,7 +75,7 @@ public: // wxStandardPaths object is normally the same for wxBase and wxGUI // except in the case of wxMac and wxCocoa - virtual wxStandardPathsBase& GetStandardPaths(); + virtual wxStandardPaths& GetStandardPaths(); #if wxUSE_INTL // called during wxApp initialization to set the locale to correspond to diff --git a/include/wx/stdpaths.h b/include/wx/stdpaths.h index 517e7de31d..0b6f8479d4 100644 --- a/include/wx/stdpaths.h +++ b/include/wx/stdpaths.h @@ -17,6 +17,8 @@ #include "wx/string.h" #include "wx/filefn.h" +class WXDLLIMPEXP_FWD_BASE wxStandardPaths; + // ---------------------------------------------------------------------------- // wxStandardPaths returns the standard locations in the file system // ---------------------------------------------------------------------------- @@ -50,7 +52,7 @@ public: // return the global standard paths object - static wxStandardPathsBase& Get(); + static wxStandardPaths& Get(); // return the path (directory+filename) of the running executable or // wxEmptyString if it couldn't be determined. diff --git a/include/wx/unix/apptrait.h b/include/wx/unix/apptrait.h index b8dd8e4abf..cd46c08eb5 100644 --- a/include/wx/unix/apptrait.h +++ b/include/wx/unix/apptrait.h @@ -62,7 +62,7 @@ public: #endif #if (defined(__WXMAC__) || defined(__WXCOCOA__)) && wxUSE_STDPATHS - virtual wxStandardPathsBase& GetStandardPaths(); + virtual wxStandardPaths& GetStandardPaths(); #endif virtual wxPortId GetToolkitVersion(int *majVer = NULL, int *minVer = NULL) const; diff --git a/interface/wx/stdpaths.h b/interface/wx/stdpaths.h index af4dac1d29..d082af4b97 100644 --- a/interface/wx/stdpaths.h +++ b/interface/wx/stdpaths.h @@ -51,7 +51,7 @@ public: /** Returns reference to the unique global standard paths object. */ - static wxStandardPathsBase& Get(); + static wxStandardPaths& Get(); /** Return the directory for the document files used by this application. diff --git a/src/common/stdpbase.cpp b/src/common/stdpbase.cpp index 6eaaeb29ec..6cf9b8a32a 100644 --- a/src/common/stdpbase.cpp +++ b/src/common/stdpbase.cpp @@ -43,7 +43,7 @@ static wxStandardPaths gs_stdPaths; // ============================================================================ /* static */ -wxStandardPathsBase& wxStandardPathsBase::Get() +wxStandardPaths& wxStandardPathsBase::Get() { wxAppTraits * const traits = wxTheApp ? wxTheApp->GetTraits() : NULL; wxCHECK_MSG( traits, gs_stdPaths, _T("create wxApp before calling this") ); @@ -72,7 +72,7 @@ wxString wxStandardPathsBase::GetExecutablePath() const return filename.GetFullPath(); } -wxStandardPathsBase& wxAppTraitsBase::GetStandardPaths() +wxStandardPaths& wxAppTraitsBase::GetStandardPaths() { return gs_stdPaths; } diff --git a/src/osx/core/utilsexc_cf.cpp b/src/osx/core/utilsexc_cf.cpp index be96bcfb36..d503bd5975 100644 --- a/src/osx/core/utilsexc_cf.cpp +++ b/src/osx/core/utilsexc_cf.cpp @@ -110,7 +110,7 @@ int wxGUIAppTraits::AddProcessCallback(wxEndProcessData *proc_data, int fd) // put it in because it's already compiled for wxCocoa and wxMac GUI lib. #if wxUSE_STDPATHS static wxStandardPathsCF gs_stdPaths; -wxStandardPathsBase& wxGUIAppTraits::GetStandardPaths() +wxStandardPaths& wxGUIAppTraits::GetStandardPaths() { return gs_stdPaths; } -- 2.45.2