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:
@@ -38,8 +38,10 @@ Constructor.
|
|||||||
|
|
||||||
\func{static void}{AddHandler}{\param{wxFileSystemHandler }{*handler}}
|
\func{static void}{AddHandler}{\param{wxFileSystemHandler }{*handler}}
|
||||||
|
|
||||||
This static function adds new handler into the list of handlers.
|
This static function adds new handler into the list of
|
||||||
The \helpref{handlers}{wxfilesystemhandler} provide access to virtual FS.
|
\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}
|
\wxheading{Note}
|
||||||
|
|
||||||
|
@@ -482,7 +482,9 @@ bool wxFileSystem::FindFileInPath(wxString *pStr,
|
|||||||
|
|
||||||
void wxFileSystem::AddHandler(wxFileSystemHandler *handler)
|
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)
|
bool wxFileSystem::HasHandlerForPath(const wxString &location)
|
||||||
|
Reference in New Issue
Block a user