diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2009-10-01 16:10:22 (GMT) |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2009-10-01 16:10:22 (GMT) |
commit | 30d9101ecabeb0778c829c3578f1fcf5ec276a8c (patch) | |
tree | d6d67506c2bae71bf967845ff503e02dd41372ae /src | |
parent | 6ee282013b82b5f46fa972296b801eab55c614c1 (diff) | |
parent | 984fe9ebfc6d9582d21bcf1d09cb0578fd163f54 (diff) | |
download | Qt-30d9101ecabeb0778c829c3578f1fcf5ec276a8c.zip Qt-30d9101ecabeb0778c829c3578f1fcf5ec276a8c.tar.gz Qt-30d9101ecabeb0778c829c3578f1fcf5ec276a8c.tar.bz2 |
Merge branch '4.5' of scm.dev.nokia.troll.no:qt/qt into 4.6
Diffstat (limited to 'src')
-rw-r--r-- | src/3rdparty/phonon/gstreamer/mediaobject.cpp | 22 | ||||
-rw-r--r-- | src/gui/kernel/qapplication.cpp | 2 | ||||
-rw-r--r-- | src/network/access/qhttpnetworkconnection.cpp | 9 |
3 files changed, 30 insertions, 3 deletions
diff --git a/src/3rdparty/phonon/gstreamer/mediaobject.cpp b/src/3rdparty/phonon/gstreamer/mediaobject.cpp index 13f9734..5dcbd42 100644 --- a/src/3rdparty/phonon/gstreamer/mediaobject.cpp +++ b/src/3rdparty/phonon/gstreamer/mediaobject.cpp @@ -369,6 +369,11 @@ bool MediaObject::createPipefromURL(const QUrl &url) if (!m_datasource) return false; + // Set the device for MediaSource::Disc + QByteArray mediaDevice = QFile::encodeName(m_source.deviceName()); + if (!mediaDevice.isEmpty()) + g_object_set (m_datasource, "device", mediaDevice.constData(), (const char*)NULL); + // Link data source into pipeline gst_bin_add(GST_BIN(m_pipeline), m_datasource); if (!gst_element_link(m_datasource, m_decodebin)) { @@ -904,8 +909,21 @@ void MediaObject::setSource(const MediaSource &source) case MediaSource::Disc: // CD tracks can be specified by setting the url in the following way uri=cdda:4 { - QUrl cdurl(QLatin1String("cdda://")); - if (createPipefromURL(cdurl)) + QUrl url; + switch (source.discType()) { + case Phonon::Cd: + url = QUrl(QLatin1String("cdda://")); + break; + case Phonon::Dvd: + url = QUrl(QLatin1String("dvd://")); + break; + case Phonon::Vcd: + url = QUrl(QLatin1String("vcd://")); + break; + default: + break; + } + if (!url.isEmpty() && createPipefromURL(url)) m_loading = true; else setError(tr("Could not open media source.")); diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp index 1332545..044fedd 100644 --- a/src/gui/kernel/qapplication.cpp +++ b/src/gui/kernel/qapplication.cpp @@ -3071,7 +3071,7 @@ void QApplicationPrivate::sendSyntheticEnterLeave(QWidget *widget) qt_button_down = 0; // Send enter/leave events followed by a mouse move on the entered widget. - QMouseEvent e(QEvent::MouseMove, pos, globalPos, Qt::NoButton, mouse_buttons, modifier_buttons); + QMouseEvent e(QEvent::MouseMove, pos, globalPos, Qt::NoButton, Qt::NoButton, Qt::NoModifier); sendMouseEvent(widgetUnderCursor, &e, widgetUnderCursor, tlw, &qt_button_down, qt_last_mouse_receiver); #endif // QT_NO_CURSOR } diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp index 27c0ed4..1124337 100644 --- a/src/network/access/qhttpnetworkconnection.cpp +++ b/src/network/access/qhttpnetworkconnection.cpp @@ -191,6 +191,15 @@ void QHttpNetworkConnectionPrivate::prepareRequest(HttpMessagePair &messagePair) request.d->autoDecompress = false; #endif } + + // some websites mandate an accept-language header and fail + // if it is not sent. This is a problem with the website and + // not with us, but we work around this by setting a + // universal one always. + value = request.headerField("accept-language"); + if (value.isEmpty()) + request.setHeaderField("accept-language", "en,*"); + // set the User Agent value = request.headerField("user-agent"); if (value.isEmpty()) |