[Bug 680235] QGlib::Value doesn't support QGlib::Error

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Thu Aug 2 01:11:27 PDT 2012


https://bugzilla.gnome.org/show_bug.cgi?id=680235
  GStreamer | qt-gstreamer | git

George Kiagiadakis <kiagiadakis.george> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #219205|none                        |needs-work
             status|                            |

--- Comment #2 from George Kiagiadakis <kiagiadakis.george at gmail.com> 2012-08-02 08:11:22 UTC ---
Review of attachment 219205:
 --> (https://bugzilla.gnome.org/review?bug=680235&attachment=219205)

Looks good, thanks. Just some minor issues to fix.

Also, now that class Error can have a null GError inside, I would also expect
it to have a "bool isValid() const" method now that returns true when m_error
!= NULL.

::: src/QGlib/error.cpp
@@ +47,3 @@
 {
+    if (m_error != other.m_error) {
+        g_error_free(m_error);

What if m_error is NULL here? Does g_error_free() handle it?

@@ +62,3 @@
 const char* Error::what() const throw()
 {
+    return m_error ? m_error->message : NULL;

Maybe return a null string here "" instead of a NULL pointer. Will probably
save a few crashes...

::: src/QGlib/value.h
@@ +486,3 @@
+    static inline void set(Value & value, const Error & data)
+    {
+    {

static_cast<const GError *>(data) please.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list