[vlc-commits] qt: Fix compilation after "casting to children type in parent constructor is UB"
Martin Storsjö
git at videolan.org
Fri Jun 14 08:15:12 CEST 2019
vlc | branch: master | Martin Storsjö <martin at martin.st> | Fri Jun 14 09:11:02 2019 +0300| [27071508fdc369d87d39b134c51caf72941c34a3] | committer: Martin Storsjö
qt: Fix compilation after "casting to children type in parent constructor is UB"
This fixes compilation with Clang, unsure if it actually compiled with GCC before either.
Clang produced errors like these:
gui/qt/adapters/../../../../../modules/gui/qt/adapters/variables.hpp:308:79: error: 'onValueChangedInternal' is a private member of 'QVLCVariable<QVLCInteger, long long>'
connect(this, &QVLCInteger::valueChangedInternal, this, &QVLCInteger::onValueChangedInternal, Qt::QueuedConnection);
^
gui/qt/adapters/../../../../../modules/gui/qt/adapters/variables.hpp:189:18: note: declared private here
virtual void onValueChangedInternal(vlc_object_t* object, BaseType value)
^
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=27071508fdc369d87d39b134c51caf72941c34a3
---
modules/gui/qt/adapters/variables.hpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/gui/qt/adapters/variables.hpp b/modules/gui/qt/adapters/variables.hpp
index eae67af5be..15421f5c1b 100644
--- a/modules/gui/qt/adapters/variables.hpp
+++ b/modules/gui/qt/adapters/variables.hpp
@@ -184,7 +184,6 @@ protected:
VLCVarTypeTraits<BaseType>::releaseValue(vlcvalue);
}
-private:
//executed on UI thread
virtual void onValueChangedInternal(vlc_object_t* object, BaseType value)
{
@@ -198,6 +197,7 @@ private:
}
+private:
//executed on variable thread, this forwards the callback to the UI thread
static int value_modified( vlc_object_t * object, char const *, vlc_value_t, vlc_value_t newValue, void * data)
{
More information about the vlc-commits
mailing list