Commit 6c6a9cf5 authored by Matthew Waters's avatar Matthew Waters 🐨

qt: use a static_cast instead of dynamic one

The dynamic_cast is a little but of overkill as the app will still crash if it
fails in the later g_assert.

Allows compilation with -fno-rtti

https://bugzilla.gnome.org/show_bug.cgi?id=762526
parent 472b3965
......@@ -305,7 +305,7 @@ gst_qt_sink_change_state (GstElement * element, GstStateChange transition)
switch (transition) {
case GST_STATE_CHANGE_NULL_TO_READY:
app = dynamic_cast<QGuiApplication *> (QCoreApplication::instance ());
app = static_cast<QGuiApplication *> (QCoreApplication::instance ());
if (!app) {
GST_ELEMENT_ERROR (element, RESOURCE, NOT_FOUND,
("%s", "Failed to connect to Qt"),
......
......@@ -122,7 +122,7 @@ void InitializeSceneGraph::run()
QtGLVideoItem::QtGLVideoItem()
{
QGuiApplication *app = dynamic_cast<QGuiApplication *> (QCoreApplication::instance ());
QGuiApplication *app = static_cast<QGuiApplication *> (QCoreApplication::instance ());
static volatile gsize _debug;
g_assert (app != NULL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment