]> git.saurik.com Git - wxWidgets.git/commitdiff
using wxURL now enforces linking http.o, ftp.o and sckfile.o
authorVáclav Slavík <vslavik@fastmail.fm>
Fri, 23 Feb 2001 22:52:11 +0000 (22:52 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Fri, 23 Feb 2001 22:52:11 +0000 (22:52 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9426 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/changes.txt
include/wx/protocol/protocol.h
src/common/url.cpp

index 928d3c1f6f3c1bd8f8117d37375630659f755ab6..9ad280061bdfb98b1c6fe5316fdad447069bb8c7 100644 (file)
@@ -9,11 +9,12 @@ wxWindows 2 Change Log
 
 wxBase:
 
+- fixed problem with wxURL when using static version of the library
+- wxZipFSHandler::FindFirst() and FindNext() now correctly list directories
 - wxMimeTypesManager now can create file associations too
 - wxCopyFile() respects the file permissions (Roland Scholz)
 - wxFTP::GetFileSize() added (Søren Erland Vestø)
 - wxDateTime::IsSameDate() bug fixed
-- wxZipFSHandler::FindFirst() and FindNext() now correctly list directories
 
 All (GUI):
 
index 1ac98294c83e7acac907a589e926bcb53cec41c8..894ca9615d8fb235a7f439aa5973e8363e69e339 100644 (file)
@@ -96,7 +96,15 @@ public: \
   static wxProtoInfo g_proto_##class;
 
 #define IMPLEMENT_PROTOCOL(class, name, serv, host) \
-wxProtoInfo class::g_proto_##class(name, serv, host, CLASSINFO(class));
+wxProtoInfo class::g_proto_##class(name, serv, host, CLASSINFO(class)); \
+bool wxProtocolUse##class = TRUE;
+
+#define USE_PROTOCOL(class) \
+    extern bool wxProtocolUse##class ; \
+    static struct wxProtocolUserFor##class \
+    { \
+        wxProtocolUserFor##class() { wxProtocolUse##class = TRUE; } \
+    } wxProtocolDoUse##class;
 
 class WXDLLEXPORT wxProtoInfo : public wxObject
 {
index b6c54cca4579c174cd71abb6b690051979826118..eae17c35cae21795c0b4afd983e4e72790bc5829 100644 (file)
@@ -35,6 +35,11 @@ IMPLEMENT_CLASS(wxURL, wxObject)
 // Protocols list
 wxProtoInfo *wxURL::ms_protocols = NULL;
 
+// Enforce linking of protocol classes:
+USE_PROTOCOL(wxHTTP)
+USE_PROTOCOL(wxFTP)
+USE_PROTOCOL(wxFileProto)
+
 #if wxUSE_SOCKETS
     wxHTTP *wxURL::ms_proxyDefault = NULL;
     bool wxURL::ms_useDefaultProxy = FALSE;