qtglrenderer.cc: Fix compiling

46bfb7d247 fixed a format warning without checking if it actually compiled.
toUtf8() returns QByteArray so we need to assign it to a temporary variable to be able to get the raw string data from it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/593>
This commit is contained in:
Raul Tambre 2020-05-15 19:20:45 +03:00
parent 46bfb7d247
commit 37c1b1e13f

View file

@ -628,7 +628,7 @@ void GstQuickRenderer::initializeGstGL ()
* 2. QAnimationDriver controls the 'animation time' that the Qml scene is
* rendered at
*/
/* FIXME: what happens with multiple qmlgloverlay elements? Do we need a
/* FIXME: what happens with multiple qmlgloverlay elements? Do we need a
* shared animation driver? */
g_mutex_lock (&m_sharedRenderData->lock);
if (m_sharedRenderData->m_animationDriver == nullptr) {
@ -720,8 +720,9 @@ bool GstQuickRenderer::setQmlScene (const gchar * scene, GError ** error)
initializeQml();
if (m_errorString != "") {
QByteArray string = m_errorString.toUtf8();
g_set_error (error, GST_RESOURCE_ERROR, GST_RESOURCE_ERROR_SETTINGS,
"%s", m_errorString.toUtf8());
"%s", string.constData());
return FALSE;
}