Commit 8e77ff6b authored by Val Doroshchuk's avatar Val Doroshchuk

test

parent c8ac54ff
......@@ -509,7 +509,7 @@ static void setGstProperty(GstElement *element, const QString &name, T v)
g_object_set(G_OBJECT(element), name.toLatin1().constData(), v, NULL);
}
void QGstreamerMediaPlayer::set(const QString &elementName, const QVariantMap& map)
bool QGstreamerMediaPlayer::set(const QString &elementName, const QVariantMap& map)
{
Q_D(QGstreamerMediaPlayer);
......@@ -534,7 +534,7 @@ void QGstreamerMediaPlayer::set(const QString &elementName, const QVariantMap& m
qWarning() << "No pipeline available";
}
return;
return false;
}
for (auto it = map.begin(); it != map.end(); ++it) {
......@@ -558,6 +558,8 @@ void QGstreamerMediaPlayer::set(const QString &elementName, const QVariantMap& m
break;
}
}
return true;
}
#include "moc_qgstreamermediaplayer.cpp"
......
......@@ -106,7 +106,7 @@ public:
void setTextStream(int i);
Q_INVOKABLE QVariantMap textStreamProperties(int i);
Q_INVOKABLE void set(const QString &elementName, const QVariantMap& map);
Q_INVOKABLE bool set(const QString &elementName, const QVariantMap& map);
Q_SIGNALS:
void sourceChanged();
......
......@@ -228,7 +228,7 @@ void tst_QGstreamerMediaPlayer::testSetProperty()
{
QVariantMap m;
m["name"] = "new_name";
control->set("source", m);
QVERIFY(control->set("source", m));
}
QTEST_GUILESS_MAIN(tst_QGstreamerMediaPlayer)
......
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