summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKjell Ahlstedt <kjellahlstedt@gmail.com>2020-11-01 13:29:48 +0100
committerKjell Ahlstedt <kjellahlstedt@gmail.com>2020-11-01 13:29:48 +0100
commit3f9bbd905d10dec534023bb398a0c8bb103672de (patch)
tree0a9a57bbe9ff331f56dc0e8a852c68d5a6ee5540
parent9aaade399592d42312e78d54c3581c1fcd731b71 (diff)
downloadglibmm-3f9bbd905d10dec534023bb398a0c8bb103672de.tar.gz
Gio::File docs: Fix names of thrown exceptions
and remove unnecessary TODO comments in several files.
-rw-r--r--gio/src/desktopappinfo.hg4
-rw-r--r--gio/src/file.hg7
-rw-r--r--gio/src/fileattributeinfo.hg2
-rw-r--r--gio/src/memoryoutputstream.hg1
-rw-r--r--glib/src/convert.ccg3
-rw-r--r--glib/src/module.hg2
-rw-r--r--glib/src/optiongroup.hg3
7 files changed, 7 insertions, 15 deletions
diff --git a/gio/src/desktopappinfo.hg b/gio/src/desktopappinfo.hg
index e2afc0f1..ebf86e60 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(const Glib::RefPtr<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 7347465b..263d6e36 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 5f329d73..5447efd3 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 84441b36..1556c1ab 100644
--- a/gio/src/memoryoutputstream.hg
+++ b/gio/src/memoryoutputstream.hg
@@ -18,7 +18,6 @@
#include <giomm/seekable.h>
#include <giomm/pollableoutputstream.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 ea926882..8ea00edb 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 aebb03bb..54a830f5 100644
--- a/glib/src/optiongroup.hg
+++ b/glib/src/optiongroup.hg
@@ -21,8 +21,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; }