From: George Kiagiadakis Date: Wed, 12 Jun 2019 10:03:21 +0000 (+0300) Subject: Fix compilation error - m_roles contains QObject* and needs a cast X-Git-Tag: 7.99.2^0 X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=commitdiff_plain;h=38598f4a2a84b6727bcbaefbe79da0ba740d32d2;p=apps%2Fmixer.git Fix compilation error - m_roles contains QObject* and needs a cast Bug-AGL: SPEC-2473 Change-Id: Ia07be3c3b9231b34a8607b430f6f9dfa8ad8b530 Signed-off-by: George Kiagiadakis --- diff --git a/app/mixer.cpp b/app/mixer.cpp index 873f1be..fae2e6a 100644 --- a/app/mixer.cpp +++ b/app/mixer.cpp @@ -120,7 +120,8 @@ void Mixer::onClientEventReceived(QString eventName, const QJsonValue& data) int value = data.toObject()["value"].toDouble() * 100; value = qBound(0, value, 100); - for (AudioRole *ar : m_roles) { + for (QObject *o : m_roles) { + AudioRole *ar = static_cast(o); if (ar->Name() == name) { ar->BeginUpdate(); ar->setValue(value);