summaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-01-08 13:15:15 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-01-08 13:15:15 (GMT)
commita518a9151964edcfaa805fd68c24883bd8eae97d (patch)
treed3675c630e68c02b936cf5ed321bc2bce48756e1 /demos
parent4596db451cd2c53768e42b00a4234e7de2149f39 (diff)
parent32419380bdd11e7db401fd37a840e0ec4f5b6845 (diff)
downloadQt-a518a9151964edcfaa805fd68c24883bd8eae97d.zip
Qt-a518a9151964edcfaa805fd68c24883bd8eae97d.tar.gz
Qt-a518a9151964edcfaa805fd68c24883bd8eae97d.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public: Enable building with MSVC2008 Added mention of Symbian binary packages to INSTALL file Fix for QTBUG-5870 QGraphicsProxyWidget does not show children on Deploy sqlite3.sis instead of sqlite3.dll in Symbian Separated "make run" and "make runonphone" targets Added UIDs and icons to some webkit examples Implemented node disconnection in Phonon MMF backend Removed dead code from Phonon MMF backend Re-emit prefinishMarkReached and aboutToFinish if rewound back past mark. Implemented support for playlist handling in Phonon MMF backend Mediaplayer: enqueue all entries from .ram file before starting playback Changed call sequence of seeking in Phonon MMF backend, for streaming Implemented buffer status notifications in Phonon MMF backend Added support for streaming playback to Phonon MMF backend Phonon MMF: leaves during object construction throw exceptions Removed stale TODO comments from Phonon MMF backend Symbian: More i18n strings work. Fixed bug which caused Phonon backend error messages to be suppressed Added error strings to Phonon MMF backend
Diffstat (limited to 'demos')
-rw-r--r--demos/qmediaplayer/mediaplayer.cpp16
-rw-r--r--demos/qmediaplayer/mediaplayer.h1
2 files changed, 12 insertions, 5 deletions
diff --git a/demos/qmediaplayer/mediaplayer.cpp b/demos/qmediaplayer/mediaplayer.cpp
index 8f6848f..8471ebd 100644
--- a/demos/qmediaplayer/mediaplayer.cpp
+++ b/demos/qmediaplayer/mediaplayer.cpp
@@ -673,6 +673,13 @@ void MediaPlayer::setFile(const QString &fileName)
m_MediaObject.play();
}
+void MediaPlayer::setLocation(const QString& location)
+{
+ setWindowTitle(location.right(location.length() - location.lastIndexOf('/') - 1));
+ m_MediaObject.setCurrentSource(Phonon::MediaSource(QUrl::fromEncoded(location.toUtf8())));
+ m_MediaObject.play();
+}
+
bool MediaPlayer::playPauseForDialog()
{
// If we're running on a small screen, we want to pause the video when
@@ -850,9 +857,7 @@ void MediaPlayer::openUrl()
bool ok = false;
sourceURL = QInputDialog::getText(this, tr("Open Location"), tr("Please enter a valid address here:"), QLineEdit::Normal, sourceURL, &ok);
if (ok && !sourceURL.isEmpty()) {
- setWindowTitle(sourceURL.right(sourceURL.length() - sourceURL.lastIndexOf('/') - 1));
- m_MediaObject.setCurrentSource(Phonon::MediaSource(QUrl::fromEncoded(sourceURL.toUtf8())));
- m_MediaObject.play();
+ setLocation(sourceURL);
settings.setValue("location", sourceURL);
}
}
@@ -892,10 +897,11 @@ void MediaPlayer::openRamFile()
}
if (!list.isEmpty()) {
- m_MediaObject.setCurrentSource(Phonon::MediaSource(list[0]));
- m_MediaObject.play();
+ m_MediaObject.clearQueue();
+ setLocation(list[0].toString());
for (int i = 1; i < list.count(); i++)
m_MediaObject.enqueue(Phonon::MediaSource(list[i]));
+ m_MediaObject.play();
}
forwardButton->setEnabled(!m_MediaObject.queue().isEmpty());
diff --git a/demos/qmediaplayer/mediaplayer.h b/demos/qmediaplayer/mediaplayer.h
index 14ed4ac..fc1bd90 100644
--- a/demos/qmediaplayer/mediaplayer.h
+++ b/demos/qmediaplayer/mediaplayer.h
@@ -112,6 +112,7 @@ public:
void dropEvent(QDropEvent *e);
void handleDrop(QDropEvent *e);
void setFile(const QString &text);
+ void setLocation(const QString &location);
void initVideoWindow();
void initSettingsDialog();