From 92493ca51dd59756aa8011c21b8f29c4cdb51211 Mon Sep 17 00:00:00 2001 From: George Kiagiadakis Date: Fri, 21 Jan 2011 12:26:52 +0200 Subject: Register ClockTime with the type system, to be possible to use it with QGlib::Value. --- src/QGst/clocktime.h | 2 ++ tests/auto/clocktest.cpp | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/src/QGst/clocktime.h b/src/QGst/clocktime.h index 2858a21..ea3ced6 100644 --- a/src/QGst/clocktime.h +++ b/src/QGst/clocktime.h @@ -61,4 +61,6 @@ private: } //namspace QGst +QGST_REGISTER_TYPE(QGst::ClockTime) + #endif // QGST_CLOCKTIME_H diff --git a/tests/auto/clocktest.cpp b/tests/auto/clocktest.cpp index fac49d2..3b8f88b 100644 --- a/tests/auto/clocktest.cpp +++ b/tests/auto/clocktest.cpp @@ -26,6 +26,7 @@ private Q_SLOTS: void systemTest(); void timeFromClockTimeTest(); void clockTimeFromTimeTest(); + void valueTest(); }; void ClockTest::systemTest() @@ -64,6 +65,12 @@ void ClockTest::clockTimeFromTimeTest() static_cast((50001 * 1000 +15) * Q_UINT64_C(1000000))); } +void ClockTest::valueTest() +{ + QGst::ClockTime time = QGst::ClockTime(123456789); + QGlib::Value v = QGlib::Value::create(time); + QCOMPARE(v.get(), time); +} QTEST_MAIN(ClockTest) -- cgit v1.2.3