Просмотр исходного кода

Add comment and cleanup the csync exclude list code

Removed the csync_add_exclude_list function that isn't use anywhere
anymore.
Jocelyn Turcotte 10 лет назад
Родитель
Сommit
7561f5c717
4 измененных файлов с 2 добавлено и 20 удалено
  1. 0 8
      csync/src/csync.c
  2. 0 11
      csync/src/csync.h
  3. 0 1
      src/cmd/cmd.cpp
  4. 2 0
      src/libsync/excludedfiles.h

+ 0 - 8
csync/src/csync.c

@@ -594,14 +594,6 @@ int csync_destroy(CSYNC *ctx) {
   return rc;
 }
 
-int csync_add_exclude_list(CSYNC *ctx, const char *path) {
-  if (ctx == NULL || path == NULL) {
-    return -1;
-  }
-
-  return csync_exclude_load(path, &ctx->excludes);
-}
-
 void *csync_get_userdata(CSYNC *ctx) {
   if (ctx == NULL) {
     return NULL;

+ 0 - 11
csync/src/csync.h

@@ -366,17 +366,6 @@ int csync_commit(CSYNC *ctx);
  */
 int csync_destroy(CSYNC *ctx);
 
-/**
- * @brief Add an additional exclude list.
- *
- * @param ctx           The context to add the exclude list.
- *
- * @param path          The path pointing to the file.
- *
- * @return              0 on success, less than 0 if an error occurred.
- */
-int csync_add_exclude_list(CSYNC *ctx, const char *path);
-
 /**
  * @brief Get the userdata saved in the context.
  *

+ 0 - 1
src/cmd/cmd.cpp

@@ -443,7 +443,6 @@ restart_sync:
     QObject::connect(&engine, SIGNAL(finished(bool)), &app, SLOT(quit()));
     QObject::connect(&engine, SIGNAL(transmissionProgress(ProgressInfo)), &cmd, SLOT(transmissionProgressSlot()));
 
-// FIXME: Test (maybe even auto)
     // Exclude lists
     engine.excludedFiles().addExcludeFilePath(ConfigFile::excludeFileFromSystem());
     if( QFile::exists(options.exclude) )

+ 2 - 0
src/libsync/excludedfiles.h

@@ -66,6 +66,8 @@ public slots:
     bool reloadExcludes();
 
 private:
+    // This is a pointer to the csync exclude list, its is owned by this class
+    // but the pointer can be in a csync_context so that it can itself also query the list.
     c_strlist_t** _excludesPtr;
     QStringList _excludeFiles;
     mutable QReadWriteLock _mutex;