X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/42841dfcaddc6045ffc618acbb620b1fde1bc618..489a164c1c56855b29285230237c69514ff823e1:/include/wx/confbase.h diff --git a/include/wx/confbase.h b/include/wx/confbase.h index 15c4919896..63b755f0f9 100644 --- a/include/wx/confbase.h +++ b/include/wx/confbase.h @@ -14,10 +14,6 @@ #ifndef _WX_CONFBASE_H_ #define _WX_CONFBASE_H_ -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma interface "confbase.h" -#endif - #include "wx/defs.h" #include "wx/string.h" @@ -117,7 +113,7 @@ public: long style = 0); // empty but ensures that dtor of all derived classes is virtual - virtual ~wxConfigBase(){}; + virtual ~wxConfigBase(); // path management // set current path: if the first character is '/', it's the absolute path, @@ -297,13 +293,21 @@ private: class WXDLLIMPEXP_BASE wxConfigPathChanger { public: - // ctor/dtor do path changing/restorin + // ctor/dtor do path changing/restoring of the path wxConfigPathChanger(const wxConfigBase *pContainer, const wxString& strEntry); ~wxConfigPathChanger(); // get the key name const wxString& Name() const { return m_strName; } + // this method must be called if the original path (i.e. the current path at + // the moment of creation of this object) could have been deleted to prevent + // us from restoring the not existing (any more) path + // + // if the original path doesn't exist any more, the path will be restored to + // the deepest still existing component of the old path + void UpdateIfDeleted(); + private: wxConfigBase *m_pContainer; // object we live in wxString m_strName, // name of entry (i.e. name only)