diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-06-16 16:50:34 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-06-16 16:50:34 (GMT) |
commit | 30c8d1e3dccc83499ac3d76284cfb2e8d860808a (patch) | |
tree | 1d64aba69045221953034f0194dd4045e819d529 /examples | |
parent | 65b05e330640a5e1920c61a4735cbc27a5ca3fe2 (diff) | |
parent | 8e59d3372d9ba18b48ae0b2271fa453332a1ac12 (diff) | |
download | Qt-30c8d1e3dccc83499ac3d76284cfb2e8d860808a.zip Qt-30c8d1e3dccc83499ac3d76284cfb2e8d860808a.tar.gz Qt-30c8d1e3dccc83499ac3d76284cfb2e8d860808a.tar.bz2 |
Merge branch 'qt-4.7-from-4.6' of scm.dev.nokia.troll.no:qt/qt-integration into 4.7-integration
* 'qt-4.7-from-4.6' of scm.dev.nokia.troll.no:qt/qt-integration: (26 commits)
Updated WebKit from /home/shausman/src/webkit/trunk to qtwebkit/qtwebkit-4.6 ( 7932e8da6bfdeff653c572c22aed879c8c308829 )
Updated Harfbuzz from git+ssh://git.freedesktop.org/git/harfbuzz to 5e9b2a88688f6e360d7db00bc86a45bf2cf86e52
VideoWidget example
Buildfix for MSVC2008 (C90 violation)
Updated Harfbuzz from git+ssh://git.freedesktop.org/git/harfbuzz to 1313dc84678c74f1c24f910f702d7ed27a417607
Add skeleton changes files for 4.6.4.
Bump version number after 4.6.3 release.
Fixed unit test failure in qimagereader.
beautify tst_QLocalSocket::writeToClientAndDisconnect
QLocalSocket/Win: check for broken pipe in waitForReadyRead
QLocalSocket/Win: call close on async connection loss
Fix issues with thai line breaking
fix detection of header files
Prospective S60 build fix
Thread safety for QFontEngineS60
Allow to build Qt in static with mingw
Fix incorrect line breaking in QtWebKit.
QLocalSocket: don't emit readChannelFinished() twice on Windows
QLocalSocket/Win: QLocalSocketPrivate::bytesAvailable renamed
QLocalSocket: fix reading from a socket after broken connection
...
Diffstat (limited to 'examples')
-rw-r--r-- | examples/multimedia/videographicsitem/videoplayer.cpp | 15 | ||||
-rw-r--r-- | examples/multimedia/videowidget/videoplayer.cpp | 15 |
2 files changed, 28 insertions, 2 deletions
diff --git a/examples/multimedia/videographicsitem/videoplayer.cpp b/examples/multimedia/videographicsitem/videoplayer.cpp index 281cd6e..f98f542 100644 --- a/examples/multimedia/videographicsitem/videoplayer.cpp +++ b/examples/multimedia/videographicsitem/videoplayer.cpp @@ -115,7 +115,20 @@ VideoPlayer::~VideoPlayer() void VideoPlayer::openFile() { - QString fileName = QFileDialog::getOpenFileName(this, tr("Open Movie")); + QStringList supportedFormats; + foreach (QString fmt, QMovie::supportedFormats()) + supportedFormats << fmt; + foreach (QString fmt, QImageReader::supportedImageFormats()) + supportedFormats << fmt; + + QString filter = "Images ("; + foreach ( QString fmt, supportedFormats) { + filter.append(QString("*.%1 ").arg(fmt)); + } + filter.append(")"); + + QString fileName = QFileDialog::getOpenFileName(this, tr("Open Movie"), + QDir::homePath(), filter); if (!fileName.isEmpty()) { videoItem->stop(); diff --git a/examples/multimedia/videowidget/videoplayer.cpp b/examples/multimedia/videowidget/videoplayer.cpp index 87a2621..ad12069 100644 --- a/examples/multimedia/videowidget/videoplayer.cpp +++ b/examples/multimedia/videowidget/videoplayer.cpp @@ -96,7 +96,20 @@ VideoPlayer::~VideoPlayer() void VideoPlayer::openFile() { - QString fileName = QFileDialog::getOpenFileName(this, tr("Open Movie")); + QStringList supportedFormats; + foreach (QString fmt, QMovie::supportedFormats()) + supportedFormats << fmt; + foreach (QString fmt, QImageReader::supportedImageFormats()) + supportedFormats << fmt; + + QString filter = "Images ("; + foreach ( QString fmt, supportedFormats) { + filter.append(QString("*.%1 ").arg(fmt)); + } + filter.append(")"); + + QString fileName = QFileDialog::getOpenFileName(this, tr("Open Movie"), + QDir::homePath(), filter); if (!fileName.isEmpty()) { surface->stop(); |