[glibmm/glibmm-2-64] Gio::File docs: Fix names of thrown exceptions



commit cc7701ca576072812fdb2f5c2837fcdcc96b7034
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date:   Sun Nov 1 13:50:53 2020 +0100

    Gio::File docs: Fix names of thrown exceptions
    
    and remove unnecessary TODO comments in several files.

 gio/src/desktopappinfo.hg     | 4 ++--
 gio/src/file.hg               | 7 +++----
 gio/src/fileattributeinfo.hg  | 2 +-
 gio/src/memoryoutputstream.hg | 1 -
 glib/src/convert.ccg          | 3 ---
 glib/src/module.hg            | 2 --
 glib/src/optiongroup.hg       | 3 +--
 7 files changed, 7 insertions(+), 15 deletions(-)
---
diff --git a/gio/src/desktopappinfo.hg b/gio/src/desktopappinfo.hg
index e561ce87..4e600a16 100644
--- a/gio/src/desktopappinfo.hg
+++ b/gio/src/desktopappinfo.hg
@@ -48,8 +48,8 @@ class GIOMM_API DesktopAppInfo
   _IMPLEMENTS_INTERFACE(AppInfo)
 
 public:
-  // TODO: should use _WRAP_CREATE(), but these functions do more than just call
-  // g_object_new() because there's quite a bit of error-handling to do.
+  // We can't use _WRAP_CTOR() and _WRAP_CREATE() because the C functions do more
+  // than just call g_object_new(). There's quite a bit of error-handling to do.
   _WRAP_METHOD(static Glib::RefPtr<DesktopAppInfo> create(const std::string& desktop_id), 
g_desktop_app_info_new)
   _WRAP_METHOD(static Glib::RefPtr<DesktopAppInfo> create_from_keyfile(Glib::KeyFile& key_file), 
g_desktop_app_info_new_from_keyfile)
   _WRAP_METHOD(static Glib::RefPtr<DesktopAppInfo> create_from_filename(const std::string& filename), 
g_desktop_app_info_new_from_filename)
diff --git a/gio/src/file.hg b/gio/src/file.hg
index 6ee40a00..39e77d71 100644
--- a/gio/src/file.hg
+++ b/gio/src/file.hg
@@ -28,7 +28,6 @@
 #include <giomm/mountoperation.h>
 #include <giomm/drive.h>
 #include <giomm/error.h> //Because this is thrown by some of these methods.
-//#include <giomm/volume.h>
 
 _DEFS(giomm,gio)
 _PINCLUDE(glibmm/private/interface_p.h)
@@ -950,7 +949,7 @@ public:
    * was cancelled, a Gio::Error with CANCELLED will be thrown.
    *
    * If the file does not exist, a Gio::Error with NOT_FOUND will be thrown.
-   * If the file is not a directory, a Glib::FileError with NOTDIR will be thrown.
+   * If the file is not a directory, a Gio::Error with NOT_DIRECTORY will be thrown.
    * Other errors are possible too.
    *
    * @param cancellable A Cancellable object.
@@ -974,7 +973,7 @@ public:
    * The standard attributes are availible as defines, like FILE_ATTRIBUTE_STANDARD_NAME.
    *
    * If the file does not exist, a Gio::Error with NOT_FOUND will be thrown.
-   * If the file is not a directory, a Glib::FileError with NOTDIR will be thrown.
+   * If the file is not a directory, a Gio::Error with NOT_DIRECTORY will be thrown.
    * Other errors are possible too.
    *
    * @param attributes An attribute query string.
@@ -1049,7 +1048,7 @@ public:
   /** Deletes a file.
    * If the file is a directory, it will only be deleted if it is empty.
    * The operation can be cancelled by triggering the cancellable object from another thread.
-   * If the operation was cancelled, a Glib::FileError with ERROR_CANCELLED will be thrown.
+   * If the operation was cancelled, a Gio::Error with CANCELLED will be thrown.
    *
    * @param cancellable A Cancellable object which can be used to cancel the operation.
    * @return <tt>true</tt> if the file was deleted. <tt>false</tt> otherwise.
diff --git a/gio/src/fileattributeinfo.hg b/gio/src/fileattributeinfo.hg
index 6ffb00b2..c46fab13 100644
--- a/gio/src/fileattributeinfo.hg
+++ b/gio/src/fileattributeinfo.hg
@@ -17,7 +17,7 @@
 _CONFIGINCLUDE(giommconfig.h)
 
 #include <string>
-#include <gio/gio.h> //TODO: avoid this include
+#include <gio/gio.h>
 #include <glibmm/object.h>
 
 _DEFS(giomm,gio)
diff --git a/gio/src/memoryoutputstream.hg b/gio/src/memoryoutputstream.hg
index 4d4d15ed..e90a5c9a 100644
--- a/gio/src/memoryoutputstream.hg
+++ b/gio/src/memoryoutputstream.hg
@@ -17,7 +17,6 @@
 #include <giomm/outputstream.h>
 #include <giomm/seekable.h>
 #include <glibmm/object.h>
-// TODO: remove this if possible -- it's here for the GReallocFunc definition
 #include <gio/gio.h>
 
 _DEFS(giomm,gio)
diff --git a/glib/src/convert.ccg b/glib/src/convert.ccg
index cd08eacd..bcdd7f55 100644
--- a/glib/src/convert.ccg
+++ b/glib/src/convert.ccg
@@ -86,7 +86,6 @@ IConv::convert(const std::string& str)
   if (gerror)
     ::Glib::Error::throw_exception(gerror);
 
-  // TODO: Avoid the copy by using a perfect-forwarding std::string constructor?
   return std::string(make_unique_ptr_gfree(buf).get(), bytes_written);
 }
 
@@ -120,7 +119,6 @@ convert(const std::string& str, const std::string& to_codeset, const std::string
   if (gerror)
     ::Glib::Error::throw_exception(gerror);
 
-  // TODO: Avoid the copy by using a perfect-forwarding std::string constructor?
   return std::string(make_unique_ptr_gfree(buf).get(), bytes_written);
 }
 
@@ -137,7 +135,6 @@ convert_with_fallback(
   if (gerror)
     ::Glib::Error::throw_exception(gerror);
 
-  // TODO: Avoid the copy by using a perfect-forwarding std::string constructor?
   return std::string(make_unique_ptr_gfree(buf).get(), bytes_written);
 }
 
diff --git a/glib/src/module.hg b/glib/src/module.hg
index 239e2c29..4ccb1441 100644
--- a/glib/src/module.hg
+++ b/glib/src/module.hg
@@ -133,8 +133,6 @@ public:
    * @param module_name The name of the module
    * @returns The system-specific filename of the module
    */
-  // TODO: add an override which doesn't take a directory
-  // TODO: check what happens when directory is ""
   _WRAP_METHOD(static std::string build_path(const std::string& directory, const std::string& module_name), 
g_module_build_path)
 
   GModule*       gobj()       { return gobject_; }
diff --git a/glib/src/optiongroup.hg b/glib/src/optiongroup.hg
index e491f306..2ad90f81 100644
--- a/glib/src/optiongroup.hg
+++ b/glib/src/optiongroup.hg
@@ -20,8 +20,7 @@ _DEFS(glibmm,glib)
 #include <sigc++/slot.h>
 #include <map>
 #include <vector>
-#include <glib.h> //TODO: Try to hide this.
-
+#include <glib.h>
 
 #ifndef DOXYGEN_SHOULD_SKIP_THIS
 extern "C" { typedef struct _GOptionGroup GOptionGroup; }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]