summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/player/mediaapp.cpp6
-rw-r--r--examples/player/player.cpp4
2 files changed, 5 insertions, 5 deletions
diff --git a/examples/player/mediaapp.cpp b/examples/player/mediaapp.cpp
index ab07fff..0285bae 100644
--- a/examples/player/mediaapp.cpp
+++ b/examples/player/mediaapp.cpp
@@ -137,7 +137,7 @@ void MediaApp::onPositionChanged()
length.toString("hh:mm:ss.zzz"));
if (length != QTime(0,0)) {
- m_positionSlider->setValue(curpos.msecsTo(QTime()) * 1000 / length.msecsTo(QTime()));
+ m_positionSlider->setValue(curpos.msecsTo(QTime(0,0)) * 1000 / length.msecsTo(QTime(0,0)));
} else {
m_positionSlider->setValue(0);
}
@@ -151,9 +151,9 @@ void MediaApp::onPositionChanged()
/* Called when the user changes the slider's position */
void MediaApp::setPosition(int value)
{
- uint length = -m_player->length().msecsTo(QTime());
+ uint length = -m_player->length().msecsTo(QTime(0,0));
if (length != 0 && value > 0) {
- QTime pos;
+ QTime pos(0,0);
pos = pos.addMSecs(length * (value / 1000.0));
m_player->setPosition(pos);
}
diff --git a/examples/player/player.cpp b/examples/player/player.cpp
index 6d7fd4f..bfcd091 100644
--- a/examples/player/player.cpp
+++ b/examples/player/player.cpp
@@ -84,7 +84,7 @@ QTime Player::position() const
m_pipeline->query(query);
return QGst::ClockTime(query->position()).toTime();
} else {
- return QTime();
+ return QTime(0,0);
}
}
@@ -135,7 +135,7 @@ QTime Player::length() const
m_pipeline->query(query);
return QGst::ClockTime(query->duration()).toTime();
} else {
- return QTime();
+ return QTime(0,0);
}
}