handlers added using AddHandler() last must have the highest priority (patch 1522807)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40302 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2006-07-25 00:33:14 +00:00
parent a5e8ddfb27
commit 4948ebf3ff
2 changed files with 7 additions and 3 deletions

View File

@@ -38,8 +38,10 @@ Constructor.
\func{static void}{AddHandler}{\param{wxFileSystemHandler }{*handler}}
This static function adds new handler into the list of handlers.
The \helpref{handlers}{wxfilesystemhandler} provide access to virtual FS.
This static function adds new handler into the list of
\helpref{handlers}{wxfilesystemhandler} which provide access to virtual FS.
Note that if two handlers for the same protocol are added, the last one added
takes precedence.
\wxheading{Note}

View File

@@ -482,7 +482,9 @@ bool wxFileSystem::FindFileInPath(wxString *pStr,
void wxFileSystem::AddHandler(wxFileSystemHandler *handler)
{
m_Handlers.Append(handler);
// prepend the handler to the beginning of the list because handlers added
// last should have the highest priority to allow overriding them
m_Handlers.Insert(0u, handler);
}
bool wxFileSystem::HasHandlerForPath(const wxString &location)