<html><head></head><body>Hi,<br><br>I am referring to fixing up pointers to C++ object. I don't know what it means to fix pointers to C structures, such as vlc_object_t, up. In other words, this does not seem to follow the rules about C++ pointer inter-convertibility.<br><br><div class="gmail_quote">Le 24 avril 2019 10:30:21 GMT+03:00, pierre@videolabs.io a écrit :<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">On 2019-04-23 17:38, Rémi Denis-Courmont wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;">Le tiistaina 23. huhtikuuta 2019, 10.51.59 EEST Pierre Lamot a écrit :<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;">  children object isn't built yet.<br><br>  Fixes #22187<hr> modules/gui/qt/adapters/variables.hpp | 18 +++++++++++-------<br> 1 file changed, 11 insertions(+), 7 deletions(-)<br><br>diff --git a/modules/gui/qt/adapters/variables.hpp<br>b/modules/gui/qt/adapters/variables.hpp index 710880cf23..930a7e2238 <br>100644<br>--- a/modules/gui/qt/adapters/variables.hpp<br>+++ b/modules/gui/qt/adapters/variables.hpp<br>@@ -112,17 +112,13 @@ public:<br>         , m_object(new VLCObjectHolderImpl<T>(nullptr))<br>         , m_property(property)<br>     {<br>-        resetObject<T>(object);<br>-        Derived* derived = static_cast<Derived*>(this);<br>-        connect(derived, &Derived::valueChangedInternal, this,<br>&QVLCVariable<Derived, BaseType>::onValueChangedInternal,<br>Qt::QueuedConnection); }<br><br>     virtual ~QVLCVariable()<br>     {<br>         if (m_object->get())<br>         {<br>-            Derived* derived = static_cast<Derived*>(this);<br>-            var_DelCallback(m_object->get(), qtu(m_property),<br>value_modified, derived);<br>+            var_DelCallback(m_object->get(),<br>qtu(m_property), value_modified, this); var_Destroy(m_object->get(),<br>qtu(m_property));<br></blockquote>Uh... Doesn't this incorrectly assume that pointer fixup is <br>unnecessary?<br></blockquote><br>The object can be downcasted to its Derived form as we know its type by <br>construction (CRTP)....well except in the Ctor/Dtor of the parent class.<br>This is the responsibility of the VLCObjectHolderImpl class to return <br>the vlc_object_t of the object it owns through the get method.<br><br>but maybe I missed something with the recent changes to the objects <br>(though it would rather impact VLCObjectHolderImpl implementation)<hr>vlc-devel mailing list<br>To unsubscribe or modify your subscription options:<br><a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a></pre></blockquote></div><br>-- <br>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</body></html>