summaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-01-07 21:26:18 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-01-07 21:26:18 (GMT)
commitfcf3c500ca9f1659088af5114d19f7a365d01701 (patch)
tree2ad737890ec859b4bc9fe6ba5dbf4db3db2c2d34 /demos
parent2dde31f712b5952838d867966d99565e1c7c825d (diff)
parent784374ac949ecf2fdc6895908e1e4dfe938931b8 (diff)
downloadQt-fcf3c500ca9f1659088af5114d19f7a365d01701.zip
Qt-fcf3c500ca9f1659088af5114d19f7a365d01701.tar.gz
Qt-fcf3c500ca9f1659088af5114d19f7a365d01701.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: 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();