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