]> git.saurik.com Git - wxWidgets.git/commitdiff
Rename wxFileSystemWatcherBase::DoAdd() to AddAny() and make it public.
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 13 Jul 2012 12:00:14 +0000 (12:00 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 13 Jul 2012 12:00:14 +0000 (12:00 +0000)
Make this method public to fix compilation after the recent changes as
traverser classes can't call it otherwise (no idea why did it compile with
g++). And give it a better name just in case people decide to call it even
though it's not documented and described as private in comment (but perhaps we
could make it really public later).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72071 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/fswatcher.h
src/common/fswatchercmn.cpp
src/msw/fswatcher.cpp

index 959bcf8a8ac2bac5e8d8868a580687c6102dde2f..9792bce12b4eab66c2d43661d53fb606241c266d 100644 (file)
@@ -305,6 +305,13 @@ public:
             m_owner = handler;
     }
 
+
+    // This is a semi-private function used by wxWidgets itself only.
+    //
+    // Delegates the real work of adding the path to wxFSWatcherImpl::Add() and
+    // updates m_watches if the new path was successfully added.
+    bool AddAny(const wxFileName& path, int events, wxFSWPathType type);
+
 protected:
 
     static wxString GetCanonicalPath(const wxFileName& path)
@@ -320,10 +327,6 @@ protected:
         return path_copy.GetFullPath();
     }
 
-    // Delegates the real work of adding the path to wxFSWatcherImpl::Add() and
-    // updates m_watches if the new path was successfully added.
-    bool DoAdd(const wxFileName& path, int events, wxFSWPathType type);
-
 
     wxFSWatchInfoMap m_watches;        // path=>wxFSWatchInfo map
     wxFSWatcherImpl* m_service;     // file system events service
index 9983369c4186477a0ed53eb41dde60689c060cc8..7382c2f6fb52abbbbe2809bbdf7a5957b35617cc 100644 (file)
@@ -95,13 +95,13 @@ bool wxFileSystemWatcherBase::Add(const wxFileName& path, int events)
         return false;
     }
 
-    return DoAdd(path, events, type);
+    return AddAny(path, events, type);
 }
 
 bool
-wxFileSystemWatcherBase::DoAdd(const wxFileName& path,
-                               int events,
-                               wxFSWPathType type)
+wxFileSystemWatcherBase::AddAny(const wxFileName& path,
+                                int events,
+                                wxFSWPathType type)
 {
     wxString canonical = GetCanonicalPath(path);
     if (canonical.IsEmpty())
@@ -163,7 +163,7 @@ bool wxFileSystemWatcherBase::AddTree(const wxFileName& path, int events,
         {
             wxLogTrace(wxTRACE_FSWATCHER,
                        "--- AddTree adding file '%s' ---", filename);
-            m_watcher->DoAdd(wxFileName::FileName(filename),
+            m_watcher->AddAny(wxFileName::FileName(filename),
                              m_events, wxFSWPath_File);
             return wxDIR_CONTINUE;
         }
@@ -173,7 +173,7 @@ bool wxFileSystemWatcherBase::AddTree(const wxFileName& path, int events,
             wxLogTrace(wxTRACE_FSWATCHER,
                        "--- AddTree adding directory '%s' ---", dirname);
             // we add as much as possible and ignore errors
-            m_watcher->DoAdd(wxFileName::DirName(dirname),
+            m_watcher->AddAny(wxFileName::DirName(dirname),
                              m_events, wxFSWPath_Dir);
             return wxDIR_CONTINUE;
         }
index a186acd2caefc429cba13e36555259e288e5f1b5..69c19e19b728644705a481fb14aa1a738faf5218 100644 (file)
@@ -431,7 +431,7 @@ wxMSWFileSystemWatcher::AddTree(const wxFileName& path,
         return false;
     }
 
-    return DoAdd(path, events, wxFSWPath_Tree);
+    return AddAny(path, events, wxFSWPath_Tree);
 }
 
 #endif // wxUSE_FSWATCHER