summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/3rdparty/phonon/ds9/abstractvideorenderer.cpp4
-rw-r--r--src/3rdparty/phonon/ds9/backend.cpp14
-rw-r--r--src/3rdparty/phonon/ds9/backend.h4
-rw-r--r--src/3rdparty/phonon/ds9/backendnode.cpp19
-rw-r--r--src/3rdparty/phonon/ds9/ds9.desktop17
-rw-r--r--src/3rdparty/phonon/ds9/effect.cpp4
-rw-r--r--src/3rdparty/phonon/ds9/fakesource.cpp34
-rw-r--r--src/3rdparty/phonon/ds9/iodevicereader.cpp94
-rw-r--r--src/3rdparty/phonon/ds9/iodevicereader.h1
-rw-r--r--src/3rdparty/phonon/ds9/mediagraph.cpp38
-rw-r--r--src/3rdparty/phonon/ds9/mediaobject.cpp202
-rw-r--r--src/3rdparty/phonon/ds9/mediaobject.h8
-rw-r--r--src/3rdparty/phonon/ds9/qasyncreader.cpp72
-rw-r--r--src/3rdparty/phonon/ds9/qasyncreader.h6
-rw-r--r--src/3rdparty/phonon/ds9/qaudiocdreader.cpp54
-rw-r--r--src/3rdparty/phonon/ds9/qaudiocdreader.h2
-rw-r--r--src/3rdparty/phonon/ds9/qbasefilter.cpp33
-rw-r--r--src/3rdparty/phonon/ds9/qbasefilter.h4
-rw-r--r--src/3rdparty/phonon/ds9/qevr9.h143
-rw-r--r--src/3rdparty/phonon/ds9/qmeminputpin.cpp113
-rw-r--r--src/3rdparty/phonon/ds9/qmeminputpin.h9
-rw-r--r--src/3rdparty/phonon/ds9/qpin.cpp73
-rw-r--r--src/3rdparty/phonon/ds9/qpin.h7
-rw-r--r--src/3rdparty/phonon/ds9/videorenderer_default.cpp153
-rw-r--r--src/3rdparty/phonon/ds9/videorenderer_default.h55
-rw-r--r--src/3rdparty/phonon/ds9/videorenderer_evr.cpp215
-rw-r--r--src/3rdparty/phonon/ds9/videorenderer_evr.h56
-rw-r--r--src/3rdparty/phonon/ds9/videorenderer_soft.cpp15
-rw-r--r--src/3rdparty/phonon/ds9/videorenderer_vmr9.cpp113
-rw-r--r--src/3rdparty/phonon/ds9/videorenderer_vmr9.h1
-rw-r--r--src/3rdparty/phonon/ds9/videowidget.cpp50
-rw-r--r--src/3rdparty/phonon/ds9/volumeeffect.cpp5
-rw-r--r--src/3rdparty/phonon/ds9/volumeeffect.h2
-rw-r--r--src/3rdparty/phonon/mmf/videowidget.cpp2
-rw-r--r--src/corelib/global/qfeatures.h5
-rw-r--r--src/corelib/global/qfeatures.txt8
-rw-r--r--src/corelib/io/qwindowspipewriter.cpp6
-rw-r--r--src/corelib/kernel/qcoreapplication.cpp7
-rw-r--r--src/corelib/kernel/qcoreapplication_win.cpp51
-rw-r--r--src/corelib/thread/qthread.cpp31
-rw-r--r--src/corelib/thread/qthread_p.h9
-rw-r--r--src/corelib/thread/qthread_unix.cpp2
-rw-r--r--src/corelib/thread/qthread_win.cpp2
-rw-r--r--src/corelib/tools/qsimd_p.h3
-rw-r--r--src/declarative/graphicsitems/graphicsitems.pri6
-rw-r--r--src/declarative/graphicsitems/qdeclarativeanchors.cpp144
-rw-r--r--src/declarative/graphicsitems/qdeclarativeanchors_p.h19
-rw-r--r--src/declarative/graphicsitems/qdeclarativeanchors_p_p.h21
-rw-r--r--src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp4
-rw-r--r--src/declarative/graphicsitems/qdeclarativeanimatedimage_p.h4
-rw-r--r--src/declarative/graphicsitems/qdeclarativeanimatedimage_p_p.h4
-rw-r--r--src/declarative/graphicsitems/qdeclarativeeffects_p.h2
-rw-r--r--src/declarative/graphicsitems/qdeclarativeflickable.cpp4
-rw-r--r--src/declarative/graphicsitems/qdeclarativegraphicswidget.cpp144
-rw-r--r--src/declarative/graphicsitems/qdeclarativegraphicswidget_p.h90
-rw-r--r--src/declarative/graphicsitems/qdeclarativegridview.cpp10
-rw-r--r--src/declarative/graphicsitems/qdeclarativeimage.cpp6
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitem.cpp2
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitem.h3
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitem_p.h3
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp18
-rw-r--r--src/declarative/graphicsitems/qdeclarativelistview.cpp10
-rw-r--r--src/declarative/graphicsitems/qdeclarativepathview.cpp4
-rw-r--r--src/declarative/graphicsitems/qdeclarativepositioners.cpp9
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextinput.cpp79
-rw-r--r--src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp17
-rw-r--r--src/declarative/qml/qdeclarativebinding.cpp2
-rw-r--r--src/declarative/qml/qdeclarativeboundsignal.cpp2
-rw-r--r--src/declarative/qml/qdeclarativecompiledbindings.cpp7
-rw-r--r--src/declarative/qml/qdeclarativecomponent.cpp11
-rw-r--r--src/declarative/qml/qdeclarativecompositetypemanager.cpp4
-rw-r--r--src/declarative/qml/qdeclarativecontext.cpp21
-rw-r--r--src/declarative/qml/qdeclarativecontext.h3
-rw-r--r--src/declarative/qml/qdeclarativecontext_p.h4
-rw-r--r--src/declarative/qml/qdeclarativeengine.cpp62
-rw-r--r--src/declarative/qml/qdeclarativeengine.h2
-rw-r--r--src/declarative/qml/qdeclarativeexpression.cpp2
-rw-r--r--src/declarative/qml/qdeclarativeextensionplugin.cpp12
-rw-r--r--src/declarative/qml/qdeclarativevme.cpp5
-rw-r--r--src/declarative/util/qdeclarativelistmodel.cpp8
-rw-r--r--src/declarative/util/qdeclarativesmoothedfollow.cpp2
-rw-r--r--src/declarative/util/qdeclarativeview.cpp8
-rw-r--r--src/gui/animation/qguivariantanimation.cpp5
-rw-r--r--src/gui/dialogs/qfiledialog.cpp4
-rw-r--r--src/gui/dialogs/qfiledialog_win.cpp1
-rw-r--r--src/gui/dialogs/qprintdialog_unix.cpp2
-rw-r--r--src/gui/egl/qegl_p.h9
-rw-r--r--src/gui/egl/qegl_x11.cpp77
-rw-r--r--src/gui/embedded/qscreenlinuxfb_qws.cpp72
-rw-r--r--src/gui/embedded/qscreenlinuxfb_qws.h4
-rw-r--r--src/gui/embedded/qscreenqnx_qws.cpp2
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp12
-rw-r--r--src/gui/graphicsview/qgraphicsitem.h3
-rw-r--r--src/gui/graphicsview/qgraphicsitem_p.h4
-rw-r--r--src/gui/inputmethod/qcoefepinputcontext_s60.cpp15
-rw-r--r--src/gui/itemviews/qitemselectionmodel.cpp21
-rw-r--r--src/gui/itemviews/qitemselectionmodel.h2
-rw-r--r--src/gui/itemviews/qtableview.cpp4
-rw-r--r--src/gui/itemviews/qtreeview.cpp23
-rw-r--r--src/gui/itemviews/qtreeview_p.h1
-rw-r--r--src/gui/itemviews/qtreewidget.cpp6
-rw-r--r--src/gui/kernel/qaction.cpp1
-rw-r--r--src/gui/kernel/qaction_p.h17
-rw-r--r--src/gui/kernel/qapplication.cpp4
-rw-r--r--src/gui/kernel/qsoftkeymanager.cpp12
-rw-r--r--src/gui/kernel/qsoftkeymanager_p.h3
-rw-r--r--src/gui/kernel/qsoftkeymanager_s60.cpp5
-rw-r--r--src/gui/painting/qbezier.cpp4
-rw-r--r--src/gui/painting/qdrawhelper.cpp454
-rw-r--r--src/gui/painting/qpathclipper.cpp7
-rw-r--r--src/gui/painting/qtextureglyphcache.cpp7
-rw-r--r--src/gui/painting/qtextureglyphcache_p.h1
-rw-r--r--src/gui/styles/qs60style.cpp175
-rw-r--r--src/gui/styles/qs60style_p.h27
-rw-r--r--src/gui/styles/qs60style_s60.cpp21
-rw-r--r--src/gui/styles/qstylesheetstyle.cpp4
-rw-r--r--src/gui/text/qfont.cpp8
-rw-r--r--src/gui/text/qfontdatabase_x11.cpp9
-rw-r--r--src/gui/util/qcompleter.cpp2
-rw-r--r--src/gui/widgets/qdialogbuttonbox.cpp15
-rw-r--r--src/gui/widgets/qframe.cpp2
-rw-r--r--src/gui/widgets/qmenubar.cpp11
-rw-r--r--src/imports/gestures/qdeclarativegesturearea.cpp3
-rw-r--r--src/imports/multimedia/qdeclarativeaudio.cpp2
-rw-r--r--src/imports/multimedia/qdeclarativevideo.cpp2
-rw-r--r--src/imports/particles/qdeclarativeparticles.cpp4
-rw-r--r--src/imports/widgets/widgets.cpp3
-rw-r--r--src/multimedia/effects/qsoundeffect.cpp2
-rw-r--r--src/network/access/qhttpnetworkconnectionchannel.cpp2
-rw-r--r--src/network/access/qnetworkaccessbackend.cpp3
-rw-r--r--src/network/access/qnetworkaccessbackend_p.h2
-rw-r--r--src/network/access/qnetworkaccessmanager.cpp12
-rw-r--r--src/network/access/qnetworkaccessmanager.h12
-rw-r--r--src/network/access/qnetworkaccessmanager_p.h6
-rw-r--r--src/network/access/qnetworkreplyimpl.cpp12
-rw-r--r--src/network/access/qnetworkreplyimpl_p.h6
-rw-r--r--src/network/bearer/qbearerengine.cpp4
-rw-r--r--src/network/bearer/qbearerengine_p.h4
-rw-r--r--src/network/bearer/qbearerplugin.cpp4
-rw-r--r--src/network/bearer/qbearerplugin_p.h5
-rw-r--r--src/network/bearer/qnetworkconfigmanager.cpp5
-rw-r--r--src/network/bearer/qnetworkconfigmanager.h4
-rw-r--r--src/network/bearer/qnetworkconfigmanager_p.cpp20
-rw-r--r--src/network/bearer/qnetworkconfigmanager_p.h15
-rw-r--r--src/network/bearer/qnetworkconfiguration_p.h4
-rw-r--r--src/network/bearer/qnetworksession.cpp4
-rw-r--r--src/network/bearer/qnetworksession.h4
-rw-r--r--src/network/bearer/qnetworksession_p.h8
-rw-r--r--src/network/socket/qlocalserver_win.cpp4
-rw-r--r--src/network/ssl/qsslsocket_openssl_symbols.cpp2
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp6
-rw-r--r--src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp5
-rw-r--r--src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h1
-rw-r--r--src/opengl/gl2paintengineex/qtriangulatingstroker.cpp28
-rw-r--r--src/opengl/qgl.cpp3
-rw-r--r--src/opengl/qgl_x11.cpp8
-rw-r--r--src/plugins/bearer/corewlan/corewlan.pro2
-rw-r--r--src/plugins/bearer/corewlan/main.cpp4
-rw-r--r--src/plugins/bearer/corewlan/qcorewlanengine.h5
-rw-r--r--src/plugins/bearer/corewlan/qcorewlanengine.mm8
-rw-r--r--src/plugins/bearer/generic/generic.pro2
-rw-r--r--src/plugins/bearer/generic/main.cpp4
-rw-r--r--src/plugins/bearer/generic/qgenericengine.cpp3
-rw-r--r--src/plugins/bearer/generic/qgenericengine.h4
-rw-r--r--src/plugins/bearer/icd/main.cpp4
-rw-r--r--src/plugins/bearer/icd/qicdengine.cpp4
-rw-r--r--src/plugins/bearer/icd/qicdengine.h8
-rw-r--r--src/plugins/bearer/icd/qnetworksession_impl.cpp4
-rw-r--r--src/plugins/bearer/icd/qnetworksession_impl.h4
-rw-r--r--src/plugins/bearer/nativewifi/main.cpp4
-rw-r--r--src/plugins/bearer/nativewifi/nativewifi.pro2
-rw-r--r--src/plugins/bearer/nativewifi/qnativewifiengine.cpp4
-rw-r--r--src/plugins/bearer/nativewifi/qnativewifiengine.h4
-rw-r--r--src/plugins/bearer/networkmanager/main.cpp2
-rw-r--r--src/plugins/bearer/networkmanager/networkmanager.pro2
-rw-r--r--src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp2
-rw-r--r--src/plugins/bearer/networkmanager/qnetworkmanagerengine.h2
-rw-r--r--src/plugins/bearer/nla/nla.pro2
-rw-r--r--src/plugins/bearer/qbearerengine_impl.h3
-rw-r--r--src/plugins/bearer/qnetworksession_impl.cpp5
-rw-r--r--src/plugins/bearer/qnetworksession_impl.h12
-rw-r--r--src/plugins/bearer/symbian/main.cpp4
-rw-r--r--src/plugins/bearer/symbian/qnetworksession_impl.cpp5
-rw-r--r--src/plugins/bearer/symbian/symbianengine.cpp4
-rw-r--r--src/plugins/bearer/symbian/symbianengine.h8
-rw-r--r--src/plugins/gfxdrivers/powervr/QWSWSEGL/pvrqwsdrawable.c2
-rw-r--r--src/plugins/phonon/ds9/ds9.pro11
-rw-r--r--src/s60installs/bwins/QtCoreu.def7
-rw-r--r--src/s60installs/bwins/QtDeclarativeu.def129
-rw-r--r--src/s60installs/bwins/QtGuiu.def5
-rw-r--r--src/s60installs/bwins/QtMultimediau.def2
-rw-r--r--src/s60installs/eabi/QtCoreu.def13
-rw-r--r--src/s60installs/eabi/QtDeclarativeu.def135
-rw-r--r--src/s60installs/eabi/QtGuiu.def5
-rw-r--r--src/s60installs/eabi/QtMultimediau.def3
-rw-r--r--src/script/api/qscriptengine.cpp16
196 files changed, 2789 insertions, 1429 deletions
diff --git a/src/3rdparty/phonon/ds9/abstractvideorenderer.cpp b/src/3rdparty/phonon/ds9/abstractvideorenderer.cpp
index e932e70..a9d0694 100644
--- a/src/3rdparty/phonon/ds9/abstractvideorenderer.cpp
+++ b/src/3rdparty/phonon/ds9/abstractvideorenderer.cpp
@@ -99,8 +99,8 @@ namespace Phonon
m_dstX = m_dstY = 0;
if (ratio > 0) {
- if (realWidth / realHeight > ratio && scaleMode == Phonon::VideoWidget::FitInView
- || realWidth / realHeight < ratio && scaleMode == Phonon::VideoWidget::ScaleAndCrop) {
+ if ((realWidth / realHeight > ratio && scaleMode == Phonon::VideoWidget::FitInView)
+ || (realWidth / realHeight < ratio && scaleMode == Phonon::VideoWidget::ScaleAndCrop)) {
//the height is correct, let's change the width
m_dstWidth = qRound(realHeight * ratio);
m_dstX = qRound((realWidth - realHeight * ratio) / 2.);
diff --git a/src/3rdparty/phonon/ds9/backend.cpp b/src/3rdparty/phonon/ds9/backend.cpp
index 2c56af7..fbc4bdc 100644
--- a/src/3rdparty/phonon/ds9/backend.cpp
+++ b/src/3rdparty/phonon/ds9/backend.cpp
@@ -41,6 +41,8 @@ namespace Phonon
{
namespace DS9
{
+ QMutex *Backend::directShowMutex = 0;
+
bool Backend::AudioMoniker::operator==(const AudioMoniker &other)
{
return other->IsEqual(*this) == S_OK;
@@ -50,6 +52,8 @@ namespace Phonon
Backend::Backend(QObject *parent, const QVariantList &)
: QObject(parent)
{
+ directShowMutex = &m_directShowMutex;
+
::CoInitialize(0);
//registering meta types
@@ -62,6 +66,8 @@ namespace Phonon
m_audioOutputs.clear();
m_audioEffects.clear();
::CoUninitialize();
+
+ directShowMutex = 0;
}
QObject *Backend::createObject(BackendInterface::Class c, QObject *parent, const QList<QVariant> &args)
@@ -131,6 +137,7 @@ namespace Phonon
QList<int> Backend::objectDescriptionIndexes(Phonon::ObjectDescriptionType type) const
{
+ QMutexLocker locker(&m_directShowMutex);
QList<int> ret;
switch(type)
@@ -157,7 +164,7 @@ namespace Phonon
while (S_OK == enumMon->Next(1, mon.pparam(), 0)) {
LPOLESTR str = 0;
mon->GetDisplayName(0,0,&str);
- const QString name = QString::fromUtf16((unsigned short*)str);
+ const QString name = QString::fromWCharArray(str);
ComPointer<IMalloc> alloc;
::CoGetMalloc(1, alloc.pparam());
alloc->Free(str);
@@ -204,6 +211,7 @@ namespace Phonon
QHash<QByteArray, QVariant> Backend::objectDescriptionProperties(Phonon::ObjectDescriptionType type, int index) const
{
+ QMutexLocker locker(&m_directShowMutex);
QHash<QByteArray, QVariant> ret;
switch (type)
{
@@ -216,7 +224,7 @@ namespace Phonon
LPOLESTR str = 0;
HRESULT hr = mon->GetDisplayName(0,0, &str);
if (SUCCEEDED(hr)) {
- QString name = QString::fromUtf16((unsigned short*)str);
+ QString name = QString::fromWCharArray(str);
ComPointer<IMalloc> alloc;
::CoGetMalloc(1, alloc.pparam());
alloc->Free(str);
@@ -231,7 +239,7 @@ namespace Phonon
WCHAR name[80]; // 80 is clearly stated in the MSDN doc
HRESULT hr = ::DMOGetName(m_audioEffects[index], name);
if (SUCCEEDED(hr)) {
- ret["name"] = QString::fromUtf16((unsigned short*)name);
+ ret["name"] = QString::fromWCharArray(name);
}
}
break;
diff --git a/src/3rdparty/phonon/ds9/backend.h b/src/3rdparty/phonon/ds9/backend.h
index ad638f2..7c3c109 100644
--- a/src/3rdparty/phonon/ds9/backend.h
+++ b/src/3rdparty/phonon/ds9/backend.h
@@ -23,6 +23,7 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
#include <phonon/phononnamespace.h>
#include <QtCore/QList>
+#include <QtCore/QMutex>
#include "compointer.h"
#include "backendnode.h"
@@ -63,6 +64,8 @@ namespace Phonon
Filter getAudioOutputFilter(int index) const;
+ static QMutex *directShowMutex;
+
Q_SIGNALS:
void objectDescriptionChanged(ObjectDescriptionType);
@@ -74,6 +77,7 @@ namespace Phonon
};
mutable QVector<AudioMoniker> m_audioOutputs;
mutable QVector<CLSID> m_audioEffects;
+ mutable QMutex m_directShowMutex;
};
}
}
diff --git a/src/3rdparty/phonon/ds9/backendnode.cpp b/src/3rdparty/phonon/ds9/backendnode.cpp
index 7e0b3cd..737ab7b 100644
--- a/src/3rdparty/phonon/ds9/backendnode.cpp
+++ b/src/3rdparty/phonon/ds9/backendnode.cpp
@@ -57,6 +57,25 @@ namespace Phonon
BackendNode::~BackendNode()
{
+ //this will remove the filter from the graph
+ FILTER_INFO info;
+ for(int i = 0; i < FILTER_COUNT; ++i) {
+ const Filter &filter = m_filters[i];
+ if (!filter)
+ continue;
+ filter->QueryFilterInfo(&info);
+ if (info.pGraph) {
+ HRESULT hr = info.pGraph->RemoveFilter(filter);
+
+ if (FAILED(hr) && m_mediaObject) {
+ m_mediaObject->ensureStopped();
+
+ hr = info.pGraph->RemoveFilter(filter);
+ }
+ Q_ASSERT(SUCCEEDED(hr));
+ info.pGraph->Release();
+ }
+ }
}
void BackendNode::setMediaObject(MediaObject *mo)
diff --git a/src/3rdparty/phonon/ds9/ds9.desktop b/src/3rdparty/phonon/ds9/ds9.desktop
index 1bc3451..764390e 100644
--- a/src/3rdparty/phonon/ds9/ds9.desktop
+++ b/src/3rdparty/phonon/ds9/ds9.desktop
@@ -5,13 +5,12 @@ MimeType=application/x-annodex;video/quicktime;video/x-quicktime;audio/x-m4a;app
X-KDE-Library=phonon_ds9
X-KDE-PhononBackendInfo-InterfaceVersion=1
X-KDE-PhononBackendInfo-Version=0.1
-X-KDE-PhononBackendInfo-Website=http://www.trolltech.com/
+X-KDE-PhononBackendInfo-Website=http://qt.nokia.com/
InitialPreference=15
Name=DirectShow9
Name[bg]=DirectShow9
Name[ca]=DirectShow9
-Name[ca@valencia]=DirectShow9
Name[cs]=DirectShow9
Name[da]=DirectShow9
Name[de]=DirectShow9
@@ -20,14 +19,11 @@ Name[en_GB]=DirectShow9
Name[es]=DirectShow9
Name[et]=DirectShow9
Name[eu]=DirectShow9
-Name[fi]=DirectShow9
Name[fr]=DirectShow9
Name[ga]=DirectShow9
Name[gl]=DirectShow9
-Name[hr]=DirectShow9
Name[hsb]=DirectShow9
Name[hu]=DirectShow9
-Name[id]=DirectShow9
Name[is]=DirectShow9
Name[it]=DirectShow9
Name[ja]=DirectShow9
@@ -35,7 +31,6 @@ Name[ko]=DirectShow9
Name[ku]=DirectShow9
Name[lt]=DirectShow9
Name[lv]=DirectShow9
-Name[nb]=DirectShow9
Name[nds]=DirectShow9
Name[nl]=DirectShow9
Name[nn]=DirectShow9
@@ -43,13 +38,10 @@ Name[pa]=ਡਾਇਰੈਕਸ਼ੋ9
Name[pl]=DirectShow9
Name[pt]=DirectShow9
Name[pt_BR]=DirectShow9
-Name[ru]=DirectShow9
Name[se]=DirectShow9
Name[sk]=DirectShow 9
Name[sl]=DirectShow 9
Name[sr]=Директшоу‑9
-Name[sr@ijekavian]=Директшоу‑9
-Name[sr@ijekavianlatin]=DirectShow‑9
Name[sr@latin]=DirectShow‑9
Name[sv]=Directshow 9
Name[tr]=DirectShow9
@@ -61,7 +53,6 @@ Name[zh_TW]=DirectShow9
Comment=Phonon DirectShow9 backend
Comment[bg]=Phonon DirectShow9
Comment[ca]=Dorsal DirectShow9 del Phonon
-Comment[ca@valencia]=Dorsal DirectShow9 del Phonon
Comment[cs]=Phonon DirectShow9 backend
Comment[da]=DirectShow9-backend til Phonon
Comment[de]=Phonon-Treiber für DirectShow9
@@ -70,13 +61,11 @@ Comment[en_GB]=Phonon DirectShow9 backend
Comment[es]=Motor DirectShow9 para Phonon
Comment[et]=Phononi DirectShow9 taustaprogramm
Comment[eu]=Phonon DirectShow9 backend
-Comment[fi]=Phonon DirectShow9-taustaohjelma
Comment[fr]=Système de gestion DirectShow9 pour Phonon
Comment[ga]=Inneall DirectShow9 le haghaidh Phonon
Comment[gl]=Infraestrutura de DirectShow9 para Phonon
Comment[hsb]=Phonon DirectShow9 backend
Comment[hu]=Phonon DirectShow9 modul
-Comment[id]=Phonon DirectShow9 backend
Comment[is]=Phonon DirectShow9 bakendi
Comment[it]=Motore DirectShow9 di Phonon
Comment[ja]=Phonon DirectShow9 バックエンド
@@ -84,7 +73,6 @@ Comment[ko]=Phonon DirectShow9 백엔드
Comment[ku]=Binesaza Phonon DirectShow9
Comment[lt]=Phonon DirectShow9 galinė sąsaja
Comment[lv]=Phonon DirectShow9 aizmugure
-Comment[nb]=Phonon-motor for DirectShow9
Comment[nds]=Phonon-Hülpprogrmm DirectShow9
Comment[nl]=DirectShow9-backend (Phonon)
Comment[nn]=Phonon-motor for DirectShow9
@@ -92,13 +80,10 @@ Comment[pa]=ਫੋਨੋਨ ਡਾਇਰੈਕਟਸ਼ੋ9 ਬੈਕਐਂਡ
Comment[pl]=Obsługa DirectShow9 przez Phonon
Comment[pt]=Infra-estrutura do DirectShow9 para o Phonon
Comment[pt_BR]=Infraestrutura Phonon DirectShow9
-Comment[ru]=Механизм DirectShow9 для Phonon
Comment[se]=Phonon DirectShow9 duogášmohtor
Comment[sk]=Phonon DirectShow 9 podsystém
Comment[sl]=Phononova Hrbtenica DirectShow 9
Comment[sr]=Директшоу‑9 као позадина Фонона
-Comment[sr@ijekavian]=Директшоу‑9 као позадина Фонона
-Comment[sr@ijekavianlatin]=DirectShow‑9 kao pozadina Phonona
Comment[sr@latin]=DirectShow‑9 kao pozadina Phonona
Comment[sv]=Phonon Directshow 9-gränssnitt
Comment[tr]=Phonon DirectShow9 arka ucu
diff --git a/src/3rdparty/phonon/ds9/effect.cpp b/src/3rdparty/phonon/ds9/effect.cpp
index 104a3c1..ebe976b 100644
--- a/src/3rdparty/phonon/ds9/effect.cpp
+++ b/src/3rdparty/phonon/ds9/effect.cpp
@@ -82,7 +82,7 @@ namespace Phonon
current += wcslen(current) + 1; //skip the name
current += wcslen(current) + 1; //skip the unit
for(; *current; current += wcslen(current) + 1) {
- values.append( QString::fromUtf16((unsigned short*)current) );
+ values.append( QString::fromWCharArray(current) );
}
}
//FALLTHROUGH
@@ -107,7 +107,7 @@ namespace Phonon
Phonon::EffectParameter::Hints hint = info.mopCaps == MP_CAPS_CURVE_INVSQUARE ?
Phonon::EffectParameter::LogarithmicHint : Phonon::EffectParameter::Hints(0);
- const QString n = QString::fromUtf16((unsigned short*)name);
+ const QString n = QString::fromWCharArray(name);
ret.append(Phonon::EffectParameter(i, n, hint, def, min, max, values));
::CoTaskMemFree(name); //let's free the memory
}
diff --git a/src/3rdparty/phonon/ds9/fakesource.cpp b/src/3rdparty/phonon/ds9/fakesource.cpp
index 9a61a2e..4dce138 100644
--- a/src/3rdparty/phonon/ds9/fakesource.cpp
+++ b/src/3rdparty/phonon/ds9/fakesource.cpp
@@ -29,8 +29,10 @@ namespace Phonon
namespace DS9
{
static WAVEFORMATEX g_defaultWaveFormat = {WAVE_FORMAT_PCM, 2, 44100, 176400, 4, 16, 0};
- static BITMAPINFOHEADER g_defautBitmapHeader = { sizeof(BITMAPINFOHEADER), 1, 1, 1, 0, 0, 0, 0, 0, 0, 0};
- static VIDEOINFOHEADER2 g_defaultVideoInfo = { { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+ static VIDEOINFOHEADER2 g_defaultVideoInfo = { { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, 0, 0, 0, 0, 0, 0, 0, {0}, 0, {sizeof(BITMAPINFOHEADER), 1, 1, 1, 0, 0, 0, 0, 0, 0, 0} };
+
+ static const AM_MEDIA_TYPE g_fakeAudioType = {MEDIATYPE_Audio, MEDIASUBTYPE_PCM, 0, 0, 2, FORMAT_WaveFormatEx, 0, sizeof(WAVEFORMATEX), reinterpret_cast<BYTE*>(&g_defaultWaveFormat)};
+ static const AM_MEDIA_TYPE g_fakeVideoType = {MEDIATYPE_Video, MEDIASUBTYPE_RGB32, TRUE, FALSE, 0, FORMAT_VideoInfo2, 0, sizeof(VIDEOINFOHEADER2), reinterpret_cast<BYTE*>(&g_defaultVideoInfo)};
class FakePin : public QPin
{
@@ -128,36 +130,12 @@ namespace Phonon
void FakeSource::createFakeAudioPin()
{
- AM_MEDIA_TYPE mt;
- qMemSet(&mt, 0, sizeof(AM_MEDIA_TYPE));
- mt.majortype = MEDIATYPE_Audio;
- mt.subtype = MEDIASUBTYPE_PCM;
- mt.formattype = FORMAT_WaveFormatEx;
- mt.lSampleSize = 2;
-
- //fake the format (stereo 44.1 khz stereo 16 bits)
- mt.cbFormat = sizeof(WAVEFORMATEX);
- mt.pbFormat = reinterpret_cast<BYTE*>(&g_defaultWaveFormat);
-
- new FakePin(this, mt);
+ new FakePin(this, g_fakeAudioType);
}
void FakeSource::createFakeVideoPin()
{
- AM_MEDIA_TYPE mt;
- qMemSet(&mt, 0, sizeof(AM_MEDIA_TYPE));
- mt.majortype = MEDIATYPE_Video;
- mt.subtype = MEDIASUBTYPE_RGB32;
- mt.formattype = FORMAT_VideoInfo2;
- mt.bFixedSizeSamples = 1;
-
- g_defaultVideoInfo.bmiHeader = g_defautBitmapHeader;
-
- //fake the format
- mt.cbFormat = sizeof(VIDEOINFOHEADER2);
- mt.pbFormat = reinterpret_cast<BYTE*>(&g_defaultVideoInfo);
-
- new FakePin(this, mt);
+ new FakePin(this, g_fakeVideoType);
}
}
diff --git a/src/3rdparty/phonon/ds9/iodevicereader.cpp b/src/3rdparty/phonon/ds9/iodevicereader.cpp
index 9152712..ba4ae5c 100644
--- a/src/3rdparty/phonon/ds9/iodevicereader.cpp
+++ b/src/3rdparty/phonon/ds9/iodevicereader.cpp
@@ -36,18 +36,20 @@ namespace Phonon
//these mediatypes define a stream, its type will be autodetected by DirectShow
static QVector<AM_MEDIA_TYPE> getMediaTypes()
{
- AM_MEDIA_TYPE mt = { MEDIATYPE_Stream, MEDIASUBTYPE_NULL, TRUE, FALSE, 1, GUID_NULL, 0, 0, 0};
+ //the order here is important because otherwise,
+ //directshow might not be able to detect the stream type correctly
+
+ AM_MEDIA_TYPE mt = { MEDIATYPE_Stream, MEDIASUBTYPE_Avi, TRUE, FALSE, 1, GUID_NULL, 0, 0, 0};
QVector<AM_MEDIA_TYPE> ret;
- //normal auto-detect stream
- mt.subtype = MEDIASUBTYPE_NULL;
- ret << mt;
//AVI stream
- mt.subtype = MEDIASUBTYPE_Avi;
ret << mt;
//WAVE stream
mt.subtype = MEDIASUBTYPE_WAVE;
ret << mt;
+ //normal auto-detect stream (must be at the end!)
+ mt.subtype = MEDIASUBTYPE_NULL;
+ ret << mt;
return ret;
}
@@ -64,7 +66,6 @@ namespace Phonon
//for Phonon::StreamInterface
void writeData(const QByteArray &data)
{
- QWriteLocker locker(&m_lock);
m_pos += data.size();
m_buffer += data;
}
@@ -75,54 +76,22 @@ namespace Phonon
void setStreamSize(qint64 newSize)
{
- QWriteLocker locker(&m_lock);
+ QMutexLocker locker(&m_mutex);
m_size = newSize;
}
- qint64 streamSize() const
- {
- QReadLocker locker(&m_lock);
- return m_size;
- }
-
void setStreamSeekable(bool s)
{
- QWriteLocker locker(&m_lock);
+ QMutexLocker locker(&m_mutex);
m_seekable = s;
}
- bool streamSeekable() const
- {
- QReadLocker locker(&m_lock);
- return m_seekable;
- }
-
- void setCurrentPos(qint64 pos)
- {
- QWriteLocker locker(&m_lock);
- m_pos = pos;
- seekStream(pos);
- m_buffer.clear();
- }
-
- qint64 currentPos() const
- {
- QReadLocker locker(&m_lock);
- return m_pos;
- }
-
- int currentBufferSize() const
- {
- QReadLocker locker(&m_lock);
- return m_buffer.size();
- }
-
//virtual pure members
//implementation from IAsyncReader
STDMETHODIMP Length(LONGLONG *total, LONGLONG *available)
{
- QReadLocker locker(&m_lock);
+ QMutexLocker locker(&m_mutex);
if (total) {
*total = m_size;
}
@@ -137,37 +106,39 @@ namespace Phonon
HRESULT read(LONGLONG pos, LONG length, BYTE *buffer, LONG *actual)
{
- QMutexLocker locker(&m_mutexRead);
+ Q_ASSERT(!m_mutex.tryLock());
+ if (m_mediaGraph->isStopping()) {
+ return VFW_E_WRONG_STATE;
+ }
- if(streamSize() != 1 && pos + length > streamSize()) {
+ if(m_size != 1 && pos + length > m_size) {
//it tries to read outside of the boundaries
return E_FAIL;
}
- if (currentPos() - currentBufferSize() != pos) {
- if (!streamSeekable()) {
+ if (m_pos - m_buffer.size() != pos) {
+ if (!m_seekable) {
return S_FALSE;
}
- setCurrentPos(pos);
+ m_pos = pos;
+ seekStream(pos);
+ m_buffer.clear();
}
- int oldSize = currentBufferSize();
- while (currentBufferSize() < int(length)) {
+ int oldSize = m_buffer.size();
+ while (m_buffer.size() < int(length)) {
needData();
- if (oldSize == currentBufferSize()) {
+ if (oldSize == m_buffer.size()) {
break; //we didn't get any data
}
- oldSize = currentBufferSize();
+ oldSize = m_buffer.size();
}
- DWORD bytesRead = qMin(currentBufferSize(), int(length));
- {
- QWriteLocker locker(&m_lock);
- qMemCopy(buffer, m_buffer.data(), bytesRead);
- //truncate the buffer
- m_buffer = m_buffer.mid(bytesRead);
- }
+ int bytesRead = qMin(m_buffer.size(), int(length));
+ qMemCopy(buffer, m_buffer.data(), bytesRead);
+ //truncate the buffer
+ m_buffer = m_buffer.mid(bytesRead);
if (actual) {
*actual = bytesRead; //initialization
@@ -183,7 +154,6 @@ namespace Phonon
qint64 m_pos;
qint64 m_size;
- QMutex m_mutexRead;
const MediaGraph *m_mediaGraph;
};
@@ -197,14 +167,6 @@ namespace Phonon
IODeviceReader::~IODeviceReader()
{
}
-
- STDMETHODIMP IODeviceReader::Stop()
- {
- HRESULT hr = QBaseFilter::Stop();
- m_streamReader->enoughData(); //this asks to cancel any blocked call to needData
- return hr;
- }
-
}
}
diff --git a/src/3rdparty/phonon/ds9/iodevicereader.h b/src/3rdparty/phonon/ds9/iodevicereader.h
index af4b271..c8b91c3 100644
--- a/src/3rdparty/phonon/ds9/iodevicereader.h
+++ b/src/3rdparty/phonon/ds9/iodevicereader.h
@@ -41,7 +41,6 @@ namespace Phonon
public:
IODeviceReader(const MediaSource &source, const MediaGraph *);
~IODeviceReader();
- STDMETHODIMP Stop();
private:
StreamReader *m_streamReader;
diff --git a/src/3rdparty/phonon/ds9/mediagraph.cpp b/src/3rdparty/phonon/ds9/mediagraph.cpp
index db0ec84..3e7a68b 100644
--- a/src/3rdparty/phonon/ds9/mediagraph.cpp
+++ b/src/3rdparty/phonon/ds9/mediagraph.cpp
@@ -68,6 +68,8 @@ namespace Phonon
return ret;
}
+
+/*
static HRESULT saveToFile(Graph graph, const QString &filepath)
{
const WCHAR wszStreamName[] = L"ActiveMovieGraph";
@@ -103,7 +105,7 @@ namespace Phonon
return hr;
}
-
+*/
MediaGraph::MediaGraph(MediaObject *mo, short index) :
m_graph(CLSID_FilterGraph, IID_IGraphBuilder),
@@ -377,11 +379,12 @@ namespace Phonon
FILTER_INFO info;
filter->QueryFilterInfo(&info);
#ifdef GRAPH_DEBUG
- qDebug() << "removeFilter" << QString::fromUtf16(info.achName);
+ qDebug() << "removeFilter" << QString((const QChar *)info.achName);
#endif
if (info.pGraph) {
info.pGraph->Release();
- return m_graph->RemoveFilter(filter);
+ if (info.pGraph == m_graph)
+ return m_graph->RemoveFilter(filter);
}
//already removed
@@ -537,11 +540,11 @@ namespace Phonon
const QList<OutputPin> outputs = BackendNode::pins(filter, PINDIR_OUTPUT);
for(int i = 0; i < outputs.count(); ++i) {
const OutputPin &pin = outputs.at(i);
- if (VFW_E_NOT_CONNECTED == pin->ConnectedTo(inPin.pparam())) {
+ if (HRESULT(VFW_E_NOT_CONNECTED) == pin->ConnectedTo(inPin.pparam())) {
return SUCCEEDED(pin->Connect(newIn, 0));
}
}
- //we should never go here
+ //we shoud never go here
return false;
} else {
QAMMediaType type;
@@ -679,7 +682,6 @@ namespace Phonon
#ifndef QT_NO_PHONON_MEDIACONTROLLER
} else if (source.discType() == Phonon::Cd) {
m_realSource = Filter(new QAudioCDPlayer);
- m_result = m_graph->AddFilter(m_realSource, 0);
#endif //QT_NO_PHONON_MEDIACONTROLLER
} else {
@@ -809,7 +811,7 @@ namespace Phonon
for (int i = 0; i < outputs.count(); ++i) {
const OutputPin &out = outputs.at(i);
InputPin pin;
- if (out->ConnectedTo(pin.pparam()) == VFW_E_NOT_CONNECTED) {
+ if (out->ConnectedTo(pin.pparam()) == HRESULT(VFW_E_NOT_CONNECTED)) {
m_decoderPins += out; //unconnected outputs can be decoded outputs
}
}
@@ -820,7 +822,7 @@ namespace Phonon
//let's reestablish the connections
for (int i = 0; i < connections.count(); ++i) {
const GraphConnection &connection = connections.at(i);
- //check if we should transfer the sink node
+ //check if we shoud transfer the sink node
grabFilter(connection.input);
grabFilter(connection.output);
@@ -873,7 +875,7 @@ namespace Phonon
{
FILTER_INFO info;
filter->QueryFilterInfo(&info);
- qDebug() << Q_FUNC_INFO << QString::fromUtf16(info.achName);
+ qDebug() << Q_FUNC_INFO << QString((const QChar *)info.achName);
if (info.pGraph) {
info.pGraph->Release();
}
@@ -919,7 +921,7 @@ namespace Phonon
{
FILTER_INFO info;
filter->QueryFilterInfo(&info);
- qDebug() << "found a decoder filter" << QString::fromUtf16(info.achName);
+ qDebug() << "found a decoder filter" << QString((const QChar *)info.achName);
if (info.pGraph) {
info.pGraph->Release();
}
@@ -935,7 +937,7 @@ namespace Phonon
{
FILTER_INFO info;
filter->QueryFilterInfo(&info);
- qDebug() << Q_FUNC_INFO << QString::fromUtf16(info.achName);
+ qDebug() << Q_FUNC_INFO << QString((const QChar *)info.achName);
if (info.pGraph) {
info.pGraph->Release();
}
@@ -954,7 +956,7 @@ namespace Phonon
{
FILTER_INFO info;
filter->QueryFilterInfo(&info);
- qDebug() << Q_FUNC_INFO << QString::fromUtf16(info.achName);
+ qDebug() << Q_FUNC_INFO << QString((const QChar *)info.achName);
if (info.pGraph) {
info.pGraph->Release();
}
@@ -988,7 +990,7 @@ namespace Phonon
{
FILTER_INFO info;
filter->QueryFilterInfo(&info);
- qDebug() << "found a demuxer filter" << QString::fromUtf16(info.achName);
+ qDebug() << "found a demuxer filter" << QString((const QChar *)info.achName);
if (info.pGraph) {
info.pGraph->Release();
}
@@ -1006,27 +1008,27 @@ namespace Phonon
BSTR str;
HRESULT hr = mediaContent->get_AuthorName(&str);
if (SUCCEEDED(hr)) {
- ret.insert(QLatin1String("ARTIST"), QString::fromUtf16((const unsigned short*)str));
+ ret.insert(QLatin1String("ARTIST"), QString::fromWCharArray(str));
SysFreeString(str);
}
hr = mediaContent->get_Title(&str);
if (SUCCEEDED(hr)) {
- ret.insert(QLatin1String("TITLE"), QString::fromUtf16((const unsigned short*)str));
+ ret.insert(QLatin1String("TITLE"), QString::fromWCharArray(str));
SysFreeString(str);
}
hr = mediaContent->get_Description(&str);
if (SUCCEEDED(hr)) {
- ret.insert(QLatin1String("DESCRIPTION"), QString::fromUtf16((const unsigned short*)str));
+ ret.insert(QLatin1String("DESCRIPTION"), QString::fromWCharArray(str));
SysFreeString(str);
}
hr = mediaContent->get_Copyright(&str);
if (SUCCEEDED(hr)) {
- ret.insert(QLatin1String("COPYRIGHT"), QString::fromUtf16((const unsigned short*)str));
+ ret.insert(QLatin1String("COPYRIGHT"), QString::fromWCharArray(str));
SysFreeString(str);
}
hr = mediaContent->get_MoreInfoText(&str);
if (SUCCEEDED(hr)) {
- ret.insert(QLatin1String("MOREINFO"), QString::fromUtf16((const unsigned short*)str));
+ ret.insert(QLatin1String("MOREINFO"), QString::fromWCharArray(str));
SysFreeString(str);
}
}
diff --git a/src/3rdparty/phonon/ds9/mediaobject.cpp b/src/3rdparty/phonon/ds9/mediaobject.cpp
index b9a8713..d640956 100644
--- a/src/3rdparty/phonon/ds9/mediaobject.cpp
+++ b/src/3rdparty/phonon/ds9/mediaobject.cpp
@@ -23,7 +23,7 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
#ifndef Q_CC_MSVC
#include <dshow.h>
-#endif //Q_CC_MSVC
+#endif
#include <objbase.h>
#include <initguid.h>
#include <qnetwork.h>
@@ -52,7 +52,7 @@ namespace Phonon
//first the definition of the WorkerThread class
WorkerThread::WorkerThread()
- : QThread(), m_currentRenderId(0), m_finished(false), m_currentWorkId(1)
+ : QThread(), m_finished(false), m_currentWorkId(1)
{
}
@@ -60,24 +60,6 @@ namespace Phonon
{
}
- WorkerThread::Work WorkerThread::dequeueWork()
- {
- QMutexLocker locker(&m_mutex);
- if (m_finished) {
- return Work();
- }
- Work ret = m_queue.dequeue();
-
- //we ensure to have the wait condition in the right state
- if (m_queue.isEmpty()) {
- m_waitCondition.reset();
- } else {
- m_waitCondition.set();
- }
-
- return ret;
- }
-
void WorkerThread::run()
{
while (m_finished == false) {
@@ -91,11 +73,6 @@ namespace Phonon
}
DWORD result = ::WaitForMultipleObjects(count, handles, FALSE, INFINITE);
if (result == WAIT_OBJECT_0) {
- if (m_finished) {
- //that's the end of the thread execution
- return;
- }
-
handleTask();
} else {
//this is the event management
@@ -183,6 +160,7 @@ namespace Phonon
//we create a new graph
w.graph = Graph(CLSID_FilterGraph, IID_IGraphBuilder);
w.filter = filter;
+ w.graph->AddFilter(filter, 0);
w.id = m_currentWorkId++;
m_queue.enqueue(w);
m_waitCondition.set();
@@ -202,23 +180,29 @@ namespace Phonon
void WorkerThread::handleTask()
{
- const Work w = dequeueWork();
+ QMutexLocker locker(Backend::directShowMutex);
+ {
+ QMutexLocker locker(&m_mutex);
+ if (m_finished || m_queue.isEmpty()) {
+ return;
+ }
- if (m_finished) {
- return;
+ m_currentWork = m_queue.dequeue();
+
+ //we ensure to have the wait condition in the right state
+ if (m_queue.isEmpty()) {
+ m_waitCondition.reset();
+ } else {
+ m_waitCondition.set();
+ }
}
HRESULT hr = S_OK;
- m_currentRender = w.graph;
- m_currentRenderId = w.id;
- if (w.task == ReplaceGraph) {
- QMutexLocker locker(&m_mutex);
- HANDLE h;
-
+ if (m_currentWork.task == ReplaceGraph) {
int index = -1;
for(int i = 0; i < FILTER_COUNT; ++i) {
- if (m_graphHandle[i].graph == w.oldGraph) {
+ if (m_graphHandle[i].graph == m_currentWork.oldGraph) {
m_graphHandle[i].graph = Graph();
index = i;
break;
@@ -231,51 +215,40 @@ namespace Phonon
Q_ASSERT(index != -1);
//add the new graph
- if (SUCCEEDED(ComPointer<IMediaEvent>(w.graph, IID_IMediaEvent)
+ HANDLE h;
+ if (SUCCEEDED(ComPointer<IMediaEvent>(m_currentWork.graph, IID_IMediaEvent)
->GetEventHandle(reinterpret_cast<OAEVENT*>(&h)))) {
- m_graphHandle[index].graph = w.graph;
+ m_graphHandle[index].graph = m_currentWork.graph;
m_graphHandle[index].handle = h;
}
- } else if (w.task == Render) {
- if (w.filter) {
+ } else if (m_currentWork.task == Render) {
+ if (m_currentWork.filter) {
//let's render pins
- w.graph->AddFilter(w.filter, 0);
- const QList<OutputPin> outputs = BackendNode::pins(w.filter, PINDIR_OUTPUT);
- for (int i = 0; i < outputs.count(); ++i) {
- //blocking call
- hr = w.graph->Render(outputs.at(i));
- if (FAILED(hr)) {
- break;
- }
+ const QList<OutputPin> outputs = BackendNode::pins(m_currentWork.filter, PINDIR_OUTPUT);
+ for (int i = 0; SUCCEEDED(hr) && i < outputs.count(); ++i) {
+ hr = m_currentWork.graph->Render(outputs.at(i));
}
- } else if (!w.url.isEmpty()) {
+ } else if (!m_currentWork.url.isEmpty()) {
//let's render a url (blocking call)
- hr = w.graph->RenderFile(reinterpret_cast<const wchar_t *>(w.url.utf16()), 0);
+ hr = m_currentWork.graph->RenderFile(reinterpret_cast<const wchar_t *>(m_currentWork.url.utf16()), 0);
}
if (hr != E_ABORT) {
- emit asyncRenderFinished(w.id, hr, w.graph);
+ emit asyncRenderFinished(m_currentWork.id, hr, m_currentWork.graph);
}
- } else if (w.task == Seek) {
+ } else if (m_currentWork.task == Seek) {
//that's a seekrequest
- ComPointer<IMediaSeeking> mediaSeeking(w.graph, IID_IMediaSeeking);
- qint64 newtime = w.time * 10000;
+ ComPointer<IMediaSeeking> mediaSeeking(m_currentWork.graph, IID_IMediaSeeking);
+ qint64 newtime = m_currentWork.time * 10000;
hr = mediaSeeking->SetPositions(&newtime, AM_SEEKING_AbsolutePositioning,
0, AM_SEEKING_NoPositioning);
- qint64 currentTime = -1;
- if (SUCCEEDED(hr)) {
- hr = mediaSeeking->GetCurrentPosition(&currentTime);
- if (SUCCEEDED(hr)) {
- currentTime /= 10000; //convert to ms
- }
- }
- emit asyncSeekingFinished(w.id, currentTime);
+ emit asyncSeekingFinished(m_currentWork.id, newtime / 10000);
hr = E_ABORT; //to avoid emitting asyncRenderFinished
- } else if (w.task == ChangeState) {
+ } else if (m_currentWork.task == ChangeState) {
//remove useless decoders
QList<Filter> unused;
- for (int i = 0; i < w.decoders.count(); ++i) {
- const Filter &filter = w.decoders.at(i);
+ for (int i = 0; i < m_currentWork.decoders.count(); ++i) {
+ const Filter &filter = m_currentWork.decoders.at(i);
bool used = false;
const QList<OutputPin> pins = BackendNode::pins(filter, PINDIR_OUTPUT);
for( int i = 0; i < pins.count(); ++i) {
@@ -292,15 +265,15 @@ namespace Phonon
//we can get the state
for (int i = 0; i < unused.count(); ++i) {
//we should remove this filter from the graph
- w.graph->RemoveFilter(unused.at(i));
+ m_currentWork.graph->RemoveFilter(unused.at(i));
}
//we can get the state
- ComPointer<IMediaControl> mc(w.graph, IID_IMediaControl);
+ ComPointer<IMediaControl> mc(m_currentWork.graph, IID_IMediaControl);
//we change the state here
- switch(w.state)
+ switch(m_currentWork.state)
{
case State_Stopped:
mc->Stop();
@@ -318,36 +291,38 @@ namespace Phonon
if (SUCCEEDED(hr)) {
if (s == State_Stopped) {
- emit stateReady(w.graph, Phonon::StoppedState);
+ emit stateReady(m_currentWork.graph, Phonon::StoppedState);
} else if (s == State_Paused) {
- emit stateReady(w.graph, Phonon::PausedState);
+ emit stateReady(m_currentWork.graph, Phonon::PausedState);
} else /*if (s == State_Running)*/ {
- emit stateReady(w.graph, Phonon::PlayingState);
+ emit stateReady(m_currentWork.graph, Phonon::PlayingState);
}
}
}
- m_currentRender = Graph();
- m_currentRenderId = 0;
-
+ {
+ QMutexLocker locker(&m_mutex);
+ m_currentWork = Work(); //reinitialize
+ }
}
- void WorkerThread::abortCurrentRender(qint16 renderId)
- {
+ void WorkerThread::abortCurrentRender(qint16 renderId)
+ {
QMutexLocker locker(&m_mutex);
+ if (m_currentWork.id == renderId) {
+ m_currentWork.graph->Abort();
+ }
bool found = false;
- //we try to see if there is already an attempt to seek and we remove it
for(int i = 0; !found && i < m_queue.size(); ++i) {
const Work &w = m_queue.at(i);
if (w.id == renderId) {
found = true;
m_queue.removeAt(i);
+ if (m_queue.isEmpty()) {
+ m_waitCondition.reset();
+ }
}
}
-
- if (m_currentRender && m_currentRenderId == renderId) {
- m_currentRender->Abort();
- }
}
//tells the thread to stop processing
@@ -355,9 +330,9 @@ namespace Phonon
{
QMutexLocker locker(&m_mutex);
m_queue.clear();
- if (m_currentRender) {
+ if (m_currentWork.graph) {
//in case we're currently rendering something
- m_currentRender->Abort();
+ m_currentWork.graph->Abort();
}
@@ -389,17 +364,17 @@ namespace Phonon
m_graphs[i] = new MediaGraph(this, i);
}
- connect(&m_thread, SIGNAL(stateReady(Graph, Phonon::State)),
- SLOT(slotStateReady(Graph, Phonon::State)));
+ connect(&m_thread, SIGNAL(stateReady(Graph,Phonon::State)),
+ SLOT(slotStateReady(Graph,Phonon::State)));
- connect(&m_thread, SIGNAL(eventReady(Graph, long, long)),
- SLOT(handleEvents(Graph, long, long)));
+ connect(&m_thread, SIGNAL(eventReady(Graph,long,long)),
+ SLOT(handleEvents(Graph,long,long)));
- connect(&m_thread, SIGNAL(asyncRenderFinished(quint16, HRESULT, Graph)),
- SLOT(finishLoading(quint16, HRESULT, Graph)));
+ connect(&m_thread, SIGNAL(asyncRenderFinished(quint16,HRESULT,Graph)),
+ SLOT(finishLoading(quint16,HRESULT,Graph)));
- connect(&m_thread, SIGNAL(asyncSeekingFinished(quint16, qint64)),
- SLOT(finishSeeking(quint16, qint64)));
+ connect(&m_thread, SIGNAL(asyncSeekingFinished(quint16,qint64)),
+ SLOT(finishSeeking(quint16,qint64)));
//really special case
m_mediaObject = this;
m_thread.start();
@@ -522,6 +497,18 @@ namespace Phonon
qSwap(m_graphs[0], m_graphs[1]); //swap the graphs
+ if (m_transitionTime >= 0)
+ m_graphs[1]->stop(); //make sure we stop the previous graph
+
+ if (currentGraph()->mediaSource().type() != Phonon::MediaSource::Invalid &&
+ catchComError(currentGraph()->renderResult())) {
+ setState(Phonon::ErrorState);
+ return;
+ }
+
+ //we need to play the next media
+ play();
+
//we tell the video widgets to switch now to the new source
#ifndef QT_NO_PHONON_VIDEO
for (int i = 0; i < m_videoWidgets.count(); ++i) {
@@ -530,15 +517,6 @@ namespace Phonon
#endif //QT_NO_PHONON_VIDEO
emit currentSourceChanged(currentGraph()->mediaSource());
-
- if (currentGraph()->isLoading()) {
- //will simply tell that when loading is finished
- //it should start the playback
- play();
- }
-
-
-
emit metaDataChanged(currentGraph()->metadata());
if (nextGraph()->hasVideo() != currentGraph()->hasVideo()) {
@@ -551,15 +529,6 @@ namespace Phonon
#ifndef QT_NO_PHONON_MEDIACONTROLLER
setTitles(currentGraph()->titles());
#endif //QT_NO_PHONON_MEDIACONTROLLER
-
- //this manages only gapless transitions
- if (currentGraph()->mediaSource().type() != Phonon::MediaSource::Invalid) {
- if (catchComError(currentGraph()->renderResult())) {
- setState(Phonon::ErrorState);
- } else {
- play();
- }
- }
}
Phonon::State MediaObject::state() const
@@ -794,15 +763,16 @@ namespace Phonon
case Phonon::PausedState:
pause();
break;
- case Phonon::StoppedState:
- stop();
- break;
case Phonon::PlayingState:
play();
break;
case Phonon::ErrorState:
setState(Phonon::ErrorState);
break;
+ case Phonon::StoppedState:
+ default:
+ stop();
+ break;
}
}
}
@@ -850,13 +820,11 @@ namespace Phonon
#endif
LPAMGETERRORTEXT getErrorText = (LPAMGETERRORTEXT)QLibrary::resolve(QLatin1String("quartz"), "AMGetErrorTextW");
- ushort buffer[MAX_ERROR_TEXT_LEN];
- if (getErrorText && getErrorText(hr, (WCHAR*)buffer, MAX_ERROR_TEXT_LEN)) {
- m_errorString = QString::fromUtf16(buffer);
-#ifdef Q_CC_MSVC
+ WCHAR buffer[MAX_ERROR_TEXT_LEN];
+ if (getErrorText && getErrorText(hr, buffer, MAX_ERROR_TEXT_LEN)) {
+ m_errorString = QString::fromWCharArray(buffer);
} else {
- m_errorString = QString::fromUtf16((ushort*)_com_error(hr).ErrorMessage());
-#endif
+ m_errorString = QString::fromLatin1("Unknown error");
}
const QString comError = QString::number(uint(hr), 16);
if (!m_errorString.toLower().contains(comError.toLower())) {
diff --git a/src/3rdparty/phonon/ds9/mediaobject.h b/src/3rdparty/phonon/ds9/mediaobject.h
index 2c34ffc..34aa666 100644
--- a/src/3rdparty/phonon/ds9/mediaobject.h
+++ b/src/3rdparty/phonon/ds9/mediaobject.h
@@ -114,6 +114,7 @@ namespace Phonon
enum Task
{
+ None,
Render,
Seek,
ChangeState,
@@ -122,6 +123,7 @@ namespace Phonon
struct Work
{
+ Work() : task(None), id(0), time(0) { }
Task task;
quint16 id;
Graph graph;
@@ -135,16 +137,14 @@ namespace Phonon
};
QList<Filter> decoders; //for the state change requests
};
- Work dequeueWork();
void handleTask();
- Graph m_currentRender;
- qint16 m_currentRenderId;
+ Work m_currentWork;
QQueue<Work> m_queue;
bool m_finished;
quint16 m_currentWorkId;
QWinWaitCondition m_waitCondition;
- QMutex m_mutex;
+ QMutex m_mutex; // mutex for the m_queue, m_finished and m_currentWorkId
//this is for WaitForMultipleObjects
struct
diff --git a/src/3rdparty/phonon/ds9/qasyncreader.cpp b/src/3rdparty/phonon/ds9/qasyncreader.cpp
index 68ec1f8..a3f9cda 100644
--- a/src/3rdparty/phonon/ds9/qasyncreader.cpp
+++ b/src/3rdparty/phonon/ds9/qasyncreader.cpp
@@ -15,8 +15,6 @@ You should have received a copy of the GNU Lesser General Public License
along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <QtCore/QFile>
-
#include "qasyncreader.h"
#include "qbasefilter.h"
@@ -80,8 +78,7 @@ namespace Phonon
STDMETHODIMP QAsyncReader::Request(IMediaSample *sample,DWORD_PTR user)
{
- QMutexLocker mutexLocker(&m_mutexWait);
- QWriteLocker locker(&m_lock);
+ QMutexLocker locker(&m_mutex);
if (m_flushing) {
return VFW_E_WRONG_STATE;
}
@@ -93,33 +90,28 @@ namespace Phonon
STDMETHODIMP QAsyncReader::WaitForNext(DWORD timeout, IMediaSample **sample, DWORD_PTR *user)
{
- QMutexLocker locker(&m_mutexWait);
+ QMutexLocker locker(&m_mutex);
if (!sample ||!user) {
return E_POINTER;
}
+ //msdn says to return immediately if we're flushing but that doesn't seem to be true
+ //since it triggers a dead-lock somewhere inside directshow (see task 258830)
+
*sample = 0;
*user = 0;
- AsyncRequest r = getNextRequest();
-
- if (r.sample == 0) {
- //there is no request in the queue
- if (isFlushing()) {
+ if (m_requestQueue.isEmpty()) {
+ if (m_requestWait.wait(&m_mutex, timeout) == false) {
+ return VFW_E_TIMEOUT;
+ }
+ if (m_requestQueue.isEmpty()) {
return VFW_E_WRONG_STATE;
- } else {
- //First we need to lock the mutex
- if (m_requestWait.wait(&m_mutexWait, timeout) == false) {
- return VFW_E_TIMEOUT;
- }
- if (isFlushing()) {
- return VFW_E_WRONG_STATE;
- }
-
- r = getNextRequest();
}
}
+ AsyncRequest r = m_requestQueue.dequeue();
+
//at this point we're sure to have a request to proceed
if (r.sample == 0) {
return E_FAIL;
@@ -127,14 +119,12 @@ namespace Phonon
*sample = r.sample;
*user = r.user;
-
- return SyncReadAligned(r.sample);
+ return syncReadAlignedUnlocked(r.sample);
}
STDMETHODIMP QAsyncReader::BeginFlush()
{
- QMutexLocker mutexLocker(&m_mutexWait);
- QWriteLocker locker(&m_lock);
+ QMutexLocker locker(&m_mutex);
m_flushing = true;
m_requestWait.wakeOne();
return S_OK;
@@ -142,13 +132,28 @@ namespace Phonon
STDMETHODIMP QAsyncReader::EndFlush()
{
- QWriteLocker locker(&m_lock);
+ QMutexLocker locker(&m_mutex);
m_flushing = false;
return S_OK;
}
STDMETHODIMP QAsyncReader::SyncReadAligned(IMediaSample *sample)
{
+ QMutexLocker locker(&m_mutex);
+ return syncReadAlignedUnlocked(sample);
+ }
+
+ STDMETHODIMP QAsyncReader::SyncRead(LONGLONG pos, LONG length, BYTE *buffer)
+ {
+ QMutexLocker locker(&m_mutex);
+ return read(pos, length, buffer, 0);
+ }
+
+
+ STDMETHODIMP QAsyncReader::syncReadAlignedUnlocked(IMediaSample *sample)
+ {
+ Q_ASSERT(!m_mutex.tryLock());
+
if (!sample) {
return E_POINTER;
}
@@ -175,23 +180,6 @@ namespace Phonon
return sample->SetActualDataLength(actual);
}
- STDMETHODIMP QAsyncReader::SyncRead(LONGLONG pos, LONG length, BYTE *buffer)
- {
- return read(pos, length, buffer, 0);
- }
-
-
- //addition
- QAsyncReader::AsyncRequest QAsyncReader::getNextRequest()
- {
- QWriteLocker locker(&m_lock);
- AsyncRequest ret;
- if (!m_requestQueue.isEmpty()) {
- ret = m_requestQueue.dequeue();
- }
-
- return ret;
- }
}
}
diff --git a/src/3rdparty/phonon/ds9/qasyncreader.h b/src/3rdparty/phonon/ds9/qasyncreader.h
index cb789ee..95872f9 100644
--- a/src/3rdparty/phonon/ds9/qasyncreader.h
+++ b/src/3rdparty/phonon/ds9/qasyncreader.h
@@ -48,11 +48,12 @@ namespace Phonon
STDMETHODIMP WaitForNext(DWORD,IMediaSample **,DWORD_PTR *);
STDMETHODIMP SyncReadAligned(IMediaSample *);
STDMETHODIMP SyncRead(LONGLONG,LONG,BYTE *);
- virtual STDMETHODIMP Length(LONGLONG *,LONGLONG *) = 0;
+ STDMETHODIMP Length(LONGLONG *,LONGLONG *) = 0;
STDMETHODIMP BeginFlush();
STDMETHODIMP EndFlush();
protected:
+ STDMETHODIMP syncReadAlignedUnlocked(IMediaSample *);
virtual HRESULT read(LONGLONG pos, LONG length, BYTE *buffer, LONG *actual) = 0;
private:
@@ -62,9 +63,6 @@ namespace Phonon
IMediaSample *sample;
DWORD_PTR user;
};
- AsyncRequest getNextRequest();
-
- QMutex m_mutexWait;
QQueue<AsyncRequest> m_requestQueue;
QWaitCondition m_requestWait;
diff --git a/src/3rdparty/phonon/ds9/qaudiocdreader.cpp b/src/3rdparty/phonon/ds9/qaudiocdreader.cpp
index b9f9fd6..6d0f335 100644
--- a/src/3rdparty/phonon/ds9/qaudiocdreader.cpp
+++ b/src/3rdparty/phonon/ds9/qaudiocdreader.cpp
@@ -103,8 +103,8 @@ namespace Phonon
private:
HANDLE m_cddrive;
- CDROM_TOC *m_toc;
- WaveStructure *m_waveHeader;
+ CDROM_TOC m_toc;
+ WaveStructure m_waveHeader;
qint64 m_trackAddress;
};
@@ -112,19 +112,8 @@ namespace Phonon
#define SECTOR_SIZE 2352
#define NB_SECTORS_READ 20
- static AM_MEDIA_TYPE getAudioCDMediaType()
- {
- AM_MEDIA_TYPE mt;
- qMemSet(&mt, 0, sizeof(AM_MEDIA_TYPE));
- mt.majortype = MEDIATYPE_Stream;
- mt.subtype = MEDIASUBTYPE_WAVE;
- mt.bFixedSizeSamples = TRUE;
- mt.bTemporalCompression = FALSE;
- mt.lSampleSize = 1;
- mt.formattype = GUID_NULL;
- return mt;
- }
-
+ static const AM_MEDIA_TYPE audioCDMediaType = { MEDIATYPE_Stream, MEDIASUBTYPE_WAVE, TRUE, FALSE, 1, GUID_NULL, 0, 0, 0};
+
int addressToSectors(UCHAR address[4])
{
return ((address[0] * 60 + address[1]) * 60 + address[2]) * 75 + address[3] - 150;
@@ -141,11 +130,8 @@ namespace Phonon
}
- QAudioCDReader::QAudioCDReader(QBaseFilter *parent, QChar drive) : QAsyncReader(parent, QVector<AM_MEDIA_TYPE>() << getAudioCDMediaType())
+ QAudioCDReader::QAudioCDReader(QBaseFilter *parent, QChar drive) : QAsyncReader(parent, QVector<AM_MEDIA_TYPE>() << audioCDMediaType)
{
- m_toc = new CDROM_TOC;
- m_waveHeader = new WaveStructure;
-
//now open the cd-drive
QString path;
if (drive.isNull()) {
@@ -154,36 +140,30 @@ namespace Phonon
path = QString::fromLatin1("\\\\.\\%1:").arg(drive);
}
- m_cddrive = QT_WA_INLINE (
- ::CreateFile( (TCHAR*)path.utf16(), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL ),
- ::CreateFileA( path.toLocal8Bit().constData(), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL )
- );
+ m_cddrive = ::CreateFile((const wchar_t *)path.utf16(), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL);
- qMemSet(m_toc, 0, sizeof(CDROM_TOC));
+ qMemSet(&m_toc, 0, sizeof(CDROM_TOC));
//read the TOC
DWORD bytesRead = 0;
- bool tocRead = ::DeviceIoControl(m_cddrive, IOCTL_CDROM_READ_TOC, 0, 0, m_toc, sizeof(CDROM_TOC), &bytesRead, 0);
+ bool tocRead = ::DeviceIoControl(m_cddrive, IOCTL_CDROM_READ_TOC, 0, 0, &m_toc, sizeof(CDROM_TOC), &bytesRead, 0);
if (!tocRead) {
qWarning("unable to load the TOC from the CD");
return;
}
- m_trackAddress = addressToSectors(m_toc->TrackData[0].Address);
- const qint32 nbSectorsToRead = (addressToSectors(m_toc->TrackData[m_toc->LastTrack + 1 - m_toc->FirstTrack].Address)
+ m_trackAddress = addressToSectors(m_toc.TrackData[0].Address);
+ const qint32 nbSectorsToRead = (addressToSectors(m_toc.TrackData[m_toc.LastTrack + 1 - m_toc.FirstTrack].Address)
- m_trackAddress);
const qint32 dataLength = nbSectorsToRead * SECTOR_SIZE;
- m_waveHeader->chunksize = 4 + (8 + m_waveHeader->chunksize2) + (8 + dataLength);
- m_waveHeader->dataLength = dataLength;
+ m_waveHeader.chunksize = 4 + (8 + m_waveHeader.chunksize2) + (8 + dataLength);
+ m_waveHeader.dataLength = dataLength;
}
QAudioCDReader::~QAudioCDReader()
{
::CloseHandle(m_cddrive);
- delete m_toc;
- delete m_waveHeader;
-
}
STDMETHODIMP_(ULONG) QAudioCDReader::AddRef()
@@ -199,7 +179,7 @@ namespace Phonon
STDMETHODIMP QAudioCDReader::Length(LONGLONG *total,LONGLONG *available)
{
- const LONGLONG length = sizeof(WaveStructure) + m_waveHeader->dataLength;
+ const LONGLONG length = sizeof(WaveStructure) + m_waveHeader.dataLength;
if (total) {
*total = length;
}
@@ -238,11 +218,11 @@ namespace Phonon
if (pos < sizeof(WaveStructure)) {
//we first copy the content of the structure
nbRead = qMin(LONG(sizeof(WaveStructure) - pos), length);
- qMemCopy(buffer, reinterpret_cast<char*>(m_waveHeader) + pos, nbRead);
+ qMemCopy(buffer, reinterpret_cast<char*>(&m_waveHeader) + pos, nbRead);
}
const LONGLONG posInTrack = pos - sizeof(WaveStructure) + nbRead;
- const int bytesLeft = qMin(m_waveHeader->dataLength - posInTrack, LONGLONG(length - nbRead));
+ const int bytesLeft = qMin(m_waveHeader.dataLength - posInTrack, LONGLONG(length - nbRead));
if (bytesLeft > 0) {
@@ -297,8 +277,8 @@ namespace Phonon
{
QList<qint64> ret;
ret << 0;
- for(int i = m_toc->FirstTrack; i <= m_toc->LastTrack ; ++i) {
- const uchar *address = m_toc->TrackData[i].Address;
+ for(int i = m_toc.FirstTrack; i <= m_toc.LastTrack ; ++i) {
+ const uchar *address = m_toc.TrackData[i].Address;
ret << ((address[0] * 60 + address[1]) * 60 + address[2]) * 1000 + address[3]*1000/75 - 2000;
}
diff --git a/src/3rdparty/phonon/ds9/qaudiocdreader.h b/src/3rdparty/phonon/ds9/qaudiocdreader.h
index 9049b66..eff845d 100644
--- a/src/3rdparty/phonon/ds9/qaudiocdreader.h
+++ b/src/3rdparty/phonon/ds9/qaudiocdreader.h
@@ -31,7 +31,7 @@ namespace Phonon
{
struct CDROM_TOC;
struct WaveStructure;
- extern const IID IID_ITitleInterface;
+ EXTERN_C const IID IID_ITitleInterface;
//interface for the Titles
struct ITitleInterface : public IUnknown
diff --git a/src/3rdparty/phonon/ds9/qbasefilter.cpp b/src/3rdparty/phonon/ds9/qbasefilter.cpp
index 95cab92..78b8b8f 100644
--- a/src/3rdparty/phonon/ds9/qbasefilter.cpp
+++ b/src/3rdparty/phonon/ds9/qbasefilter.cpp
@@ -92,8 +92,8 @@ namespace Phonon
return E_POINTER;
}
- int nbfetched = 0;
- while (nbfetched < int(count) && m_index < m_pins.count()) {
+ uint nbfetched = 0;
+ while (nbfetched < count && m_index < m_pins.count()) {
IPin *current = m_pins[m_index];
current->AddRef();
ret[nbfetched] = current;
@@ -166,19 +166,19 @@ namespace Phonon
const QList<QPin *> QBaseFilter::pins() const
{
- QReadLocker locker(&m_lock);
+ QMutexLocker locker(&m_mutex);
return m_pins;
}
void QBaseFilter::addPin(QPin *pin)
{
- QWriteLocker locker(&m_lock);
+ QMutexLocker locker(&m_mutex);
m_pins.append(pin);
}
void QBaseFilter::removePin(QPin *pin)
{
- QWriteLocker locker(&m_lock);
+ QMutexLocker locker(&m_mutex);
m_pins.removeAll(pin);
}
@@ -211,7 +211,8 @@ namespace Phonon
}
else if (iid == IID_IMediaPosition || iid == IID_IMediaSeeking) {
if (inputPins().isEmpty()) {
- if (*out = getUpStreamInterface(iid)) {
+ *out = getUpStreamInterface(iid);
+ if (*out) {
return S_OK; //we return here to avoid adding a reference
} else {
hr = E_NOINTERFACE;
@@ -250,35 +251,35 @@ namespace Phonon
STDMETHODIMP QBaseFilter::GetClassID(CLSID *clsid)
{
- QReadLocker locker(&m_lock);
+ QMutexLocker locker(&m_mutex);
*clsid = m_clsid;
return S_OK;
}
STDMETHODIMP QBaseFilter::Stop()
{
- QWriteLocker locker(&m_lock);
+ QMutexLocker locker(&m_mutex);
m_state = State_Stopped;
return S_OK;
}
STDMETHODIMP QBaseFilter::Pause()
{
- QWriteLocker locker(&m_lock);
+ QMutexLocker locker(&m_mutex);
m_state = State_Paused;
return S_OK;
}
STDMETHODIMP QBaseFilter::Run(REFERENCE_TIME)
{
- QWriteLocker locker(&m_lock);
+ QMutexLocker locker(&m_mutex);
m_state = State_Running;
return S_OK;
}
STDMETHODIMP QBaseFilter::GetState(DWORD, FILTER_STATE *state)
{
- QReadLocker locker(&m_lock);
+ QMutexLocker locker(&m_mutex);
if (!state) {
return E_POINTER;
}
@@ -289,7 +290,7 @@ namespace Phonon
STDMETHODIMP QBaseFilter::SetSyncSource(IReferenceClock *clock)
{
- QWriteLocker locker(&m_lock);
+ QMutexLocker locker(&m_mutex);
if (clock) {
clock->AddRef();
}
@@ -302,7 +303,7 @@ namespace Phonon
STDMETHODIMP QBaseFilter::GetSyncSource(IReferenceClock **clock)
{
- QReadLocker locker(&m_lock);
+ QMutexLocker locker(&m_mutex);
if (!clock) {
return E_POINTER;
}
@@ -341,7 +342,7 @@ namespace Phonon
STDMETHODIMP QBaseFilter::QueryFilterInfo(FILTER_INFO *info )
{
- QReadLocker locker(&m_lock);
+ QMutexLocker locker(&m_mutex);
if (!info) {
return E_POINTER;
}
@@ -355,9 +356,9 @@ namespace Phonon
STDMETHODIMP QBaseFilter::JoinFilterGraph(IFilterGraph *graph, LPCWSTR name)
{
- QWriteLocker locker(&m_lock);
+ QMutexLocker locker(&m_mutex);
m_graph = graph;
- m_name = QString::fromUtf16((const unsigned short*)name);
+ m_name = QString::fromWCharArray(name);
return S_OK;
}
diff --git a/src/3rdparty/phonon/ds9/qbasefilter.h b/src/3rdparty/phonon/ds9/qbasefilter.h
index 85f1431..a72d6fe 100644
--- a/src/3rdparty/phonon/ds9/qbasefilter.h
+++ b/src/3rdparty/phonon/ds9/qbasefilter.h
@@ -22,7 +22,7 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
#include <QtCore/QString>
#include <QtCore/QList>
-#include <QtCore/QReadWriteLock>
+#include <QtCore/QMutex>
#include <dshow.h>
@@ -127,7 +127,7 @@ namespace Phonon
IFilterGraph *m_graph;
FILTER_STATE m_state;
QList<QPin *> m_pins;
- mutable QReadWriteLock m_lock;
+ mutable QMutex m_mutex;
};
}
}
diff --git a/src/3rdparty/phonon/ds9/qevr9.h b/src/3rdparty/phonon/ds9/qevr9.h
new file mode 100644
index 0000000..8599fce
--- /dev/null
+++ b/src/3rdparty/phonon/ds9/qevr9.h
@@ -0,0 +1,143 @@
+/* This file is part of the KDE project.
+
+Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+
+This library is free software: you can redistribute it and/or modify
+it under the terms of the GNU Lesser General Public License as published by
+the Free Software Foundation, either version 2.1 or 3 of the License.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public License
+along with this library. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <d3d9.h>
+
+#define DXVA2_ProcAmp_Brightness 1
+#define DXVA2_ProcAmp_Contrast 2
+#define DXVA2_ProcAmp_Hue 4
+#define DXVA2_ProcAmp_Saturation 8
+
+typedef enum {
+ MFVideoARMode_None = 0x00000000,
+ MFVideoARMode_PreservePicture = 0x00000001,
+ MFVideoARMode_PreservePixel = 0x00000002,
+ MFVideoARMode_NonLinearStretch = 0x00000004,
+ MFVideoARMode_Mask = 0x00000007
+} MFVideoAspectRatioMode;
+
+typedef struct {
+ float left;
+ float top;
+ float right;
+ float bottom;
+} MFVideoNormalizedRect;
+
+typedef struct {
+ UINT DeviceCaps;
+ D3DPOOL InputPool;
+ UINT NumForwardRefSamples;
+ UINT NumBackwardRefSamples;
+ UINT Reserved;
+ UINT DeinterlaceTechnology;
+ UINT ProcAmpControlCaps;
+ UINT VideoProcessorOperations;
+ UINT NoiseFilterTechnology;
+ UINT DetailFilterTechnology;
+} DXVA2_VideoProcessorCaps;
+
+typedef struct {
+ union {
+ struct {
+ USHORT Fraction;
+ SHORT Value;
+ };
+ LONG ll;
+ };
+} DXVA2_Fixed32;
+
+typedef struct {
+ DXVA2_Fixed32 MinValue;
+ DXVA2_Fixed32 MaxValue;
+ DXVA2_Fixed32 DefaultValue;
+ DXVA2_Fixed32 StepSize;
+} DXVA2_ValueRange;
+
+typedef struct {
+ DXVA2_Fixed32 Brightness;
+ DXVA2_Fixed32 Contrast;
+ DXVA2_Fixed32 Hue;
+ DXVA2_Fixed32 Saturation;
+} DXVA2_ProcAmpValues;
+
+DXVA2_Fixed32 DXVA2FloatToFixed(const float _float_)
+{
+ DXVA2_Fixed32 _fixed_;
+ _fixed_.Fraction = LOWORD(_float_ * 0x10000);
+ _fixed_.Value = HIWORD(_float_ * 0x10000);
+ return _fixed_;
+}
+
+float DXVA2FixedToFloat(const DXVA2_Fixed32 _fixed_)
+{
+ return (FLOAT)_fixed_.Value + (FLOAT)_fixed_.Fraction / 0x10000;
+}
+
+#undef INTERFACE
+#define INTERFACE IMFVideoDisplayControl
+DECLARE_INTERFACE_(IMFVideoDisplayControl, IUnknown)
+{
+ STDMETHOD(GetNativeVideoSize)(THIS_ SIZE* pszVideo, SIZE* pszARVideo) PURE;
+ STDMETHOD(GetIdealVideoSize)(THIS_ SIZE* pszMin, SIZE* pszMax) PURE;
+ STDMETHOD(SetVideoPosition)(THIS_ const MFVideoNormalizedRect* pnrcSource, const LPRECT prcDest) PURE;
+ STDMETHOD(GetVideoPosition)(THIS_ MFVideoNormalizedRect* pnrcSource, LPRECT prcDest) PURE;
+ STDMETHOD(SetAspectRatioMode)(THIS_ DWORD dwAspectRatioMode) PURE;
+ STDMETHOD(GetAspectRatioMode)(THIS_ DWORD* pdwAspectRatioMode) PURE;
+ STDMETHOD(SetVideoWindow)(THIS_ HWND hwndVideo) PURE;
+ STDMETHOD(GetVideoWindow)(THIS_ HWND* phwndVideo) PURE;
+ STDMETHOD(RepaintVideo)(THIS_) PURE;
+ STDMETHOD(GetCurrentImage)(THIS_ BITMAPINFOHEADER* pBih, BYTE** pDib, DWORD* pcbDib, LONGLONG* pTimeStamp) PURE;
+ STDMETHOD(SetBorderColor)(THIS_ COLORREF Clr) PURE;
+ STDMETHOD(GetBorderColor)(THIS_ COLORREF* pClr) PURE;
+ STDMETHOD(SetRenderingPrefs)(THIS_ DWORD dwRenderFlags) PURE;
+ STDMETHOD(GetRenderingPrefs)(THIS_ DWORD* pdwRenderFlags) PURE;
+ STDMETHOD(SetFullScreen)(THIS_ BOOL fFullscreen) PURE;
+ STDMETHOD(GetFullScreen)(THIS_ BOOL* pfFullscreen) PURE;
+};
+#undef INTERFACE
+#define INTERFACE IMFVideoMixerControl
+DECLARE_INTERFACE_(IMFVideoMixerControl, IUnknown)
+{
+ STDMETHOD(SetStreamZOrder)(THIS_ DWORD dwStreamID, DWORD dwZ) PURE;
+ STDMETHOD(GetStreamZOrder)(THIS_ DWORD dwStreamID, DWORD* pdwZ) PURE;
+ STDMETHOD(SetStreamOutputRect)(THIS_ DWORD dwStreamID, const MFVideoNormalizedRect* pnrcOutput) PURE;
+ STDMETHOD(GetStreamOutputRect)(THIS_ DWORD dwStreamID, MFVideoNormalizedRect* pnrcOutput) PURE;
+};
+#undef INTERFACE
+#define INTERFACE IMFVideoProcessor
+DECLARE_INTERFACE_(IMFVideoProcessor, IUnknown)
+{
+ STDMETHOD(GetAvailableVideoProcessorModes)(THIS_ UINT* lpdwNumProcessingModes, GUID** ppVideoProcessingModes) PURE;
+ STDMETHOD(GetVideoProcessorCaps)(THIS_ LPGUID lpVideoProcessorMode, DXVA2_VideoProcessorCaps* lpVideoProcessorCaps) PURE;
+ STDMETHOD(GetVideoProcessorMode)(THIS_ LPGUID lpMode) PURE;
+ STDMETHOD(SetVideoProcessorMode)(THIS_ LPGUID lpMode) PURE;
+ STDMETHOD(GetProcAmpRange)(THIS_ DWORD dwProperty, DXVA2_ValueRange* pPropRange) PURE;
+ STDMETHOD(GetProcAmpValues)(THIS_ DWORD dwFlags, DXVA2_ProcAmpValues* Values) PURE;
+ STDMETHOD(SetProcAmpValues)(THIS_ DWORD dwFlags, DXVA2_ProcAmpValues* pValues) PURE;
+ STDMETHOD(GetFilteringRange)(THIS_ DWORD dwProperty, DXVA2_ValueRange* pPropRange) PURE;
+ STDMETHOD(GetFilteringValue)(THIS_ DWORD dwProperty, DXVA2_Fixed32* pValue) PURE;
+ STDMETHOD(SetFilteringValue)(THIS_ DWORD dwProperty, DXVA2_Fixed32* pValue) PURE;
+ STDMETHOD(GetBackgroundColor)(THIS_ COLORREF* lpClrBkg) PURE;
+ STDMETHOD(SetBackgroundColor)(THIS_ COLORREF ClrBkg) PURE;
+};
+#undef INTERFACE
+#define INTERFACE IMFGetService
+DECLARE_INTERFACE_(IMFGetService, IUnknown)
+{
+ STDMETHOD(GetService)(THIS_ REFGUID guidService, REFIID riid, LPVOID* ppvObject) PURE;
+};
+#undef INTERFACE
diff --git a/src/3rdparty/phonon/ds9/qmeminputpin.cpp b/src/3rdparty/phonon/ds9/qmeminputpin.cpp
index dca99db..a21fbe7 100644
--- a/src/3rdparty/phonon/ds9/qmeminputpin.cpp
+++ b/src/3rdparty/phonon/ds9/qmeminputpin.cpp
@@ -28,8 +28,8 @@ namespace Phonon
namespace DS9
{
- QMemInputPin::QMemInputPin(QBaseFilter *parent, const QVector<AM_MEDIA_TYPE> &mt, bool transform) :
- QPin(parent, PINDIR_INPUT, mt), m_shouldDuplicateSamples(true), m_transform(transform)
+ QMemInputPin::QMemInputPin(QBaseFilter *parent, const QVector<AM_MEDIA_TYPE> &mt, bool transform, QPin *output) :
+ QPin(parent, PINDIR_INPUT, mt), m_shouldDuplicateSamples(true), m_transform(transform), m_output(output)
{
}
@@ -66,11 +66,9 @@ namespace Phonon
{
//this allows to serialize with Receive calls
QMutexLocker locker(&m_mutexReceive);
- for(int i = 0; i < m_outputs.count(); ++i) {
- IPin *conn = m_outputs.at(i)->connected();
- if (conn) {
- conn->EndOfStream();
- }
+ IPin *conn = m_output ? m_output->connected() : 0;
+ if (conn) {
+ conn->EndOfStream();
}
return S_OK;
}
@@ -78,13 +76,11 @@ namespace Phonon
STDMETHODIMP QMemInputPin::BeginFlush()
{
//pass downstream
- for(int i = 0; i < m_outputs.count(); ++i) {
- IPin *conn = m_outputs.at(i)->connected();
- if (conn) {
- conn->BeginFlush();
- }
+ IPin *conn = m_output ? m_output->connected() : 0;
+ if (conn) {
+ conn->BeginFlush();
}
- QWriteLocker locker(&m_lock);
+ QMutexLocker locker(&m_mutex);
m_flushing = true;
return S_OK;
}
@@ -92,22 +88,19 @@ namespace Phonon
STDMETHODIMP QMemInputPin::EndFlush()
{
//pass downstream
- for(int i = 0; i < m_outputs.count(); ++i) {
- IPin *conn = m_outputs.at(i)->connected();
- if (conn) {
- conn->EndFlush();
- }
+ IPin *conn = m_output ? m_output->connected() : 0;
+ if (conn) {
+ conn->EndFlush();
}
- QWriteLocker locker(&m_lock);
+ QMutexLocker locker(&m_mutex);
m_flushing = false;
return S_OK;
}
STDMETHODIMP QMemInputPin::NewSegment(REFERENCE_TIME start, REFERENCE_TIME stop, double rate)
{
- for(int i = 0; i < m_outputs.count(); ++i) {
- m_outputs.at(i)->NewSegment(start, stop, rate);
- }
+ if (m_output)
+ m_output->NewSegment(start, stop, rate);
return S_OK;
}
@@ -119,14 +112,9 @@ namespace Phonon
if (hr == S_OK &&
mt->majortype != MEDIATYPE_NULL &&
mt->subtype != MEDIASUBTYPE_NULL &&
- mt->formattype != GUID_NULL) {
- //we tell the output pins that they should connect with this type
- for(int i = 0; i < m_outputs.count(); ++i) {
- hr = m_outputs.at(i)->setAcceptedMediaType(connectedType());
- if (FAILED(hr)) {
- break;
- }
- }
+ mt->formattype != GUID_NULL && m_output) {
+ //we tell the output pin that it should connect with this type
+ hr = m_output->setAcceptedMediaType(connectedType());
}
return hr;
}
@@ -137,7 +125,8 @@ namespace Phonon
return E_POINTER;
}
- if (*alloc = memoryAllocator(true)) {
+ *alloc = memoryAllocator(true);
+ if (*alloc) {
return S_OK;
}
@@ -151,18 +140,15 @@ namespace Phonon
}
{
- QWriteLocker locker(&m_lock);
+ QMutexLocker locker(&m_mutex);
m_shouldDuplicateSamples = m_transform && readonly;
}
setMemoryAllocator(alloc);
- for(int i = 0; i < m_outputs.count(); ++i) {
- IPin *pin = m_outputs.at(i)->connected();
- if (pin) {
- ComPointer<IMemInputPin> input(pin, IID_IMemInputPin);
- input->NotifyAllocator(alloc, m_shouldDuplicateSamples);
- }
+ if (m_output) {
+ ComPointer<IMemInputPin> input(m_output, IID_IMemInputPin);
+ input->NotifyAllocator(alloc, m_shouldDuplicateSamples);
}
return S_OK;
@@ -201,22 +187,18 @@ namespace Phonon
}
}
- for (int i = 0; i < m_outputs.count(); ++i) {
- QPin *current = m_outputs.at(i);
+ if (m_output) {
IMediaSample *outSample = m_shouldDuplicateSamples ?
- duplicateSampleForOutput(sample, current->memoryAllocator())
+ duplicateSampleForOutput(sample, m_output->memoryAllocator())
: sample;
if (m_shouldDuplicateSamples) {
m_parent->processSample(outSample);
}
- IPin *pin = current->connected();
- if (pin) {
- ComPointer<IMemInputPin> input(pin, IID_IMemInputPin);
- if (input) {
- input->Receive(outSample);
- }
+ ComPointer<IMemInputPin> input(m_output->connected(), IID_IMemInputPin);
+ if (input) {
+ input->Receive(outSample);
}
if (m_shouldDuplicateSamples) {
@@ -247,39 +229,16 @@ namespace Phonon
STDMETHODIMP QMemInputPin::ReceiveCanBlock()
{
- //we test the output to see if they can block
- for(int i = 0; i < m_outputs.count(); ++i) {
- IPin *input = m_outputs.at(i)->connected();
- if (input) {
- ComPointer<IMemInputPin> meminput(input, IID_IMemInputPin);
- if (meminput && meminput->ReceiveCanBlock() != S_FALSE) {
- return S_OK;
- }
+ //we test the output to see if it can block
+ if (m_output) {
+ ComPointer<IMemInputPin> meminput(m_output->connected(), IID_IMemInputPin);
+ if (meminput && meminput->ReceiveCanBlock() != S_FALSE) {
+ return S_OK;
}
}
return S_FALSE;
}
- //addition
- //this should be used by the filter to tell its input pins to which output they should route the samples
-
- void QMemInputPin::addOutput(QPin *output)
- {
- QWriteLocker locker(&m_lock);
- m_outputs += output;
- }
-
- void QMemInputPin::removeOutput(QPin *output)
- {
- QWriteLocker locker(&m_lock);
- m_outputs.removeOne(output);
- }
-
- QList<QPin*> QMemInputPin::outputs() const
- {
- QReadLocker locker(&m_lock);
- return m_outputs;
- }
ALLOCATOR_PROPERTIES QMemInputPin::getDefaultAllocatorProperties() const
{
@@ -294,7 +253,7 @@ namespace Phonon
LONG length = sample->GetActualDataLength();
HRESULT hr = alloc->Commit();
- if (hr == VFW_E_SIZENOTSET) {
+ if (hr == HRESULT(VFW_E_SIZENOTSET)) {
ALLOCATOR_PROPERTIES prop = getDefaultAllocatorProperties();
prop.cbBuffer = qMax(prop.cbBuffer, length);
ALLOCATOR_PROPERTIES actual;
@@ -324,7 +283,7 @@ namespace Phonon
{
LONGLONG start, end;
hr = sample->GetMediaTime(&start, &end);
- if (hr != VFW_E_MEDIA_TIME_NOT_SET) {
+ if (hr != HRESULT(VFW_E_MEDIA_TIME_NOT_SET)) {
hr = out->SetMediaTime(&start, &end);
Q_ASSERT(SUCCEEDED(hr));
}
diff --git a/src/3rdparty/phonon/ds9/qmeminputpin.h b/src/3rdparty/phonon/ds9/qmeminputpin.h
index c449721..d74c451 100644
--- a/src/3rdparty/phonon/ds9/qmeminputpin.h
+++ b/src/3rdparty/phonon/ds9/qmeminputpin.h
@@ -37,7 +37,7 @@ namespace Phonon
class QMemInputPin : public QPin, public IMemInputPin
{
public:
- QMemInputPin(QBaseFilter *, const QVector<AM_MEDIA_TYPE> &, bool transform);
+ QMemInputPin(QBaseFilter *, const QVector<AM_MEDIA_TYPE> &, bool transform, QPin *output);
~QMemInputPin();
//reimplementation from IUnknown
@@ -60,18 +60,13 @@ namespace Phonon
STDMETHODIMP ReceiveMultiple(IMediaSample **,long,long *);
STDMETHODIMP ReceiveCanBlock();
- //addition
- void addOutput(QPin *output);
- void removeOutput(QPin *output);
- QList<QPin*> outputs() const;
-
private:
IMediaSample *duplicateSampleForOutput(IMediaSample *, IMemAllocator *);
ALLOCATOR_PROPERTIES getDefaultAllocatorProperties() const;
bool m_shouldDuplicateSamples;
const bool m_transform; //defines if the pin is transforming the samples
- QList<QPin*> m_outputs;
+ QPin* const m_output;
QMutex m_mutexReceive;
};
}
diff --git a/src/3rdparty/phonon/ds9/qpin.cpp b/src/3rdparty/phonon/ds9/qpin.cpp
index 37fe48d..b4afd10 100644
--- a/src/3rdparty/phonon/ds9/qpin.cpp
+++ b/src/3rdparty/phonon/ds9/qpin.cpp
@@ -28,20 +28,7 @@ namespace Phonon
namespace DS9
{
- static const AM_MEDIA_TYPE defaultMediaType()
- {
- AM_MEDIA_TYPE ret;
- ret.majortype = MEDIATYPE_NULL;
- ret.subtype = MEDIASUBTYPE_NULL;
- ret.bFixedSizeSamples = TRUE;
- ret.bTemporalCompression = FALSE;
- ret.lSampleSize = 1;
- ret.formattype = GUID_NULL;
- ret.pUnk = 0;
- ret.cbFormat = 0;
- ret.pbFormat = 0;
- return ret;
- }
+ static const AM_MEDIA_TYPE defaultMediaType = { MEDIATYPE_NULL, MEDIASUBTYPE_NULL, TRUE, FALSE, 1, GUID_NULL, 0, 0, 0};
class QEnumMediaTypes : public IEnumMediaTypes
{
@@ -104,8 +91,8 @@ namespace Phonon
return E_INVALIDARG;
}
- int nbFetched = 0;
- while (nbFetched < int(count) && m_index < m_pin->mediaTypes().count()) {
+ uint nbFetched = 0;
+ while (nbFetched < count && m_index < m_pin->mediaTypes().count()) {
//the caller will deallocate the memory
*out = static_cast<AM_MEDIA_TYPE *>(::CoTaskMemAlloc(sizeof(AM_MEDIA_TYPE)));
const AM_MEDIA_TYPE original = m_pin->mediaTypes().at(m_index);
@@ -158,9 +145,9 @@ namespace Phonon
QPin::QPin(QBaseFilter *parent, PIN_DIRECTION dir, const QVector<AM_MEDIA_TYPE> &mt) :
- m_memAlloc(0), m_parent(parent), m_refCount(1), m_connected(0),
- m_direction(dir), m_mediaTypes(mt), m_connectedType(defaultMediaType()),
- m_flushing(false)
+ m_parent(parent), m_flushing(false), m_refCount(1), m_connected(0),
+ m_direction(dir), m_mediaTypes(mt), m_connectedType(defaultMediaType),
+ m_memAlloc(0)
{
Q_ASSERT(m_parent);
m_parent->addPin(this);
@@ -273,7 +260,7 @@ namespace Phonon
if (FAILED(hr)) {
setConnected(0);
- setConnectedType(defaultMediaType());
+ setConnectedType(defaultMediaType);
} else {
ComPointer<IMemInputPin> input(pin, IID_IMemInputPin);
if (input) {
@@ -315,10 +302,8 @@ namespace Phonon
}
setConnected(0);
- setConnectedType(defaultMediaType());
- if (m_direction == PINDIR_INPUT) {
- setMemoryAllocator(0);
- }
+ setConnectedType(defaultMediaType);
+ setMemoryAllocator(0);
return S_OK;
}
@@ -338,7 +323,7 @@ namespace Phonon
STDMETHODIMP QPin::ConnectionMediaType(AM_MEDIA_TYPE *type)
{
- QReadLocker locker(&m_lock);
+ QMutexLocker locker(&m_mutex);
if (!type) {
return E_POINTER;
}
@@ -353,7 +338,6 @@ namespace Phonon
STDMETHODIMP QPin::QueryPinInfo(PIN_INFO *info)
{
- QReadLocker locker(&m_lock);
if (!info) {
return E_POINTER;
}
@@ -361,14 +345,12 @@ namespace Phonon
info->dir = m_direction;
info->pFilter = m_parent;
m_parent->AddRef();
- qMemCopy(info->achName, m_name.utf16(), qMin(MAX_FILTER_NAME, m_name.length()+1) *2);
-
+ info->achName[0] = 0;
return S_OK;
}
STDMETHODIMP QPin::QueryDirection(PIN_DIRECTION *dir)
{
- QReadLocker locker(&m_lock);
if (!dir) {
return E_POINTER;
}
@@ -379,20 +361,18 @@ namespace Phonon
STDMETHODIMP QPin::QueryId(LPWSTR *id)
{
- QReadLocker locker(&m_lock);
if (!id) {
return E_POINTER;
}
- int nbBytes = (m_name.length()+1)*2;
- *id = static_cast<LPWSTR>(::CoTaskMemAlloc(nbBytes));
- qMemCopy(*id, m_name.utf16(), nbBytes);
+ *id = static_cast<LPWSTR>(::CoTaskMemAlloc(2));
+ *id[0] = 0;
return S_OK;
}
STDMETHODIMP QPin::QueryAccept(const AM_MEDIA_TYPE *type)
{
- QReadLocker locker(&m_lock);
+ QMutexLocker locker(&m_mutex);
if (!type) {
return E_POINTER;
}
@@ -439,7 +419,7 @@ namespace Phonon
STDMETHODIMP QPin::NewSegment(REFERENCE_TIME start, REFERENCE_TIME stop, double rate)
{
- QReadLocker locker(&m_lock);
+ QMutexLocker locker(&m_mutex);
if (m_direction == PINDIR_OUTPUT && m_connected) {
//we deliver this downstream
m_connected->NewSegment(start, stop, rate);
@@ -456,8 +436,8 @@ namespace Phonon
HRESULT QPin::checkOutputMediaTypesConnection(IPin *pin)
{
- IEnumMediaTypes *emt = 0;
- HRESULT hr = pin->EnumMediaTypes(&emt);
+ ComPointer<IEnumMediaTypes> emt;
+ HRESULT hr = pin->EnumMediaTypes(emt.pparam());
if (hr != S_OK) {
return hr;
}
@@ -470,7 +450,7 @@ namespace Phonon
freeMediaType(type);
return S_OK;
} else {
- setConnectedType(defaultMediaType());
+ setConnectedType(defaultMediaType);
freeMediaType(type);
}
}
@@ -520,7 +500,7 @@ namespace Phonon
void QPin::setConnectedType(const AM_MEDIA_TYPE &type)
{
- QWriteLocker locker(&m_lock);
+ QMutexLocker locker(&m_mutex);
//1st we free memory
freeMediaType(m_connectedType);
@@ -530,13 +510,13 @@ namespace Phonon
const AM_MEDIA_TYPE &QPin::connectedType() const
{
- QReadLocker locker(&m_lock);
+ QMutexLocker locker(&m_mutex);
return m_connectedType;
}
void QPin::setConnected(IPin *pin)
{
- QWriteLocker locker(&m_lock);
+ QMutexLocker locker(&m_mutex);
if (pin) {
pin->AddRef();
}
@@ -548,7 +528,7 @@ namespace Phonon
IPin *QPin::connected(bool addref) const
{
- QReadLocker locker(&m_lock);
+ QMutexLocker locker(&m_mutex);
if (addref && m_connected) {
m_connected->AddRef();
}
@@ -557,13 +537,12 @@ namespace Phonon
bool QPin::isFlushing() const
{
- QReadLocker locker(&m_lock);
+ QMutexLocker locker(&m_mutex);
return m_flushing;
}
FILTER_STATE QPin::filterState() const
{
- QReadLocker locker(&m_lock);
FILTER_STATE fstate = State_Stopped;
m_parent->GetState(0, &fstate);
return fstate;
@@ -571,7 +550,7 @@ namespace Phonon
QVector<AM_MEDIA_TYPE> QPin::mediaTypes() const
{
- QReadLocker locker(&m_lock);
+ QMutexLocker locker(&m_mutex);
return m_mediaTypes;
}
@@ -607,7 +586,7 @@ namespace Phonon
void QPin::setMemoryAllocator(IMemAllocator *alloc)
{
- QWriteLocker locker(&m_lock);
+ QMutexLocker locker(&m_mutex);
if (alloc) {
alloc->AddRef();
}
@@ -619,7 +598,7 @@ namespace Phonon
IMemAllocator *QPin::memoryAllocator(bool addref) const
{
- QReadLocker locker(&m_lock);
+ QMutexLocker locker(&m_mutex);
if (addref && m_memAlloc) {
m_memAlloc->AddRef();
}
diff --git a/src/3rdparty/phonon/ds9/qpin.h b/src/3rdparty/phonon/ds9/qpin.h
index a3287c4..280ad61 100644
--- a/src/3rdparty/phonon/ds9/qpin.h
+++ b/src/3rdparty/phonon/ds9/qpin.h
@@ -22,7 +22,7 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
#include <QtCore/QString>
#include <QtCore/QVector>
-#include <QtCore/QReadWriteLock>
+#include <QtCore/QMutex>
#include <dshow.h>
@@ -85,8 +85,8 @@ namespace Phonon
protected:
//this can be used by sub-classes
- mutable QReadWriteLock m_lock;
- QBaseFilter *m_parent;
+ mutable QMutex m_mutex;
+ QBaseFilter * const m_parent;
bool m_flushing;
private:
@@ -98,7 +98,6 @@ namespace Phonon
const PIN_DIRECTION m_direction;
QVector<AM_MEDIA_TYPE> m_mediaTypes; //accepted media types
AM_MEDIA_TYPE m_connectedType;
- QString m_name;
IMemAllocator *m_memAlloc;
};
diff --git a/src/3rdparty/phonon/ds9/videorenderer_default.cpp b/src/3rdparty/phonon/ds9/videorenderer_default.cpp
new file mode 100644
index 0000000..0045a49
--- /dev/null
+++ b/src/3rdparty/phonon/ds9/videorenderer_default.cpp
@@ -0,0 +1,153 @@
+/* This file is part of the KDE project.
+
+Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+
+This library is free software: you can redistribute it and/or modify
+it under the terms of the GNU Lesser General Public License as published by
+the Free Software Foundation, either version 2.1 or 3 of the License.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public License
+along with this library. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+
+#include "videorenderer_default.h"
+
+#ifndef QT_NO_PHONON_VIDEO
+
+#include <QtGui/QWidget>
+#include <QtGui/QPainter>
+
+#include <uuids.h>
+
+QT_BEGIN_NAMESPACE
+
+
+namespace Phonon
+{
+ namespace DS9
+ {
+ VideoRendererDefault::~VideoRendererDefault()
+ {
+ }
+
+ bool VideoRendererDefault::isNative() const
+ {
+ return true;
+ }
+
+
+ VideoRendererDefault::VideoRendererDefault(QWidget *target) : m_target(target)
+ {
+ m_target->setAttribute(Qt::WA_PaintOnScreen, true);
+ m_filter = Filter(CLSID_VideoRenderer, IID_IBaseFilter);
+ }
+
+ QSize VideoRendererDefault::videoSize() const
+ {
+ LONG w = 0,
+ h = 0;
+ ComPointer<IBasicVideo> basic(m_filter, IID_IBasicVideo);
+ if (basic) {
+ basic->GetVideoSize( &w, &h);
+ }
+ return QSize(w, h);
+ }
+
+ void VideoRendererDefault::repaintCurrentFrame(QWidget * /*target*/, const QRect & /*rect*/)
+ {
+ //nothing to do here: the renderer paints everything
+ }
+
+ void VideoRendererDefault::notifyResize(const QSize &size, Phonon::VideoWidget::AspectRatio aspectRatio,
+ Phonon::VideoWidget::ScaleMode scaleMode)
+ {
+ if (!isActive()) {
+ ComPointer<IBasicVideo> basic(m_filter, IID_IBasicVideo);
+ if (basic) {
+ basic->SetDestinationPosition(0, 0, 0, 0);
+ }
+ return;
+ }
+
+ ComPointer<IVideoWindow> video(m_filter, IID_IVideoWindow);
+
+ OAHWND owner;
+ HRESULT hr = video->get_Owner(&owner);
+ if (FAILED(hr)) {
+ return;
+ }
+
+ const OAHWND newOwner = reinterpret_cast<OAHWND>(m_target->winId());
+ if (owner != newOwner) {
+ video->put_Owner(newOwner);
+ video->put_MessageDrain(newOwner);
+ video->put_WindowStyle(WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS);
+ }
+
+ //make sure the widget takes the whole size of the parent
+ video->SetWindowPosition(0, 0, size.width(), size.height());
+
+ const QSize vsize = videoSize();
+ internalNotifyResize(size, vsize, aspectRatio, scaleMode);
+
+ ComPointer<IBasicVideo> basic(m_filter, IID_IBasicVideo);
+ if (basic) {
+ basic->SetDestinationPosition(m_dstX, m_dstY, m_dstWidth, m_dstHeight);
+ }
+ }
+
+ void VideoRendererDefault::applyMixerSettings(qreal /*brightness*/, qreal /*contrast*/, qreal /*m_hue*/, qreal /*saturation*/)
+ {
+ //this can't be supported for the default renderer
+ }
+
+ QImage VideoRendererDefault::snapshot() const
+ {
+ ComPointer<IBasicVideo> basic(m_filter, IID_IBasicVideo);
+ if (basic) {
+ LONG bufferSize = 0;
+ //1st we get the buffer size
+ basic->GetCurrentImage(&bufferSize, 0);
+
+ QByteArray buffer;
+ buffer.resize(bufferSize);
+ HRESULT hr = basic->GetCurrentImage(&bufferSize, reinterpret_cast<long*>(buffer.data()));
+
+ if (SUCCEEDED(hr)) {
+
+ const BITMAPINFOHEADER *bmi = reinterpret_cast<const BITMAPINFOHEADER*>(buffer.constData());
+
+ const int w = qAbs(bmi->biWidth),
+ h = qAbs(bmi->biHeight);
+
+ // Create image and copy data into image.
+ QImage ret(w, h, QImage::Format_RGB32);
+
+ if (!ret.isNull()) {
+ const char *data = buffer.constData() + bmi->biSize;
+ const int bytes_per_line = w * sizeof(QRgb);
+ for (int y = h - 1; y >= 0; --y) {
+ qMemCopy(ret.scanLine(y), //destination
+ data, //source
+ bytes_per_line);
+ data += bytes_per_line;
+ }
+ }
+ return ret;
+ }
+ }
+ return QImage();
+ }
+
+ }
+}
+
+QT_END_NAMESPACE
+
+#endif //QT_NO_PHONON_VIDEO
diff --git a/src/3rdparty/phonon/ds9/videorenderer_default.h b/src/3rdparty/phonon/ds9/videorenderer_default.h
new file mode 100644
index 0000000..43768d9
--- /dev/null
+++ b/src/3rdparty/phonon/ds9/videorenderer_default.h
@@ -0,0 +1,55 @@
+/* This file is part of the KDE project.
+
+Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+
+This library is free software: you can redistribute it and/or modify
+it under the terms of the GNU Lesser General Public License as published by
+the Free Software Foundation, either version 2.1 or 3 of the License.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public License
+along with this library. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef PHONON_VIDEORENDERER_DEFAULT_H
+#define PHONON_VIDEORENDERER_DEFAULT_H
+
+#include "abstractvideorenderer.h"
+
+QT_BEGIN_NAMESPACE
+
+#ifndef QT_NO_PHONON_VIDEO
+
+namespace Phonon
+{
+ namespace DS9
+ {
+ class VideoRendererDefault : public AbstractVideoRenderer
+ {
+ public:
+ VideoRendererDefault(QWidget *target);
+ ~VideoRendererDefault();
+
+ //Implementation from AbstractVideoRenderer
+ void repaintCurrentFrame(QWidget *target, const QRect &rect);
+ void notifyResize(const QSize&, Phonon::VideoWidget::AspectRatio, Phonon::VideoWidget::ScaleMode);
+ QSize videoSize() const;
+ QImage snapshot() const;
+ void applyMixerSettings(qreal brightness, qreal contrast, qreal m_hue, qreal saturation);
+ bool isNative() const;
+ private:
+ QWidget *m_target;
+ };
+ }
+}
+
+#endif //QT_NO_PHONON_VIDEO
+
+QT_END_NAMESPACE
+
+#endif
+
diff --git a/src/3rdparty/phonon/ds9/videorenderer_evr.cpp b/src/3rdparty/phonon/ds9/videorenderer_evr.cpp
new file mode 100644
index 0000000..d23d9ce
--- /dev/null
+++ b/src/3rdparty/phonon/ds9/videorenderer_evr.cpp
@@ -0,0 +1,215 @@
+/* This file is part of the KDE project.
+
+Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+
+This library is free software: you can redistribute it and/or modify
+it under the terms of the GNU Lesser General Public License as published by
+the Free Software Foundation, either version 2.1 or 3 of the License.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public License
+along with this library. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+
+#include "videorenderer_evr.h"
+#include "qevr9.h"
+
+#ifndef QT_NO_PHONON_VIDEO
+
+#include <QtGui/QWidget>
+#include <QtGui/QPainter>
+
+QT_BEGIN_NAMESPACE
+
+namespace Phonon
+{
+ namespace DS9
+ {
+ //we have to define them here because not all compilers/sdk have them
+ static const GUID MR_VIDEO_RENDER_SERVICE = {0x1092a86c, 0xab1a, 0x459a, {0xa3, 0x36, 0x83, 0x1f, 0xbc, 0x4d, 0x11, 0xff} };
+ static const GUID MR_VIDEO_MIXER_SERVICE = { 0x73cd2fc, 0x6cf4, 0x40b7, {0x88, 0x59, 0xe8, 0x95, 0x52, 0xc8, 0x41, 0xf8} };
+ static const IID IID_IMFVideoDisplayControl = {0xa490b1e4, 0xab84, 0x4d31, {0xa1, 0xb2, 0x18, 0x1e, 0x03, 0xb1, 0x07, 0x7a} };
+ static const IID IID_IMFVideoMixerControl = {0xA5C6C53F, 0xC202, 0x4aa5, {0x96, 0x95, 0x17, 0x5B, 0xA8, 0xC5, 0x08, 0xA5} };
+ static const IID IID_IMFVideoProcessor = {0x6AB0000C, 0xFECE, 0x4d1f, {0xA2, 0xAC, 0xA9, 0x57, 0x35, 0x30, 0x65, 0x6E} };
+ static const IID IID_IMFGetService = {0xFA993888, 0x4383, 0x415A, {0xA9, 0x30, 0xDD, 0x47, 0x2A, 0x8C, 0xF6, 0xF7} };
+ static const GUID CLSID_EnhancedVideoRenderer = {0xfa10746c, 0x9b63, 0x4b6c, {0xbc, 0x49, 0xfc, 0x30, 0xe, 0xa5, 0xf2, 0x56} };
+
+ template <typename T> ComPointer<T> getService(const Filter &filter, REFGUID guidService, REFIID riid)
+ {
+ //normally we should use IID_IMFGetService but this introduces another dependency
+ //so here we simply define our own IId with the same value
+ ComPointer<IMFGetService> getService(filter, IID_IMFGetService);
+ Q_ASSERT(getService);
+ T *ptr = 0;
+ HRESULT hr = getService->GetService(guidService, riid, reinterpret_cast<void **>(&ptr));
+ if (!SUCCEEDED(hr) || ptr == 0)
+ Q_ASSERT(!SUCCEEDED(hr) && ptr != 0);
+ ComPointer<T> service(ptr);
+ return service;
+ }
+
+ VideoRendererEVR::~VideoRendererEVR()
+ {
+ }
+
+ bool VideoRendererEVR::isNative() const
+ {
+ return true;
+ }
+
+ VideoRendererEVR::VideoRendererEVR(QWidget *target) : m_target(target)
+ {
+ m_filter = Filter(CLSID_EnhancedVideoRenderer, IID_IBaseFilter);
+ if (!m_filter) {
+ return;
+ }
+
+ ComPointer<IMFVideoDisplayControl> filterControl = getService<IMFVideoDisplayControl>(m_filter, MR_VIDEO_RENDER_SERVICE, IID_IMFVideoDisplayControl);
+
+ filterControl->SetVideoWindow(reinterpret_cast<HWND>(target->winId()));
+ filterControl->SetAspectRatioMode(MFVideoARMode_None); // We're in control of the size
+ }
+
+ QImage VideoRendererEVR::snapshot() const
+ {
+ // This will always capture black areas where no video is drawn, if any are present.
+ // Due to the hack in notifyResize()
+ ComPointer<IMFVideoDisplayControl> filterControl = getService<IMFVideoDisplayControl>(m_filter, MR_VIDEO_RENDER_SERVICE, IID_IMFVideoDisplayControl);
+ if (filterControl) {
+ BITMAPINFOHEADER bmi;
+ BYTE *buffer = 0;
+ DWORD bufferSize;
+ LONGLONG timeStamp;
+
+ bmi.biSize = sizeof(BITMAPINFOHEADER);
+
+ HRESULT hr = filterControl->GetCurrentImage(&bmi, &buffer, &bufferSize, &timeStamp);
+ if (SUCCEEDED(hr)) {
+
+ const int w = qAbs(bmi.biWidth),
+ h = qAbs(bmi.biHeight);
+
+ // Create image and copy data into image.
+ QImage ret(w, h, QImage::Format_RGB32);
+
+ if (!ret.isNull()) {
+ uchar *data = buffer;
+ const int bytes_per_line = w * sizeof(QRgb);
+ for (int y = h - 1; y >= 0; --y) {
+ qMemCopy(ret.scanLine(y), //destination
+ data, //source
+ bytes_per_line);
+ data += bytes_per_line;
+ }
+ }
+ ::CoTaskMemFree(buffer);
+ return ret;
+ }
+ }
+ return QImage();
+ }
+
+ QSize VideoRendererEVR::videoSize() const
+ {
+ SIZE nativeSize;
+ SIZE aspectRatioSize;
+
+ ComPointer<IMFVideoDisplayControl> filterControl = getService<IMFVideoDisplayControl>(m_filter, MR_VIDEO_RENDER_SERVICE, IID_IMFVideoDisplayControl);
+
+ filterControl->GetNativeVideoSize(&nativeSize, &aspectRatioSize);
+
+ return QSize(nativeSize.cx, nativeSize.cy);
+ }
+
+ void VideoRendererEVR::repaintCurrentFrame(QWidget *target, const QRect &rect)
+ {
+ // repaint the video
+ ComPointer<IMFVideoDisplayControl> filterControl = getService<IMFVideoDisplayControl>(m_filter, MR_VIDEO_RENDER_SERVICE, IID_IMFVideoDisplayControl);
+ // All failed results can be safely ignored
+ filterControl->RepaintVideo();
+ }
+
+ void VideoRendererEVR::notifyResize(const QSize &size, Phonon::VideoWidget::AspectRatio aspectRatio,
+ Phonon::VideoWidget::ScaleMode scaleMode)
+ {
+ if (!isActive()) {
+ RECT dummyRect = { 0, 0, 0, 0};
+ ComPointer<IMFVideoDisplayControl> filterControl = getService<IMFVideoDisplayControl>(m_filter, MR_VIDEO_RENDER_SERVICE, IID_IMFVideoDisplayControl);
+ filterControl->SetVideoPosition(0, &dummyRect);
+ return;
+ }
+
+ const QSize vsize = videoSize();
+ internalNotifyResize(size, vsize, aspectRatio, scaleMode);
+
+ RECT dstRectWin = { 0, 0, size.width(), size.height()};
+
+ // Resize the Stream output rect instead of the destination rect.
+ // Hacky workaround for flicker in the areas outside of the destination rect
+ // This way these areas don't exist
+ MFVideoNormalizedRect streamOutputRect = { float(m_dstX) / float(size.width()), float(m_dstY) / float(size.height()),
+ float(m_dstWidth + m_dstX) / float(size.width()), float(m_dstHeight + m_dstY) / float(size.height())};
+
+ ComPointer<IMFVideoMixerControl> filterMixer = getService<IMFVideoMixerControl>(m_filter, MR_VIDEO_MIXER_SERVICE, IID_IMFVideoMixerControl);
+ ComPointer<IMFVideoDisplayControl> filterControl = getService<IMFVideoDisplayControl>(m_filter, MR_VIDEO_RENDER_SERVICE, IID_IMFVideoDisplayControl);
+
+ filterMixer->SetStreamOutputRect(0, &streamOutputRect);
+ filterControl->SetVideoPosition(0, &dstRectWin);
+ }
+
+ void VideoRendererEVR::applyMixerSettings(qreal brightness, qreal contrast, qreal hue, qreal saturation)
+ {
+ InputPin sink = BackendNode::pins(m_filter, PINDIR_INPUT).first();
+ OutputPin source;
+ if (FAILED(sink->ConnectedTo(source.pparam()))) {
+ return; //it must be connected to work
+ }
+
+ // Get the "Video Processor" (used for brightness/contrast/saturation/hue)
+ ComPointer<IMFVideoProcessor> processor = getService<IMFVideoProcessor>(m_filter, MR_VIDEO_MIXER_SERVICE, IID_IMFVideoProcessor);
+ Q_ASSERT(processor);
+
+ DXVA2_ValueRange contrastRange;
+ DXVA2_ValueRange brightnessRange;
+ DXVA2_ValueRange saturationRange;
+ DXVA2_ValueRange hueRange;
+
+ if (FAILED(processor->GetProcAmpRange(DXVA2_ProcAmp_Contrast, &contrastRange)))
+ return;
+ if (FAILED(processor->GetProcAmpRange(DXVA2_ProcAmp_Brightness, &brightnessRange)))
+ return;
+ if (FAILED(processor->GetProcAmpRange(DXVA2_ProcAmp_Saturation, &saturationRange)))
+ return;
+ if (FAILED(processor->GetProcAmpRange(DXVA2_ProcAmp_Hue, &hueRange)))
+ return;
+
+ DXVA2_ProcAmpValues values;
+
+ values.Contrast = DXVA2FloatToFixed(((contrast < 0
+ ? DXVA2FixedToFloat(contrastRange.MinValue) : DXVA2FixedToFloat(contrastRange.MaxValue))
+ - DXVA2FixedToFloat(contrastRange.DefaultValue)) * qAbs(contrast) + DXVA2FixedToFloat(contrastRange.DefaultValue));
+ values.Brightness = DXVA2FloatToFixed(((brightness < 0
+ ? DXVA2FixedToFloat(brightnessRange.MinValue) : DXVA2FixedToFloat(brightnessRange.MaxValue))
+ - DXVA2FixedToFloat(brightnessRange.DefaultValue)) * qAbs(brightness) + DXVA2FixedToFloat(brightnessRange.DefaultValue));
+ values.Saturation = DXVA2FloatToFixed(((saturation < 0
+ ? DXVA2FixedToFloat(saturationRange.MinValue) : DXVA2FixedToFloat(saturationRange.MaxValue))
+ - DXVA2FixedToFloat(saturationRange.DefaultValue)) * qAbs(saturation) + DXVA2FixedToFloat(saturationRange.DefaultValue));
+ values.Hue = DXVA2FloatToFixed(((hue < 0
+ ? DXVA2FixedToFloat(hueRange.MinValue) : DXVA2FixedToFloat(hueRange.MaxValue))
+ - DXVA2FixedToFloat(hueRange.DefaultValue)) * qAbs(hue) + DXVA2FixedToFloat(hueRange.DefaultValue));
+
+ //finally set the settings
+ processor->SetProcAmpValues(DXVA2_ProcAmp_Contrast | DXVA2_ProcAmp_Brightness | DXVA2_ProcAmp_Saturation | DXVA2_ProcAmp_Hue, &values);
+
+ }
+ }
+}
+
+QT_END_NAMESPACE
+
+#endif //QT_NO_PHONON_VIDEO
diff --git a/src/3rdparty/phonon/ds9/videorenderer_evr.h b/src/3rdparty/phonon/ds9/videorenderer_evr.h
new file mode 100644
index 0000000..229c36d
--- /dev/null
+++ b/src/3rdparty/phonon/ds9/videorenderer_evr.h
@@ -0,0 +1,56 @@
+/* This file is part of the KDE project.
+
+Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+
+This library is free software: you can redistribute it and/or modify
+it under the terms of the GNU Lesser General Public License as published by
+the Free Software Foundation, either version 2.1 or 3 of the License.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public License
+along with this library. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef PHONON_VIDEORENDERER_EVR_H
+#define PHONON_VIDEORENDERER_EVR_H
+
+#include "abstractvideorenderer.h"
+#include "compointer.h"
+
+QT_BEGIN_NAMESPACE
+
+#ifndef QT_NO_PHONON_VIDEO
+
+namespace Phonon
+{
+ namespace DS9
+ {
+ class VideoRendererEVR : public AbstractVideoRenderer
+ {
+ public:
+ VideoRendererEVR(QWidget *target);
+ ~VideoRendererEVR();
+
+ //Implementation from AbstractVideoRenderer
+ void repaintCurrentFrame(QWidget *target, const QRect &rect);
+ void notifyResize(const QSize&, Phonon::VideoWidget::AspectRatio, Phonon::VideoWidget::ScaleMode);
+ QSize videoSize() const;
+ QImage snapshot() const;
+ void applyMixerSettings(qreal brightness, qreal contrast, qreal m_hue, qreal saturation);
+ bool isNative() const;
+ private:
+ QWidget *m_target;
+ };
+ }
+}
+
+#endif //QT_NO_PHONON_VIDEO
+
+QT_END_NAMESPACE
+
+#endif
+
diff --git a/src/3rdparty/phonon/ds9/videorenderer_soft.cpp b/src/3rdparty/phonon/ds9/videorenderer_soft.cpp
index 491d1bd..9c7993c 100644
--- a/src/3rdparty/phonon/ds9/videorenderer_soft.cpp
+++ b/src/3rdparty/phonon/ds9/videorenderer_soft.cpp
@@ -194,8 +194,8 @@ namespace Phonon
m_sampleBuffer = ComPointer<IMediaSample>();
#ifndef QT_NO_OPENGL
freeGLResources();
-#endif // QT_NO_OPENGL
m_textureUploaded = false;
+#endif // QT_NO_OPENGL
}
void endOfStream()
@@ -314,7 +314,6 @@ namespace Phonon
REFERENCE_TIME m_start;
HANDLE m_renderEvent, m_receiveCanWait; // Signals sample to render
QSize m_size;
- bool m_textureUploaded;
//mixer settings
qreal m_brightness,
@@ -356,6 +355,7 @@ namespace Phonon
bool m_checkedPrograms;
bool m_usingOpenGL;
+ bool m_textureUploaded;
GLuint m_program[2];
GLuint m_texture[3];
#endif
@@ -365,7 +365,7 @@ namespace Phonon
{
public:
VideoRendererSoftPin(VideoRendererSoftFilter *parent) :
- QMemInputPin(parent, videoMediaTypes(), false /*no transformation of the samples*/),
+ QMemInputPin(parent, videoMediaTypes(), false /*no transformation of the samples*/, 0),
m_renderer(parent)
{
}
@@ -436,7 +436,7 @@ namespace Phonon
QBaseFilter(CLSID_NULL), m_inputPin(new VideoRendererSoftPin(this)),
m_renderer(renderer), m_start(0)
#ifndef QT_NO_OPENGL
- ,m_usingOpenGL(false), m_checkedPrograms(false), m_textureUploaded(false)
+ , m_checkedPrograms(false), m_usingOpenGL(false), m_textureUploaded(false)
#endif
{
m_renderEvent = ::CreateEvent(0, 0, 0, 0);
@@ -661,7 +661,10 @@ namespace Phonon
#ifndef QT_NO_OPENGL
- if (painter.paintEngine() && painter.paintEngine()->type() == QPaintEngine::OpenGL && checkGLPrograms()) {
+ if (painter.paintEngine() &&
+ (painter.paintEngine()->type() == QPaintEngine::OpenGL || painter.paintEngine()->type() == QPaintEngine::OpenGL2)
+ && checkGLPrograms()) {
+
//for now we only support YUV (both YV12 and YUY2)
updateTexture();
@@ -673,6 +676,7 @@ namespace Phonon
}
//let's draw the texture
+ painter.beginNativePainting();
//Let's pass the other arguments
const Program prog = (m_inputPin->connectedType().subtype == MEDIASUBTYPE_YV12) ? YV12toRGB : YUY2toRGB;
@@ -722,6 +726,7 @@ namespace Phonon
glDisableClientState(GL_VERTEX_ARRAY);
glDisable(GL_FRAGMENT_PROGRAM_ARB);
+ painter.endNativePainting();
return;
} else
#endif
diff --git a/src/3rdparty/phonon/ds9/videorenderer_vmr9.cpp b/src/3rdparty/phonon/ds9/videorenderer_vmr9.cpp
index 298e9fa..545b31e 100644
--- a/src/3rdparty/phonon/ds9/videorenderer_vmr9.cpp
+++ b/src/3rdparty/phonon/ds9/videorenderer_vmr9.cpp
@@ -22,14 +22,9 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
#include <QtGui/QWidget>
#include <QtGui/QPainter>
-#include <QtCore/QTimerEvent>
-#ifndef Q_OS_WINCE
#include <d3d9.h>
#include <vmr9.h>
-#else
-#include <uuids.h>
-#endif
QT_BEGIN_NAMESPACE
@@ -48,116 +43,10 @@ namespace Phonon
}
-#ifdef Q_OS_WINCE
- VideoRendererVMR9::VideoRendererVMR9(QWidget *target) : m_target(target)
- {
- m_target->setAttribute(Qt::WA_PaintOnScreen, true);
- m_filter = Filter(CLSID_VideoRenderer, IID_IBaseFilter);
- }
-
- QSize VideoRendererVMR9::videoSize() const
- {
- LONG w = 0,
- h = 0;
- ComPointer<IBasicVideo> basic(m_filter, IID_IBasicVideo);
- if (basic) {
- basic->GetVideoSize( &w, &h);
- }
- return QSize(w, h);
- }
-
- void VideoRendererVMR9::repaintCurrentFrame(QWidget * /*target*/, const QRect & /*rect*/)
- {
- //nothing to do here: the renderer paints everything
- }
-
- void VideoRendererVMR9::notifyResize(const QSize &size, Phonon::VideoWidget::AspectRatio aspectRatio,
- Phonon::VideoWidget::ScaleMode scaleMode)
- {
- if (!isActive()) {
- ComPointer<IBasicVideo> basic(m_filter, IID_IBasicVideo);
- if (basic) {
- basic->SetDestinationPosition(0, 0, 0, 0);
- }
- return;
- }
-
- ComPointer<IVideoWindow> video(m_filter, IID_IVideoWindow);
-
- OAHWND owner;
- HRESULT hr = video->get_Owner(&owner);
- if (FAILED(hr)) {
- return;
- }
-
- const OAHWND newOwner = reinterpret_cast<OAHWND>(m_target->winId());
- if (owner != newOwner) {
- video->put_Owner(newOwner);
- video->put_MessageDrain(newOwner);
- video->put_WindowStyle(WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS);
- }
-
- //make sure the widget takes the whole size of the parent
- video->SetWindowPosition(0, 0, size.width(), size.height());
-
- const QSize vsize = videoSize();
- internalNotifyResize(size, vsize, aspectRatio, scaleMode);
-
- ComPointer<IBasicVideo> basic(m_filter, IID_IBasicVideo);
- if (basic) {
- basic->SetDestinationPosition(m_dstX, m_dstY, m_dstWidth, m_dstHeight);
- }
- }
-
- void VideoRendererVMR9::applyMixerSettings(qreal /*brightness*/, qreal /*contrast*/, qreal /*m_hue*/, qreal /*saturation*/)
- {
- //this can't be supported for WinCE
- }
-
- QImage VideoRendererVMR9::snapshot() const
- {
- ComPointer<IBasicVideo> basic(m_filter, IID_IBasicVideo);
- if (basic) {
- LONG bufferSize = 0;
- //1st we get the buffer size
- basic->GetCurrentImage(&bufferSize, 0);
-
- QByteArray buffer;
- buffer.resize(bufferSize);
- HRESULT hr = basic->GetCurrentImage(&bufferSize, reinterpret_cast<long*>(buffer.data()));
-
- if (SUCCEEDED(hr)) {
-
- const BITMAPINFOHEADER *bmi = reinterpret_cast<const BITMAPINFOHEADER*>(buffer.constData());
-
- const int w = qAbs(bmi->biWidth),
- h = qAbs(bmi->biHeight);
-
- // Create image and copy data into image.
- QImage ret(w, h, QImage::Format_RGB32);
-
- if (!ret.isNull()) {
- const char *data = buffer.constData() + bmi->biSize;
- const int bytes_per_line = w * sizeof(QRgb);
- for (int y = h - 1; y >= 0; --y) {
- qMemCopy(ret.scanLine(y), //destination
- data, //source
- bytes_per_line);
- data += bytes_per_line;
- }
- }
- return ret;
- }
- }
- return QImage();
- }
-
-#else
VideoRendererVMR9::VideoRendererVMR9(QWidget *target) : m_target(target)
{
m_filter = Filter(CLSID_VideoMixingRenderer9, IID_IBaseFilter);
if (!m_filter) {
- qWarning("the video widget could not be initialized correctly");
return;
}
@@ -169,6 +58,7 @@ namespace Phonon
Q_ASSERT(SUCCEEDED(hr));
ComPointer<IVMRWindowlessControl9> windowlessControl(m_filter, IID_IVMRWindowlessControl9);
windowlessControl->SetVideoClippingWindow(reinterpret_cast<HWND>(target->winId()));
+ windowlessControl->SetAspectRatioMode(VMR9ARMode_None); //we're in control of the size
}
QImage VideoRendererVMR9::snapshot() const
@@ -324,7 +214,6 @@ namespace Phonon
//finally set the settings
mixer->SetProcAmpControl(0, &ctrl);
}
-#endif
}
}
diff --git a/src/3rdparty/phonon/ds9/videorenderer_vmr9.h b/src/3rdparty/phonon/ds9/videorenderer_vmr9.h
index 4eb237e..516d79d 100644
--- a/src/3rdparty/phonon/ds9/videorenderer_vmr9.h
+++ b/src/3rdparty/phonon/ds9/videorenderer_vmr9.h
@@ -19,7 +19,6 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
#define PHONON_VIDEORENDERER_VMR9_H
#include "abstractvideorenderer.h"
-#include "compointer.h"
QT_BEGIN_NAMESPACE
diff --git a/src/3rdparty/phonon/ds9/videowidget.cpp b/src/3rdparty/phonon/ds9/videowidget.cpp
index de7ce5f..09d42a4 100644
--- a/src/3rdparty/phonon/ds9/videowidget.cpp
+++ b/src/3rdparty/phonon/ds9/videowidget.cpp
@@ -24,7 +24,12 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
#include "mediaobject.h"
+#ifndef Q_OS_WINCE
+#include "videorenderer_evr.h"
#include "videorenderer_vmr9.h"
+#else
+#include "videorenderer_default.h"
+#endif
#include "videorenderer_soft.h"
QT_BEGIN_NAMESPACE
@@ -84,7 +89,19 @@ namespace Phonon
void setCurrentRenderer(AbstractVideoRenderer *renderer)
{
m_currentRenderer = renderer;
- update();
+ //we disallow repaint on that widget for just a fraction of second
+ //this allows better transition between videos
+ setUpdatesEnabled(false);
+ m_flickerFreeTimer.start(20, this);
+ }
+
+ void timerEvent(QTimerEvent *e)
+ {
+ if (e->timerId() == m_flickerFreeTimer.timerId()) {
+ m_flickerFreeTimer.stop();
+ setUpdatesEnabled(true);
+ }
+ QWidget::timerEvent(e);
}
QSize sizeHint() const
@@ -106,6 +123,8 @@ namespace Phonon
void paintEvent(QPaintEvent *e)
{
+ if (!updatesEnabled())
+ return; //this avoids repaint from native events
checkCurrentRenderingMode();
m_currentRenderer->repaintCurrentFrame(this, e->rect());
}
@@ -153,13 +172,14 @@ namespace Phonon
}
} else if (!isEmbedded()) {
m_currentRenderer = m_node->switchRendering(m_currentRenderer);
- setAttribute(Qt::WA_PaintOnScreen, true);
+ setAttribute(Qt::WA_PaintOnScreen, false);
}
}
VideoWidget *m_node;
AbstractVideoRenderer *m_currentRenderer;
QVariant m_restoreScreenSaverActive;
+ QBasicTimer m_flickerFreeTimer;
};
VideoWidget::VideoWidget(QWidget *parent)
@@ -203,6 +223,9 @@ namespace Phonon
if (toNative && m_noNativeRendererSupported)
return current; //no switch here
+ if (!mediaObject())
+ return current;
+
//firt we delete the renderer
//initialization of the widgets
for(int i = 0; i < FILTER_COUNT; ++i) {
@@ -261,6 +284,7 @@ namespace Phonon
{
m_aspectRatio = aspectRatio;
updateVideoSize();
+ m_widget->update();
}
Phonon::VideoWidget::ScaleMode VideoWidget::scaleMode() const
@@ -279,6 +303,7 @@ namespace Phonon
{
m_scaleMode = scaleMode;
updateVideoSize();
+ m_widget->update();
}
void VideoWidget::setBrightness(qreal b)
@@ -332,14 +357,29 @@ namespace Phonon
int index = graphIndex * 2 + type;
if (m_renderers[index] == 0 && autoCreate) {
AbstractVideoRenderer *renderer = 0;
- if (type == Native) {
- renderer = new VideoRendererVMR9(m_widget);
+ if (type == Native) {
+#ifndef Q_OS_WINCE
+ renderer = new VideoRendererEVR(m_widget);
+ if (renderer->getFilter() == 0) {
+ delete renderer;
+ //EVR not present, let's try VMR
+ renderer = new VideoRendererVMR9(m_widget);
+ if (renderer->getFilter() == 0) {
+ //instanciating the renderer might fail
+ m_noNativeRendererSupported = true;
+ delete renderer;
+ renderer = 0;
+ }
+ }
+#else
+ renderer = new VideoRendererDefault(m_widget);
if (renderer->getFilter() == 0) {
- //instanciating the renderer might fail with error VFW_E_DDRAW_CAPS_NOT_SUITABLE (0x80040273)
+ //instanciating the renderer might fail
m_noNativeRendererSupported = true;
delete renderer;
renderer = 0;
}
+#endif
}
if (renderer == 0) {
diff --git a/src/3rdparty/phonon/ds9/volumeeffect.cpp b/src/3rdparty/phonon/ds9/volumeeffect.cpp
index b9a5fce..a93b074 100644
--- a/src/3rdparty/phonon/ds9/volumeeffect.cpp
+++ b/src/3rdparty/phonon/ds9/volumeeffect.cpp
@@ -76,7 +76,7 @@ namespace Phonon
class VolumeMemInputPin : public QMemInputPin
{
public:
- VolumeMemInputPin(QBaseFilter *parent, const QVector<AM_MEDIA_TYPE> &mt) : QMemInputPin(parent, mt, true /*transform*/)
+ VolumeMemInputPin(QBaseFilter *parent, const QVector<AM_MEDIA_TYPE> &mt, QPin *output) : QMemInputPin(parent, mt, true /*transform*/, output)
{
}
@@ -139,8 +139,7 @@ namespace Phonon
//then creating the input
mt << audioMediaType();
- m_input = new VolumeMemInputPin(this, mt);
- m_input->addOutput(m_output); //make the connection here
+ m_input = new VolumeMemInputPin(this, mt, m_output);
}
void VolumeEffectFilter::treatOneSamplePerChannel(BYTE **buffer, int sampleSize, int channelCount, int frequency)
diff --git a/src/3rdparty/phonon/ds9/volumeeffect.h b/src/3rdparty/phonon/ds9/volumeeffect.h
index 39b20d0..d1b0186 100644
--- a/src/3rdparty/phonon/ds9/volumeeffect.h
+++ b/src/3rdparty/phonon/ds9/volumeeffect.h
@@ -47,7 +47,7 @@ namespace Phonon
private:
float m_volume;
- //parameters used to fade
+ //paramaters used to fade
Phonon::VolumeFaderEffect::FadeCurve m_fadeCurve;
bool m_fading; //determines if we should be fading.
diff --git a/src/3rdparty/phonon/mmf/videowidget.cpp b/src/3rdparty/phonon/mmf/videowidget.cpp
index 4ed9979..122094e 100644
--- a/src/3rdparty/phonon/mmf/videowidget.cpp
+++ b/src/3rdparty/phonon/mmf/videowidget.cpp
@@ -123,7 +123,7 @@ Phonon::VideoWidget::ScaleMode MMF::VideoWidget::scaleMode() const
void MMF::VideoWidget::setScaleMode(Phonon::VideoWidget::ScaleMode scaleMode)
{
TRACE_CONTEXT(VideoWidget::setScaleMode, EVideoApi);
- TRACE("setScaleMode %d", setScaleMode);
+ TRACE("setScaleMode %d", scaleMode);
m_videoOutput->setScaleMode(scaleMode);
}
diff --git a/src/corelib/global/qfeatures.h b/src/corelib/global/qfeatures.h
index 74fa8ee..c66047a 100644
--- a/src/corelib/global/qfeatures.h
+++ b/src/corelib/global/qfeatures.h
@@ -505,6 +505,11 @@
#define QT_NO_XMLSTREAMWRITER
#endif
+// Bearer Management
+#if !defined(QT_NO_BEARERMANAGEMENT) && (defined(QT_NO_LIBRARY))
+#define QT_NO_BEARERMANAGEMENT
+#endif
+
// Context menu
#if !defined(QT_NO_CONTEXTMENU) && (defined(QT_NO_MENU))
#define QT_NO_CONTEXTMENU
diff --git a/src/corelib/global/qfeatures.txt b/src/corelib/global/qfeatures.txt
index 0053556..ed173b1 100644
--- a/src/corelib/global/qfeatures.txt
+++ b/src/corelib/global/qfeatures.txt
@@ -1098,6 +1098,14 @@ Requires: TEMPORARYFILE
Name: QNetworkDiskCache
SeeAlso: ???
+Feature: BEARERMANAGEMENT
+Description: Provides bearer management support
+Section: Networking
+Requires: LIBRARY
+Name: Bearer Management
+SeeAlso: ???
+
+
# Utilities
Feature: COMPLETER
diff --git a/src/corelib/io/qwindowspipewriter.cpp b/src/corelib/io/qwindowspipewriter.cpp
index 417439f..2fe4424 100644
--- a/src/corelib/io/qwindowspipewriter.cpp
+++ b/src/corelib/io/qwindowspipewriter.cpp
@@ -128,11 +128,9 @@ void QWindowsPipeWriter::run()
overl.OffsetHigh = 0;
while ((!quitNow) && totalWritten < maxlen) {
DWORD written = 0;
- // Write 2k at a time to prevent flooding the pipe. If you
- // write too much (4k-8k), the pipe can close
- // unexpectedly.
if (!WriteFile(writePipe, ptrData + totalWritten,
- qMin<int>(2048, maxlen - totalWritten), &written, &overl)) {
+ maxlen - totalWritten, &written, &overl)) {
+
if (GetLastError() == 0xE8/*NT_STATUS_INVALID_USER_BUFFER*/) {
// give the os a rest
msleep(100);
diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp
index 1a1f978..bf2e2e4 100644
--- a/src/corelib/kernel/qcoreapplication.cpp
+++ b/src/corelib/kernel/qcoreapplication.cpp
@@ -523,8 +523,6 @@ QCoreApplication::QCoreApplication(int &argc, char **argv)
}
-extern void set_winapp_name();
-
// ### move to QCoreApplicationPrivate constructor?
void QCoreApplication::init()
{
@@ -535,11 +533,6 @@ void QCoreApplication::init()
qt_locale_initialized = true;
#endif
-#ifdef Q_WS_WIN
- // Get the application name/instance if qWinMain() was not invoked
- set_winapp_name();
-#endif
-
Q_ASSERT_X(!self, "QCoreApplication", "there should be only one application object");
QCoreApplication::self = this;
diff --git a/src/corelib/kernel/qcoreapplication_win.cpp b/src/corelib/kernel/qcoreapplication_win.cpp
index c1925e7..320f801 100644
--- a/src/corelib/kernel/qcoreapplication_win.cpp
+++ b/src/corelib/kernel/qcoreapplication_win.cpp
@@ -52,26 +52,31 @@
QT_BEGIN_NAMESPACE
-char appFileName[MAX_PATH]; // application file name
-char theAppName[MAX_PATH]; // application name
-HINSTANCE appInst = 0; // handle to app instance
-HINSTANCE appPrevInst = 0; // handle to prev app instance
-int appCmdShow = 0;
bool usingWinMain = false; // whether the qWinMain() is used or not
+int appCmdShow = 0;
Q_CORE_EXPORT HINSTANCE qWinAppInst() // get Windows app handle
{
- return appInst;
+ return GetModuleHandle(0);
}
Q_CORE_EXPORT HINSTANCE qWinAppPrevInst() // get Windows prev app handle
{
- return appPrevInst;
+ return 0;
}
Q_CORE_EXPORT int qWinAppCmdShow() // get main window show command
{
+#if defined(Q_OS_WINCE)
return appCmdShow;
+#else
+ STARTUPINFO startupInfo;
+ GetStartupInfo(&startupInfo);
+
+ return (startupInfo.dwFlags & STARTF_USESHOWWINDOW)
+ ? startupInfo.wShowWindow
+ : SW_SHOWDEFAULT;
+#endif
}
Q_CORE_EXPORT QString qAppFileName() // get application file name
@@ -115,25 +120,6 @@ Q_CORE_EXPORT QString qAppFileName() // get application file name
return res;
}
-void set_winapp_name()
-{
- static bool already_set = false;
- if (!already_set) {
- already_set = true;
-
- QString moduleName = qAppFileName();
-
- QByteArray filePath = moduleName.toLocal8Bit();
- QByteArray fileName = QFileInfo(moduleName).baseName().toLocal8Bit();
-
- memcpy(appFileName, filePath.constData(), filePath.length());
- memcpy(theAppName, fileName.constData(), fileName.length());
-
- if (appInst == 0)
- appInst = GetModuleHandle(0);
- }
-}
-
QString QCoreApplicationPrivate::appName() const
{
return QFileInfo(qAppFileName()).baseName();
@@ -198,20 +184,17 @@ void qWinMain(HINSTANCE instance, HINSTANCE prevInstance, LPSTR cmdParam,
already_called = true;
usingWinMain = true;
- // Install default debug handler
-
+ // Install default debug handler
qInstallMsgHandler(qWinMsgHandler);
- // Create command line
-
+ // Create command line
argv = qWinCmdLine<char>(cmdParam, int(strlen(cmdParam)), argc);
- // Get Windows parameters
- appInst = instance;
- appPrevInst = prevInstance;
appCmdShow = cmdShow;
- set_winapp_name();
+ // Ignore Windows parameters
+ Q_UNUSED(instance);
+ Q_UNUSED(prevInstance);
}
/*!
diff --git a/src/corelib/thread/qthread.cpp b/src/corelib/thread/qthread.cpp
index c35eb28..cdcb65c 100644
--- a/src/corelib/thread/qthread.cpp
+++ b/src/corelib/thread/qthread.cpp
@@ -174,7 +174,7 @@ void QAdoptedThread::run()
QThreadPrivate::QThreadPrivate(QThreadData *d)
: QObjectPrivate(), running(false), finished(false), terminated(false),
- stackSize(0), priority(QThread::InheritPriority), data(d), object(0)
+ stackSize(0), priority(QThread::InheritPriority), data(d)
{
#if defined (Q_OS_UNIX)
thread_id = 0;
@@ -377,9 +377,6 @@ QThread::QThread(QObject *parent)
Q_D(QThread);
// fprintf(stderr, "QThreadData %p created for thread %p\n", d->data, this);
d->data->thread = this;
-
- d->object = new QThreadPrivateInternalObject;
- d->object->moveToThread(this);
}
/*! \internal
@@ -390,8 +387,6 @@ QThread::QThread(QThreadPrivate &dd, QObject *parent)
Q_D(QThread);
// fprintf(stderr, "QThreadData %p taken from private data for thread %p\n", d->data, this);
d->data->thread = this;
-
- // do not create the internal object for adopted threads
}
/*!
@@ -413,9 +408,6 @@ QThread::~QThread()
d->data->thread = 0;
}
-
- delete d->object;
- d->object = 0;
}
/*!
@@ -488,11 +480,11 @@ uint QThread::stackSize() const
int QThread::exec()
{
Q_D(QThread);
- QMutexLocker locker(&d->mutex);
- d->data->quitNow = false;
QEventLoop eventLoop;
- locker.unlock();
int returnCode = eventLoop.exec();
+
+ QMutexLocker locker(&d->mutex);
+ d->data->quitNow = false;
return returnCode;
}
@@ -518,21 +510,6 @@ int QThread::exec()
void QThread::exit(int returnCode)
{
Q_D(QThread);
- if (d->object) {
- QMetaObject::invokeMethod(d->object, "exit", Q_ARG(int, returnCode));
- } else {
- QMutexLocker locker(&d->mutex);
- d->data->quitNow = true;
- for (int i = 0; i < d->data->eventLoops.size(); ++i) {
- QEventLoop *eventLoop = d->data->eventLoops.at(i);
- eventLoop->exit(returnCode);
- }
- }
-}
-
-void QThreadPrivateInternalObject::exit(int returnCode)
-{
- QThreadPrivate *d = static_cast<QThreadPrivate *>(QObjectPrivate::get(thread()));
QMutexLocker locker(&d->mutex);
d->data->quitNow = true;
for (int i = 0; i < d->data->eventLoops.size(); ++i) {
diff --git a/src/corelib/thread/qthread_p.h b/src/corelib/thread/qthread_p.h
index 54ffd80..44eb8f8 100644
--- a/src/corelib/thread/qthread_p.h
+++ b/src/corelib/thread/qthread_p.h
@@ -113,14 +113,6 @@ public:
#ifndef QT_NO_THREAD
-class QThreadPrivateInternalObject : public QObject
-{
- Q_OBJECT
-
-public slots:
- void exit(int);
-};
-
class QThreadPrivate : public QObjectPrivate
{
Q_DECLARE_PUBLIC(QThread)
@@ -165,7 +157,6 @@ public:
bool terminationEnabled, terminatePending;
# endif
QThreadData *data;
- QThreadPrivateInternalObject *object;
static void createEventDispatcher(QThreadData *data);
};
diff --git a/src/corelib/thread/qthread_unix.cpp b/src/corelib/thread/qthread_unix.cpp
index 6b34b5f..bd31d9c 100644
--- a/src/corelib/thread/qthread_unix.cpp
+++ b/src/corelib/thread/qthread_unix.cpp
@@ -253,7 +253,6 @@ void *QThreadPrivate::start(void *arg)
pthread_setspecific(current_thread_data_key, data);
data->ref();
- data->quitNow = false;
// ### TODO: allow the user to create a custom event dispatcher
createEventDispatcher(data);
@@ -495,6 +494,7 @@ void QThread::start(Priority priority)
d->running = true;
d->finished = false;
d->terminated = false;
+ d->data->quitNow = false;
pthread_attr_t attr;
pthread_attr_init(&attr);
diff --git a/src/corelib/thread/qthread_win.cpp b/src/corelib/thread/qthread_win.cpp
index 37d5b87..9826dcb 100644
--- a/src/corelib/thread/qthread_win.cpp
+++ b/src/corelib/thread/qthread_win.cpp
@@ -298,7 +298,6 @@ unsigned int __stdcall QThreadPrivate::start(void *arg)
QThread::setTerminationEnabled(false);
- data->quitNow = false;
// ### TODO: allow the user to create a custom event dispatcher
createEventDispatcher(data);
@@ -405,6 +404,7 @@ void QThread::start(Priority priority)
d->running = true;
d->finished = false;
d->terminated = false;
+ d->data->quitNow = false;
/*
NOTE: we create the thread in the suspended state, set the
diff --git a/src/corelib/tools/qsimd_p.h b/src/corelib/tools/qsimd_p.h
index c69dd09..cbe6146 100644
--- a/src/corelib/tools/qsimd_p.h
+++ b/src/corelib/tools/qsimd_p.h
@@ -66,6 +66,9 @@ QT_BEGIN_HEADER
# include <emmintrin.h>
# undef posix_memalign
#else
+# ifdef Q_CC_MINGW
+# include <windows.h>
+# endif
# include <emmintrin.h>
#endif
diff --git a/src/declarative/graphicsitems/graphicsitems.pri b/src/declarative/graphicsitems/graphicsitems.pri
index eab41e3..ad7ccb5 100644
--- a/src/declarative/graphicsitems/graphicsitems.pri
+++ b/src/declarative/graphicsitems/graphicsitems.pri
@@ -50,7 +50,8 @@ HEADERS += \
$$PWD/qdeclarativelistview_p.h \
$$PWD/qdeclarativelayoutitem_p.h \
$$PWD/qdeclarativeitemchangelistener_p.h \
- $$PWD/qdeclarativeeffects.cpp
+ $$PWD/qdeclarativeeffects.cpp \
+ $$PWD/qdeclarativegraphicswidget_p.h
SOURCES += \
$$PWD/qdeclarativeitemsmodule.cpp \
@@ -81,4 +82,5 @@ SOURCES += \
$$PWD/qdeclarativetextedit.cpp \
$$PWD/qdeclarativevisualitemmodel.cpp \
$$PWD/qdeclarativelistview.cpp \
- $$PWD/qdeclarativelayoutitem.cpp
+ $$PWD/qdeclarativelayoutitem.cpp \
+ $$PWD/qdeclarativegraphicswidget.cpp
diff --git a/src/declarative/graphicsitems/qdeclarativeanchors.cpp b/src/declarative/graphicsitems/qdeclarativeanchors.cpp
index 7a7e5be..96d0867 100644
--- a/src/declarative/graphicsitems/qdeclarativeanchors.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeanchors.cpp
@@ -55,30 +55,32 @@ QT_BEGIN_NAMESPACE
//### const item?
//local position
-static qreal position(QDeclarativeItem *item, QDeclarativeAnchorLine::AnchorLine anchorLine)
+static qreal position(QGraphicsObject *item, QDeclarativeAnchorLine::AnchorLine anchorLine)
{
qreal ret = 0.0;
+ QGraphicsItemPrivate *d = QGraphicsItemPrivate::get(item);
switch(anchorLine) {
case QDeclarativeAnchorLine::Left:
ret = item->x();
break;
case QDeclarativeAnchorLine::Right:
- ret = item->x() + item->width();
+ ret = item->x() + d->width();
break;
case QDeclarativeAnchorLine::Top:
ret = item->y();
break;
case QDeclarativeAnchorLine::Bottom:
- ret = item->y() + item->height();
+ ret = item->y() + d->height();
break;
case QDeclarativeAnchorLine::HCenter:
- ret = item->x() + item->width()/2;
+ ret = item->x() + d->width()/2;
break;
case QDeclarativeAnchorLine::VCenter:
- ret = item->y() + item->height()/2;
+ ret = item->y() + d->height()/2;
break;
case QDeclarativeAnchorLine::Baseline:
- ret = item->y() + item->baselineOffset();
+ if (d->isDeclarativeItem)
+ ret = item->y() + static_cast<QDeclarativeItem*>(item)->baselineOffset();
break;
default:
break;
@@ -88,30 +90,32 @@ static qreal position(QDeclarativeItem *item, QDeclarativeAnchorLine::AnchorLine
}
//position when origin is 0,0
-static qreal adjustedPosition(QDeclarativeItem *item, QDeclarativeAnchorLine::AnchorLine anchorLine)
+static qreal adjustedPosition(QGraphicsObject *item, QDeclarativeAnchorLine::AnchorLine anchorLine)
{
int ret = 0;
+ QGraphicsItemPrivate *d = QGraphicsItemPrivate::get(item);
switch(anchorLine) {
case QDeclarativeAnchorLine::Left:
ret = 0;
break;
case QDeclarativeAnchorLine::Right:
- ret = item->width();
+ ret = d->width();
break;
case QDeclarativeAnchorLine::Top:
ret = 0;
break;
case QDeclarativeAnchorLine::Bottom:
- ret = item->height();
+ ret = d->height();
break;
case QDeclarativeAnchorLine::HCenter:
- ret = item->width()/2;
+ ret = d->width()/2;
break;
case QDeclarativeAnchorLine::VCenter:
- ret = item->height()/2;
+ ret = d->height()/2;
break;
case QDeclarativeAnchorLine::Baseline:
- ret = item->baselineOffset();
+ if (d->isDeclarativeItem)
+ ret = static_cast<QDeclarativeItem*>(item)->baselineOffset();
break;
default:
break;
@@ -136,7 +140,7 @@ QDeclarativeAnchors::QDeclarativeAnchors(QObject *parent)
qFatal("QDeclarativeAnchors::QDeclarativeAnchors(QObject*) called");
}
-QDeclarativeAnchors::QDeclarativeAnchors(QDeclarativeItem *item, QObject *parent)
+QDeclarativeAnchors::QDeclarativeAnchors(QGraphicsObject *item, QObject *parent)
: QObject(*new QDeclarativeAnchorsPrivate(item), parent)
{
}
@@ -168,7 +172,8 @@ void QDeclarativeAnchorsPrivate::fillChanged()
} else if (fill->parentItem() == item->parentItem()) { //siblings
setItemPos(QPointF(fill->x()+leftMargin, fill->y()+topMargin));
}
- setItemSize(QSizeF(fill->width()-leftMargin-rightMargin, fill->height()-topMargin-bottomMargin));
+ QGraphicsItemPrivate *fillPrivate = QGraphicsItemPrivate::get(fill);
+ setItemSize(QSizeF(fillPrivate->width()-leftMargin-rightMargin, fillPrivate->height()-topMargin-bottomMargin));
--updatingFill;
} else {
@@ -185,16 +190,17 @@ void QDeclarativeAnchorsPrivate::centerInChanged()
if (updatingCenterIn < 2) {
++updatingCenterIn;
-
+ QGraphicsItemPrivate *itemPrivate = QGraphicsItemPrivate::get(item);
if (centerIn == item->parentItem()) {
- QPointF p((item->parentItem()->width() - item->width()) / 2. + hCenterOffset,
- (item->parentItem()->height() - item->height()) / 2. + vCenterOffset);
+ QGraphicsItemPrivate *parentPrivate = QGraphicsItemPrivate::get(item->parentItem());
+ QPointF p((parentPrivate->width() - itemPrivate->width()) / 2. + hCenterOffset,
+ (parentPrivate->height() - itemPrivate->height()) / 2. + vCenterOffset);
setItemPos(p);
} else if (centerIn->parentItem() == item->parentItem()) {
-
- QPointF p(centerIn->x() + (centerIn->width() - item->width()) / 2. + hCenterOffset,
- centerIn->y() + (centerIn->height() - item->height()) / 2. + vCenterOffset);
+ QGraphicsItemPrivate *centerPrivate = QGraphicsItemPrivate::get(centerIn);
+ QPointF p(centerIn->x() + (centerPrivate->width() - itemPrivate->width()) / 2. + hCenterOffset,
+ centerIn->y() + (centerPrivate->height() - itemPrivate->height()) / 2. + vCenterOffset);
setItemPos(p);
}
@@ -205,7 +211,7 @@ void QDeclarativeAnchorsPrivate::centerInChanged()
}
}
-void QDeclarativeAnchorsPrivate::clearItem(QDeclarativeItem *item)
+void QDeclarativeAnchorsPrivate::clearItem(QGraphicsObject *item)
{
if (!item)
return;
@@ -243,22 +249,38 @@ void QDeclarativeAnchorsPrivate::clearItem(QDeclarativeItem *item)
}
}
-void QDeclarativeAnchorsPrivate::addDepend(QDeclarativeItem *item)
+void QDeclarativeAnchorsPrivate::addDepend(QGraphicsObject *item)
{
if (!item)
return;
- QDeclarativeItemPrivate *p =
- static_cast<QDeclarativeItemPrivate *>(QGraphicsItemPrivate::get(item));
- p->addItemChangeListener(this, QDeclarativeItemPrivate::Geometry);
+ QGraphicsItemPrivate * itemPrivate = QGraphicsItemPrivate::get(item);
+ if (itemPrivate->isDeclarativeItem) {
+ QDeclarativeItemPrivate *p =
+ static_cast<QDeclarativeItemPrivate *>(QGraphicsItemPrivate::get(item));
+ p->addItemChangeListener(this, QDeclarativeItemPrivate::Geometry);
+ } else if(itemPrivate->isWidget) {
+ Q_Q(QDeclarativeAnchors);
+ QGraphicsWidget *widget = static_cast<QGraphicsWidget *>(item);
+ QObject::connect(widget, SIGNAL(destroyed(QObject *)), q, SLOT(_q_widgetDestroyed(QObject *)));
+ QObject::connect(widget, SIGNAL(geometryChanged()), q, SLOT(_q_widgetGeometryChanged()));
+ }
}
-void QDeclarativeAnchorsPrivate::remDepend(QDeclarativeItem *item)
+void QDeclarativeAnchorsPrivate::remDepend(QGraphicsObject *item)
{
if (!item)
return;
- QDeclarativeItemPrivate *p =
- static_cast<QDeclarativeItemPrivate *>(QGraphicsItemPrivate::get(item));
- p->removeItemChangeListener(this, QDeclarativeItemPrivate::Geometry);
+ QGraphicsItemPrivate * itemPrivate = QGraphicsItemPrivate::get(item);
+ if (itemPrivate->isDeclarativeItem) {
+ QDeclarativeItemPrivate *p =
+ static_cast<QDeclarativeItemPrivate *>(itemPrivate);
+ p->removeItemChangeListener(this, QDeclarativeItemPrivate::Geometry);
+ } else if(itemPrivate->isWidget) {
+ Q_Q(QDeclarativeAnchors);
+ QGraphicsWidget *widget = static_cast<QGraphicsWidget *>(item);
+ QObject::disconnect(widget, SIGNAL(destroyed(QObject *)), q, SLOT(_q_widgetDestroyed(QObject *)));
+ QObject::disconnect(widget, SIGNAL(geometryChanged()), q, SLOT(_q_widgetGeometryChanged()));
+ }
}
bool QDeclarativeAnchorsPrivate::isItemComplete() const
@@ -281,14 +303,14 @@ void QDeclarativeAnchors::componentComplete()
void QDeclarativeAnchorsPrivate::setItemHeight(qreal v)
{
updatingMe = true;
- item->setHeight(v);
+ QGraphicsItemPrivate::get(item)->setHeight(v);
updatingMe = false;
}
void QDeclarativeAnchorsPrivate::setItemWidth(qreal v)
{
updatingMe = true;
- item->setWidth(v);
+ QGraphicsItemPrivate::get(item)->setWidth(v);
updatingMe = false;
}
@@ -316,7 +338,10 @@ void QDeclarativeAnchorsPrivate::setItemPos(const QPointF &v)
void QDeclarativeAnchorsPrivate::setItemSize(const QSizeF &v)
{
updatingMe = true;
- item->setSize(v);
+ if(QGraphicsItemPrivate::get(item)->isWidget)
+ static_cast<QGraphicsWidget *>(item)->resize(v);
+ else if (QGraphicsItemPrivate::get(item)->isDeclarativeItem)
+ static_cast<QDeclarativeItem *>(item)->setSize(v);
updatingMe = false;
}
@@ -341,24 +366,36 @@ void QDeclarativeAnchorsPrivate::updateOnComplete()
updateVerticalAnchors();
}
-void QDeclarativeAnchorsPrivate::itemGeometryChanged(QDeclarativeItem *, const QRectF &newG, const QRectF &oldG)
+void QDeclarativeAnchorsPrivate::_q_widgetDestroyed(QObject *obj)
+{
+ clearItem(qobject_cast<QGraphicsObject*>(obj));
+}
+
+void QDeclarativeAnchorsPrivate::_q_widgetGeometryChanged()
{
fillChanged();
centerInChanged();
+ updateHorizontalAnchors();
+ updateVerticalAnchors();
+}
+void QDeclarativeAnchorsPrivate::itemGeometryChanged(QDeclarativeItem *, const QRectF &newG, const QRectF &oldG)
+{
+ fillChanged();
+ centerInChanged();
if (newG.x() != oldG.x() || newG.width() != oldG.width())
updateHorizontalAnchors();
if (newG.y() != oldG.y() || newG.height() != oldG.height())
updateVerticalAnchors();
}
-QDeclarativeItem *QDeclarativeAnchors::fill() const
+QGraphicsObject *QDeclarativeAnchors::fill() const
{
Q_D(const QDeclarativeAnchors);
return d->fill;
}
-void QDeclarativeAnchors::setFill(QDeclarativeItem *f)
+void QDeclarativeAnchors::setFill(QGraphicsObject *f)
{
Q_D(QDeclarativeAnchors);
if (d->fill == f)
@@ -386,13 +423,13 @@ void QDeclarativeAnchors::resetFill()
setFill(0);
}
-QDeclarativeItem *QDeclarativeAnchors::centerIn() const
+QGraphicsObject *QDeclarativeAnchors::centerIn() const
{
Q_D(const QDeclarativeAnchors);
return d->centerIn;
}
-void QDeclarativeAnchors::setCenterIn(QDeclarativeItem* c)
+void QDeclarativeAnchors::setCenterIn(QGraphicsObject* c)
{
Q_D(QDeclarativeAnchors);
if (d->centerIn == c)
@@ -439,10 +476,10 @@ bool QDeclarativeAnchorsPrivate::calcStretch(const QDeclarativeAnchorLine &edge1
- ((int)position(edge1.item, edge1.anchorLine) + offset1);
} else if (edge2IsParent && edge1IsSibling) {
stretch = ((int)position(edge2.item, edge2.anchorLine) + offset2)
- - ((int)position(item->parentItem(), line)
+ - ((int)position(item->parentObject(), line)
+ (int)position(edge1.item, edge1.anchorLine) + offset1);
} else if (edge2IsSibling && edge1IsParent) {
- stretch = ((int)position(item->parentItem(), line) + (int)position(edge2.item, edge2.anchorLine) + offset2)
+ stretch = ((int)position(item->parentObject(), line) + (int)position(edge2.item, edge2.anchorLine) + offset2)
- ((int)position(edge1.item, edge1.anchorLine) + offset1);
} else
invalid = true;
@@ -457,6 +494,7 @@ void QDeclarativeAnchorsPrivate::updateVerticalAnchors()
if (updatingVerticalAnchor < 2) {
++updatingVerticalAnchor;
+ QGraphicsItemPrivate *itemPrivate = QGraphicsItemPrivate::get(item);
if (usedAnchors & QDeclarativeAnchors::HasTopAnchor) {
//Handle stretching
bool invalid = true;
@@ -488,9 +526,9 @@ void QDeclarativeAnchorsPrivate::updateVerticalAnchors()
//Handle bottom
if (bottom.item == item->parentItem()) {
- setItemY(adjustedPosition(bottom.item, bottom.anchorLine) - item->height() - bottomMargin);
+ setItemY(adjustedPosition(bottom.item, bottom.anchorLine) - itemPrivate->height() - bottomMargin);
} else if (bottom.item->parentItem() == item->parentItem()) {
- setItemY(position(bottom.item, bottom.anchorLine) - item->height() - bottomMargin);
+ setItemY(position(bottom.item, bottom.anchorLine) - itemPrivate->height() - bottomMargin);
}
} else if (usedAnchors & QDeclarativeAnchors::HasVCenterAnchor) {
//(stetching handled above)
@@ -498,18 +536,20 @@ void QDeclarativeAnchorsPrivate::updateVerticalAnchors()
//Handle vCenter
if (vCenter.item == item->parentItem()) {
setItemY(adjustedPosition(vCenter.item, vCenter.anchorLine)
- - item->height()/2 + vCenterOffset);
+ - itemPrivate->height()/2 + vCenterOffset);
} else if (vCenter.item->parentItem() == item->parentItem()) {
- setItemY(position(vCenter.item, vCenter.anchorLine) - item->height()/2 + vCenterOffset);
+ setItemY(position(vCenter.item, vCenter.anchorLine) - itemPrivate->height()/2 + vCenterOffset);
}
} else if (usedAnchors & QDeclarativeAnchors::HasBaselineAnchor) {
//Handle baseline
if (baseline.item == item->parentItem()) {
- setItemY(adjustedPosition(baseline.item, baseline.anchorLine)
- - item->baselineOffset() + baselineOffset);
+ if (itemPrivate->isDeclarativeItem)
+ setItemY(adjustedPosition(baseline.item, baseline.anchorLine)
+ - static_cast<QDeclarativeItem *>(item)->baselineOffset() + baselineOffset);
} else if (baseline.item->parentItem() == item->parentItem()) {
- setItemY(position(baseline.item, baseline.anchorLine)
- - item->baselineOffset() + baselineOffset);
+ if (itemPrivate->isDeclarativeItem)
+ setItemY(position(baseline.item, baseline.anchorLine)
+ - static_cast<QDeclarativeItem *>(item)->baselineOffset() + baselineOffset);
}
}
--updatingVerticalAnchor;
@@ -526,7 +566,7 @@ void QDeclarativeAnchorsPrivate::updateHorizontalAnchors()
if (updatingHorizontalAnchor < 2) {
++updatingHorizontalAnchor;
-
+ QGraphicsItemPrivate *itemPrivate = QGraphicsItemPrivate::get(item);
if (usedAnchors & QDeclarativeAnchors::HasLeftAnchor) {
//Handle stretching
bool invalid = true;
@@ -558,16 +598,16 @@ void QDeclarativeAnchorsPrivate::updateHorizontalAnchors()
//Handle right
if (right.item == item->parentItem()) {
- setItemX(adjustedPosition(right.item, right.anchorLine) - item->width() - rightMargin);
+ setItemX(adjustedPosition(right.item, right.anchorLine) - itemPrivate->width() - rightMargin);
} else if (right.item->parentItem() == item->parentItem()) {
- setItemX(position(right.item, right.anchorLine) - item->width() - rightMargin);
+ setItemX(position(right.item, right.anchorLine) - itemPrivate->width() - rightMargin);
}
} else if (usedAnchors & QDeclarativeAnchors::HasHCenterAnchor) {
//Handle hCenter
if (hCenter.item == item->parentItem()) {
- setItemX(adjustedPosition(hCenter.item, hCenter.anchorLine) - item->width()/2 + hCenterOffset);
+ setItemX(adjustedPosition(hCenter.item, hCenter.anchorLine) - itemPrivate->width()/2 + hCenterOffset);
} else if (hCenter.item->parentItem() == item->parentItem()) {
- setItemX(position(hCenter.item, hCenter.anchorLine) - item->width()/2 + hCenterOffset);
+ setItemX(position(hCenter.item, hCenter.anchorLine) - itemPrivate->width()/2 + hCenterOffset);
}
}
diff --git a/src/declarative/graphicsitems/qdeclarativeanchors_p.h b/src/declarative/graphicsitems/qdeclarativeanchors_p.h
index 1961fdd..f2e57cc 100644
--- a/src/declarative/graphicsitems/qdeclarativeanchors_p.h
+++ b/src/declarative/graphicsitems/qdeclarativeanchors_p.h
@@ -55,7 +55,7 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
class QDeclarativeAnchorsPrivate;
-struct QDeclarativeAnchorLine;
+class QDeclarativeAnchorLine;
class Q_DECLARATIVE_EXPORT QDeclarativeAnchors : public QObject
{
Q_OBJECT
@@ -75,12 +75,12 @@ class Q_DECLARATIVE_EXPORT QDeclarativeAnchors : public QObject
Q_PROPERTY(qreal bottomMargin READ bottomMargin WRITE setBottomMargin NOTIFY bottomMarginChanged)
Q_PROPERTY(qreal verticalCenterOffset READ verticalCenterOffset WRITE setVerticalCenterOffset NOTIFY verticalCenterOffsetChanged())
Q_PROPERTY(qreal baselineOffset READ baselineOffset WRITE setBaselineOffset NOTIFY baselineOffsetChanged())
- Q_PROPERTY(QDeclarativeItem *fill READ fill WRITE setFill RESET resetFill NOTIFY fillChanged)
- Q_PROPERTY(QDeclarativeItem *centerIn READ centerIn WRITE setCenterIn RESET resetCenterIn NOTIFY centerInChanged)
+ Q_PROPERTY(QGraphicsObject *fill READ fill WRITE setFill RESET resetFill NOTIFY fillChanged)
+ Q_PROPERTY(QGraphicsObject *centerIn READ centerIn WRITE setCenterIn RESET resetCenterIn NOTIFY centerInChanged)
public:
QDeclarativeAnchors(QObject *parent=0);
- QDeclarativeAnchors(QDeclarativeItem *item, QObject *parent=0);
+ QDeclarativeAnchors(QGraphicsObject *item, QObject *parent=0);
virtual ~QDeclarativeAnchors();
enum UsedAnchor {
@@ -148,12 +148,12 @@ public:
qreal baselineOffset() const;
void setBaselineOffset(qreal);
- QDeclarativeItem *fill() const;
- void setFill(QDeclarativeItem *);
+ QGraphicsObject *fill() const;
+ void setFill(QGraphicsObject *);
void resetFill();
- QDeclarativeItem *centerIn() const;
- void setCenterIn(QDeclarativeItem *);
+ QGraphicsObject *centerIn() const;
+ void setCenterIn(QGraphicsObject *);
void resetCenterIn();
UsedAnchors usedAnchors() const;
@@ -182,8 +182,11 @@ Q_SIGNALS:
private:
friend class QDeclarativeItem;
+ friend class QDeclarativeGraphicsWidget;
Q_DISABLE_COPY(QDeclarativeAnchors)
Q_DECLARE_PRIVATE(QDeclarativeAnchors)
+ Q_PRIVATE_SLOT(d_func(), void _q_widgetGeometryChanged())
+ Q_PRIVATE_SLOT(d_func(), void _q_widgetDestroyed(QObject *obj))
};
Q_DECLARE_OPERATORS_FOR_FLAGS(QDeclarativeAnchors::UsedAnchors)
diff --git a/src/declarative/graphicsitems/qdeclarativeanchors_p_p.h b/src/declarative/graphicsitems/qdeclarativeanchors_p_p.h
index ba6359a..f8489aa 100644
--- a/src/declarative/graphicsitems/qdeclarativeanchors_p_p.h
+++ b/src/declarative/graphicsitems/qdeclarativeanchors_p_p.h
@@ -59,8 +59,9 @@
QT_BEGIN_NAMESPACE
-struct QDeclarativeAnchorLine
+class QDeclarativeAnchorLine
{
+public:
QDeclarativeAnchorLine() : item(0), anchorLine(Invalid) {}
enum AnchorLine {
@@ -76,7 +77,7 @@ struct QDeclarativeAnchorLine
Vertical_Mask = Top | Bottom | VCenter | Baseline
};
- QDeclarativeItem *item;
+ QGraphicsObject *item;
AnchorLine anchorLine;
};
@@ -89,7 +90,7 @@ class QDeclarativeAnchorsPrivate : public QObjectPrivate, public QDeclarativeIte
{
Q_DECLARE_PUBLIC(QDeclarativeAnchors)
public:
- QDeclarativeAnchorsPrivate(QDeclarativeItem *i)
+ QDeclarativeAnchorsPrivate(QGraphicsObject *i)
: componentComplete(true), updatingMe(false), updatingHorizontalAnchor(0),
updatingVerticalAnchor(0), updatingFill(0), updatingCenterIn(0), item(i), usedAnchors(0), fill(0),
centerIn(0), leftMargin(0), rightMargin(0), topMargin(0), bottomMargin(0),
@@ -97,10 +98,10 @@ public:
{
}
- void clearItem(QDeclarativeItem *);
+ void clearItem(QGraphicsObject *);
- void addDepend(QDeclarativeItem *);
- void remDepend(QDeclarativeItem *);
+ void addDepend(QGraphicsObject *);
+ void remDepend(QGraphicsObject *);
bool isItemComplete() const;
bool componentComplete:1;
@@ -122,6 +123,8 @@ public:
// QDeclarativeItemGeometryListener interface
void itemGeometryChanged(QDeclarativeItem *, const QRectF &, const QRectF &);
+ void _q_widgetDestroyed(QObject *);
+ void _q_widgetGeometryChanged();
QDeclarativeAnchorsPrivate *anchorPrivate() { return this; }
bool checkHValid() const;
@@ -135,11 +138,11 @@ public:
void fillChanged();
void centerInChanged();
- QDeclarativeItem *item;
+ QGraphicsObject *item;
QDeclarativeAnchors::UsedAnchors usedAnchors;
- QDeclarativeItem *fill;
- QDeclarativeItem *centerIn;
+ QGraphicsObject *fill;
+ QGraphicsObject *centerIn;
QDeclarativeAnchorLine left;
QDeclarativeAnchorLine right;
diff --git a/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp b/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp
index cc062f0..6ab126d 100644
--- a/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp
@@ -42,6 +42,8 @@
#include "private/qdeclarativeanimatedimage_p.h"
#include "private/qdeclarativeanimatedimage_p_p.h"
+#ifndef QT_NO_MOVIE
+
#include <qdeclarativeengine.h>
#include <QMovie>
@@ -320,3 +322,5 @@ void QDeclarativeAnimatedImage::componentComplete()
}
QT_END_NAMESPACE
+
+#endif // QT_NO_MOVIE
diff --git a/src/declarative/graphicsitems/qdeclarativeanimatedimage_p.h b/src/declarative/graphicsitems/qdeclarativeanimatedimage_p.h
index 9d8087c..5981cd3 100644
--- a/src/declarative/graphicsitems/qdeclarativeanimatedimage_p.h
+++ b/src/declarative/graphicsitems/qdeclarativeanimatedimage_p.h
@@ -44,6 +44,8 @@
#include "private/qdeclarativeimage_p.h"
+#ifndef QT_NO_MOVIE
+
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
@@ -108,4 +110,6 @@ QML_DECLARE_TYPE(QDeclarativeAnimatedImage)
QT_END_HEADER
+#endif // QT_NO_MOVIE
+
#endif
diff --git a/src/declarative/graphicsitems/qdeclarativeanimatedimage_p_p.h b/src/declarative/graphicsitems/qdeclarativeanimatedimage_p_p.h
index 8ca9755..a02893d 100644
--- a/src/declarative/graphicsitems/qdeclarativeanimatedimage_p_p.h
+++ b/src/declarative/graphicsitems/qdeclarativeanimatedimage_p_p.h
@@ -55,6 +55,8 @@
#include "private/qdeclarativeimage_p_p.h"
+#ifndef QT_NO_MOVIE
+
QT_BEGIN_NAMESPACE
class QMovie;
@@ -80,4 +82,6 @@ public:
QT_END_NAMESPACE
+#endif // QT_NO_MOVIE
+
#endif // QDECLARATIVEANIMATEDIMAGE_P_H
diff --git a/src/declarative/graphicsitems/qdeclarativeeffects_p.h b/src/declarative/graphicsitems/qdeclarativeeffects_p.h
index 73eec6a..0de5854 100644
--- a/src/declarative/graphicsitems/qdeclarativeeffects_p.h
+++ b/src/declarative/graphicsitems/qdeclarativeeffects_p.h
@@ -56,10 +56,12 @@
#include <qdeclarative.h>
#include <QtGui/qgraphicseffect.h>
+#ifndef QT_NO_GRAPHICSEFFECT
QML_DECLARE_TYPE(QGraphicsEffect)
QML_DECLARE_TYPE(QGraphicsBlurEffect)
QML_DECLARE_TYPE(QGraphicsColorizeEffect)
QML_DECLARE_TYPE(QGraphicsDropShadowEffect)
QML_DECLARE_TYPE(QGraphicsOpacityEffect)
+#endif
#endif // QDECLARATIVEEFFECTS_P_H
diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
index fc7a87b..951b171 100644
--- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
@@ -816,6 +816,8 @@ void QDeclarativeFlickable::wheelEvent(QGraphicsSceneWheelEvent *event)
d->vData.velocity = qMin(event->delta() - d->vData.smoothVelocity.value(), qreal(-250.0));
d->flicked = false;
d->flickY(d->vData.velocity);
+ if (d->flicked)
+ movementStarting();
event->accept();
} else if (xflick()) {
if (event->delta() > 0)
@@ -824,6 +826,8 @@ void QDeclarativeFlickable::wheelEvent(QGraphicsSceneWheelEvent *event)
d->hData.velocity = qMin(event->delta() - d->hData.smoothVelocity.value(), qreal(-250.0));
d->flicked = false;
d->flickX(d->hData.velocity);
+ if (d->flicked)
+ movementStarting();
event->accept();
} else {
QDeclarativeItem::wheelEvent(event);
diff --git a/src/declarative/graphicsitems/qdeclarativegraphicswidget.cpp b/src/declarative/graphicsitems/qdeclarativegraphicswidget.cpp
new file mode 100644
index 0000000..ee45406
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativegraphicswidget.cpp
@@ -0,0 +1,144 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtDeclarative module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativegraphicswidget_p.h"
+#include "private/qdeclarativeanchors_p.h"
+#include "private/qdeclarativeitem_p.h"
+#include "private/qdeclarativeanchors_p_p.h"
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeGraphicsWidgetPrivate : public QObjectPrivate {
+ Q_DECLARE_PUBLIC(QDeclarativeGraphicsWidget)
+public :
+ QDeclarativeGraphicsWidgetPrivate() :
+ _anchors(0), _anchorLines(0)
+ {}
+ QDeclarativeItemPrivate::AnchorLines *anchorLines() const;
+ QDeclarativeAnchors *_anchors;
+ mutable QDeclarativeItemPrivate::AnchorLines *_anchorLines;
+};
+
+QDeclarativeGraphicsWidget::QDeclarativeGraphicsWidget(QObject *parent) :
+ QObject(*new QDeclarativeGraphicsWidgetPrivate, parent)
+{
+}
+QDeclarativeGraphicsWidget::~QDeclarativeGraphicsWidget()
+{
+ Q_D(QDeclarativeGraphicsWidget);
+ delete d->_anchorLines; d->_anchorLines = 0;
+ delete d->_anchors; d->_anchors = 0;
+}
+
+/*! \internal */
+QDeclarativeAnchors *QDeclarativeGraphicsWidget::anchors()
+{
+ Q_D(QDeclarativeGraphicsWidget);
+ if (!d->_anchors)
+ d->_anchors = new QDeclarativeAnchors(static_cast<QGraphicsObject *>(parent()));
+ return d->_anchors;
+}
+
+QDeclarativeItemPrivate::AnchorLines *QDeclarativeGraphicsWidgetPrivate::anchorLines() const
+{
+ Q_Q(const QDeclarativeGraphicsWidget);
+ if (!_anchorLines)
+ _anchorLines = new QDeclarativeItemPrivate::AnchorLines(static_cast<QGraphicsObject *>(q->parent()));
+ return _anchorLines;
+}
+
+/*!
+ \internal
+*/
+QDeclarativeAnchorLine QDeclarativeGraphicsWidget::left() const
+{
+ Q_D(const QDeclarativeGraphicsWidget);
+ return d->anchorLines()->left;
+}
+
+/*!
+ \internal
+*/
+QDeclarativeAnchorLine QDeclarativeGraphicsWidget::right() const
+{
+ Q_D(const QDeclarativeGraphicsWidget);
+ return d->anchorLines()->right;
+}
+
+/*!
+ \internal
+*/
+QDeclarativeAnchorLine QDeclarativeGraphicsWidget::horizontalCenter() const
+{
+ Q_D(const QDeclarativeGraphicsWidget);
+ return d->anchorLines()->hCenter;
+}
+
+/*!
+ \internal
+*/
+QDeclarativeAnchorLine QDeclarativeGraphicsWidget::top() const
+{
+ Q_D(const QDeclarativeGraphicsWidget);
+ return d->anchorLines()->top;
+}
+
+/*!
+ \internal
+*/
+QDeclarativeAnchorLine QDeclarativeGraphicsWidget::bottom() const
+{
+ Q_D(const QDeclarativeGraphicsWidget);
+ return d->anchorLines()->bottom;
+}
+
+/*!
+ \internal
+*/
+QDeclarativeAnchorLine QDeclarativeGraphicsWidget::verticalCenter() const
+{
+ Q_D(const QDeclarativeGraphicsWidget);
+ return d->anchorLines()->vCenter;
+}
+
+QT_END_NAMESPACE
+
+#include <moc_qdeclarativegraphicswidget_p.cpp>
diff --git a/src/declarative/graphicsitems/qdeclarativegraphicswidget_p.h b/src/declarative/graphicsitems/qdeclarativegraphicswidget_p.h
new file mode 100644
index 0000000..987303e
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativegraphicswidget_p.h
@@ -0,0 +1,90 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtDeclarative module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEGRAPHICSWIDGET_P_H
+#define QDECLARATIVEGRAPHICSWIDGET_P_H
+
+#include <QObject>
+#include <QtDeclarative/qdeclarativecomponent.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QDeclarativeAnchorLine;
+class QDeclarativeAnchors;
+class QGraphicsObject;
+class QDeclarativeGraphicsWidgetPrivate;
+
+// ### TODO can the extension object be the anchor directly? We save one allocation -> awesome.
+class QDeclarativeGraphicsWidget : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QDeclarativeAnchors * anchors READ anchors DESIGNABLE false CONSTANT FINAL)
+ Q_PROPERTY(QDeclarativeAnchorLine left READ left CONSTANT FINAL)
+ Q_PROPERTY(QDeclarativeAnchorLine right READ right CONSTANT FINAL)
+ Q_PROPERTY(QDeclarativeAnchorLine horizontalCenter READ horizontalCenter CONSTANT FINAL)
+ Q_PROPERTY(QDeclarativeAnchorLine top READ top CONSTANT FINAL)
+ Q_PROPERTY(QDeclarativeAnchorLine bottom READ bottom CONSTANT FINAL)
+ Q_PROPERTY(QDeclarativeAnchorLine verticalCenter READ verticalCenter CONSTANT FINAL)
+ // ### TODO : QGraphicsWidget don't have a baseline concept yet.
+ //Q_PROPERTY(QDeclarativeAnchorLine baseline READ baseline CONSTANT FINAL)
+public:
+ QDeclarativeGraphicsWidget(QObject *parent = 0);
+ ~QDeclarativeGraphicsWidget();
+ QDeclarativeAnchors *anchors();
+ QDeclarativeAnchorLine left() const;
+ QDeclarativeAnchorLine right() const;
+ QDeclarativeAnchorLine horizontalCenter() const;
+ QDeclarativeAnchorLine top() const;
+ QDeclarativeAnchorLine bottom() const;
+ QDeclarativeAnchorLine verticalCenter() const;
+ Q_DISABLE_COPY(QDeclarativeGraphicsWidget)
+ Q_DECLARE_PRIVATE(QDeclarativeGraphicsWidget)
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QDECLARATIVEGRAPHICSWIDGET_P_H
diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp
index 9be025a..562ba2a 100644
--- a/src/declarative/graphicsitems/qdeclarativegridview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp
@@ -613,8 +613,6 @@ void QDeclarativeGridViewPrivate::updateTrackedItem()
if (highlight)
item = highlight;
- FxGridItem *oldTracked = trackedItem;
-
if (trackedItem && item != trackedItem) {
QObject::disconnect(trackedItem->item, SIGNAL(yChanged()), q, SLOT(trackedPositionChanged()));
QObject::disconnect(trackedItem->item, SIGNAL(xChanged()), q, SLOT(trackedPositionChanged()));
@@ -626,7 +624,7 @@ void QDeclarativeGridViewPrivate::updateTrackedItem()
QObject::connect(trackedItem->item, SIGNAL(yChanged()), q, SLOT(trackedPositionChanged()));
QObject::connect(trackedItem->item, SIGNAL(xChanged()), q, SLOT(trackedPositionChanged()));
}
- if (trackedItem && trackedItem != oldTracked)
+ if (trackedItem)
q->trackedPositionChanged();
}
@@ -938,10 +936,10 @@ QDeclarativeGridView::~QDeclarativeGridView()
id: myDelegate
Item {
id: wrapper
- SequentialAnimation on GridView.onRemove {
- PropertyAction { target: wrapper.GridView; property: "delayRemove"; value: true }
+ GridView.onRemove: SequentialAnimation {
+ PropertyAction { target: wrapper; property: "GridView.delayRemove"; value: true }
NumberAnimation { target: wrapper; property: "scale"; to: 0; duration: 250; easing.type: "InOutQuad" }
- PropertyAction { target: wrapper.GridView; property: "delayRemove"; value: false }
+ PropertyAction { target: wrapper; property: "GridView.delayRemove"; value: false }
}
}
}
diff --git a/src/declarative/graphicsitems/qdeclarativeimage.cpp b/src/declarative/graphicsitems/qdeclarativeimage.cpp
index e4f3464..ca86637 100644
--- a/src/declarative/graphicsitems/qdeclarativeimage.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeimage.cpp
@@ -311,6 +311,12 @@ void QDeclarativeImage::updatePaintedGeometry()
d->paintedWidth = heightScale * qreal(d->pix.width());
d->paintedHeight = height();
}
+ if (widthValid() && !heightValid()) {
+ setImplicitHeight(d->paintedHeight);
+ }
+ if (heightValid() && !widthValid()) {
+ setImplicitWidth(d->paintedWidth);
+ }
} else {
d->paintedWidth = width();
d->paintedHeight = height();
diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp
index 55a81f4..86dbaf0 100644
--- a/src/declarative/graphicsitems/qdeclarativeitem.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp
@@ -2507,7 +2507,7 @@ QDeclarativeStateGroup *QDeclarativeItemPrivate::states()
return _stateGroup;
}
-QDeclarativeItemPrivate::AnchorLines::AnchorLines(QDeclarativeItem *q)
+QDeclarativeItemPrivate::AnchorLines::AnchorLines(QGraphicsObject *q)
{
left.item = q;
left.anchorLine = QDeclarativeAnchorLine::Left;
diff --git a/src/declarative/graphicsitems/qdeclarativeitem.h b/src/declarative/graphicsitems/qdeclarativeitem.h
index 917e480..51889f6 100644
--- a/src/declarative/graphicsitems/qdeclarativeitem.h
+++ b/src/declarative/graphicsitems/qdeclarativeitem.h
@@ -59,7 +59,7 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
class QDeclarativeState;
-struct QDeclarativeAnchorLine;
+class QDeclarativeAnchorLine;
class QDeclarativeTransition;
class QDeclarativeKeyEvent;
class QDeclarativeAnchors;
@@ -91,7 +91,6 @@ class Q_DECLARATIVE_EXPORT QDeclarativeItem : public QGraphicsObject, public QDe
Q_PROPERTY(QDeclarativeListProperty<QGraphicsTransform> transform READ transform DESIGNABLE false FINAL)
Q_PROPERTY(TransformOrigin transformOrigin READ transformOrigin WRITE setTransformOrigin NOTIFY transformOriginChanged)
Q_PROPERTY(bool smooth READ smooth WRITE setSmooth NOTIFY smoothChanged)
- Q_PROPERTY(QGraphicsEffect *effect READ graphicsEffect WRITE setGraphicsEffect)
Q_ENUMS(TransformOrigin)
Q_CLASSINFO("DefaultProperty", "data")
diff --git a/src/declarative/graphicsitems/qdeclarativeitem_p.h b/src/declarative/graphicsitems/qdeclarativeitem_p.h
index 2607137..cf138c3 100644
--- a/src/declarative/graphicsitems/qdeclarativeitem_p.h
+++ b/src/declarative/graphicsitems/qdeclarativeitem_p.h
@@ -120,6 +120,7 @@ public:
mWidth(0), mHeight(0), implicitWidth(0), implicitHeight(0)
{
QGraphicsItemPrivate::acceptedMouseButtons = 0;
+ isDeclarativeItem = 1;
QGraphicsItemPrivate::flags = QGraphicsItem::GraphicsItemFlags(
QGraphicsItem::ItemHasNoContents
| QGraphicsItem::ItemIsFocusable
@@ -183,7 +184,7 @@ public:
QDeclarativeNullableValue<qreal> _baselineOffset;
struct AnchorLines {
- AnchorLines(QDeclarativeItem *);
+ AnchorLines(QGraphicsObject *);
QDeclarativeAnchorLine left;
QDeclarativeAnchorLine right;
QDeclarativeAnchorLine hCenter;
diff --git a/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp
index 8e5b863..2d01eef 100644
--- a/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp
@@ -73,6 +73,7 @@
#include "private/qdeclarativetextedit_p.h"
#include "private/qdeclarativetextinput_p.h"
#include "private/qdeclarativevisualitemmodel_p.h"
+#include "private/qdeclarativegraphicswidget_p.h"
#ifdef QT_WEBKIT_LIB
#include "private/qdeclarativewebview_p.h"
#include "private/qdeclarativewebview_p_p.h"
@@ -81,13 +82,12 @@
void QDeclarativeItemModule::defineModule()
{
+#ifndef QT_NO_MOVIE
qmlRegisterType<QDeclarativeAnimatedImage>("Qt",4,6,"AnimatedImage");
- qmlRegisterType<QGraphicsBlurEffect>("Qt",4,6,"Blur");
+#endif
qmlRegisterType<QDeclarativeBorderImage>("Qt",4,6,"BorderImage");
- qmlRegisterType<QGraphicsColorizeEffect>("Qt",4,6,"Colorize");
qmlRegisterType<QDeclarativeColumn>("Qt",4,6,"Column");
qmlRegisterType<QDeclarativeDrag>("Qt",4,6,"Drag");
- qmlRegisterType<QGraphicsDropShadowEffect>("Qt",4,6,"DropShadow");
qmlRegisterType<QDeclarativeFlickable>("Qt",4,6,"Flickable");
qmlRegisterType<QDeclarativeFlipable>("Qt",4,6,"Flipable");
qmlRegisterType<QDeclarativeFlow>("Qt",4,6,"Flow");
@@ -103,7 +103,6 @@ void QDeclarativeItemModule::defineModule()
qmlRegisterType<QDeclarativeListView>("Qt",4,6,"ListView");
qmlRegisterType<QDeclarativeLoader>("Qt",4,6,"Loader");
qmlRegisterType<QDeclarativeMouseArea>("Qt",4,6,"MouseArea");
- qmlRegisterType<QGraphicsOpacityEffect>("Qt",4,6,"Opacity");
qmlRegisterType<QDeclarativePath>("Qt",4,6,"Path");
qmlRegisterType<QDeclarativePathAttribute>("Qt",4,6,"PathAttribute");
qmlRegisterType<QDeclarativePathCubic>("Qt",4,6,"PathCubic");
@@ -128,11 +127,11 @@ void QDeclarativeItemModule::defineModule()
qmlRegisterType<QDeclarativeVisualItemModel>("Qt",4,6,"VisualItemModel");
qmlRegisterType<QDeclarativeAnchors>();
- qmlRegisterType<QGraphicsEffect>();
qmlRegisterType<QDeclarativeKeyEvent>();
qmlRegisterType<QDeclarativeMouseEvent>();
qmlRegisterType<QGraphicsObject>();
- qmlRegisterType<QGraphicsWidget>();
+ qmlRegisterType<QGraphicsWidget>("Qt",4,6,"QGraphicsWidget");
+ qmlRegisterExtendedType<QGraphicsWidget,QDeclarativeGraphicsWidget>("Qt",4,6,"QGraphicsWidget");
qmlRegisterType<QGraphicsTransform>();
qmlRegisterType<QDeclarativePathElement>();
qmlRegisterType<QDeclarativeCurve>();
@@ -142,6 +141,13 @@ void QDeclarativeItemModule::defineModule()
qmlRegisterType<QAction>();
qmlRegisterType<QDeclarativePen>();
qmlRegisterType<QDeclarativeFlickableVisibleArea>();
+#ifndef QT_NO_GRAPHICSEFFECT
+ qmlRegisterType<QGraphicsEffect>();
+ qmlRegisterType<QGraphicsBlurEffect>("Qt",4,6,"Blur");
+ qmlRegisterType<QGraphicsColorizeEffect>("Qt",4,6,"Colorize");
+ qmlRegisterType<QGraphicsDropShadowEffect>("Qt",4,6,"DropShadow");
+ qmlRegisterType<QGraphicsOpacityEffect>("Qt",4,6,"Opacity");
+#endif
#ifdef QT_WEBKIT_LIB
qmlRegisterType<QDeclarativeWebSettings>();
#endif
diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp
index b4506ef..cf7b96f 100644
--- a/src/declarative/graphicsitems/qdeclarativelistview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp
@@ -770,8 +770,6 @@ void QDeclarativeListViewPrivate::updateTrackedItem()
if (highlight)
item = highlight;
- FxListItem *oldTracked = trackedItem;
-
const char *notifier1 = orient == QDeclarativeListView::Vertical ? SIGNAL(yChanged()) : SIGNAL(xChanged());
const char *notifier2 = orient == QDeclarativeListView::Vertical ? SIGNAL(heightChanged()) : SIGNAL(widthChanged());
@@ -786,7 +784,7 @@ void QDeclarativeListViewPrivate::updateTrackedItem()
QObject::connect(trackedItem->item, notifier1, q, SLOT(trackedPositionChanged()));
QObject::connect(trackedItem->item, notifier2, q, SLOT(trackedPositionChanged()));
}
- if (trackedItem && trackedItem != oldTracked)
+ if (trackedItem)
q->trackedPositionChanged();
}
@@ -1364,10 +1362,10 @@ QDeclarativeListView::~QDeclarativeListView()
id: myDelegate
Item {
id: wrapper
- SequentialAnimation on ListView.onRemove {
- PropertyAction { target: wrapper.ListView; property: "delayRemove"; value: true }
+ ListView.onRemove: SequentialAnimation {
+ PropertyAction { target: wrapper; property: "ListView.delayRemove"; value: true }
NumberAnimation { target: wrapper; property: "scale"; to: 0; duration: 250; easing.type: "InOutQuad" }
- PropertyAction { target: wrapper.ListView; property: "delayRemove"; value: false }
+ PropertyAction { target: wrapper; property: "ListView.delayRemove"; value: false }
}
}
}
diff --git a/src/declarative/graphicsitems/qdeclarativepathview.cpp b/src/declarative/graphicsitems/qdeclarativepathview.cpp
index 06e3540..4aaa28d 100644
--- a/src/declarative/graphicsitems/qdeclarativepathview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativepathview.cpp
@@ -1102,7 +1102,6 @@ void QDeclarativePathView::refill()
// qDebug() << "append" << idx;
QDeclarativeItem *item = d->getItem(idx);
item->setZValue(idx+1);
- d->model->completeItem();
if (d->currentIndex == idx) {
item->setFocus(true);
if (QDeclarativePathViewAttached *att = d->attached(item))
@@ -1115,6 +1114,7 @@ void QDeclarativePathView::refill()
d->firstIndex = idx;
d->items.append(item);
d->updateItem(item, pos);
+ d->model->completeItem();
++idx;
if (idx >= d->model->count())
idx = 0;
@@ -1129,7 +1129,6 @@ void QDeclarativePathView::refill()
// qDebug() << "prepend" << idx;
QDeclarativeItem *item = d->getItem(idx);
item->setZValue(idx+1);
- d->model->completeItem();
if (d->currentIndex == idx) {
item->setFocus(true);
if (QDeclarativePathViewAttached *att = d->attached(item))
@@ -1140,6 +1139,7 @@ void QDeclarativePathView::refill()
}
d->items.prepend(item);
d->updateItem(item, pos);
+ d->model->completeItem();
d->firstIndex = idx;
idx = d->firstIndex - 1;
if (idx < 0)
diff --git a/src/declarative/graphicsitems/qdeclarativepositioners.cpp b/src/declarative/graphicsitems/qdeclarativepositioners.cpp
index d33a8be..f436471 100644
--- a/src/declarative/graphicsitems/qdeclarativepositioners.cpp
+++ b/src/declarative/graphicsitems/qdeclarativepositioners.cpp
@@ -700,14 +700,15 @@ void QDeclarativeGrid::setRows(const int rows)
void QDeclarativeGrid::doPositioning(QSizeF *contentSize)
{
- int c=_columns,r=_rows;//Actual number of rows/columns
+ int c = _columns;
+ int r = _rows;
int numVisible = positionedItems.count();
- if (_columns==-1 && _rows==-1){
+ if (_columns <= 0 && _rows <= 0){
c = 4;
r = (numVisible+3)/4;
- }else if (_rows==-1){
+ } else if (_rows <= 0){
r = (numVisible+(_columns-1))/_columns;
- }else if (_columns==-1){
+ } else if (_columns <= 0){
c = (numVisible+(_rows-1))/_rows;
}
diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
index 89ec834..e00d333 100644
--- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
@@ -554,6 +554,75 @@ void QDeclarativeTextInput::setAutoScroll(bool b)
}
/*!
+ \qmlclass IntValidator QIntValidator
+
+ This element provides a validator for integer values
+*/
+/*!
+ \qmlproperty int IntValidator::top
+
+ This property holds the validator's highest acceptable value.
+ By default, this property's value is derived from the highest signed integer available (typically 2147483647).
+*/
+/*!
+ \qmlproperty int IntValidator::bottom
+
+ This property holds the validator's lowest acceptable value.
+ By default, this property's value is derived from the lowest signed integer available (typically -2147483647).
+*/
+
+/*!
+ \qmlclass DoubleValidator QDoubleValidator
+
+ This element provides a validator for non-integer numbers.
+*/
+
+/*!
+ \qmlproperty real DoubleValidator::top
+
+ This property holds the validator's maximum acceptable value.
+ By default, this property contains a value of infinity.
+*/
+/*!
+ \qmlproperty real DoubleValidator::bottom
+
+ This property holds the validator's minimum acceptable value.
+ By default, this property contains a value of -infinity.
+*/
+/*!
+ \qmlproperty int DoubleValidator::decimals
+
+ This property holds the validator's maximum number of digits after the decimal point.
+ By default, this property contains a value of 1000.
+*/
+/*!
+ \qmlproperty enumeration DoubleValidator::notation
+ This property holds the notation of how a string can describe a number.
+
+ The values for this property are DoubleValidator.StandardNotation or DoubleValidator.ScientificNotation.
+ If this property is set to ScientificNotation, the written number may have an exponent part(i.e. 1.5E-2).
+
+ By default, this property is set to ScientificNotation.
+*/
+
+/*!
+ \qmlclass RegExpValidator QRegExpValidator
+
+ This element provides a validator, which counts as valid any string which
+ matches a specified regular expression.
+*/
+/*!
+ \qmlproperty regExp RegExpValidator::regExp
+
+ This property holds the regular expression used for validation.
+
+ Note that this property should be a regular expression in JS syntax, e.g /a/ for the regular expression
+ matching "a".
+
+ By default, this property contains a regular expression with the pattern .* that matches any string.
+*/
+
+/*!
\qmlproperty Validator TextInput::validator
Allows you to set a validator on the TextInput. When a validator is set
@@ -562,15 +631,7 @@ void QDeclarativeTextInput::setAutoScroll(bool b)
if the text is in an acceptable state when enter is pressed.
Currently supported validators are IntValidator, DoubleValidator and
- RegExpValidator. For details, refer to their C++ documentation (QIntValidator,
- QDoubleValidator, and QRegExpValidator) and remember
- that all Q_PROPERTIES are accessible from Qml. A brief usage guide follows:
-
- IntValidator and DoubleValidator both are controllable through two properties,
- top and bottom. The difference is that for IntValidator the top and bottom properties
- should be integers, and for DoubleValidator they should be doubles. RegExpValidator
- has a single string property, regExp, which should be set to the regular expression to
- be used for validation. An example of using validators is shown below, which allows
+ RegExpValidator. An example of using validators is shown below, which allows
input of integers between 11 and 31 into the text input:
\code
diff --git a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
index 15348ed..03e4703 100644
--- a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
+++ b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
@@ -243,7 +243,7 @@ public:
QString m_part;
QDeclarativeComponent *m_delegate;
- QDeclarativeContext *m_context;
+ QDeclarativeGuard<QDeclarativeContext> m_context;
QList<int> m_roles;
QHash<QByteArray,int> m_roleNames;
void ensureRoles() {
@@ -1127,20 +1127,21 @@ void QDeclarativeVisualDataModel::_q_itemsChanged(int index, int count,
const QList<int> &roles)
{
Q_D(QDeclarativeVisualDataModel);
- // XXX - highly inefficient
- for (int ii = index; ii < index + count; ++ii) {
-
- if (QObject *item = d->m_cache.item(ii)) {
- QDeclarativeVisualDataModelData *data = d->data(item);
+ for (QHash<int,QDeclarativeVisualDataModelPrivate::ObjectRef>::ConstIterator iter = d->m_cache.begin();
+ iter != d->m_cache.end(); ++iter) {
+ const int idx = iter.key();
+ if (idx >= index && idx < index+count) {
+ QDeclarativeVisualDataModelPrivate::ObjectRef objRef = *iter;
+ QDeclarativeVisualDataModelData *data = d->data(objRef.obj);
for (int roleIdx = 0; roleIdx < roles.count(); ++roleIdx) {
int role = roles.at(roleIdx);
int propId = data->propForRole(role);
if (propId != -1) {
if (d->m_listModelInterface) {
- data->setValue(propId, d->m_listModelInterface->data(ii, QList<int>() << role).value(role));
+ data->setValue(propId, d->m_listModelInterface->data(idx, QList<int>() << role).value(role));
} else if (d->m_abstractItemModel) {
- QModelIndex index = d->m_abstractItemModel->index(ii, 0, d->m_root);
+ QModelIndex index = d->m_abstractItemModel->index(idx, 0, d->m_root);
data->setValue(propId, d->m_abstractItemModel->data(index, role));
}
}
diff --git a/src/declarative/qml/qdeclarativebinding.cpp b/src/declarative/qml/qdeclarativebinding.cpp
index e172a8b..664118d 100644
--- a/src/declarative/qml/qdeclarativebinding.cpp
+++ b/src/declarative/qml/qdeclarativebinding.cpp
@@ -126,7 +126,7 @@ void QDeclarativeBinding::update(QDeclarativePropertyPrivate::WriteFlags flags)
QDeclarativeBindingData *data = d->bindingData();
- if (!data->enabled || !data->context() || !data->context()->engine)
+ if (!data->enabled || !data->context() || !data->context()->isValid())
return;
data->addref();
diff --git a/src/declarative/qml/qdeclarativeboundsignal.cpp b/src/declarative/qml/qdeclarativeboundsignal.cpp
index 762c6428..8c7a977 100644
--- a/src/declarative/qml/qdeclarativeboundsignal.cpp
+++ b/src/declarative/qml/qdeclarativeboundsignal.cpp
@@ -176,7 +176,7 @@ int QDeclarativeBoundSignal::qt_metacall(QMetaObject::Call c, int id, void **a)
}
if (m_params) m_params->setValues(a);
- if (m_expression) {
+ if (m_expression && m_expression->engine()) {
QDeclarativeExpressionPrivate::get(m_expression)->value(m_params);
if (m_expression && m_expression->hasError())
qWarning().nospace() << qPrintable(m_expression->error().toString());
diff --git a/src/declarative/qml/qdeclarativecompiledbindings.cpp b/src/declarative/qml/qdeclarativecompiledbindings.cpp
index 0c824fc..6fdf706 100644
--- a/src/declarative/qml/qdeclarativecompiledbindings.cpp
+++ b/src/declarative/qml/qdeclarativecompiledbindings.cpp
@@ -285,12 +285,7 @@ void QDeclarativeCompiledBindingsPrivate::run(Binding *binding, QDeclarativeProp
return;
QDeclarativeContextData *context = q->QDeclarativeAbstractExpression::context();
- if (!context) {
- qWarning("QDeclarativeCompiledBindings: Attempted to evaluate an expression in an invalid context");
- return;
- }
-
- if (!context->engine)
+ if (!context || !context->isValid())
return;
if (binding->updating) {
diff --git a/src/declarative/qml/qdeclarativecomponent.cpp b/src/declarative/qml/qdeclarativecomponent.cpp
index e180374..5f26ad5 100644
--- a/src/declarative/qml/qdeclarativecomponent.cpp
+++ b/src/declarative/qml/qdeclarativecomponent.cpp
@@ -320,6 +320,9 @@ QDeclarativeComponent::QDeclarativeComponent(QDeclarativeEngine *engine, QObject
Create a QDeclarativeComponent from the given \a url and give it the
specified \a parent and \a engine.
+ Ensure that the URL provided is full and correct, in particular, use
+ \l QUrl::fromLocalFile() when loading a file from the local filesystem.
+
\sa loadUrl()
*/
QDeclarativeComponent::QDeclarativeComponent(QDeclarativeEngine *engine, const QUrl &url, QObject *parent)
@@ -409,6 +412,9 @@ QDeclarativeContext *QDeclarativeComponent::creationContext() const
/*!
Load the QDeclarativeComponent from the provided \a url.
+
+ Ensure that the URL provided is full and correct, in particular, use
+ \l QUrl::fromLocalFile() when loading a file from the local filesystem.
*/
void QDeclarativeComponent::loadUrl(const QUrl &url)
{
@@ -591,6 +597,11 @@ QDeclarativeComponentPrivate::beginCreate(QDeclarativeContextData *context, cons
return 0;
}
+ if (!context->isValid()) {
+ qWarning("QDeclarativeComponent::beginCreate(): Cannot create a component in an invalid context");
+ return 0;
+ }
+
if (context->engine != engine) {
qWarning("QDeclarativeComponent::beginCreate(): Must create component in context from the same QDeclarativeEngine");
return 0;
diff --git a/src/declarative/qml/qdeclarativecompositetypemanager.cpp b/src/declarative/qml/qdeclarativecompositetypemanager.cpp
index 05e8d22..133b71f 100644
--- a/src/declarative/qml/qdeclarativecompositetypemanager.cpp
+++ b/src/declarative/qml/qdeclarativecompositetypemanager.cpp
@@ -723,6 +723,10 @@ void QDeclarativeCompositeTypeManager::compile(QDeclarativeCompositeTypeData *un
}
}
+ QUrl importUrl = unit->imports.baseUrl().resolved(QUrl(QLatin1String("qmldir")));
+ if (toLocalFileOrQrc(importUrl).isEmpty())
+ resourceList.prepend(importUrl);
+
for (int ii = 0; ii < resourceList.count(); ++ii) {
QUrl url = unit->imports.baseUrl().resolved(resourceList.at(ii));
diff --git a/src/declarative/qml/qdeclarativecontext.cpp b/src/declarative/qml/qdeclarativecontext.cpp
index 9307bcc..ba4da95 100644
--- a/src/declarative/qml/qdeclarativecontext.cpp
+++ b/src/declarative/qml/qdeclarativecontext.cpp
@@ -202,6 +202,12 @@ QDeclarativeContext::~QDeclarativeContext()
d->data->destroy();
}
+bool QDeclarativeContext::isValid() const
+{
+ Q_D(const QDeclarativeContext);
+ return d->data && d->data->isValid();
+}
+
/*!
Return the context's QDeclarativeEngine, or 0 if the context has no QDeclarativeEngine or the
QDeclarativeEngine was destroyed.
@@ -245,6 +251,11 @@ void QDeclarativeContext::setContextObject(QObject *object)
return;
}
+ if (!isValid()) {
+ qWarning("QDeclarativeContext: Cannot set context object on invalid context.");
+ return;
+ }
+
data->contextObject = object;
}
@@ -264,6 +275,11 @@ void QDeclarativeContext::setContextProperty(const QString &name, const QVariant
return;
}
+ if (!isValid()) {
+ qWarning("QDeclarativeContext: Cannot set property on invalid context.");
+ return;
+ }
+
if (data->engine) {
bool ok;
QObject *o = QDeclarativeEnginePrivate::get(data->engine)->toQObject(value, &ok);
@@ -305,6 +321,11 @@ void QDeclarativeContext::setContextProperty(const QString &name, QObject *value
return;
}
+ if (!isValid()) {
+ qWarning("QDeclarativeContext: Cannot set property on invalid context.");
+ return;
+ }
+
if (!data->propertyNames) data->propertyNames = new QDeclarativeIntegerCache(data->engine);
int idx = data->propertyNames->value(name);
diff --git a/src/declarative/qml/qdeclarativecontext.h b/src/declarative/qml/qdeclarativecontext.h
index a349628..94c9f4a 100644
--- a/src/declarative/qml/qdeclarativecontext.h
+++ b/src/declarative/qml/qdeclarativecontext.h
@@ -46,6 +46,7 @@
#include <QtCore/qobject.h>
#include <QtScript/qscriptvalue.h>
#include <QtCore/qmetatype.h>
+#include <QtCore/qvariant.h>
QT_BEGIN_HEADER
@@ -70,6 +71,8 @@ public:
QDeclarativeContext(QDeclarativeContext *parent, QObject *objParent=0);
virtual ~QDeclarativeContext();
+ bool isValid() const;
+
QDeclarativeEngine *engine() const;
QDeclarativeContext *parentContext() const;
diff --git a/src/declarative/qml/qdeclarativecontext_p.h b/src/declarative/qml/qdeclarativecontext_p.h
index eee72b6..7a16179 100644
--- a/src/declarative/qml/qdeclarativecontext_p.h
+++ b/src/declarative/qml/qdeclarativecontext_p.h
@@ -114,6 +114,10 @@ public:
QDeclarativeContextData(QDeclarativeContext *);
void destroy();
+ inline bool isValid() const {
+ return engine && (!isInternal || !contextObject || !QObjectPrivate::get(contextObject)->wasDeleted);
+ }
+
// My parent context and engine
QDeclarativeContextData *parent;
QDeclarativeEngine *engine;
diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp
index f1adc16..c5afe92 100644
--- a/src/declarative/qml/qdeclarativeengine.cpp
+++ b/src/declarative/qml/qdeclarativeengine.cpp
@@ -212,10 +212,13 @@ QDeclarativeScriptEngine::QDeclarativeScriptEngine(QDeclarativeEnginePrivate *pr
newQMetaObject(StaticQtMetaObject::get());
globalObject().setProperty(QLatin1String("Qt"), qtObject);
+#ifndef QT_NO_DESKTOPSERVICES
offlineStoragePath = QDesktopServices::storageLocation(QDesktopServices::DataLocation).replace(QLatin1Char('/'), QDir::separator())
+ QDir::separator() + QLatin1String("QML")
+ QDir::separator() + QLatin1String("OfflineStorage");
-
+#else
+ qWarning("offlineStoragePath is not set by default with QT_NO_DESKTOPSERVICES");
+#endif
qt_add_qmlxmlhttprequest(this);
qt_add_qmlsqldatabase(this);
@@ -848,6 +851,9 @@ void QDeclarativeDeclarativeData::destroyed(QObject *object)
if (propertyCache)
propertyCache->release();
+ if (ownContext)
+ context->destroy();
+
QDeclarativeGuard<QObject> *guard = guards;
while (guard) {
QDeclarativeGuard<QObject> *g = guard;
@@ -858,9 +864,6 @@ void QDeclarativeDeclarativeData::destroyed(QObject *object)
g->objectDestroyed(object);
}
- if (ownContext)
- context->destroy();
-
if (scriptValue)
delete scriptValue;
@@ -1214,7 +1217,10 @@ QScriptValue QDeclarativeEnginePrivate::desktopOpenUrl(QScriptContext *ctxt, QSc
{
if(ctxt->argumentCount() < 1)
return e->newVariant(QVariant(false));
- bool ret = QDesktopServices::openUrl(QUrl(ctxt->argument(0).toString()));
+ bool ret = false;
+#ifndef QT_NO_DESKTOPSERVICES
+ ret = QDesktopServices::openUrl(QUrl(ctxt->argument(0).toString()));
+#endif
return e->newVariant(QVariant(ret));
}
@@ -1486,13 +1492,17 @@ public:
QSet<QString> qmlDirFilesForWhichPluginsHaveBeenLoaded;
- QDeclarativeDirComponents importExtension(const QString &absoluteFilePath, const QString &uri, QDeclarativeEngine *engine) {
+ bool importExtension(const QString &absoluteFilePath, const QString &uri, QDeclarativeEngine *engine, QDeclarativeDirComponents* components, QString *errorString) {
QFile file(absoluteFilePath);
QString filecontent;
if (file.open(QFile::ReadOnly)) {
filecontent = QString::fromUtf8(file.readAll());
if (qmlImportTrace())
qDebug() << "QDeclarativeEngine::add: loaded" << absoluteFilePath;
+ } else {
+ if (errorString)
+ *errorString = QDeclarativeEngine::tr("module \"%1\" definition \"%2\" not readable").arg(uri).arg(absoluteFilePath);
+ return false;
}
QDir dir = QFileInfo(file).dir();
@@ -1512,11 +1522,23 @@ public:
plugin.name);
if (!resolvedFilePath.isEmpty()) {
- engine->importPlugin(resolvedFilePath, uri);
+ if (!engine->importPlugin(resolvedFilePath, uri, errorString)) {
+ if (errorString)
+ *errorString = QDeclarativeEngine::tr("plugin cannot be loaded for module \"%1\": %2").arg(uri).arg(*errorString);
+ return false;
+ }
+ } else {
+ if (errorString)
+ *errorString = QDeclarativeEngine::tr("module \"%1\" plugin \"%2\" not found").arg(uri).arg(plugin.name);
+ return false;
}
}
}
- return qmldirParser.components();
+
+ if (components)
+ *components = qmldirParser.components();
+
+ return true;
}
QString resolvedUri(const QString &dir_arg, QDeclarativeEngine *engine)
@@ -1577,7 +1599,8 @@ public:
url = QUrl::fromLocalFile(fi.absolutePath()).toString();
uri = resolvedUri(dir, engine);
- qmldircomponents = importExtension(absoluteFilePath, uri, engine);
+ if (!importExtension(absoluteFilePath, uri, engine, &qmldircomponents, errorString))
+ return false;
break;
}
}
@@ -1608,12 +1631,12 @@ public:
return false; // local import dirs must exist
}
uri = resolvedUri(toLocalFileOrQrc(base.resolved(QUrl(uri))), engine);
- qmldircomponents = importExtension(localFileOrQrc,
- uri,
- engine);
-
if (uri.endsWith(QLatin1Char('/')))
uri.chop(1);
+ if (QFile::exists(localFileOrQrc)) {
+ if (!importExtension(localFileOrQrc,uri,engine,&qmldircomponents,errorString))
+ return false;
+ }
} else {
if (prefix.isEmpty()) {
// directory must at least exist for valid import
@@ -1926,8 +1949,10 @@ void QDeclarativeEngine::setPluginPathList(const QStringList &paths)
/*!
Imports the plugin named \a filePath with the \a uri provided.
Returns true if the plugin was successfully imported; otherwise returns false.
+
+ The plugin has to be a Qt plugin which implements the QDeclarativeExtensionPlugin interface.
*/
-bool QDeclarativeEngine::importPlugin(const QString &filePath, const QString &uri)
+bool QDeclarativeEngine::importPlugin(const QString &filePath, const QString &uri, QString *errorString)
{
if (qmlImportTrace())
qDebug() << "QDeclarativeEngine::importPlugin" << uri << "from" << filePath;
@@ -1948,9 +1973,8 @@ bool QDeclarativeEngine::importPlugin(const QString &filePath, const QString &ur
QPluginLoader loader(absoluteFilePath);
if (!loader.load()) {
- if (qmlImportTrace()) {
- qDebug() << "QDeclarativeEngine::importPlugin: " << loader.errorString();
- }
+ if (errorString)
+ *errorString = loader.errorString();
return false;
}
@@ -1972,8 +1996,8 @@ bool QDeclarativeEngine::importPlugin(const QString &filePath, const QString &ur
iface->initializeEngine(this, moduleId);
}
} else {
- if (qmlImportTrace())
- qDebug() << "QDeclarativeEngine::importPlugin: no DeclarativeExtensionInterface error";
+ if (errorString)
+ *errorString = loader.errorString();
return false;
}
}
diff --git a/src/declarative/qml/qdeclarativeengine.h b/src/declarative/qml/qdeclarativeengine.h
index fcaddcf..7b058ea 100644
--- a/src/declarative/qml/qdeclarativeengine.h
+++ b/src/declarative/qml/qdeclarativeengine.h
@@ -85,7 +85,7 @@ public:
void setPluginPathList(const QStringList &paths);
void addPluginPath(const QString& dir);
- bool importPlugin(const QString &filePath, const QString &uri);
+ bool importPlugin(const QString &filePath, const QString &uri, QString *errorString);
void setNetworkAccessManagerFactory(QDeclarativeNetworkAccessManagerFactory *);
QDeclarativeNetworkAccessManagerFactory *networkAccessManagerFactory() const;
diff --git a/src/declarative/qml/qdeclarativeexpression.cpp b/src/declarative/qml/qdeclarativeexpression.cpp
index 2a3e557..05240a2 100644
--- a/src/declarative/qml/qdeclarativeexpression.cpp
+++ b/src/declarative/qml/qdeclarativeexpression.cpp
@@ -468,7 +468,7 @@ QVariant QDeclarativeExpressionPrivate::value(QObject *secondaryScope, bool *isU
{
Q_Q(QDeclarativeExpression);
- if (!q->engine()) {
+ if (!data || !data->context() || !data->context()->isValid()) {
qWarning("QDeclarativeExpression: Attempted to evaluate an expression in an invalid context");
return QVariant();
}
diff --git a/src/declarative/qml/qdeclarativeextensionplugin.cpp b/src/declarative/qml/qdeclarativeextensionplugin.cpp
index 5b7f1e8..762c642d 100644
--- a/src/declarative/qml/qdeclarativeextensionplugin.cpp
+++ b/src/declarative/qml/qdeclarativeextensionplugin.cpp
@@ -55,17 +55,21 @@ QT_BEGIN_NAMESPACE
applications using the QDeclarativeEngine class.
Writing a QML extension plugin is achieved by subclassing this
- base class, reimplementing the pure virtual initialize()
+ base class, reimplementing the pure virtual registerTypes()
function, and exporting the class using the Q_EXPORT_PLUGIN2()
- macro. See \l {How to Create Qt Plugins} for details.
+ macro.
- \sa QDeclarativeEngine::importExtension()
+ See \l {Extending QML in C++} for details how to write a QML extension plugin.
+ See \l {How to Create Qt Plugins} for general Qt plugin documentation.
+
+ \sa QDeclarativeEngine::importPlugin()
*/
/*!
\fn void QDeclarativeExtensionPlugin::registerTypes(const char *uri)
- Registers the QML types in the given \a uri.
+ Registers the QML types in the given \a uri. Here you call qmlRegisterType() for
+ all types which are provided by the extension plugin.
*/
/*!
diff --git a/src/declarative/qml/qdeclarativevme.cpp b/src/declarative/qml/qdeclarativevme.cpp
index 0addfabd..3575c17 100644
--- a/src/declarative/qml/qdeclarativevme.cpp
+++ b/src/declarative/qml/qdeclarativevme.cpp
@@ -246,12 +246,7 @@ QObject *QDeclarativeVME::run(QDeclarativeVMEStack<QObject *> &stack,
{
QObject *o = (QObject *)operator new(instr.createSimple.typeSize +
sizeof(QDeclarativeDeclarativeData));
-#if defined(Q_OS_WIN32) || defined(Q_OS_WINCE)
::memset(o, 0, instr.createSimple.typeSize + sizeof(QDeclarativeDeclarativeData));
-#else
- // faster than memset
- ::bzero(o, instr.createSimple.typeSize + sizeof(QDeclarativeDeclarativeData));
-#endif
instr.createSimple.create(o);
QDeclarativeDeclarativeData *ddata =
diff --git a/src/declarative/util/qdeclarativelistmodel.cpp b/src/declarative/util/qdeclarativelistmodel.cpp
index e3680f2..2616ccf 100644
--- a/src/declarative/util/qdeclarativelistmodel.cpp
+++ b/src/declarative/util/qdeclarativelistmodel.cpp
@@ -219,13 +219,13 @@ QDeclarativeListModelParser::ListInstruction *QDeclarativeListModelParser::ListM
\tt dataloader.js, which appends the current time to the list model.
Note the call to sync() from the \c WorkerScript.onMessage() handler.
- Without this call, the changes made to the list are not reflected in the
- list model in the main thread.
+ You must call sync() or else the changes made to the list from the external
+ thread will not be reflected in the list model in the main thread.
\section3 Limitations
If a list model is to be accessed from a WorkerScript, it \bold cannot
- contain nested list data. So, the following model cannot be used from a WorkerScript
+ contain list data. So, the following model cannot be used from a WorkerScript
because of the list contained in the "attributes" property:
\code
@@ -242,7 +242,7 @@ QDeclarativeListModelParser::ListInstruction *QDeclarativeListModelParser::ListM
}
\endcode
- In addition, the WorkerScript cannot add any nested list data to the model.
+ In addition, the WorkerScript cannot add any list data to the model.
\sa {qmlmodels}{Data Models}, WorkerScript
*/
diff --git a/src/declarative/util/qdeclarativesmoothedfollow.cpp b/src/declarative/util/qdeclarativesmoothedfollow.cpp
index 63c9618..9f155fc 100644
--- a/src/declarative/util/qdeclarativesmoothedfollow.cpp
+++ b/src/declarative/util/qdeclarativesmoothedfollow.cpp
@@ -86,7 +86,7 @@ public:
The follow example shows one rectangle tracking the position of another.
\code
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 800; height: 600; color: "blue"
diff --git a/src/declarative/util/qdeclarativeview.cpp b/src/declarative/util/qdeclarativeview.cpp
index 22a7873..c0425ef 100644
--- a/src/declarative/util/qdeclarativeview.cpp
+++ b/src/declarative/util/qdeclarativeview.cpp
@@ -204,7 +204,7 @@ void QDeclarativeViewPrivate::execute()
QDeclarativeView *view = new QDeclarativeView(this);
vbox->addWidget(view);
- QUrl url(fileName);
+ QUrl url = QUrl::fromLocalFile(fileName);
view->setSource(url);
view->show();
\endcode
@@ -279,11 +279,17 @@ QDeclarativeView::~QDeclarativeView()
\brief The URL of the source of the QML component.
Changing this property causes the QML component to be reloaded.
+
+ Ensure that the URL provided is full and correct, in particular, use
+ \l QUrl::fromLocalFile() when loading a file from the local filesystem.
*/
/*!
Sets the source to the \a url, loads the QML component and instantiates it.
+ Ensure that the URL provided is full and correct, in particular, use
+ \l QUrl::fromLocalFile() when loading a file from the local filesystem.
+
Calling this methods multiple times with the same url will result
in the QML being reloaded.
*/
diff --git a/src/gui/animation/qguivariantanimation.cpp b/src/gui/animation/qguivariantanimation.cpp
index 52303f5..28cde3e 100644
--- a/src/gui/animation/qguivariantanimation.cpp
+++ b/src/gui/animation/qguivariantanimation.cpp
@@ -38,12 +38,11 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-
-#ifndef QT_NO_ANIMATION
-
#include <QtCore/qvariantanimation.h>
#include <private/qvariantanimation_p.h>
+#ifndef QT_NO_ANIMATION
+
#include <QtGui/qcolor.h>
#include <QtGui/qvector2d.h>
#include <QtGui/qvector3d.h>
diff --git a/src/gui/dialogs/qfiledialog.cpp b/src/gui/dialogs/qfiledialog.cpp
index 3b5fb9f..cb74a3c 100644
--- a/src/gui/dialogs/qfiledialog.cpp
+++ b/src/gui/dialogs/qfiledialog.cpp
@@ -723,15 +723,19 @@ void QFileDialog::setVisible(bool visible)
// Set WA_DontShowOnScreen so that QDialog::setVisible(visible) below
// updates the state correctly, but skips showing the non-native version:
setAttribute(Qt::WA_DontShowOnScreen);
+#ifndef QT_NO_FSCOMPLETER
//So the completer don't try to complete and therefore to show a popup
d->completer->setModel(0);
+#endif
} else {
d->nativeDialogInUse = false;
setAttribute(Qt::WA_DontShowOnScreen, false);
+#ifndef QT_NO_FSCOMPLETER
if (d->proxyModel != 0)
d->completer->setModel(d->proxyModel);
else
d->completer->setModel(d->model);
+#endif
}
}
diff --git a/src/gui/dialogs/qfiledialog_win.cpp b/src/gui/dialogs/qfiledialog_win.cpp
index afeed8e..258707c 100644
--- a/src/gui/dialogs/qfiledialog_win.cpp
+++ b/src/gui/dialogs/qfiledialog_win.cpp
@@ -218,7 +218,6 @@ static OPENFILENAME* qt_win_make_OFN(QWidget *parent,
memset(ofn, 0, sizeof(OPENFILENAME));
ofn->lStructSize = sizeof(OPENFILENAME);
- Q_ASSERT(!parent ||parent->testAttribute(Qt::WA_WState_Created));
ofn->hwndOwner = parent ? parent->winId() : 0;
ofn->lpstrFilter = (wchar_t*)tFilters.utf16();
ofn->lpstrFile = tInitSel;
diff --git a/src/gui/dialogs/qprintdialog_unix.cpp b/src/gui/dialogs/qprintdialog_unix.cpp
index 9b4d6e8..e3c62be 100644
--- a/src/gui/dialogs/qprintdialog_unix.cpp
+++ b/src/gui/dialogs/qprintdialog_unix.cpp
@@ -703,7 +703,7 @@ QUnixPrintWidgetPrivate::QUnixPrintWidgetPrivate(QUnixPrintWidget *p)
}
#endif
-#ifndef QT_NO_FILESYSTEMMODEL
+#if !defined(QT_NO_FILESYSTEMMODEL) && !defined(QT_NO_COMPLETER)
QFileSystemModel *fsm = new QFileSystemModel(widget.filename);
fsm->setRootPath(QDir::homePath());
widget.filename->setCompleter(new QCompleter(fsm, widget.filename));
diff --git a/src/gui/egl/qegl_p.h b/src/gui/egl/qegl_p.h
index 540cd3d..f81add6 100644
--- a/src/gui/egl/qegl_p.h
+++ b/src/gui/egl/qegl_p.h
@@ -139,6 +139,12 @@ QT_BEGIN_NAMESPACE
typedef void *EGLImageKHR;
#define EGL_NO_IMAGE_KHR ((EGLImageKHR)0)
#define EGL_IMAGE_PRESERVED_KHR 0x30D2
+#define EGL_KHR_image_base
+#endif
+
+#if !defined(EGL_KHR_image) && !defined(EGL_KHR_image_pixmap)
+#define EGL_NATIVE_PIXMAP_KHR 0x30B0
+#define EGL_KHR_image_pixmap
#endif
// It is possible that something has included eglext.h (like Symbian 10.1's broken egl.h), in
@@ -154,9 +160,6 @@ extern Q_GUI_EXPORT _eglCreateImageKHR eglCreateImageKHR;
extern Q_GUI_EXPORT _eglDestroyImageKHR eglDestroyImageKHR;
#endif // (defined(EGL_KHR_image) || defined(EGL_KHR_image_base)) && !defined(EGL_EGLEXT_PROTOTYPES)
-#if !defined(EGL_KHR_image) && !defined(EGL_KHR_image_pixmap)
-#define EGL_NATIVE_PIXMAP_KHR 0x30B0
-#endif
class QEglProperties;
diff --git a/src/gui/egl/qegl_x11.cpp b/src/gui/egl/qegl_x11.cpp
index 91423c8..5341ea1 100644
--- a/src/gui/egl/qegl_x11.cpp
+++ b/src/gui/egl/qegl_x11.cpp
@@ -147,9 +147,6 @@ VisualID QEgl::getCompatibleVisualId(EGLConfig config)
EGLint configAlphaSize = 0;
eglGetConfigAttrib(display(), config, EGL_ALPHA_SIZE, &configAlphaSize);
- eglGetConfigAttrib(display(), config, EGL_BUFFER_SIZE, &eglValue);
- int configBitDepth = eglValue;
-
eglGetConfigAttrib(display(), config, EGL_CONFIG_ID, &eglValue);
int configId = eglValue;
@@ -166,28 +163,53 @@ VisualID QEgl::getCompatibleVisualId(EGLConfig config)
int matchingCount = 0;
chosenVisualInfo = XGetVisualInfo(X11->display, VisualIDMask, &visualInfoTemplate, &matchingCount);
if (chosenVisualInfo) {
- if (configBitDepth == chosenVisualInfo->depth) {
+ int visualRedSize = countBits(chosenVisualInfo->red_mask);
+ int visualGreenSize = countBits(chosenVisualInfo->green_mask);
+ int visualBlueSize = countBits(chosenVisualInfo->blue_mask);
+ int visualAlphaSize = -1; // Need XRender to tell us the alpha channel size
+
#if !defined(QT_NO_XRENDER)
+ if (X11->use_xrender) {
// If we have XRender, actually check the visual supplied by EGL is ARGB
- if (configAlphaSize > 0) {
- XRenderPictFormat *format;
- format = XRenderFindVisualFormat(X11->display, chosenVisualInfo->visual);
- if (!format || (format->type != PictTypeDirect) || (!format->direct.alphaMask)) {
- qWarning("Warning: EGL suggested using X visual ID %d for config %d, but this is not ARGB",
- (int)visualId, configId);
- visualId = 0;
- }
- }
+ XRenderPictFormat *format;
+ format = XRenderFindVisualFormat(X11->display, chosenVisualInfo->visual);
+ if (format && (format->type == PictTypeDirect))
+ visualAlphaSize = countBits(format->direct.alphaMask);
+ }
#endif
- } else {
- qWarning("Warning: EGL suggested using X visual ID %d (%d bpp) for config %d (%d bpp), but the depths do not match!",
- (int)visualId, chosenVisualInfo->depth, configId, configBitDepth);
+
+ bool visualMatchesConfig = false;
+ if ( visualRedSize == configRedSize &&
+ visualGreenSize == configGreenSize &&
+ visualBlueSize == configBlueSize )
+ {
+ // We need XRender to check the alpha channel size of the visual. If we don't have
+ // the alpha size, we don't check it against the EGL config's alpha size.
+ if (visualAlphaSize >= 0)
+ visualMatchesConfig = visualAlphaSize == configAlphaSize;
+ else
+ visualMatchesConfig = true;
+ }
+
+ if (!visualMatchesConfig) {
+ if (visualAlphaSize >= 0) {
+ qWarning("Warning: EGL suggested using X Visual ID %d (ARGB%d%d%d%d) for EGL config %d (ARGB%d%d%d%d), but this is incompatable",
+ (int)visualId, visualAlphaSize, visualRedSize, visualGreenSize, visualBlueSize,
+ configId, configAlphaSize, configRedSize, configGreenSize, configBlueSize);
+ } else {
+ qWarning("Warning: EGL suggested using X Visual ID %d (RGB%d%d%d) for EGL config %d (RGB%d%d%d), but this is incompatable",
+ (int)visualId, visualRedSize, visualGreenSize, visualBlueSize,
+ configId, configRedSize, configGreenSize, configBlueSize);
+ }
visualId = 0;
}
+ } else {
+ qWarning("Warning: EGL suggested using X Visual ID %d for EGL config %d, but that isn't a valid ID",
+ (int)visualId, configId);
+ visualId = 0;
}
XFree(chosenVisualInfo);
}
-
if (visualId) {
#ifdef QT_DEBUG_X11_VISUAL_SELECTION
if (configAlphaSize > 0)
@@ -201,17 +223,16 @@ VisualID QEgl::getCompatibleVisualId(EGLConfig config)
// If EGL didn't give us a valid visual ID, try XRender
#if !defined(QT_NO_XRENDER)
- if (!visualId) {
+ if (!visualId && X11->use_xrender) {
XVisualInfo visualInfoTemplate;
memset(&visualInfoTemplate, 0, sizeof(XVisualInfo));
- visualInfoTemplate.depth = configBitDepth;
visualInfoTemplate.c_class = TrueColor;
XVisualInfo *matchingVisuals;
int matchingCount = 0;
matchingVisuals = XGetVisualInfo(X11->display,
- VisualDepthMask|VisualClassMask,
+ VisualClassMask,
&visualInfoTemplate,
&matchingCount);
@@ -246,19 +267,27 @@ VisualID QEgl::getCompatibleVisualId(EGLConfig config)
// Finally, if XRender also failed to find a visual (or isn't present), try to
- // use XGetVisualInfo and only use the bit depth to match on:
+ // use XGetVisualInfo and only use the bit depths to match on:
if (!visualId) {
XVisualInfo visualInfoTemplate;
memset(&visualInfoTemplate, 0, sizeof(XVisualInfo));
-
- visualInfoTemplate.depth = configBitDepth;
-
XVisualInfo *matchingVisuals;
int matchingCount = 0;
+
+ visualInfoTemplate.depth = configRedSize + configGreenSize + configBlueSize + configAlphaSize;
matchingVisuals = XGetVisualInfo(X11->display,
VisualDepthMask,
&visualInfoTemplate,
&matchingCount);
+ if (!matchingVisuals) {
+ // Try again without taking the alpha channel into account:
+ visualInfoTemplate.depth = configRedSize + configGreenSize + configBlueSize;
+ matchingVisuals = XGetVisualInfo(X11->display,
+ VisualDepthMask,
+ &visualInfoTemplate,
+ &matchingCount);
+ }
+
if (matchingVisuals) {
visualId = matchingVisuals[0].visualid;
XFree(matchingVisuals);
diff --git a/src/gui/embedded/qscreenlinuxfb_qws.cpp b/src/gui/embedded/qscreenlinuxfb_qws.cpp
index 8a21022..1effcfa 100644
--- a/src/gui/embedded/qscreenlinuxfb_qws.cpp
+++ b/src/gui/embedded/qscreenlinuxfb_qws.cpp
@@ -91,6 +91,7 @@ public:
int startuph;
int startupd;
bool blank;
+ QLinuxFbScreen::DriverTypes driverType;
bool doGraphicsMode;
#ifdef QT_QWS_DEPTH_GENERIC
@@ -165,6 +166,36 @@ void QLinuxFbScreenPrivate::closeTty()
}
/*!
+ \enum QLinuxFbScreen::DriverTypes
+
+ This enum describes the driver type.
+
+ \value GenericDriver Generic Linux framebuffer driver
+ \value EInk8Track e-Ink framebuffer driver using the 8Track chipset
+ */
+
+/*!
+ \fn QLinuxFbScreen::fixupScreenInfo(fb_fix_screeninfo &finfo, fb_var_screeninfo &vinfo)
+
+ Adjust the values returned by the framebuffer driver, to work
+ around driver bugs or nonstandard behavior in certain drivers.
+ \a finfo and \a vinfo specify the fixed and variable screen info
+ returned by the driver.
+ */
+void QLinuxFbScreen::fixupScreenInfo(fb_fix_screeninfo &finfo, fb_var_screeninfo &vinfo)
+{
+ // 8Track e-ink devices (as found in Sony PRS-505) lie
+ // about their bit depth -- they claim they're 1 bit per
+ // pixel while the only supported mode is 8 bit per pixel
+ // grayscale.
+ // Caused by this, they also miscalculate their line length.
+ if(!strcmp(finfo.id, "8TRACKFB") && vinfo.bits_per_pixel == 1) {
+ vinfo.bits_per_pixel = 8;
+ finfo.line_length = vinfo.xres;
+ }
+}
+
+/*!
\internal
\class QLinuxFbScreen
@@ -306,6 +337,8 @@ bool QLinuxFbScreen::connect(const QString &displaySpec)
return false;
}
+ d_ptr->driverType = strcmp(finfo.id, "8TRACKFB") ? GenericDriver : EInk8Track;
+
if (finfo.type == FB_TYPE_VGA_PLANES) {
qWarning("VGA16 video mode not supported");
return false;
@@ -318,6 +351,8 @@ bool QLinuxFbScreen::connect(const QString &displaySpec)
return false;
}
+ fixupScreenInfo(finfo, vinfo);
+
grayscale = vinfo.grayscale;
d = vinfo.bits_per_pixel;
if (d == 24) {
@@ -664,11 +699,6 @@ bool QLinuxFbScreen::initDevice()
vinfo.transp.msb_right);
#endif
- d_ptr->startupw=vinfo.xres;
- d_ptr->startuph=vinfo.yres;
- d_ptr->startupd=vinfo.bits_per_pixel;
- grayscale = vinfo.grayscale;
-
if (ioctl(d_ptr->fd, FBIOGET_FSCREENINFO, &finfo)) {
perror("QLinuxFbScreen::initDevice");
qCritical("Error reading fixed information in card init");
@@ -677,6 +707,13 @@ bool QLinuxFbScreen::initDevice()
return true;
}
+ fixupScreenInfo(finfo, vinfo);
+
+ d_ptr->startupw=vinfo.xres;
+ d_ptr->startuph=vinfo.yres;
+ d_ptr->startupd=vinfo.bits_per_pixel;
+ grayscale = vinfo.grayscale;
+
#ifdef __i386__
// Now init mtrr
if(!::getenv("QWS_NOMTRR")) {
@@ -1122,6 +1159,7 @@ void QLinuxFbScreen::setMode(int nw,int nh,int nd)
qFatal("Error reading fixed information");
}
+ fixupScreenInfo(finfo, vinfo);
disconnect();
connect(d_ptr->displaySpec);
exposeRegion(region(), 0);
@@ -1200,6 +1238,26 @@ int QLinuxFbScreen::sharedRamSize(void * end)
/*!
\reimp
*/
+void QLinuxFbScreen::setDirty(const QRect &r)
+{
+ if(d_ptr->driverType == EInk8Track) {
+ // e-Ink displays need a trigger to actually show what is
+ // in their framebuffer memory. The 8-Track driver does this
+ // by adding custom IOCTLs - FBIO_EINK_DISP_PIC (0x46a2) takes
+ // an argument specifying whether or not to flash the screen
+ // while updating.
+ // There doesn't seem to be a way to tell it to just update
+ // a subset of the screen.
+ if(r.left() == 0 && r.top() == 0 && r.width() == dw && r.height() == dh)
+ ioctl(d_ptr->fd, 0x46a2, 1);
+ else
+ ioctl(d_ptr->fd, 0x46a2, 0);
+ }
+}
+
+/*!
+ \reimp
+*/
void QLinuxFbScreen::blank(bool on)
{
if (d_ptr->blank == on)
@@ -1315,7 +1373,9 @@ void QLinuxFbScreen::setPixelFormat(struct fb_var_screeninfo info)
bool QLinuxFbScreen::useOffscreen()
{
- if ((mapsize - size) < 16*1024)
+ // Not done for 8Track because on e-Ink displays,
+ // everything is offscreen anyway
+ if (d_ptr->driverType == EInk8Track || ((mapsize - size) < 16*1024))
return false;
return true;
diff --git a/src/gui/embedded/qscreenlinuxfb_qws.h b/src/gui/embedded/qscreenlinuxfb_qws.h
index ac488b7..6abadbf 100644
--- a/src/gui/embedded/qscreenlinuxfb_qws.h
+++ b/src/gui/embedded/qscreenlinuxfb_qws.h
@@ -88,6 +88,8 @@ public:
virtual bool useOffscreen();
+ enum DriverTypes { GenericDriver, EInk8Track };
+
virtual void disconnect();
virtual void shutdownDevice();
virtual void setMode(int,int,int);
@@ -98,6 +100,7 @@ public:
virtual uchar * cache(int);
virtual void uncache(uchar *);
virtual int sharedRamSize(void *);
+ virtual void setDirty(const QRect&);
QLinuxFb_Shared * shared;
@@ -109,6 +112,7 @@ protected:
int dataoffset;
int cacheStart;
+ virtual void fixupScreenInfo(fb_fix_screeninfo &finfo, fb_var_screeninfo &vinfo);
static void clearCache(QScreen *instance, int);
private:
diff --git a/src/gui/embedded/qscreenqnx_qws.cpp b/src/gui/embedded/qscreenqnx_qws.cpp
index 705db7e..a0a697f 100644
--- a/src/gui/embedded/qscreenqnx_qws.cpp
+++ b/src/gui/embedded/qscreenqnx_qws.cpp
@@ -205,7 +205,7 @@ static bool createMemSurface(QQnxScreenContext * const d, int w, int h)
int ret = gf_surface_create(&d->memSurface, d->device, w, h,
GF_FORMAT_ARGB8888, 0,
GF_SURFACE_CREATE_CPU_FAST_ACCESS | GF_SURFACE_CREATE_CPU_LINEAR_ACCESSIBLE
- | GF_SURFACE_PHYS_CONTIG);
+ | GF_SURFACE_PHYS_CONTIG | GF_SURFACE_CREATE_SHAREABLE);
if (ret != GF_ERR_OK) {
qWarning("QQnxScreen: gf_surface_create(%dx%d) failed with error code %d",
w, h, ret);
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index 150343e..9e0ec2e 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -1408,8 +1408,16 @@ QGraphicsItem::QGraphicsItem(QGraphicsItemPrivate &dd, QGraphicsItem *parent,
*/
QGraphicsItem::~QGraphicsItem()
{
- if (d_ptr->isObject)
- QObjectPrivate::get(static_cast<QGraphicsObject *>(this))->wasDeleted = true;
+ if (d_ptr->isObject) {
+ QGraphicsObject *o = static_cast<QGraphicsObject *>(this);
+ QObjectPrivate *p = QObjectPrivate::get(o);
+ p->wasDeleted = true;
+ if (p->declarativeData) {
+ QDeclarativeData::destroyed(p->declarativeData, o);
+ p->declarativeData = 0;
+ }
+ }
+
d_ptr->inDestructor = 1;
d_ptr->removeExtraItemCache();
diff --git a/src/gui/graphicsview/qgraphicsitem.h b/src/gui/graphicsview/qgraphicsitem.h
index 9cc75af..9891af3 100644
--- a/src/gui/graphicsview/qgraphicsitem.h
+++ b/src/gui/graphicsview/qgraphicsitem.h
@@ -554,6 +554,9 @@ class Q_GUI_EXPORT QGraphicsObject : public QObject, public QGraphicsItem
Q_PROPERTY(qreal rotation READ rotation WRITE setRotation NOTIFY rotationChanged)
Q_PROPERTY(qreal scale READ scale WRITE setScale NOTIFY scaleChanged)
Q_PROPERTY(QPointF transformOriginPoint READ transformOriginPoint WRITE setTransformOriginPoint)
+#ifndef QT_NO_GRAPHICSEFFECT
+ Q_PROPERTY(QGraphicsEffect *effect READ graphicsEffect WRITE setGraphicsEffect)
+#endif
Q_PRIVATE_PROPERTY(QGraphicsItem::d_func(), QDeclarativeListProperty<QGraphicsObject> children READ childrenList DESIGNABLE false NOTIFY childrenChanged)
Q_PRIVATE_PROPERTY(QGraphicsItem::d_func(), qreal width READ width WRITE setWidth NOTIFY widthChanged RESET resetWidth FINAL)
Q_PRIVATE_PROPERTY(QGraphicsItem::d_func(), qreal height READ height WRITE setHeight NOTIFY heightChanged RESET resetHeight FINAL)
diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h
index 922581d..f922842 100644
--- a/src/gui/graphicsview/qgraphicsitem_p.h
+++ b/src/gui/graphicsview/qgraphicsitem_p.h
@@ -237,6 +237,7 @@ public:
scenePosDescendants(0),
pendingPolish(0),
mayHaveChildWithGraphicsEffect(0),
+ isDeclarativeItem(0),
globalStackingOrder(-1),
q_ptr(0)
{
@@ -576,7 +577,8 @@ public:
quint32 scenePosDescendants : 1;
quint32 pendingPolish : 1;
quint32 mayHaveChildWithGraphicsEffect : 1;
- quint32 padding : 25;
+ quint32 isDeclarativeItem : 1;
+ quint32 padding : 24;
// Optional stacking order
int globalStackingOrder;
diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
index cc60246..94036d0 100644
--- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
+++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
@@ -58,6 +58,11 @@
// MAknEdStateObserver::EAknActivatePenInputRequest
#define QT_EAknActivatePenInputRequest MAknEdStateObserver::EAknEdwinStateEvent(7)
+// EAknEditorFlagSelectionVisible is only valid from 3.2 onwards.
+// Sym^3 AVKON FEP manager expects that this flag is used for FEP-aware editors
+// that support text selection.
+#define QT_EAknEditorFlagSelectionVisible 0x100000
+
QT_BEGIN_NAMESPACE
QCoeFepInputContext::QCoeFepInputContext(QObject *parent)
@@ -75,7 +80,10 @@ QCoeFepInputContext::QCoeFepInputContext(QObject *parent)
m_hasTempPreeditString(false)
{
m_fepState->SetObjectProvider(this);
- m_fepState->SetFlags(EAknEditorFlagDefault);
+ if (QSysInfo::s60Version() > QSysInfo::SV_S60_5_0)
+ m_fepState->SetFlags(EAknEditorFlagDefault | QT_EAknEditorFlagSelectionVisible);
+ else
+ m_fepState->SetFlags(EAknEditorFlagDefault);
m_fepState->SetDefaultInputMode( EAknEditorTextInputMode );
m_fepState->SetPermittedInputModes( EAknEditorAllInputModes );
m_fepState->SetDefaultCase( EAknEditorLowerCase );
@@ -432,7 +440,10 @@ void QCoeFepInputContext::applyHints(Qt::InputMethodHints hints)
m_fepState->SetPermittedCases(flags);
ReportAknEdStateEvent(MAknEdStateObserver::EAknEdwinStateCaseModeUpdate);
- flags = 0;
+ if (QSysInfo::s60Version() > QSysInfo::SV_S60_5_0)
+ flags = QT_EAknEditorFlagSelectionVisible;
+ else
+ flags = 0;
if (hints & ImhUppercaseOnly && !(hints & ImhLowercaseOnly)
|| hints & ImhLowercaseOnly && !(hints & ImhUppercaseOnly)) {
flags |= EAknEditorFlagFixedCase;
diff --git a/src/gui/itemviews/qitemselectionmodel.cpp b/src/gui/itemviews/qitemselectionmodel.cpp
index d6e68f6..f848321 100644
--- a/src/gui/itemviews/qitemselectionmodel.cpp
+++ b/src/gui/itemviews/qitemselectionmodel.cpp
@@ -292,6 +292,27 @@ static void indexesFromRange(const QItemSelectionRange &range, QModelIndexList &
}
/*!
+ Returns true if the selection range contains no selectable item
+ \since 4.7
+*/
+
+bool QItemSelectionRange::isEmpty() const
+{
+ if (!isValid() || !model())
+ return true;
+
+ for (int column = left(); column <= right(); ++column) {
+ for (int row = top(); row <= bottom(); ++row) {
+ QModelIndex index = model()->index(row, column, parent());
+ Qt::ItemFlags flags = model()->flags(index);
+ if ((flags & Qt::ItemIsSelectable) && (flags & Qt::ItemIsEnabled))
+ return false;
+ }
+ }
+ return true;
+}
+
+/*!
Returns the list of model index items stored in the selection.
*/
diff --git a/src/gui/itemviews/qitemselectionmodel.h b/src/gui/itemviews/qitemselectionmodel.h
index 9980d0f..436514f 100644
--- a/src/gui/itemviews/qitemselectionmodel.h
+++ b/src/gui/itemviews/qitemselectionmodel.h
@@ -108,6 +108,8 @@ public:
&& top() <= bottom() && left() <= right());
}
+ bool isEmpty() const;
+
QModelIndexList indexes() const;
private:
diff --git a/src/gui/itemviews/qtableview.cpp b/src/gui/itemviews/qtableview.cpp
index 31be224..80334a6 100644
--- a/src/gui/itemviews/qtableview.cpp
+++ b/src/gui/itemviews/qtableview.cpp
@@ -1846,7 +1846,9 @@ void QTableView::setSelection(const QRect &rect, QItemSelectionModel::SelectionF
selection.append(QItemSelectionRange(topLeft, bottomRight));
}
} else { // nothing moved
- selection.append(QItemSelectionRange(tl, br));
+ QItemSelectionRange range(tl, br);
+ if (!range.isEmpty())
+ selection.append(range);
}
d->selectionModel->select(selection, command);
diff --git a/src/gui/itemviews/qtreeview.cpp b/src/gui/itemviews/qtreeview.cpp
index d934683..b797776 100644
--- a/src/gui/itemviews/qtreeview.cpp
+++ b/src/gui/itemviews/qtreeview.cpp
@@ -3194,12 +3194,16 @@ void QTreeViewPrivate::layout(int i, bool recursiveExpanding, bool afterIsUninit
int QTreeViewPrivate::pageUp(int i) const
{
int index = itemAtCoordinate(coordinateForItem(i) - viewport->height());
+ while (isItemHiddenOrDisabled(index))
+ index--;
return index == -1 ? 0 : index;
}
int QTreeViewPrivate::pageDown(int i) const
{
int index = itemAtCoordinate(coordinateForItem(i) + viewport->height());
+ while (isItemHiddenOrDisabled(index))
+ index++;
return index == -1 ? viewItems.count() - 1 : index;
}
@@ -3424,25 +3428,6 @@ int QTreeViewPrivate::columnAt(int x) const
return header->logicalIndexAt(x);
}
-void QTreeViewPrivate::relayout(const QModelIndex &parent)
-{
- Q_Q(QTreeView);
- // do a local relayout of the items
- if (parent.isValid()) {
- int parentViewIndex = viewIndex(parent);
- if (parentViewIndex > -1 && viewItems.at(parentViewIndex).expanded) {
- collapse(parentViewIndex, false); // remove the current layout
- expand(parentViewIndex, false); // do the relayout
- q->updateGeometries();
- viewport->update();
- }
- } else {
- viewItems.clear();
- q->doItemsLayout();
- }
-}
-
-
void QTreeViewPrivate::updateScrollBars()
{
Q_Q(QTreeView);
diff --git a/src/gui/itemviews/qtreeview_p.h b/src/gui/itemviews/qtreeview_p.h
index 261af31..cbbfd0e 100644
--- a/src/gui/itemviews/qtreeview_p.h
+++ b/src/gui/itemviews/qtreeview_p.h
@@ -150,7 +150,6 @@ public:
int columnAt(int x) const;
bool hasVisibleChildren( const QModelIndex& parent) const;
- void relayout(const QModelIndex &parent);
bool expandOrCollapseItemAtPos(const QPoint &pos);
void updateScrollBars();
diff --git a/src/gui/itemviews/qtreewidget.cpp b/src/gui/itemviews/qtreewidget.cpp
index 19ed10b..4c80325 100644
--- a/src/gui/itemviews/qtreewidget.cpp
+++ b/src/gui/itemviews/qtreewidget.cpp
@@ -3039,10 +3039,14 @@ QList<QTreeWidgetItem*> QTreeWidget::selectedItems() const
Q_D(const QTreeWidget);
QModelIndexList indexes = selectionModel()->selectedIndexes();
QList<QTreeWidgetItem*> items;
+ items.reserve(indexes.count());
+ QSet<QTreeWidgetItem *> seen;
+ seen.reserve(indexes.count());
for (int i = 0; i < indexes.count(); ++i) {
QTreeWidgetItem *item = d->item(indexes.at(i));
- if (isItemHidden(item) || items.contains(item)) // ### slow, optimize later
+ if (isItemHidden(item) || seen.contains(item))
continue;
+ seen.insert(item);
items.append(item);
}
return items;
diff --git a/src/gui/kernel/qaction.cpp b/src/gui/kernel/qaction.cpp
index 8ddd051..a6d2594 100644
--- a/src/gui/kernel/qaction.cpp
+++ b/src/gui/kernel/qaction.cpp
@@ -81,6 +81,7 @@ static QString qt_strippedText(QString s)
QActionPrivate::QActionPrivate() : group(0), enabled(1), forceDisabled(0),
visible(1), forceInvisible(0), checkable(0), checked(0), separator(0), fontSet(false),
+ forceEnabledInSoftkeys(false), menuActionSoftkeys(false),
menuRole(QAction::TextHeuristicRole), softKeyRole(QAction::NoSoftKey),
priority(QAction::NormalPriority), iconVisibleInMenu(-1)
{
diff --git a/src/gui/kernel/qaction_p.h b/src/gui/kernel/qaction_p.h
index b57e5d2..899b01b 100644
--- a/src/gui/kernel/qaction_p.h
+++ b/src/gui/kernel/qaction_p.h
@@ -75,6 +75,11 @@ public:
QActionPrivate();
~QActionPrivate();
+ static QActionPrivate *get(QAction *q)
+ {
+ return q->d_func();
+ }
+
bool showStatusText(QWidget *w, const QString &str);
QPointer<QActionGroup> group;
@@ -103,10 +108,16 @@ public:
uint checked : 1;
uint separator : 1;
uint fontSet : 1;
- QAction::MenuRole menuRole;
- QAction::SoftKeyRole softKeyRole;
- QAction::Priority priority;
+
+ //for soft keys management
+ uint forceEnabledInSoftkeys : 1;
+ uint menuActionSoftkeys : 1;
+
+ QAction::MenuRole menuRole : 3;
+ QAction::SoftKeyRole softKeyRole : 2;
+ QAction::Priority priority : 14;
int iconVisibleInMenu : 3; // Only has values -1, 0, and 1
+
QList<QWidget *> widgets;
#ifndef QT_NO_GRAPHICSVIEW
QList<QGraphicsWidget *> graphicsWidgets;
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
index b0a23d4..5f5e29f 100644
--- a/src/gui/kernel/qapplication.cpp
+++ b/src/gui/kernel/qapplication.cpp
@@ -186,11 +186,9 @@ QApplicationPrivate::QApplicationPrivate(int &argc, char **argv, QApplication::T
gestureManager = 0;
gestureWidget = 0;
-#if defined(Q_WS_X11) || defined(Q_WS_WIN)
move_cursor = 0;
copy_cursor = 0;
link_cursor = 0;
-#endif
#if defined(Q_WS_WIN)
ignore_cursor = 0;
#endif
@@ -1045,11 +1043,9 @@ QApplication::~QApplication()
qt_clipboard = 0;
#endif
-#if defined(Q_WS_X11) || defined(Q_WS_WIN)
delete d->move_cursor; d->move_cursor = 0;
delete d->copy_cursor; d->copy_cursor = 0;
delete d->link_cursor; d->link_cursor = 0;
-#endif
#if defined(Q_WS_WIN)
delete d->ignore_cursor; d->ignore_cursor = 0;
#endif
diff --git a/src/gui/kernel/qsoftkeymanager.cpp b/src/gui/kernel/qsoftkeymanager.cpp
index 23f1481..04e4685 100644
--- a/src/gui/kernel/qsoftkeymanager.cpp
+++ b/src/gui/kernel/qsoftkeymanager.cpp
@@ -43,7 +43,7 @@
#include "qevent.h"
#include "qbitmap.h"
#include "private/qsoftkeymanager_p.h"
-#include "private/qobject_p.h"
+#include "private/qaction_p.h"
#include "private/qsoftkeymanager_common_p.h"
#ifdef Q_WS_S60
@@ -104,7 +104,7 @@ QAction *QSoftKeyManager::createAction(StandardSoftKey standardKey, QWidget *act
QAction::SoftKeyRole softKeyRole = QAction::NoSoftKey;
switch (standardKey) {
case MenuSoftKey: // FALL-THROUGH
- action->setProperty(MENU_ACTION_PROPERTY, QVariant(true)); // TODO: can be refactored away to use _q_action_menubar
+ QActionPrivate::get(action)->menuActionSoftkeys = true;
case OkSoftKey:
case SelectSoftKey:
case DoneSoftKey:
@@ -255,16 +255,12 @@ bool QSoftKeyManager::handleUpdateSoftKeys()
void QSoftKeyManager::setForceEnabledInSoftkeys(QAction *action)
{
- action->setProperty(FORCE_ENABLED_PROPERTY, QVariant(true));
+ QActionPrivate::get(action)->forceEnabledInSoftkeys = true;
}
bool QSoftKeyManager::isForceEnabledInSofkeys(QAction *action)
{
- bool ret = false;
- QVariant property = action->property(FORCE_ENABLED_PROPERTY);
- if (property.isValid() && property.toBool())
- ret = true;
- return ret;
+ return QActionPrivate::get(action)->forceEnabledInSoftkeys;
}
bool QSoftKeyManager::event(QEvent *e)
diff --git a/src/gui/kernel/qsoftkeymanager_p.h b/src/gui/kernel/qsoftkeymanager_p.h
index a5b258b..6eedfa8 100644
--- a/src/gui/kernel/qsoftkeymanager_p.h
+++ b/src/gui/kernel/qsoftkeymanager_p.h
@@ -63,9 +63,6 @@ QT_BEGIN_NAMESPACE
class QSoftKeyManagerPrivate;
-const char MENU_ACTION_PROPERTY[] = "_q_menuAction";
-const char FORCE_ENABLED_PROPERTY[] = "_q_forceEnabledInSoftkeys";
-
class Q_AUTOTEST_EXPORT QSoftKeyManager : public QObject
{
Q_OBJECT
diff --git a/src/gui/kernel/qsoftkeymanager_s60.cpp b/src/gui/kernel/qsoftkeymanager_s60.cpp
index c0761f0..e4990b1 100644
--- a/src/gui/kernel/qsoftkeymanager_s60.cpp
+++ b/src/gui/kernel/qsoftkeymanager_s60.cpp
@@ -46,6 +46,7 @@
#include "qmenubar.h"
#include "private/qt_s60_p.h"
#include "private/qmenu_p.h"
+#include "private/qaction_p.h"
#include "private/qsoftkeymanager_p.h"
#include "private/qsoftkeymanager_s60_p.h"
#include "private/qobject_p.h"
@@ -382,8 +383,8 @@ bool QSoftKeyManagerPrivateS60::handleCommand(int command)
{
QAction *action = realSoftKeyActions.value(command);
if (action) {
- QVariant property = action->property(MENU_ACTION_PROPERTY);
- if (property.isValid() && property.toBool()) {
+ bool property = QActionPrivate::get(action)->menuActionSoftkeys;
+ if (property) {
QT_TRAP_THROWING(tryDisplayMenuBarL());
} else if (action->menu()) {
// TODO: This is hack, in order to use exising QMenuBar implementation for Symbian
diff --git a/src/gui/painting/qbezier.cpp b/src/gui/painting/qbezier.cpp
index ea7fe4f..a08c79e 100644
--- a/src/gui/painting/qbezier.cpp
+++ b/src/gui/painting/qbezier.cpp
@@ -117,8 +117,8 @@ QBezier QBezier::mapBy(const QTransform &transform) const
return QBezier::fromPoints(transform.map(pt1()), transform.map(pt2()), transform.map(pt3()), transform.map(pt4()));
}
-//0.5 is really low
-static const qreal flatness = 0.5;
+//0.05 is really low, but required for scaled-up beziers...
+static const qreal flatness = 0.05;
//based on "Fast, precise flattening of cubic Bezier path and offset curves"
// by T. F. Hain, A. L. Ahmad, S. V. R. Racherla and D. D. Langan
diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp
index 917b910..b440fce 100644
--- a/src/gui/painting/qdrawhelper.cpp
+++ b/src/gui/painting/qdrawhelper.cpp
@@ -70,8 +70,10 @@ static uint gccBug(uint value)
constants and structures
*/
-static const int fixed_scale = 1 << 16;
-static const int half_point = 1 << 15;
+enum {
+ fixed_scale = 1 << 16,
+ half_point = 1 << 15
+};
static const int buffer_size = 2048;
struct LinearGradientValues
@@ -691,37 +693,42 @@ const uint * QT_FASTCALL fetchTransformedBilinear(uint *buffer, const Operator *
fy -= half_point;
while (b < end) {
int x1 = (fx >> 16);
- int x2 = x1 + 1;
+ int x2;
int y1 = (fy >> 16);
- int y2 = y1 + 1;
-
- int distx = ((fx - (x1 << 16)) >> 8);
- int disty = ((fy - (y1 << 16)) >> 8);
- int idistx = 256 - distx;
- int idisty = 256 - disty;
+ int y2;
if (blendType == BlendTransformedBilinearTiled) {
x1 %= image_width;
+ if (x1 < 0) x1 += image_width;
+ x2 = x1 + 1;
x2 %= image_width;
- y1 %= image_height;
- y2 %= image_height;
- if (x1 < 0) x1 += image_width;
- if (x2 < 0) x2 += image_width;
+ y1 %= image_height;
if (y1 < 0) y1 += image_height;
- if (y2 < 0) y2 += image_height;
-
- Q_ASSERT(x1 >= 0 && x1 < image_width);
- Q_ASSERT(x2 >= 0 && x2 < image_width);
- Q_ASSERT(y1 >= 0 && y1 < image_height);
- Q_ASSERT(y2 >= 0 && y2 < image_height);
+ y2 = y1 + 1;
+ y2 %= image_height;
} else {
- x1 = qBound(0, x1, image_width - 1);
- x2 = qBound(0, x2, image_width - 1);
- y1 = qBound(0, y1, image_height - 1);
- y2 = qBound(0, y2, image_height - 1);
+ if (x1 < 0) {
+ x2 = x1 = 0;
+ } else if (x1 >= image_width - 1) {
+ x2 = x1 = image_width - 1;
+ } else {
+ x2 = x1 + 1;
+ }
+ if (y1 < 0) {
+ y2 = y1 = 0;
+ } else if (y1 >= image_height - 1) {
+ y2 = y1 = image_height - 1;
+ } else {
+ y2 = y1 + 1;
+ }
}
+ Q_ASSERT(x1 >= 0 && x1 < image_width);
+ Q_ASSERT(x2 >= 0 && x2 < image_width);
+ Q_ASSERT(y1 >= 0 && y1 < image_height);
+ Q_ASSERT(y2 >= 0 && y2 < image_height);
+
const uchar *s1 = data->texture.scanLine(y1);
const uchar *s2 = data->texture.scanLine(y2);
@@ -730,6 +737,11 @@ const uint * QT_FASTCALL fetchTransformedBilinear(uint *buffer, const Operator *
uint bl = fetch(s2, x1, data->texture.colorTable);
uint br = fetch(s2, x2, data->texture.colorTable);
+ int distx = (fx & 0x0000ffff) >> 8;
+ int disty = (fy & 0x0000ffff) >> 8;
+ int idistx = 256 - distx;
+ int idisty = 256 - disty;
+
uint xtop = INTERPOLATE_PIXEL_256(tl, idistx, tr, distx);
uint xbot = INTERPOLATE_PIXEL_256(bl, idistx, br, distx);
*b = INTERPOLATE_PIXEL_256(xtop, idisty, xbot, disty);
@@ -753,9 +765,9 @@ const uint * QT_FASTCALL fetchTransformedBilinear(uint *buffer, const Operator *
const qreal py = fy * iw - 0.5;
int x1 = int(px) - (px < 0);
- int x2 = x1 + 1;
+ int x2;
int y1 = int(py) - (py < 0);
- int y2 = y1 + 1;
+ int y2;
int distx = int((px - x1) * 256);
int disty = int((py - y1) * 256);
@@ -764,26 +776,36 @@ const uint * QT_FASTCALL fetchTransformedBilinear(uint *buffer, const Operator *
if (blendType == BlendTransformedBilinearTiled) {
x1 %= image_width;
+ if (x1 < 0) x1 += image_width;
+ x2 = x1 + 1;
x2 %= image_width;
- y1 %= image_height;
- y2 %= image_height;
- if (x1 < 0) x1 += image_width;
- if (x2 < 0) x2 += image_width;
+ y1 %= image_height;
if (y1 < 0) y1 += image_height;
- if (y2 < 0) y2 += image_height;
-
- Q_ASSERT(x1 >= 0 && x1 < image_width);
- Q_ASSERT(x2 >= 0 && x2 < image_width);
- Q_ASSERT(y1 >= 0 && y1 < image_height);
- Q_ASSERT(y2 >= 0 && y2 < image_height);
+ y2 = y1 + 1;
+ y2 %= image_height;
} else {
- x1 = qBound(0, x1, image_width - 1);
- x2 = qBound(0, x2, image_width - 1);
- y1 = qBound(0, y1, image_height - 1);
- y2 = qBound(0, y2, image_height - 1);
+ if (x1 < 0) {
+ x2 = x1 = 0;
+ } else if (x1 >= image_width - 1) {
+ x2 = x1 = image_width - 1;
+ } else {
+ x2 = x1 + 1;
+ }
+ if (y1 < 0) {
+ y2 = y1 = 0;
+ } else if (y1 >= image_height - 1) {
+ y2 = y1 = image_height - 1;
+ } else {
+ y2 = y1 + 1;
+ }
}
+ Q_ASSERT(x1 >= 0 && x1 < image_width);
+ Q_ASSERT(x2 >= 0 && x2 < image_width);
+ Q_ASSERT(y1 >= 0 && y1 < image_height);
+ Q_ASSERT(y2 >= 0 && y2 < image_height);
+
const uchar *s1 = data->texture.scanLine(y1);
const uchar *s2 = data->texture.scanLine(y2);
@@ -5141,7 +5163,7 @@ static void blend_tiled_rgb444(int count, const QSpan *spans, void *userData)
}
-template <SpanMethod spanMethod>
+template <SpanMethod spanMethod, TextureBlendType blendType> /* blendType must be either BlendTransformedBilinear or BlendTransformedBilinearTiled */
Q_STATIC_TEMPLATE_FUNCTION void blend_transformed_bilinear_argb(int count, const QSpan *spans, void *userData)
{
QSpanData *data = reinterpret_cast<QSpanData *>(userData);
@@ -5154,10 +5176,12 @@ Q_STATIC_TEMPLATE_FUNCTION void blend_transformed_bilinear_argb(int count, const
CompositionFunction func = functionForMode[data->rasterBuffer->compositionMode];
uint buffer[buffer_size];
- int image_x1 = data->texture.x1;
- int image_y1 = data->texture.y1;
- int image_x2 = data->texture.x2;
- int image_y2 = data->texture.y2;
+ const int image_x1 = data->texture.x1;
+ const int image_y1 = data->texture.y1;
+ const int image_x2 = data->texture.x2;
+ const int image_y2 = data->texture.y2;
+ const int image_width = data->texture.width;
+ const int image_height = data->texture.height;
const int scanline_offset = data->texture.bytesPerLine / 4;
if (data->fast_matrix) {
@@ -5187,19 +5211,41 @@ Q_STATIC_TEMPLATE_FUNCTION void blend_transformed_bilinear_argb(int count, const
uint *b = buffer;
while (b < end) {
int x1 = (x >> 16);
- int x2 = x1 + 1;
+ int x2;
int y1 = (y >> 16);
- int y2 = y1 + 1;
-
- int distx = ((x - (x1 << 16)) >> 8);
- int disty = ((y - (y1 << 16)) >> 8);
- int idistx = 256 - distx;
- int idisty = 256 - disty;
-
- x1 = qBound(image_x1, x1, image_x2 - 1);
- x2 = qBound(image_x1, x2, image_x2 - 1);
- y1 = qBound(image_y1, y1, image_y2 - 1);
- y2 = qBound(image_y1, y2, image_y2 - 1);
+ int y2;
+
+ if (blendType == BlendTransformedBilinearTiled) {
+ x1 %= image_width;
+ if (x1 < 0) x1 += image_width;
+ x2 = x1 + 1;
+ x2 %= image_width;
+
+ y1 %= image_height;
+ if (y1 < 0) y1 += image_height;
+ y2 = y1 + 1;
+ y2 %= image_height;
+
+ Q_ASSERT(x1 >= 0 && x1 < image_width);
+ Q_ASSERT(x2 >= 0 && x2 < image_width);
+ Q_ASSERT(y1 >= 0 && y1 < image_height);
+ Q_ASSERT(y2 >= 0 && y2 < image_height);
+ } else {
+ if (x1 < image_x1) {
+ x2 = x1 = image_x1;
+ } else if (x1 >= image_x2 - 1) {
+ x2 = x1 = image_x2 - 1;
+ } else {
+ x2 = x1 + 1;
+ }
+ if (y1 < image_y1) {
+ y2 = y1 = image_y1;
+ } else if (y1 >= image_y2 - 1) {
+ y2 = y1 = image_y2 - 1;
+ } else {
+ y2 = y1 + 1;
+ }
+ }
int y1_offset = y1 * scanline_offset;
int y2_offset = y2 * scanline_offset;
@@ -5216,6 +5262,11 @@ Q_STATIC_TEMPLATE_FUNCTION void blend_transformed_bilinear_argb(int count, const
uint br = image_bits[y2_offset + x2];
#endif
+ int distx = (x & 0x0000ffff) >> 8;
+ int disty = (y & 0x0000ffff) >> 8;
+ int idistx = 256 - distx;
+ int idisty = 256 - disty;
+
uint xtop = INTERPOLATE_PIXEL_256(tl, idistx, tr, distx);
uint xbot = INTERPOLATE_PIXEL_256(bl, idistx, br, distx);
*b = INTERPOLATE_PIXEL_256(xtop, idisty, xbot, disty);
@@ -5265,19 +5316,46 @@ Q_STATIC_TEMPLATE_FUNCTION void blend_transformed_bilinear_argb(int count, const
const qreal py = y * iw - 0.5;
int x1 = int(px) - (px < 0);
- int x2 = x1 + 1;
+ int x2;
int y1 = int(py) - (py < 0);
- int y2 = y1 + 1;
+ int y2;
int distx = int((px - x1) * 256);
int disty = int((py - y1) * 256);
int idistx = 256 - distx;
int idisty = 256 - disty;
- x1 = qBound(image_x1, x1, image_x2 - 1);
- x2 = qBound(image_x1, x2, image_x2 - 1);
- y1 = qBound(image_y1, y1, image_y2 - 1);
- y2 = qBound(image_y1, y2, image_y2 - 1);
+ if (blendType == BlendTransformedBilinearTiled) {
+ x1 %= image_width;
+ if (x1 < 0) x1 += image_width;
+ x2 = x1 + 1;
+ x2 %= image_width;
+
+ y1 %= image_height;
+ if (y1 < 0) y1 += image_height;
+ y2 = y1 + 1;
+ y2 %= image_height;
+
+ Q_ASSERT(x1 >= 0 && x1 < image_width);
+ Q_ASSERT(x2 >= 0 && x2 < image_width);
+ Q_ASSERT(y1 >= 0 && y1 < image_height);
+ Q_ASSERT(y2 >= 0 && y2 < image_height);
+ } else {
+ if (x1 < image_x1) {
+ x2 = x1 = image_x1;
+ } else if (x1 >= image_x2 - 1) {
+ x2 = x1 = image_x2 - 1;
+ } else {
+ x2 = x1 + 1;
+ }
+ if (y1 < image_y1) {
+ y2 = y1 = image_y1;
+ } else if (y1 >= image_y2 - 1) {
+ y2 = y1 = image_y2 - 1;
+ } else {
+ y2 = y1 + 1;
+ }
+ }
int y1_offset = y1 * scanline_offset;
int y2_offset = y2 * scanline_offset;
@@ -5366,17 +5444,27 @@ Q_STATIC_TEMPLATE_FUNCTION void blendTransformedBilinear(int count, const QSpan
SRC *b = buffer;
while (b < end) {
int x1 = (x >> 16);
- int x2 = x1 + 1;
+ int x2;
int y1 = (y >> 16);
- int y2 = y1 + 1;
+ int y2;
- const int distx = ((x - (x1 << 16)) >> 8);
- const int disty = ((y - (y1 << 16)) >> 8);
- x1 = qBound(src_minx, x1, src_maxx);
- x2 = qBound(src_minx, x2, src_maxx);
- y1 = qBound(src_miny, y1, src_maxy);
- y2 = qBound(src_miny, y2, src_maxy);
+ const int distx = (x & 0x0000ffff) >> 8;
+ const int disty = (y & 0x0000ffff) >> 8;
+ if (x1 < src_minx) {
+ x2 = x1 = src_minx;
+ } else if (x1 >= src_maxx) {
+ x2 = x1 = src_maxx;
+ } else {
+ x2 = x1 + 1;
+ }
+ if (y1 < src_miny) {
+ y2 = y1 = src_miny;
+ } else if (y1 >= src_maxy) {
+ y2 = y1 = src_maxy;
+ } else {
+ y2 = y1 + 1;
+ }
#if 0
if (x1 == x2) {
if (y1 == y2) {
@@ -5467,17 +5555,27 @@ Q_STATIC_TEMPLATE_FUNCTION void blendTransformedBilinear(int count, const QSpan
const qreal py = y * iw - qreal(0.5);
int x1 = int(px) - (px < 0);
- int x2 = x1 + 1;
+ int x2;
int y1 = int(py) - (py < 0);
- int y2 = y1 + 1;
+ int y2;
const int distx = int((px - x1) * 256);
const int disty = int((py - y1) * 256);
- x1 = qBound(src_minx, x1, src_maxx);
- x2 = qBound(src_minx, x2, src_maxx);
- y1 = qBound(src_miny, y1, src_maxy);
- y2 = qBound(src_miny, y2, src_maxy);
+ if (x1 < src_minx) {
+ x2 = x1 = src_minx;
+ } else if (x1 >= src_maxx) {
+ x2 = x1 = src_maxx;
+ } else {
+ x2 = x1 + 1;
+ }
+ if (y1 < src_miny) {
+ y2 = y1 = src_miny;
+ } else if (y1 >= src_maxy) {
+ y2 = y1 = src_maxy;
+ } else {
+ y2 = y1 + 1;
+ }
const SRC *src1 = (SRC*)data->texture.scanLine(y1);
const SRC *src2 = (SRC*)data->texture.scanLine(y2);
@@ -5646,197 +5744,6 @@ static void blend_transformed_bilinear_rgb444(int count, const QSpan *spans, voi
}
template <SpanMethod spanMethod>
-Q_STATIC_TEMPLATE_FUNCTION void blend_transformed_bilinear_tiled_argb(int count, const QSpan *spans, void *userData)
-{
- QSpanData *data = reinterpret_cast<QSpanData *>(userData);
- if (data->texture.format != QImage::Format_ARGB32_Premultiplied
- && data->texture.format != QImage::Format_RGB32) {
- blend_src_generic<spanMethod>(count, spans, userData);
- return;
- }
-
- CompositionFunction func = functionForMode[data->rasterBuffer->compositionMode];
- uint buffer[buffer_size];
-
- int image_width = data->texture.width;
- int image_height = data->texture.height;
- const int scanline_offset = data->texture.bytesPerLine / 4;
-
- if (data->fast_matrix) {
- // The increment pr x in the scanline
- int fdx = (int)(data->m11 * fixed_scale);
- int fdy = (int)(data->m12 * fixed_scale);
-
- while (count--) {
- void *t = data->rasterBuffer->scanLine(spans->y);
-
- uint *target = ((uint *)t) + spans->x;
- uint *image_bits = (uint *)data->texture.imageData;
-
- const qreal cx = spans->x + 0.5;
- const qreal cy = spans->y + 0.5;
-
- int x = int((data->m21 * cy
- + data->m11 * cx + data->dx) * fixed_scale) - half_point;
- int y = int((data->m22 * cy
- + data->m12 * cx + data->dy) * fixed_scale) - half_point;
-
- int length = spans->len;
- const int coverage = (spans->coverage * data->texture.const_alpha) >> 8;
- while (length) {
- int l = qMin(length, buffer_size);
- const uint *end = buffer + l;
- uint *b = buffer;
- while (b < end) {
- int x1 = (x >> 16);
- int x2 = (x1 + 1);
- int y1 = (y >> 16);
- int y2 = (y1 + 1);
-
- int distx = ((x - (x1 << 16)) >> 8);
- int disty = ((y - (y1 << 16)) >> 8);
- int idistx = 256 - distx;
- int idisty = 256 - disty;
-
- x1 %= image_width;
- x2 %= image_width;
- y1 %= image_height;
- y2 %= image_height;
-
- if (x1 < 0) x1 += image_width;
- if (x2 < 0) x2 += image_width;
- if (y1 < 0) y1 += image_height;
- if (y2 < 0) y2 += image_height;
-
- Q_ASSERT(x1 >= 0 && x1 < image_width);
- Q_ASSERT(x2 >= 0 && x2 < image_width);
- Q_ASSERT(y1 >= 0 && y1 < image_height);
- Q_ASSERT(y2 >= 0 && y2 < image_height);
-
- int y1_offset = y1 * scanline_offset;
- int y2_offset = y2 * scanline_offset;
-
-#if defined(Q_IRIX_GCC3_3_WORKAROUND)
- uint tl = gccBug(image_bits[y1_offset + x1]);
- uint tr = gccBug(image_bits[y1_offset + x2]);
- uint bl = gccBug(image_bits[y2_offset + x1]);
- uint br = gccBug(image_bits[y2_offset + x2]);
-#else
- uint tl = image_bits[y1_offset + x1];
- uint tr = image_bits[y1_offset + x2];
- uint bl = image_bits[y2_offset + x1];
- uint br = image_bits[y2_offset + x2];
-#endif
-
- uint xtop = INTERPOLATE_PIXEL_256(tl, idistx, tr, distx);
- uint xbot = INTERPOLATE_PIXEL_256(bl, idistx, br, distx);
- *b = INTERPOLATE_PIXEL_256(xtop, idisty, xbot, disty);
- ++b;
- x += fdx;
- y += fdy;
- }
- if (spanMethod == RegularSpans)
- func(target, buffer, l, coverage);
- else
- drawBufferSpan(data, buffer, buffer_size,
- spans->x + spans->len - length,
- spans->y, l, coverage);
- target += l;
- length -= l;
- }
- ++spans;
- }
- } else {
- const qreal fdx = data->m11;
- const qreal fdy = data->m12;
- const qreal fdw = data->m13;
- while (count--) {
- void *t = data->rasterBuffer->scanLine(spans->y);
-
- uint *target = ((uint *)t) + spans->x;
- uint *image_bits = (uint *)data->texture.imageData;
-
- const qreal cx = spans->x + 0.5;
- const qreal cy = spans->y + 0.5;
-
- qreal x = data->m21 * cy + data->m11 * cx + data->dx;
- qreal y = data->m22 * cy + data->m12 * cx + data->dy;
- qreal w = data->m23 * cy + data->m13 * cx + data->m33;
-
- int length = spans->len;
- const int coverage = (spans->coverage * data->texture.const_alpha) >> 8;
- while (length) {
- int l = qMin(length, buffer_size);
- const uint *end = buffer + l;
- uint *b = buffer;
- while (b < end) {
- const qreal iw = w == 0 ? 1 : 1 / w;
- const qreal px = x * iw - 0.5;
- const qreal py = y * iw - 0.5;
-
- int x1 = int(px) - (px < 0);
- int x2 = x1 + 1;
- int y1 = int(py) - (py < 0);
- int y2 = y1 + 1;
-
- int distx = int((px - x1) * 256);
- int disty = int((py - y1) * 256);
- int idistx = 256 - distx;
- int idisty = 256 - disty;
-
- x1 %= image_width;
- x2 %= image_width;
- y1 %= image_height;
- y2 %= image_height;
-
- if (x1 < 0) x1 += image_width;
- if (x2 < 0) x2 += image_width;
- if (y1 < 0) y1 += image_height;
- if (y2 < 0) y2 += image_height;
-
- Q_ASSERT(x1 >= 0 && x1 < image_width);
- Q_ASSERT(x2 >= 0 && x2 < image_width);
- Q_ASSERT(y1 >= 0 && y1 < image_height);
- Q_ASSERT(y2 >= 0 && y2 < image_height);
-
- int y1_offset = y1 * scanline_offset;
- int y2_offset = y2 * scanline_offset;
-
-#if defined(Q_IRIX_GCC3_3_WORKAROUND)
- uint tl = gccBug(image_bits[y1_offset + x1]);
- uint tr = gccBug(image_bits[y1_offset + x2]);
- uint bl = gccBug(image_bits[y2_offset + x1]);
- uint br = gccBug(image_bits[y2_offset + x2]);
-#else
- uint tl = image_bits[y1_offset + x1];
- uint tr = image_bits[y1_offset + x2];
- uint bl = image_bits[y2_offset + x1];
- uint br = image_bits[y2_offset + x2];
-#endif
-
- uint xtop = INTERPOLATE_PIXEL_256(tl, idistx, tr, distx);
- uint xbot = INTERPOLATE_PIXEL_256(bl, idistx, br, distx);
- *b = INTERPOLATE_PIXEL_256(xtop, idisty, xbot, disty);
- ++b;
- x += fdx;
- y += fdy;
- w += fdw;
- }
- if (spanMethod == RegularSpans)
- func(target, buffer, l, coverage);
- else
- drawBufferSpan(data, buffer, buffer_size,
- spans->x + spans->len - length,
- spans->y, l, coverage);
- target += l;
- length -= l;
- }
- ++spans;
- }
- }
-}
-
-template <SpanMethod spanMethod>
Q_STATIC_TEMPLATE_FUNCTION void blend_transformed_argb(int count, const QSpan *spans, void *userData)
{
QSpanData *data = reinterpret_cast<QSpanData *>(userData);
@@ -6738,7 +6645,7 @@ static const ProcessSpans processTextureSpans[NBlendTypes][QImage::NImageFormats
SPANFUNC_POINTER(blend_src_generic, RegularSpans), // Indexed8
SPANFUNC_POINTER(blend_src_generic, RegularSpans), // RGB32
SPANFUNC_POINTER(blend_src_generic, RegularSpans), // ARGB32
- SPANFUNC_POINTER(blend_transformed_bilinear_argb, RegularSpans), // ARGB32_Premultiplied
+ blend_transformed_bilinear_argb<RegularSpans, BlendTransformedBilinear>, // ARGB32_Premultiplied
blend_transformed_bilinear_rgb565,
blend_transformed_bilinear_argb8565,
blend_transformed_bilinear_rgb666,
@@ -6757,7 +6664,7 @@ static const ProcessSpans processTextureSpans[NBlendTypes][QImage::NImageFormats
SPANFUNC_POINTER(blend_src_generic, RegularSpans), // Indexed8
SPANFUNC_POINTER(blend_src_generic, RegularSpans), // RGB32
SPANFUNC_POINTER(blend_src_generic, RegularSpans), // ARGB32
- SPANFUNC_POINTER(blend_transformed_bilinear_tiled_argb, RegularSpans), // ARGB32_Premultiplied
+ blend_transformed_bilinear_argb<RegularSpans, BlendTransformedBilinearTiled>, // ARGB32_Premultiplied
SPANFUNC_POINTER(blend_src_generic, RegularSpans), // RGB16
SPANFUNC_POINTER(blend_src_generic, RegularSpans), // ARGB8565_Premultiplied
SPANFUNC_POINTER(blend_src_generic, RegularSpans), // RGB666
@@ -6856,7 +6763,7 @@ static const ProcessSpans processTextureSpansCallback[NBlendTypes][QImage::NImag
blend_src_generic<CallbackSpans>, // Indexed8
blend_src_generic<CallbackSpans>, // RGB32
blend_src_generic<CallbackSpans>, // ARGB32
- blend_transformed_bilinear_argb<CallbackSpans>, // ARGB32_Premultiplied
+ blend_transformed_bilinear_argb<CallbackSpans, BlendTransformedBilinear>, // ARGB32_Premultiplied
blend_src_generic<CallbackSpans>, // RGB16
blend_src_generic<CallbackSpans>, // ARGB8565_Premultiplied
blend_src_generic<CallbackSpans>, // RGB666
@@ -6875,7 +6782,7 @@ static const ProcessSpans processTextureSpansCallback[NBlendTypes][QImage::NImag
blend_src_generic<CallbackSpans>, // Indexed8
blend_src_generic<CallbackSpans>, // RGB32
blend_src_generic<CallbackSpans>, // ARGB32
- blend_transformed_bilinear_tiled_argb<CallbackSpans>, // ARGB32_Premultiplied
+ blend_transformed_bilinear_argb<CallbackSpans, BlendTransformedBilinearTiled>, // ARGB32_Premultiplied
blend_src_generic<CallbackSpans>, // RGB16
blend_src_generic<CallbackSpans>, // ARGB8565_Premultiplied
blend_src_generic<CallbackSpans>, // RGB666
@@ -7135,6 +7042,11 @@ void qt_build_pow_tables() {
int winSmooth;
if (SystemParametersInfo(0x200C /* SPI_GETFONTSMOOTHINGCONTRAST */, 0, &winSmooth, 0))
smoothing = winSmooth / 1000.0;
+
+ // Safeguard ourselves against corrupt registry values...
+ if (smoothing > 5 || smoothing < 1)
+ smoothing = 1.4;
+
#endif
#ifdef Q_WS_X11
diff --git a/src/gui/painting/qpathclipper.cpp b/src/gui/painting/qpathclipper.cpp
index 949a820..00e74ba 100644
--- a/src/gui/painting/qpathclipper.cpp
+++ b/src/gui/painting/qpathclipper.cpp
@@ -935,10 +935,9 @@ qreal QWingedEdge::delta(int vertex, int a, int b) const
qreal result = b_angle - a_angle;
- if (qFuzzyIsNull(result) || qFuzzyCompare(result, 128))
- return 0;
-
- if (result < 0)
+ if (result >= 128.)
+ return result - 128.;
+ else if (result < 0)
return result + 128.;
else
return result;
diff --git a/src/gui/painting/qtextureglyphcache.cpp b/src/gui/painting/qtextureglyphcache.cpp
index 9eda0ef..631a9cf 100644
--- a/src/gui/painting/qtextureglyphcache.cpp
+++ b/src/gui/painting/qtextureglyphcache.cpp
@@ -79,6 +79,7 @@ void QTextureGlyphCache::populate(QFontEngine *fontEngine, int numGlyphs, const
m_current_fontengine = fontEngine;
const int margin = glyphMargin();
+ const int paddingDoubled = glyphPadding() * 2;
QHash<glyph_t, Coord> listItemCoordinates;
int rowHeight = 0;
@@ -124,7 +125,7 @@ void QTextureGlyphCache::populate(QFontEngine *fontEngine, int numGlyphs, const
if (listItemCoordinates.isEmpty())
return;
- rowHeight += margin * 2;
+ rowHeight += margin * 2 + paddingDoubled;
if (isNull())
createCache(QT_DEFAULT_TEXTURE_GLYPH_CACHE_WIDTH, qt_next_power_of_two(rowHeight));
@@ -138,7 +139,7 @@ void QTextureGlyphCache::populate(QFontEngine *fontEngine, int numGlyphs, const
if (m_cx + c.w > m_w) {
// no room on the current line, start new glyph strip
m_cx = 0;
- m_cy += m_currentRowHeight;
+ m_cy += m_currentRowHeight + paddingDoubled;
m_currentRowHeight = 0; // New row
}
if (m_cy + c.h > m_h) {
@@ -156,7 +157,7 @@ void QTextureGlyphCache::populate(QFontEngine *fontEngine, int numGlyphs, const
fillTexture(c, iter.key());
coords.insert(iter.key(), c);
- m_cx += c.w;
+ m_cx += c.w + paddingDoubled;
++iter;
}
diff --git a/src/gui/painting/qtextureglyphcache_p.h b/src/gui/painting/qtextureglyphcache_p.h
index 8c2f5b4..390fe51 100644
--- a/src/gui/painting/qtextureglyphcache_p.h
+++ b/src/gui/painting/qtextureglyphcache_p.h
@@ -98,6 +98,7 @@ public:
virtual void createTextureData(int width, int height) = 0;
virtual void resizeTextureData(int width, int height) = 0;
virtual int glyphMargin() const { return 0; }
+ virtual int glyphPadding() const { return 0; }
virtual void fillTexture(const Coord &coord, glyph_t glyph) = 0;
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp
index f49acc4..28cbc45 100644
--- a/src/gui/styles/qs60style.cpp
+++ b/src/gui/styles/qs60style.cpp
@@ -122,6 +122,8 @@ QPalette *QS60StylePrivate::m_themePalette = 0;
qint64 QS60StylePrivate::m_webPaletteKey = 0;
+QPointer<QWidget> QS60StylePrivate::m_pressedWidget = 0;
+
const struct QS60StylePrivate::frameElementCenter QS60StylePrivate::m_frameElementsData[] = {
{SE_ButtonNormal, QS60StyleEnums::SP_QsnFrButtonTbCenter},
{SE_ButtonPressed, QS60StyleEnums::SP_QsnFrButtonTbCenterPressed},
@@ -138,6 +140,8 @@ const struct QS60StylePrivate::frameElementCenter QS60StylePrivate::m_frameEleme
{SE_PanelBackground, QS60StyleEnums::SP_QsnFrSetOptCenter},
{SE_ButtonInactive, QS60StyleEnums::SP_QsnFrButtonCenterInactive},
{SE_Editor, QS60StyleEnums::SP_QsnFrInputCenter},
+ {SE_TableItemPressed, QS60StyleEnums::SP_QsnFrGridCenterPressed},
+ {SE_ListItemPressed, QS60StyleEnums::SP_QsnFrListPressed},
};
static const int frameElementsCount =
@@ -294,6 +298,12 @@ void QS60StylePrivate::drawSkinElement(SkinElements element, QPainter *painter,
case SE_DropArea:
drawPart(QS60StyleEnums::SP_QgnGrafOrgBgGrid, painter, rect, flags | SF_PointNorth);
break;
+ case SE_TableItemPressed:
+ drawFrame(SF_TableItemPressed, painter, rect, flags | SF_PointNorth);
+ break;
+ case SE_ListItemPressed:
+ drawFrame(SF_ListItemPressed, painter, rect, flags | SF_PointNorth);
+ break;
default:
break;
}
@@ -939,6 +949,11 @@ bool QS60StylePrivate::canDrawThemeBackground(const QBrush &backgroundBrush, con
backgroundBrush.style() == Qt::NoBrush) ? true : false;
}
+bool QS60StylePrivate::isWidgetPressed(const QWidget *widget)
+{
+ return (widget && widget == m_pressedWidget);
+}
+
/*!
\class QS60Style
\brief The QS60Style class provides a look and feel suitable for applications on S60.
@@ -1424,73 +1439,37 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option,
// draw themed background for table unless background brush has been defined.
if (vopt->backgroundBrush == Qt::NoBrush) {
if (itemView) {
- const QModelIndex index = vopt->index;
- //todo: Draw cell background only once - for the first cell.
- QStyleOptionViewItemV4 voptAdj2 = voptAdj;
- const QModelIndex indexFirst = itemView->model()->index(0, 0);
- const QModelIndex indexLast = itemView->model()->index(
- itemView->model()->rowCount() - 1, itemView->model()->columnCount() -1);
- if (itemView->viewport())
- voptAdj2.rect = QRect( itemView->visualRect(indexFirst).topLeft(),
- itemView->visualRect(indexLast).bottomRight()).intersect(itemView->viewport()->rect());
drawPrimitive(PE_PanelItemViewItem, &voptAdj, painter, widget);
}
} else { QCommonStyle::drawPrimitive(PE_PanelItemViewItem, &voptAdj, painter, widget);}
- // draw the focus rect
- if (isSelected || hasFocus ) {
- QRect highlightRect = option->rect.adjusted(1,1,-1,-1);
- QAbstractItemView::SelectionBehavior selectionBehavior =
- itemView ? itemView->selectionBehavior() : QAbstractItemView::SelectItems;
- if (selectionBehavior != QAbstractItemView::SelectItems) {
- // set highlight rect so that it is continuous from cell to cell, yet sligthly
- // smaller than cell rect
- int xBeginning = 0, yBeginning = 0, xEnd = 0, yEnd = 0;
- if (selectionBehavior == QAbstractItemView::SelectRows) {
- yBeginning = 1; yEnd = -1;
- if (vopt->viewItemPosition == QStyleOptionViewItemV4::Beginning)
- xBeginning = 1;
- else if (vopt->viewItemPosition == QStyleOptionViewItemV4::End)
- xEnd = -1;
- } else if (selectionBehavior == QAbstractItemView::SelectColumns) {
- xBeginning = 1; xEnd = -1;
- if (vopt->viewItemPosition == QStyleOptionViewItemV4::Beginning)
- yBeginning = 1;
- else if (vopt->viewItemPosition == QStyleOptionViewItemV4::End)
- yEnd = -1;
- }
- highlightRect = option->rect.adjusted(xBeginning, yBeginning, xEnd, yEnd);
- }
- if (vopt->showDecorationSelected &&
- (vopt->palette.highlight().color() == QS60StylePrivate::themePalette()->highlight().color()))
- QS60StylePrivate::drawSkinElement(QS60StylePrivate::SE_ListHighlight, painter, highlightRect, flags);
- else
- painter->fillRect(highlightRect, vopt->palette.highlight());
- }
-
// draw the icon
const QIcon::Mode mode = (voptAdj.state & State_Enabled) ? QIcon::Normal : QIcon::Disabled;
- const QIcon::State state = voptAdj.state & State_Open ? QIcon::On : QIcon::Off;
+ const QIcon::State state = (voptAdj.state & State_Open) ? QIcon::On : QIcon::Off;
voptAdj.icon.paint(painter, iconRect, voptAdj.decorationAlignment, mode, state);
// Draw selection check mark. Show check mark only in multi selection modes.
if (itemView) {
const bool singleSelection =
(itemView->selectionMode() == QAbstractItemView::SingleSelection ||
- itemView->selectionMode() == QAbstractItemView::NoSelection);
+ itemView->selectionMode() == QAbstractItemView::NoSelection)||
+ (itemView->selectionModel()->selectedIndexes().count() < 2 );
+
+ const bool selectItemsOnly = (itemView->selectionBehavior() == QAbstractItemView::SelectItems);
+
const QRect selectionRect = subElementRect(SE_ItemViewItemCheckIndicator, &voptAdj, widget);
QStyleOptionViewItemV4 checkMarkOption(voptAdj);
- // Draw selection mark.
- if (voptAdj.state & State_Selected && !singleSelection) {
+ if (selectionRect.isValid())
checkMarkOption.rect = selectionRect;
- drawPrimitive(PE_IndicatorViewItemCheck, &checkMarkOption, painter, widget);
- if ( textRect.right() > selectionRect.left() )
+ // Draw selection mark.
+ if (isSelected && !singleSelection && selectItemsOnly) {
+ proxy()->drawPrimitive(PE_IndicatorViewItemCheck, &checkMarkOption, painter, widget);
+ // @todo: this should happen in the rect retrievel i.e. subElementRect()
+ if (textRect.right() > selectionRect.left())
textRect.setRight(selectionRect.left());
} else if (singleSelection &&
- voptAdj.features & QStyleOptionViewItemV2::HasCheckIndicator &&
- selectionRect.isValid()) {
- checkMarkOption.rect = selectionRect;
+ voptAdj.features & QStyleOptionViewItemV2::HasCheckIndicator) {
checkMarkOption.state = checkMarkOption.state & ~State_HasFocus;
switch (vopt->checkState) {
@@ -2037,7 +2016,10 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti
if (option->palette.highlight().color() == QS60StylePrivate::themePalette()->highlight().color())
if ((qstyleoption_cast<const QStyleOptionFocusRect *>(option) &&
(qobject_cast<const QRadioButton *>(widget) || qobject_cast<const QCheckBox *>(widget))))
- QS60StylePrivate::drawSkinElement(QS60StylePrivate::SE_ListHighlight, painter, option->rect, flags);
+ QS60StylePrivate::drawSkinElement(
+ QS60StylePrivate::isWidgetPressed(widget) ?
+ QS60StylePrivate::SE_ListItemPressed :
+ QS60StylePrivate::SE_ListHighlight, painter, option->rect, flags);
else
commonStyleDraws = true;
}
@@ -2257,6 +2239,57 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti
break;
#ifndef QT_NO_ITEMVIEWS
case PE_PanelItemViewItem:
+ if (const QStyleOptionViewItemV4 *vopt = qstyleoption_cast<const QStyleOptionViewItemV4 *>(option)) {
+ const bool isSelected = (vopt->state & State_Selected);
+ const bool hasFocus = (vopt->state & State_HasFocus);
+ const bool isPressed = QS60StylePrivate::isWidgetPressed(widget);
+
+ if (option->palette.highlight().color() == QS60StylePrivate::themePalette()->highlight().color()) {
+ QRect highlightRect = vopt->rect.adjusted(1,1,-1,-1);
+ const QAbstractItemView *itemView = qobject_cast<const QAbstractItemView *>(widget);
+ QAbstractItemView::SelectionBehavior selectionBehavior =
+ itemView ? itemView->selectionBehavior() : QAbstractItemView::SelectItems;
+ // Set the draw area for highlights (focus, select rect or pressed rect)
+ if (hasFocus || isSelected || isPressed) {
+ if (selectionBehavior != QAbstractItemView::SelectItems) {
+ // set highlight rect so that it is continuous from cell to cell, yet sligthly
+ // smaller than cell rect
+ int xBeginning = 0, yBeginning = 0, xEnd = 0, yEnd = 0;
+ if (selectionBehavior == QAbstractItemView::SelectRows) {
+ yBeginning = 1; yEnd = -1;
+ if (vopt->viewItemPosition == QStyleOptionViewItemV4::Beginning)
+ xBeginning = 1;
+ else if (vopt->viewItemPosition == QStyleOptionViewItemV4::End)
+ xEnd = -1;
+ } else if (selectionBehavior == QAbstractItemView::SelectColumns) {
+ xBeginning = 1; xEnd = -1;
+ if (vopt->viewItemPosition == QStyleOptionViewItemV4::Beginning)
+ yBeginning = 1;
+ else if (vopt->viewItemPosition == QStyleOptionViewItemV4::End)
+ yEnd = -1;
+ }
+ highlightRect = option->rect.adjusted(xBeginning, yBeginning, xEnd, yEnd);
+ }
+ }
+ bool tableView = false;
+ if (itemView && qobject_cast<const QTableView *>(widget))
+ tableView = true;
+
+ QS60StylePrivate::SkinElements element;
+ QRect elementRect = option->rect;
+
+ //draw item is drawn as pressed, if it already has focus.
+ if (isPressed && (hasFocus || isSelected)) {
+ element = tableView ? QS60StylePrivate::SE_TableItemPressed : QS60StylePrivate::SE_ListItemPressed;
+ } else if (hasFocus || (isSelected && selectionBehavior != QAbstractItemView::SelectItems)) {
+ element = QS60StylePrivate::SE_ListHighlight;
+ elementRect = highlightRect;
+ }
+ QS60StylePrivate::drawSkinElement(element, painter, elementRect, flags);
+ } else {
+ QCommonStyle::drawPrimitive(element, option, painter, widget);
+ }
+ }
break;
#endif //QT_NO_ITEMVIEWS
@@ -3067,8 +3100,11 @@ void QS60Style::unpolish(QWidget *widget)
void QS60Style::polish(QApplication *application)
{
Q_D(QS60Style);
+ QCommonStyle::polish(qApp);
d->m_originalPalette = application->palette();
d->setThemePalette(application);
+ if (QS60StylePrivate::isTouchSupported())
+ qApp->installEventFilter(this);
}
/*!
@@ -3077,10 +3113,14 @@ void QS60Style::polish(QApplication *application)
void QS60Style::unpolish(QApplication *application)
{
Q_UNUSED(application)
+
Q_D(QS60Style);
+ QCommonStyle::unpolish(qApp);
const QPalette newPalette = QApplication::style()->standardPalette();
QApplication::setPalette(newPalette);
QApplicationPrivate::setSystemPalette(d->m_originalPalette);
+ if (QS60StylePrivate::isTouchSupported())
+ qApp->removeEventFilter(this);
}
/*!
@@ -3227,9 +3267,40 @@ QIcon QS60Style::standardIconImplementation(StandardPixmap standardIcon,
*/
bool QS60Style::eventFilter(QObject *object, QEvent *event)
{
+ Q_D(QS60Style);
+ switch(event->type()) {
+ case QEvent::MouseButtonPress: {
+ QWidget *w = QApplication::widgetAt(QCursor::pos());
+ if (w) {
+ QWidget *focusW = w->focusProxy();
+ if (qobject_cast<QAbstractItemView *>(focusW) ||
+ qobject_cast<QRadioButton *>(focusW) ||
+ qobject_cast<QCheckBox *>(focusW))
+ d->m_pressedWidget = focusW;
+ else if (qobject_cast<QAbstractItemView *>(w)||
+ qobject_cast<QRadioButton *>(w) ||
+ qobject_cast<QCheckBox *>(w))
+ d->m_pressedWidget = w;
+
+ if ( d->m_pressedWidget)
+ d->m_pressedWidget->update();
+ }
+ break;
+ }
+ case QEvent::MouseButtonRelease: {
+ const QWidget *w = QApplication::widgetAt(QCursor::pos());
+ if (w && d->m_pressedWidget) {
+ d->m_pressedWidget->update();
+ d->m_pressedWidget = 0;
+ }
+ break;
+ }
+ default:
+ break;
+ }
+
#ifdef Q_WS_S60
#ifndef QT_NO_PROGRESSBAR
- Q_D(QS60Style);
switch(event->type()) {
case QEvent::StyleChange:
case QEvent::Show:
@@ -3250,7 +3321,7 @@ bool QS60Style::eventFilter(QObject *object, QEvent *event)
}
#endif // QT_NO_PROGRESSBAR
#endif // Q_WS_S60
- return QStyle::eventFilter(object, event);
+ return QCommonStyle::eventFilter(object, event);
}
/*!
diff --git a/src/gui/styles/qs60style_p.h b/src/gui/styles/qs60style_p.h
index 6ce4960..9dd3810 100644
--- a/src/gui/styles/qs60style_p.h
+++ b/src/gui/styles/qs60style_p.h
@@ -293,6 +293,24 @@ public:
SP_QsnFrButtonSideLInactive,
SP_QsnFrButtonSideRInactive,
SP_QsnFrButtonCenterInactive,
+ SP_QsnFrGridCornerTlPressed, // Pressed table item
+ SP_QsnFrGridCornerTrPressed,
+ SP_QsnFrGridCornerBlPressed,
+ SP_QsnFrGridCornerBrPressed,
+ SP_QsnFrGridSideTPressed,
+ SP_QsnFrGridSideBPressed,
+ SP_QsnFrGridSideLPressed,
+ SP_QsnFrGridSideRPressed,
+ SP_QsnFrGridCenterPressed,
+ SP_QsnFrListCornerTlPressed, // Pressed list item
+ SP_QsnFrListCornerTrPressed,
+ SP_QsnFrListCornerBlPressed,
+ SP_QsnFrListCornerBrPressed,
+ SP_QsnFrListSideTPressed,
+ SP_QsnFrListSideBPressed,
+ SP_QsnFrListSideLPressed,
+ SP_QsnFrListSideRPressed,
+ SP_QsnFrListPressed,
};
enum ColorLists {
@@ -424,7 +442,9 @@ public:
SE_ScrollBarHandlePressedVertical,
SE_ButtonInactive,
SE_Editor,
- SE_DropArea
+ SE_DropArea,
+ SE_TableItemPressed,
+ SE_ListItemPressed,
};
enum SkinFrameElements {
@@ -442,6 +462,8 @@ public:
SF_ToolBarButtonPressed,
SF_PanelBackground,
SF_ButtonInactive,
+ SF_TableItemPressed,
+ SF_ListItemPressed,
};
enum SkinElementFlag {
@@ -496,6 +518,7 @@ public:
static bool isToolBarBackground();
static bool hasSliderGrooveGraphic();
static bool isSingleClickUi();
+ static bool isWidgetPressed(const QWidget *widget);
// calculates average color based on button skin graphics (minus borders).
QColor colorFromFrameGraphics(SkinFrameElements frame) const;
@@ -593,6 +616,8 @@ private:
QPointer<QFocusFrame> m_focusFrame;
static qint64 m_webPaletteKey;
+ static QPointer<QWidget> m_pressedWidget;
+
#ifdef Q_WS_S60
//list of progress bars having animation running
QList<QProgressBar *> m_bars;
diff --git a/src/gui/styles/qs60style_s60.cpp b/src/gui/styles/qs60style_s60.cpp
index 6a552e0..58a7159 100644
--- a/src/gui/styles/qs60style_s60.cpp
+++ b/src/gui/styles/qs60style_s60.cpp
@@ -377,6 +377,27 @@ const partMapEntry QS60StyleModeSpecifics::m_partMap[] = {
/* SP_QsnFrButtonSideRInactive */ {KAknsIIDQsnFrButtonTbSideR, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x21b8},
/* SP_QsnFrButtonCenterInactive */ {KAknsIIDQsnFrButtonTbCenter, EDrawIcon, ES60_3_X, EAknsMajorSkin, 0x21b9},
+ // No pressed down grid in 3.1/3.2
+ /* SP_QsnFrGridCornerTlPressed */ {KAknsIIDQsnFrGridCornerTl, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2681}, /*KAknsIIDQsnFrGridCornerTlPressed*/
+ /* SP_QsnFrGridCornerTrPressed */ {KAknsIIDQsnFrGridCornerTr, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2682},
+ /* SP_QsnFrGridCornerBlPressed */ {KAknsIIDQsnFrGridCornerBl, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2683},
+ /* SP_QsnFrGridCornerBrPressed */ {KAknsIIDQsnFrGridCornerBr, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2684},
+ /* SP_QsnFrGridSideTPressed */ {KAknsIIDQsnFrGridSideT, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2685},
+ /* SP_QsnFrGridSideBPressed */ {KAknsIIDQsnFrGridSideB, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2686},
+ /* SP_QsnFrGridSideLPressed */ {KAknsIIDQsnFrGridSideL, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2687},
+ /* SP_QsnFrGridSideRPressed */ {KAknsIIDQsnFrGridSideR, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2688},
+ /* SP_QsnFrGridCenterPressed */ {KAknsIIDQsnFrGridCenter, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2689},
+
+ // No pressed down list in 3.1/3.2
+ /* SP_QsnFrListCornerTlPressed */ {KAknsIIDQsnFrListCornerTl, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x268b}, /*KAknsIIDQsnFrListCornerTlPressed*/
+ /* SP_QsnFrListCornerTrPressed */ {KAknsIIDQsnFrListCornerTr, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x268c},
+ /* SP_QsnFrListCornerBlPressed */ {KAknsIIDQsnFrListCornerBl, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x268d},
+ /* SP_QsnFrListCornerBrPressed */ {KAknsIIDQsnFrListCornerBr, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x268e},
+ /* SP_QsnFrListSideTPressed */ {KAknsIIDQsnFrListSideT, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x268f},
+ /* SP_QsnFrListSideBPressed */ {KAknsIIDQsnFrListSideB, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2690},
+ /* SP_QsnFrListSideLPressed */ {KAknsIIDQsnFrListSideL, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2691},
+ /* SP_QsnFrListSideRPressed */ {KAknsIIDQsnFrListSideR, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2692},
+ /* SP_QsnFrListPressed */ {KAknsIIDQsnFrList, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2693},
};
QPixmap QS60StyleModeSpecifics::skinnedGraphics(
diff --git a/src/gui/styles/qstylesheetstyle.cpp b/src/gui/styles/qstylesheetstyle.cpp
index cc0ce08..a1a98ba 100644
--- a/src/gui/styles/qstylesheetstyle.cpp
+++ b/src/gui/styles/qstylesheetstyle.cpp
@@ -3169,8 +3169,8 @@ void QStyleSheetStyle::drawComplexControl(ComplexControl cc, const QStyleOptionC
if (subRule1.hasDrawable()) {
QRect r(gr.topLeft(),
slider->orientation == Qt::Horizontal
- ? QPoint(hr.x()+hr.width()/2, gr.y()+gr.height())
- : QPoint(gr.x()+gr.width(), hr.y()+hr.height()/2));
+ ? QPoint(hr.x()+hr.width()/2, gr.y()+gr.height() - 1)
+ : QPoint(gr.x()+gr.width() - 1, hr.y()+hr.height()/2));
subRule1.drawRule(p, r);
}
diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp
index cb16a16..24887b5 100644
--- a/src/gui/text/qfont.cpp
+++ b/src/gui/text/qfont.cpp
@@ -1286,9 +1286,11 @@ QFont::StyleHint QFont::styleHint() const
\value PreferAntialias antialias if possible.
\value OpenGLCompatible forces the use of OpenGL compatible
fonts.
- \value NoFontMerging If a font does not contain a character requested
- to draw then Qt automatically chooses a similar looking for that contains
- the character. This flag disables this feature.
+ \value NoFontMerging If the font selected for a certain writing system
+ does not contain a character requested to draw, then Qt automatically chooses a similar
+ looking font that contains the character. The NoFontMerging flag disables this feature.
+ Please note that enabling this flag will not prevent Qt from automatically picking a
+ suitable font when the selected font does not support the writing system of the text.
Any of these may be OR-ed with one of these flags:
diff --git a/src/gui/text/qfontdatabase_x11.cpp b/src/gui/text/qfontdatabase_x11.cpp
index b1ab478..3b2e4e9 100644
--- a/src/gui/text/qfontdatabase_x11.cpp
+++ b/src/gui/text/qfontdatabase_x11.cpp
@@ -1939,8 +1939,13 @@ void QFontDatabase::load(const QFontPrivate *d, int script)
fe = loadFc(d, script, req);
if (fe != 0 && fe->fontDef.pixelSize != req.pixelSize) {
- delete fe;
- fe = loadXlfd(d->screen, script, req);
+ QFontEngine *xlfdFontEngine = loadXlfd(d->screen, script, req);
+ if (xlfdFontEngine->fontDef.family == fe->fontDef.family) {
+ delete fe;
+ fe = xlfdFontEngine;
+ } else {
+ delete xlfdFontEngine;
+ }
}
diff --git a/src/gui/util/qcompleter.cpp b/src/gui/util/qcompleter.cpp
index c095b3b..8e7ec80 100644
--- a/src/gui/util/qcompleter.cpp
+++ b/src/gui/util/qcompleter.cpp
@@ -1689,8 +1689,10 @@ QString QCompleter::pathFromIndex(const QModelIndex& index) const
QString t;
if (isDirModel)
t = sourceModel->data(idx, Qt::EditRole).toString();
+#ifndef QT_NO_FILESYSTEMMODEL
else
t = sourceModel->data(idx, QFileSystemModel::FileNameRole).toString();
+#endif
list.prepend(t);
QModelIndex parent = idx.parent();
idx = parent.sibling(parent.row(), index.column());
diff --git a/src/gui/widgets/qdialogbuttonbox.cpp b/src/gui/widgets/qdialogbuttonbox.cpp
index cc74a53..732dbc9 100644
--- a/src/gui/widgets/qdialogbuttonbox.cpp
+++ b/src/gui/widgets/qdialogbuttonbox.cpp
@@ -258,6 +258,7 @@ static const int layouts[2][5][14] =
}
};
+#if defined(QT_SOFTKEYS_ENABLED) && !defined(QT_NO_ACTION)
class QDialogButtonEnabledProxy : public QObject
{
public:
@@ -281,7 +282,7 @@ private:
QWidget *source;
QAction *target;
};
-
+#endif
class QDialogButtonBoxPrivate : public QWidgetPrivate
{
@@ -314,7 +315,7 @@ public:
void addButtonsToLayout(const QList<QAbstractButton *> &buttonList, bool reverse);
void retranslateStrings();
const char *standardButtonText(QDialogButtonBox::StandardButton sbutton) const;
-#ifdef QT_SOFTKEYS_ENABLED
+#if defined(QT_SOFTKEYS_ENABLED) && !defined(QT_NO_ACTION)
QAction *createSoftKey(QAbstractButton *button, QDialogButtonBox::ButtonRole role);
#endif
};
@@ -571,7 +572,7 @@ void QDialogButtonBoxPrivate::addButton(QAbstractButton *button, QDialogButtonBo
QObject::connect(button, SIGNAL(clicked()), q, SLOT(_q_handleButtonClicked()));
QObject::connect(button, SIGNAL(destroyed()), q, SLOT(_q_handleButtonDestroyed()));
buttonLists[role].append(button);
-#ifdef QT_SOFTKEYS_ENABLED
+#if defined(QT_SOFTKEYS_ENABLED) && !defined(QT_NO_ACTION)
QAction *action = createSoftKey(button, role);
softKeyActions.insert(button, action);
new QDialogButtonEnabledProxy(action, button, action);
@@ -580,7 +581,7 @@ void QDialogButtonBoxPrivate::addButton(QAbstractButton *button, QDialogButtonBo
layoutButtons();
}
-#ifdef QT_SOFTKEYS_ENABLED
+#if defined(QT_SOFTKEYS_ENABLED) && !defined(QT_NO_ACTION)
QAction* QDialogButtonBoxPrivate::createSoftKey(QAbstractButton *button, QDialogButtonBox::ButtonRole role)
{
Q_Q(QDialogButtonBox);
@@ -718,7 +719,7 @@ void QDialogButtonBoxPrivate::retranslateStrings()
if (buttonText) {
QPushButton *button = it.key();
button->setText(QDialogButtonBox::tr(buttonText));
-#ifdef QT_SOFTKEYS_ENABLED
+#if defined(QT_SOFTKEYS_ENABLED) && !defined(QT_NO_ACTION)
QAction *action = softKeyActions.value(button, 0);
if (action)
action->setText(button->text());
@@ -997,7 +998,7 @@ void QDialogButtonBox::removeButton(QAbstractButton *button)
}
}
}
-#ifdef QT_SOFTKEYS_ENABLED
+#if defined(QT_SOFTKEYS_ENABLED) && !defined(QT_NO_ACTION)
QAction *action = d->softKeyActions.value(button, 0);
if (action) {
d->softKeyActions.remove(button);
@@ -1243,7 +1244,7 @@ bool QDialogButtonBox::event(QEvent *event)
}else if (event->type() == QEvent::LanguageChange) {
d->retranslateStrings();
}
-#ifdef QT_SOFTKEYS_ENABLED
+#if defined(QT_SOFTKEYS_ENABLED) && !defined(QT_NO_ACTION)
else if (event->type() == QEvent::ParentChange) {
QWidget *dialog = 0;
QWidget *p = this;
diff --git a/src/gui/widgets/qframe.cpp b/src/gui/widgets/qframe.cpp
index c2e4b35..f51ddfd 100644
--- a/src/gui/widgets/qframe.cpp
+++ b/src/gui/widgets/qframe.cpp
@@ -244,7 +244,7 @@ QFrame::~QFrame()
/*!
Returns the frame style.
- The default value is QFrame::NoFrame.
+ The default value is QFrame::Plain.
\sa setFrameStyle(), frameShape(), frameShadow()
*/
diff --git a/src/gui/widgets/qmenubar.cpp b/src/gui/widgets/qmenubar.cpp
index e368d3d..a13a2fa 100644
--- a/src/gui/widgets/qmenubar.cpp
+++ b/src/gui/widgets/qmenubar.cpp
@@ -268,19 +268,15 @@ void QMenuBarPrivate::updateGeometries()
QRect QMenuBarPrivate::actionRect(QAction *act) const
{
- Q_Q(const QMenuBar);
const int index = actions.indexOf(act);
- if (index == -1)
- return QRect();
//makes sure the geometries are up-to-date
const_cast<QMenuBarPrivate*>(this)->updateGeometries();
- if (index >= actionRects.count())
+ if (index < 0 || index >= actionRects.count())
return QRect(); // that can happen in case of native menubar
- QRect ret = actionRects.at(index);
- return QStyle::visualRect(q->layoutDirection(), q->rect(), ret);
+ return actionRects.at(index);
}
void QMenuBarPrivate::focusFirstAction()
@@ -505,6 +501,9 @@ void QMenuBarPrivate::calcActionRects(int max_width, int start) const
//keep moving along..
x += rect.width() + itemSpacing;
+
+ //make sure we follow the layout direction
+ rect = QStyle::visualRect(q->layoutDirection(), q->rect(), rect);
}
}
diff --git a/src/imports/gestures/qdeclarativegesturearea.cpp b/src/imports/gestures/qdeclarativegesturearea.cpp
index b8c8f57..615c674 100644
--- a/src/imports/gestures/qdeclarativegesturearea.cpp
+++ b/src/imports/gestures/qdeclarativegesturearea.cpp
@@ -82,6 +82,9 @@ public:
A GestureArea is like a MouseArea, but it has signals for gesture events.
+ \e {Elements in the Qt.labs module are not guaranteed to remain compatible
+ in future versions.}
+
\e {This element is only functional on devices with touch input.}
\qml
diff --git a/src/imports/multimedia/qdeclarativeaudio.cpp b/src/imports/multimedia/qdeclarativeaudio.cpp
index 8d2dc61..82d5d89 100644
--- a/src/imports/multimedia/qdeclarativeaudio.cpp
+++ b/src/imports/multimedia/qdeclarativeaudio.cpp
@@ -54,7 +54,7 @@ QT_BEGIN_NAMESPACE
This element is part of the \bold{Qt.multimedia 4.7} module.
\qml
- import Qt 4.6
+ import Qt 4.7
import Qt.multimedia 4.7
Audio { source: "audio/song.mp3" }
diff --git a/src/imports/multimedia/qdeclarativevideo.cpp b/src/imports/multimedia/qdeclarativevideo.cpp
index bf112be..c6ae272 100644
--- a/src/imports/multimedia/qdeclarativevideo.cpp
+++ b/src/imports/multimedia/qdeclarativevideo.cpp
@@ -76,7 +76,7 @@ void QDeclarativeVideo::_q_error(int errorCode, const QString &errorString)
This element is part of the \bold{Qt.multimedia 4.7} module.
\qml
- import Qt 4.6
+ import Qt 4.7
import Qt.multimedia 4.7
Video { source: "video/movie.mpg" }
diff --git a/src/imports/particles/qdeclarativeparticles.cpp b/src/imports/particles/qdeclarativeparticles.cpp
index e98a801..d17a8a1 100644
--- a/src/imports/particles/qdeclarativeparticles.cpp
+++ b/src/imports/particles/qdeclarativeparticles.cpp
@@ -624,6 +624,8 @@ void QDeclarativeParticlesPrivate::updateOpacity(QDeclarativeParticle &p, int ag
\inherits Item
Particles are available in the \bold{Qt.labs.particles 1.0} module.
+ \e {Elements in the Qt.labs module are not guaranteed to remain compatible
+ in future versions.}
This element provides preliminary support for particles in QML,
and may be heavily changed or removed in later versions.
@@ -642,7 +644,7 @@ void QDeclarativeParticlesPrivate::updateOpacity(QDeclarativeParticle &p, int ag
snow, the lower one has particles expelled up like a fountain.
\qml
-import Qt 4.6
+import Qt 4.7
import Qt.labs.particles 1.0
Rectangle {
diff --git a/src/imports/widgets/widgets.cpp b/src/imports/widgets/widgets.cpp
index f26969a..1a71a68 100644
--- a/src/imports/widgets/widgets.cpp
+++ b/src/imports/widgets/widgets.cpp
@@ -44,7 +44,7 @@
#include <QGraphicsWidget>
#include "graphicslayouts_p.h"
-
+#include <private/qdeclarativegraphicswidget_p.h>
QT_BEGIN_NAMESPACE
class QWidgetsQmlModule : public QDeclarativeExtensionPlugin
@@ -60,7 +60,6 @@ public:
qmlRegisterType<QGraphicsLinearLayoutStretchItemObject>(uri,4,6,"QGraphicsLinearLayoutStretchItem");
qmlRegisterType<QGraphicsLinearLayoutObject>(uri,4,6,"QGraphicsLinearLayout");
qmlRegisterType<QGraphicsGridLayoutObject>(uri,4,6,"QGraphicsGridLayout");
- qmlRegisterType<QGraphicsWidget>(uri,4,6,"QGraphicsWidget");
}
};
diff --git a/src/multimedia/effects/qsoundeffect.cpp b/src/multimedia/effects/qsoundeffect.cpp
index 8a38103..d34e532 100644
--- a/src/multimedia/effects/qsoundeffect.cpp
+++ b/src/multimedia/effects/qsoundeffect.cpp
@@ -61,7 +61,7 @@ QT_BEGIN_NAMESPACE
The following example plays a wav file on mouse click.
\qml
- import Qt 4.6
+ import Qt 4.7
import Qt.multimedia 4.7
Item {
diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp
index 17b864c..4a31b6f 100644
--- a/src/network/access/qhttpnetworkconnectionchannel.cpp
+++ b/src/network/access/qhttpnetworkconnectionchannel.cpp
@@ -691,6 +691,8 @@ void QHttpNetworkConnectionChannel::detectPipeliningSupport()
&& (serverHeaderField = reply->headerField("Server"), !serverHeaderField.contains("Microsoft-IIS/4."))
&& (!serverHeaderField.contains("Microsoft-IIS/5."))
&& (!serverHeaderField.contains("Netscape-Enterprise/3."))
+ // this is adpoted from the knowledge of the Nokia 7.x browser team (DEF143319)
+ && (!serverHeaderField.contains("WebLogic"))
) {
pipeliningSupported = QHttpNetworkConnectionChannel::PipeliningProbablySupported;
} else {
diff --git a/src/network/access/qnetworkaccessbackend.cpp b/src/network/access/qnetworkaccessbackend.cpp
index 1fcfebb..f188bd5 100644
--- a/src/network/access/qnetworkaccessbackend.cpp
+++ b/src/network/access/qnetworkaccessbackend.cpp
@@ -346,6 +346,8 @@ void QNetworkAccessBackend::sslErrors(const QList<QSslError> &errors)
#endif
}
+#ifndef QT_NO_BEARERMANAGEMENT
+
/*!
Starts the backend. Returns true if the backend is started. Returns false if the backend
could not be started due to an unopened or roaming session. The caller should recall this
@@ -376,5 +378,6 @@ bool QNetworkAccessBackend::start()
return false;
}
+#endif
QT_END_NAMESPACE
diff --git a/src/network/access/qnetworkaccessbackend_p.h b/src/network/access/qnetworkaccessbackend_p.h
index 9bc15e5..4ce37a6 100644
--- a/src/network/access/qnetworkaccessbackend_p.h
+++ b/src/network/access/qnetworkaccessbackend_p.h
@@ -111,7 +111,9 @@ public:
// socket).
virtual void open() = 0;
+#ifndef QT_NO_BEARERMANAGEMENT
virtual bool start();
+#endif
virtual void closeDownstreamChannel() = 0;
virtual bool waitForDownstreamReadyRead(int msecs) = 0;
diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp
index 90afd2c..feb9d99 100644
--- a/src/network/access/qnetworkaccessmanager.cpp
+++ b/src/network/access/qnetworkaccessmanager.cpp
@@ -742,6 +742,8 @@ QNetworkReply *QNetworkAccessManager::deleteResource(const QNetworkRequest &requ
return d_func()->postProcess(createRequest(QNetworkAccessManager::DeleteOperation, request));
}
+#ifndef QT_NO_BEARERMANAGEMENT
+
/*!
\since 4.7
@@ -858,6 +860,8 @@ QNetworkAccessManager::NetworkAccessibility QNetworkAccessManager::networkAccess
}
}
+#endif // QT_NO_BEARERMANAGEMENT
+
/*!
\since 4.7
@@ -913,6 +917,7 @@ QNetworkReply *QNetworkAccessManager::createRequest(QNetworkAccessManager::Opera
return new QFileNetworkReply(this, req, op);
}
+#ifndef QT_NO_BEARERMANAGEMENT
// Return a disabled network reply if network access is disabled.
// Except if the scheme is empty or file://.
if (!d->networkAccessible && !(req.url().scheme() == QLatin1String("file") ||
@@ -934,6 +939,7 @@ QNetworkReply *QNetworkAccessManager::createRequest(QNetworkAccessManager::Opera
if (d->networkSession)
d->networkSession->setSessionProperty(QLatin1String("AutoCloseSessionTimeout"), -1);
+#endif
QNetworkRequest request = req;
if (!request.header(QNetworkRequest::ContentLengthHeader).isValid() &&
@@ -951,10 +957,12 @@ QNetworkReply *QNetworkAccessManager::createRequest(QNetworkAccessManager::Opera
// first step: create the reply
QUrl url = request.url();
QNetworkReplyImpl *reply = new QNetworkReplyImpl(this);
+#ifndef QT_NO_BEARERMANAGEMENT
if (req.url().scheme() != QLatin1String("file") && !req.url().scheme().isEmpty()) {
connect(this, SIGNAL(networkSessionConnected()),
reply, SLOT(_q_networkSessionConnected()));
}
+#endif
QNetworkReplyImplPrivate *priv = reply->d_func();
priv->manager = this;
@@ -994,8 +1002,10 @@ void QNetworkAccessManagerPrivate::_q_replyFinished()
if (reply)
emit q->finished(reply);
+#ifndef QT_NO_BEARERMANAGEMENT
if (networkSession && q->findChildren<QNetworkReply *>().count() == 1)
networkSession->setSessionProperty(QLatin1String("AutoCloseSessionTimeout"), 120000);
+#endif
}
void QNetworkAccessManagerPrivate::_q_replySslErrors(const QList<QSslError> &errors)
@@ -1248,6 +1258,7 @@ QNetworkAccessManagerPrivate::~QNetworkAccessManagerPrivate()
{
}
+#ifndef QT_NO_BEARERMANAGEMENT
void QNetworkAccessManagerPrivate::createSession(const QNetworkConfiguration &config)
{
Q_Q(QNetworkAccessManager);
@@ -1328,6 +1339,7 @@ void QNetworkAccessManagerPrivate::_q_networkSessionStateChanged(QNetworkSession
}
}
}
+#endif // QT_NO_BEARERMANAGEMENT
QT_END_NAMESPACE
diff --git a/src/network/access/qnetworkaccessmanager.h b/src/network/access/qnetworkaccessmanager.h
index c57c9c6..a0ffb07 100644
--- a/src/network/access/qnetworkaccessmanager.h
+++ b/src/network/access/qnetworkaccessmanager.h
@@ -62,7 +62,9 @@ class QNetworkReply;
class QNetworkProxy;
class QNetworkProxyFactory;
class QSslError;
+#ifndef QT_NO_BEARERMANAGEMENT
class QNetworkConfiguration;
+#endif
class QNetworkReplyImplPrivate;
class QNetworkAccessManagerPrivate;
@@ -70,7 +72,9 @@ class Q_NETWORK_EXPORT QNetworkAccessManager: public QObject
{
Q_OBJECT
+#ifndef QT_NO_BEARERMANAGEMENT
Q_PROPERTY(NetworkAccessibility networkAccessible READ networkAccessible WRITE setNetworkAccessible NOTIFY networkAccessibleChanged)
+#endif
public:
enum Operation {
@@ -84,11 +88,13 @@ public:
UnknownOperation = 0
};
+#ifndef QT_NO_BEARERMANAGEMENT
enum NetworkAccessibility {
UnknownAccessibility = -1,
NotAccessible = 0,
Accessible = 1
};
+#endif
explicit QNetworkAccessManager(QObject *parent = 0);
~QNetworkAccessManager();
@@ -115,12 +121,14 @@ public:
QNetworkReply *deleteResource(const QNetworkRequest &request);
QNetworkReply *sendCustomRequest(const QNetworkRequest &request, const QByteArray &verb, QIODevice *data = 0);
+#ifndef QT_NO_BEARERMANAGEMENT
void setConfiguration(const QNetworkConfiguration &config);
QNetworkConfiguration configuration() const;
QNetworkConfiguration activeConfiguration() const;
void setNetworkAccessible(NetworkAccessibility accessible);
NetworkAccessibility networkAccessible() const;
+#endif
Q_SIGNALS:
#ifndef QT_NO_NETWORKPROXY
@@ -132,9 +140,11 @@ Q_SIGNALS:
void sslErrors(QNetworkReply *reply, const QList<QSslError> &errors);
#endif
+#ifndef QT_NO_BEARERMANAGEMENT
void networkSessionConnected();
void networkAccessibleChanged(QNetworkAccessManager::NetworkAccessibility accessible);
+#endif
protected:
virtual QNetworkReply *createRequest(Operation op, const QNetworkRequest &request,
@@ -145,10 +155,12 @@ private:
Q_DECLARE_PRIVATE(QNetworkAccessManager)
Q_PRIVATE_SLOT(d_func(), void _q_replyFinished())
Q_PRIVATE_SLOT(d_func(), void _q_replySslErrors(QList<QSslError>))
+#ifndef QT_NO_BEARERMANAGEMENT
Q_PRIVATE_SLOT(d_func(), void _q_networkSessionClosed())
Q_PRIVATE_SLOT(d_func(), void _q_networkSessionNewConfigurationActivated())
Q_PRIVATE_SLOT(d_func(), void _q_networkSessionPreferredConfigurationChanged(QNetworkConfiguration,bool))
Q_PRIVATE_SLOT(d_func(), void _q_networkSessionStateChanged(QNetworkSession::State))
+#endif
};
QT_END_NAMESPACE
diff --git a/src/network/access/qnetworkaccessmanager_p.h b/src/network/access/qnetworkaccessmanager_p.h
index 1785685..695842c 100644
--- a/src/network/access/qnetworkaccessmanager_p.h
+++ b/src/network/access/qnetworkaccessmanager_p.h
@@ -75,10 +75,12 @@ public:
#ifndef QT_NO_NETWORKPROXY
proxyFactory(0),
#endif
+#ifndef QT_NO_BEARERMANAGEMENT
networkSession(0),
networkAccessible(QNetworkAccessManager::Accessible),
online(false),
initializeSession(true),
+#endif
cookieJarCreated(false)
{ }
~QNetworkAccessManagerPrivate();
@@ -104,6 +106,7 @@ public:
QNetworkAccessBackend *findBackend(QNetworkAccessManager::Operation op, const QNetworkRequest &request);
+#ifndef QT_NO_BEARERMANAGEMENT
void createSession(const QNetworkConfiguration &config);
void _q_networkSessionClosed();
@@ -111,6 +114,7 @@ public:
void _q_networkSessionPreferredConfigurationChanged(const QNetworkConfiguration &config,
bool isSeamless);
void _q_networkSessionStateChanged(QNetworkSession::State state);
+#endif
// this is the cache for storing downloaded files
QAbstractNetworkCache *networkCache;
@@ -123,11 +127,13 @@ public:
QNetworkProxyFactory *proxyFactory;
#endif
+#ifndef QT_NO_BEARERMANAGEMENT
QNetworkSession *networkSession;
QString networkConfiguration;
QNetworkAccessManager::NetworkAccessibility networkAccessible;
bool online;
bool initializeSession;
+#endif
bool cookieJarCreated;
diff --git a/src/network/access/qnetworkreplyimpl.cpp b/src/network/access/qnetworkreplyimpl.cpp
index edd6889..c3dc168 100644
--- a/src/network/access/qnetworkreplyimpl.cpp
+++ b/src/network/access/qnetworkreplyimpl.cpp
@@ -67,8 +67,6 @@ inline QNetworkReplyImplPrivate::QNetworkReplyImplPrivate()
void QNetworkReplyImplPrivate::_q_startOperation()
{
- Q_Q(QNetworkReplyImpl);
-
// ensure this function is only being called once
if (state == Working) {
qDebug("QNetworkReplyImpl::_q_startOperation was called more than once");
@@ -86,6 +84,7 @@ void QNetworkReplyImplPrivate::_q_startOperation()
return;
}
+#ifndef QT_NO_BEARERMANAGEMENT
if (!backend->start()) {
// backend failed to start because the session state is not Connected.
// QNetworkAccessManager will call reply->backend->start() again for us when the session
@@ -95,6 +94,8 @@ void QNetworkReplyImplPrivate::_q_startOperation()
QNetworkSession *session = manager->d_func()->networkSession;
if (session) {
+ Q_Q(QNetworkReplyImpl);
+
QObject::connect(session, SIGNAL(error(QNetworkSession::SessionError)),
q, SLOT(_q_networkSessionFailed()));
@@ -106,6 +107,7 @@ void QNetworkReplyImplPrivate::_q_startOperation()
return;
}
+#endif
if (state != Finished) {
if (operation == QNetworkAccessManager::GetOperation)
@@ -232,6 +234,7 @@ void QNetworkReplyImplPrivate::_q_bufferOutgoingData()
}
}
+#ifndef QT_NO_BEARERMANAGEMENT
void QNetworkReplyImplPrivate::_q_networkSessionConnected()
{
Q_Q(QNetworkReplyImpl);
@@ -272,6 +275,7 @@ void QNetworkReplyImplPrivate::_q_networkSessionFailed()
finished();
}
}
+#endif
void QNetworkReplyImplPrivate::setup(QNetworkAccessManager::Operation op, const QNetworkRequest &req,
QIODevice *data)
@@ -581,6 +585,7 @@ void QNetworkReplyImplPrivate::finished()
totalSize = totalSize.toLongLong() + preMigrationDownloaded;
if (!manager.isNull()) {
+#ifndef QT_NO_BEARERMANAGEMENT
QNetworkSession *session = manager->d_func()->networkSession;
if (session && session->state() == QNetworkSession::Roaming &&
state == Working && errorCode != QNetworkReply::OperationCanceledError) {
@@ -600,6 +605,7 @@ void QNetworkReplyImplPrivate::finished()
}
}
}
+#endif
}
resumeNotificationHandling();
@@ -889,6 +895,7 @@ bool QNetworkReplyImplPrivate::migrateBackend()
return true;
}
+#ifndef QT_NO_BEARERMANAGEMENT
QDisabledNetworkReply::QDisabledNetworkReply(QObject *parent,
const QNetworkRequest &req,
QNetworkAccessManager::Operation op)
@@ -912,6 +919,7 @@ QDisabledNetworkReply::QDisabledNetworkReply(QObject *parent,
QDisabledNetworkReply::~QDisabledNetworkReply()
{
}
+#endif
QT_END_NAMESPACE
diff --git a/src/network/access/qnetworkreplyimpl_p.h b/src/network/access/qnetworkreplyimpl_p.h
index fcb3397..bc7e408 100644
--- a/src/network/access/qnetworkreplyimpl_p.h
+++ b/src/network/access/qnetworkreplyimpl_p.h
@@ -99,8 +99,10 @@ public:
Q_PRIVATE_SLOT(d_func(), void _q_copyReadChannelFinished())
Q_PRIVATE_SLOT(d_func(), void _q_bufferOutgoingData())
Q_PRIVATE_SLOT(d_func(), void _q_bufferOutgoingDataFinished())
+#ifndef QT_NO_BEARERMANAGEMENT
Q_PRIVATE_SLOT(d_func(), void _q_networkSessionConnected())
Q_PRIVATE_SLOT(d_func(), void _q_networkSessionFailed())
+#endif
};
class QNetworkReplyImplPrivate: public QNetworkReplyPrivate
@@ -133,8 +135,10 @@ public:
void _q_copyReadChannelFinished();
void _q_bufferOutgoingData();
void _q_bufferOutgoingDataFinished();
+#ifndef QT_NO_BEARERMANAGEMENT
void _q_networkSessionConnected();
void _q_networkSessionFailed();
+#endif
void setup(QNetworkAccessManager::Operation op, const QNetworkRequest &request,
QIODevice *outgoingData);
@@ -196,6 +200,7 @@ public:
Q_DECLARE_PUBLIC(QNetworkReplyImpl)
};
+#ifndef QT_NO_BEARERMANAGEMENT
class QDisabledNetworkReply : public QNetworkReply
{
Q_OBJECT
@@ -209,6 +214,7 @@ public:
protected:
qint64 readData(char *, qint64) { return -1; }
};
+#endif
QT_END_NAMESPACE
diff --git a/src/network/bearer/qbearerengine.cpp b/src/network/bearer/qbearerengine.cpp
index c42e2d2..2f8624a 100644
--- a/src/network/bearer/qbearerengine.cpp
+++ b/src/network/bearer/qbearerengine.cpp
@@ -41,6 +41,8 @@
#include "qbearerengine_p.h"
+#ifndef QT_NO_BEARERMANAGEMENT
+
QT_BEGIN_NAMESPACE
QBearerEngine::QBearerEngine(QObject *parent)
@@ -110,4 +112,6 @@ bool QBearerEngine::configurationsInUse() const
#include "moc_qbearerengine_p.cpp"
+#endif // QT_NO_BEARERMANAGEMENT
+
QT_END_NAMESPACE
diff --git a/src/network/bearer/qbearerengine_p.h b/src/network/bearer/qbearerengine_p.h
index fd4bf87..70aa5fa 100644
--- a/src/network/bearer/qbearerengine_p.h
+++ b/src/network/bearer/qbearerengine_p.h
@@ -65,6 +65,8 @@
#include <QtCore/qsharedpointer.h>
#include <QtCore/qmutex.h>
+#ifndef QT_NO_BEARERMANAGEMENT
+
QT_BEGIN_NAMESPACE
class QNetworkConfiguration;
@@ -110,4 +112,6 @@ protected:
QT_END_NAMESPACE
+#endif // QT_NO_BEARERMANAGEMENT
+
#endif
diff --git a/src/network/bearer/qbearerplugin.cpp b/src/network/bearer/qbearerplugin.cpp
index 4509fd0..a5e8918 100644
--- a/src/network/bearer/qbearerplugin.cpp
+++ b/src/network/bearer/qbearerplugin.cpp
@@ -43,6 +43,8 @@
#include <QtCore/qdebug.h>
+#ifndef QT_NO_BEARERMANAGEMENT
+
QT_BEGIN_NAMESPACE
QBearerEnginePlugin::QBearerEnginePlugin(QObject *parent)
@@ -55,3 +57,5 @@ QBearerEnginePlugin::~QBearerEnginePlugin()
}
QT_END_NAMESPACE
+
+#endif // QT_NO_BEARERMANAGEMENT
diff --git a/src/network/bearer/qbearerplugin_p.h b/src/network/bearer/qbearerplugin_p.h
index 36709c2..9652f14 100644
--- a/src/network/bearer/qbearerplugin_p.h
+++ b/src/network/bearer/qbearerplugin_p.h
@@ -58,6 +58,8 @@
#include <QtCore/qplugin.h>
#include <QtCore/qfactoryinterface.h>
+#ifndef QT_NO_BEARERMANAGEMENT
+
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
@@ -89,5 +91,6 @@ QT_END_NAMESPACE
QT_END_HEADER
-#endif
+#endif // QT_NO_BEARERMANAGEMENT
+#endif
diff --git a/src/network/bearer/qnetworkconfigmanager.cpp b/src/network/bearer/qnetworkconfigmanager.cpp
index 1ba5dab..102b347 100644
--- a/src/network/bearer/qnetworkconfigmanager.cpp
+++ b/src/network/bearer/qnetworkconfigmanager.cpp
@@ -46,6 +46,8 @@
#include <QtCore/qstringlist.h>
+#ifndef QT_NO_BEARERMANAGEMENT
+
QT_BEGIN_NAMESPACE
Q_GLOBAL_STATIC(QNetworkConfigurationManagerPrivate, connManager);
@@ -278,7 +280,7 @@ bool QNetworkConfigurationManager::isOnline() const
*/
QNetworkConfigurationManager::Capabilities QNetworkConfigurationManager::capabilities() const
{
- return connManager()->capFlags;
+ return connManager()->capabilities();
}
/*!
@@ -304,3 +306,4 @@ void QNetworkConfigurationManager::updateConfigurations()
QT_END_NAMESPACE
+#endif // QT_NO_BEARERMANAGEMENT
diff --git a/src/network/bearer/qnetworkconfigmanager.h b/src/network/bearer/qnetworkconfigmanager.h
index 79bb27c..3e44be1 100644
--- a/src/network/bearer/qnetworkconfigmanager.h
+++ b/src/network/bearer/qnetworkconfigmanager.h
@@ -49,6 +49,8 @@
#include <QtCore/qobject.h>
#include <QtNetwork/qnetworkconfiguration.h>
+#ifndef QT_NO_BEARERMANAGEMENT
+
QT_BEGIN_HEADER
#ifndef QT_MOBILITY_BEARER
@@ -111,5 +113,7 @@ QTM_END_NAMESPACE
QT_END_HEADER
+#endif // QT_NO_BEARERMANAGEMENT
+
#endif //QNETWORKCONFIGURATIONMANAGER_H
diff --git a/src/network/bearer/qnetworkconfigmanager_p.cpp b/src/network/bearer/qnetworkconfigmanager_p.cpp
index c665fa2..a651dd1 100644
--- a/src/network/bearer/qnetworkconfigmanager_p.cpp
+++ b/src/network/bearer/qnetworkconfigmanager_p.cpp
@@ -50,13 +50,15 @@
#include <QtCore/qthread.h>
#include <QtCore/private/qcoreapplication_p.h>
+#ifndef QT_NO_BEARERMANAGEMENT
+
QT_BEGIN_NAMESPACE
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
(QBearerEngineFactoryInterface_iid, QLatin1String("/bearer")))
QNetworkConfigurationManagerPrivate::QNetworkConfigurationManagerPrivate()
-: capFlags(0), mutex(QMutex::Recursive), pollTimer(0), forcedPolling(0), firstUpdate(true)
+: pollTimer(0), mutex(QMutex::Recursive), forcedPolling(0), firstUpdate(true)
{
qRegisterMetaType<QNetworkConfiguration>("QNetworkConfiguration");
@@ -265,6 +267,18 @@ bool QNetworkConfigurationManagerPrivate::isOnline()
return !onlineConfigurations.isEmpty();
}
+QNetworkConfigurationManager::Capabilities QNetworkConfigurationManagerPrivate::capabilities()
+{
+ QMutexLocker locker(&mutex);
+
+ QNetworkConfigurationManager::Capabilities capFlags;
+
+ foreach (QBearerEngine *engine, sessionEngines)
+ capFlags |= engine->capabilities();
+
+ return capFlags;
+}
+
void QNetworkConfigurationManagerPrivate::configurationAdded(QNetworkConfigurationPrivatePointer ptr)
{
QMutexLocker locker(&mutex);
@@ -367,8 +381,6 @@ void QNetworkConfigurationManagerPrivate::updateConfigurations()
connect(engine, SIGNAL(configurationChanged(QNetworkConfigurationPrivatePointer)),
this, SLOT(configurationChanged(QNetworkConfigurationPrivatePointer)));
- capFlags |= engine->capabilities();
-
QMetaObject::invokeMethod(engine, "requestUpdate");
}
}
@@ -493,3 +505,5 @@ void QNetworkConfigurationManagerPrivate::disablePolling()
}
QT_END_NAMESPACE
+
+#endif // QT_NO_BEARERMANAGEMENT
diff --git a/src/network/bearer/qnetworkconfigmanager_p.h b/src/network/bearer/qnetworkconfigmanager_p.h
index dba9d2c..0649031 100644
--- a/src/network/bearer/qnetworkconfigmanager_p.h
+++ b/src/network/bearer/qnetworkconfigmanager_p.h
@@ -59,6 +59,8 @@
#include <QtCore/qmutex.h>
#include <QtCore/qset.h>
+#ifndef QT_NO_BEARERMANAGEMENT
+
QT_BEGIN_NAMESPACE
class QBearerEngine;
@@ -78,7 +80,7 @@ public:
bool isOnline();
- QNetworkConfigurationManager::Capabilities capFlags;
+ QNetworkConfigurationManager::Capabilities capabilities();
void performAsyncConfigurationUpdate();
@@ -102,19 +104,18 @@ Q_SIGNALS:
void abort();
private:
- QMutex mutex;
-
QTimer *pollTimer;
+ QMutex mutex;
+
QList<QBearerEngine *> sessionEngines;
QSet<QString> onlineConfigurations;
- QSet<int> updatingEngines;
- bool updating;
-
QSet<int> pollingEngines;
+ QSet<int> updatingEngines;
int forcedPolling;
+ bool updating;
bool firstUpdate;
@@ -130,4 +131,6 @@ Q_NETWORK_EXPORT QNetworkConfigurationManagerPrivate *qNetworkConfigurationManag
QT_END_NAMESPACE
+#endif // QT_NO_BEARERMANAGEMENT
+
#endif //QNETWORKCONFIGURATIONMANAGERPRIVATE_H
diff --git a/src/network/bearer/qnetworkconfiguration_p.h b/src/network/bearer/qnetworkconfiguration_p.h
index ccbe670..6e146e0 100644
--- a/src/network/bearer/qnetworkconfiguration_p.h
+++ b/src/network/bearer/qnetworkconfiguration_p.h
@@ -84,6 +84,8 @@ public:
return bearer;
}
+ QList<QNetworkConfigurationPrivatePointer> serviceNetworkMembers;
+
mutable QMutex mutex;
QString bearer;
@@ -94,8 +96,6 @@ public:
QNetworkConfiguration::Type type;
QNetworkConfiguration::Purpose purpose;
- QList<QNetworkConfigurationPrivatePointer> serviceNetworkMembers;
-
bool isValid;
bool roamingSupported;
diff --git a/src/network/bearer/qnetworksession.cpp b/src/network/bearer/qnetworksession.cpp
index 638bee7..1ed6cbb 100644
--- a/src/network/bearer/qnetworksession.cpp
+++ b/src/network/bearer/qnetworksession.cpp
@@ -47,6 +47,8 @@
#include "qnetworkconfigmanager_p.h"
#include "qnetworksession_p.h"
+#ifndef QT_NO_BEARERMANAGEMENT
+
QT_BEGIN_NAMESPACE
/*!
@@ -706,3 +708,5 @@ void QNetworkSession::disconnectNotify(const char *signal)
#include "moc_qnetworksession.cpp"
QT_END_NAMESPACE
+
+#endif // QT_NO_BEARERMANAGEMENT
diff --git a/src/network/bearer/qnetworksession.h b/src/network/bearer/qnetworksession.h
index 2911d0a..e7fffac 100644
--- a/src/network/bearer/qnetworksession.h
+++ b/src/network/bearer/qnetworksession.h
@@ -48,6 +48,8 @@
#include <QtCore/qvariant.h>
#include <QtNetwork/qnetworkconfiguration.h>
+#ifndef QT_NO_BEARERMANAGEMENT
+
#if defined(Q_OS_WIN) && defined(interface)
#undef interface
#endif
@@ -149,4 +151,6 @@ QTM_END_NAMESPACE
QT_END_HEADER
+#endif // QT_NO_BEARERMANAGEMENT
+
#endif //QNETWORKSESSION_H
diff --git a/src/network/bearer/qnetworksession_p.h b/src/network/bearer/qnetworksession_p.h
index a341eaf..c7b5718 100644
--- a/src/network/bearer/qnetworksession_p.h
+++ b/src/network/bearer/qnetworksession_p.h
@@ -56,6 +56,8 @@
#include "qnetworksession.h"
#include "qnetworkconfiguration_p.h"
+#ifndef QT_NO_BEARERMANAGEMENT
+
QT_BEGIN_NAMESPACE
class Q_NETWORK_EXPORT QNetworkSessionPrivate : public QObject
@@ -126,6 +128,8 @@ Q_SIGNALS:
void preferredConfigurationChanged(const QNetworkConfiguration &config, bool isSeamless);
protected:
+ QNetworkSession *q;
+
// The config set on QNetworkSession.
QNetworkConfiguration publicConfig;
@@ -140,11 +144,11 @@ protected:
QNetworkSession::State state;
bool isOpen;
-
- QNetworkSession *q;
};
QT_END_NAMESPACE
+#endif // QT_NO_BEARERMANAGEMENT
+
#endif //QNETWORKSESSIONPRIVATE_H
diff --git a/src/network/socket/qlocalserver_win.cpp b/src/network/socket/qlocalserver_win.cpp
index e820f73..5d2be72 100644
--- a/src/network/socket/qlocalserver_win.cpp
+++ b/src/network/socket/qlocalserver_win.cpp
@@ -65,8 +65,8 @@ bool QLocalServerPrivate::addListener()
listener.handle = CreateNamedPipe(
(const wchar_t *)fullServerName.utf16(), // pipe name
PIPE_ACCESS_DUPLEX | FILE_FLAG_OVERLAPPED, // read/write access
- PIPE_TYPE_MESSAGE | // message type pipe
- PIPE_READMODE_MESSAGE | // message-read mode
+ PIPE_TYPE_BYTE | // byte type pipe
+ PIPE_READMODE_BYTE | // byte-read mode
PIPE_WAIT, // blocking mode
PIPE_UNLIMITED_INSTANCES, // max. instances
BUFSIZE, // output buffer size
diff --git a/src/network/ssl/qsslsocket_openssl_symbols.cpp b/src/network/ssl/qsslsocket_openssl_symbols.cpp
index d2eb6f1..09ecd4d 100644
--- a/src/network/ssl/qsslsocket_openssl_symbols.cpp
+++ b/src/network/ssl/qsslsocket_openssl_symbols.cpp
@@ -748,7 +748,7 @@ bool q_resolveOpenSslSymbols()
bool q_resolveOpenSslSymbols()
{
-#ifdef QT_NO_SSL
+#ifdef QT_NO_OPENSSL
return false;
#endif
return true;
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
index 0a452f3..0cc7430 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
@@ -217,7 +217,9 @@ void QGL2PaintEngineExPrivate::updateBrushTexture()
const QPixmap& texPixmap = currentBrush.texture();
glActiveTexture(GL_TEXTURE0 + QT_BRUSH_TEXTURE_UNIT);
- QGLTexture *tex = ctx->d_func()->bindTexture(texPixmap, GL_TEXTURE_2D, GL_RGBA, QGLContext::InternalBindOption);
+ QGLTexture *tex = ctx->d_func()->bindTexture(texPixmap, GL_TEXTURE_2D, GL_RGBA,
+ QGLContext::InternalBindOption |
+ QGLContext::CanFlipNativePixmapBindOption);
updateTextureFilter(GL_TEXTURE_2D, GL_REPEAT, q->state()->renderHints & QPainter::SmoothPixmapTransform);
textureInvertedY = tex->options & QGLContext::InvertedYBindOption ? -1 : 1;
}
@@ -1641,7 +1643,7 @@ void QGL2PaintEngineExPrivate::drawCachedGlyphs(QFontEngineGlyphCache::Type glyp
glBindTexture(GL_TEXTURE_2D, cache->texture());
lastMaskTextureUsed = cache->texture();
}
- updateTextureFilter(GL_TEXTURE_2D, GL_REPEAT, false);
+ updateTextureFilter(GL_TEXTURE_2D, GL_REPEAT, s->matrix.type() > QTransform::TxTranslate);
shaderManager->currentProgram()->setUniformValue(location(QGLEngineShaderManager::MaskTexture), QT_MASK_TEXTURE_UNIT);
#if defined(QT_OPENGL_DRAWCACHEDGLYPHS_INDEX_ARRAY_VBO)
diff --git a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
index 6cb76ee..994c1c9 100644
--- a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
+++ b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
@@ -246,4 +246,9 @@ int QGLTextureGlyphCache::glyphMargin() const
#endif
}
+int QGLTextureGlyphCache::glyphPadding() const
+{
+ return 1;
+}
+
QT_END_NAMESPACE
diff --git a/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h b/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h
index 2a8a782..04731b1 100644
--- a/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h
+++ b/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h
@@ -73,6 +73,7 @@ public:
virtual void resizeTextureData(int width, int height);
virtual void fillTexture(const Coord &c, glyph_t glyph);
virtual int glyphMargin() const;
+ virtual int glyphPadding() const;
inline GLuint texture() const { return m_texture; }
diff --git a/src/opengl/gl2paintengineex/qtriangulatingstroker.cpp b/src/opengl/gl2paintengineex/qtriangulatingstroker.cpp
index 7eae78f..f677ce1 100644
--- a/src/opengl/gl2paintengineex/qtriangulatingstroker.cpp
+++ b/src/opengl/gl2paintengineex/qtriangulatingstroker.cpp
@@ -111,7 +111,7 @@ void QTriangulatingStroker::process(const QVectorPath &path, const QPen &pen, co
// depending on if the pen is cosmetic or not.
//
// The curvyness value of PI/14 was based on,
- // arcLength=2*PI*r/4=PI/2 and splitting length into somewhere
+ // arcLength = 2*PI*r/4 = PI*r/2 and splitting length into somewhere
// between 3 and 8 where 5 seemed to be give pretty good results
// hence: Q_PI/14. Lower divisors will give more detail at the
// direct cost of performance.
@@ -495,6 +495,8 @@ void QDashedStrokeProcessor::process(const QVectorPath &path, const QPen &pen, c
const QPainterPath::ElementType *types = path.elements();
int count = path.elementCount();
+ bool cosmetic = pen.isCosmetic();
+
m_points.reset();
m_types.reset();
@@ -503,10 +505,26 @@ void QDashedStrokeProcessor::process(const QVectorPath &path, const QPen &pen, c
width = 1;
m_dash_stroker.setDashPattern(pen.dashPattern());
- m_dash_stroker.setStrokeWidth(pen.isCosmetic() ? width * m_inv_scale : width);
+ m_dash_stroker.setStrokeWidth(cosmetic ? width * m_inv_scale : width);
m_dash_stroker.setMiterLimit(pen.miterLimit());
m_dash_stroker.setClipRect(clip);
- qreal curvyness = sqrt(width) * m_inv_scale / 8;
+
+ float curvynessAdd, curvynessMul, roundness = 0;
+
+ // simplfy pens that are thin in device size (2px wide or less)
+ if (width < 2.5 && (cosmetic || m_inv_scale == 1)) {
+ curvynessAdd = 0.5;
+ curvynessMul = CURVE_FLATNESS / m_inv_scale;
+ roundness = 1;
+ } else if (cosmetic) {
+ curvynessAdd= width / 2;
+ curvynessMul= CURVE_FLATNESS;
+ roundness = qMax<int>(4, width * CURVE_FLATNESS);
+ } else {
+ curvynessAdd = width * m_inv_scale;
+ curvynessMul = CURVE_FLATNESS / m_inv_scale;
+ roundness = qMax<int>(4, width * curvynessMul);
+ }
if (count < 2)
return;
@@ -541,9 +559,11 @@ void QDashedStrokeProcessor::process(const QVectorPath &path, const QPen &pen, c
*(((const QPointF *) pts) + 1),
*(((const QPointF *) pts) + 2));
QRectF bounds = b.bounds();
- int threshold = qMin<float>(64, qMax(bounds.width(), bounds.height()) * curvyness);
+ float rad = qMax(bounds.width(), bounds.height());
+ int threshold = qMin<float>(64, (rad + curvynessAdd) * curvynessMul);
if (threshold < 4)
threshold = 4;
+
qreal threshold_minus_1 = threshold - 1;
for (int i=0; i<threshold; ++i) {
QPointF pt = b.pointAt(i / threshold_minus_1);
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index e56b149..5595e02 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -2442,7 +2442,8 @@ QGLTexture *QGLContextPrivate::bindTexture(const QPixmap &pixmap, GLenum target,
// Try to use texture_from_pixmap
const QX11Info *xinfo = qt_x11Info(paintDevice);
if (pd->classId() == QPixmapData::X11Class && pd->pixelType() == QPixmapData::PixmapType
- && xinfo && xinfo->screen() == pixmap.x11Info().screen())
+ && xinfo && xinfo->screen() == pixmap.x11Info().screen()
+ && target == GL_TEXTURE_2D)
{
texture = bindTextureFromNativePixmap(const_cast<QPixmap*>(&pixmap), key, options);
if (texture) {
diff --git a/src/opengl/qgl_x11.cpp b/src/opengl/qgl_x11.cpp
index e1a202f..d203646 100644
--- a/src/opengl/qgl_x11.cpp
+++ b/src/opengl/qgl_x11.cpp
@@ -1677,6 +1677,14 @@ QGLTexture *QGLContextPrivate::bindTextureFromNativePixmap(QPixmap *pixmap, cons
#if !defined(GLX_VERSION_1_3) || defined(Q_OS_HPUX)
return 0;
#else
+
+ // Check we have GLX 1.3, as it is needed for glXCreatePixmap & glXDestroyPixmap
+ int majorVersion = 0;
+ int minorVersion = 0;
+ glXQueryVersion(X11->display, &majorVersion, &minorVersion);
+ if (majorVersion < 1 || (majorVersion == 1 && minorVersion < 3))
+ return 0;
+
Q_Q(QGLContext);
QX11PixmapData *pixmapData = static_cast<QX11PixmapData*>(pixmap->data_ptr().data());
diff --git a/src/plugins/bearer/corewlan/corewlan.pro b/src/plugins/bearer/corewlan/corewlan.pro
index 9786c03..922a501 100644
--- a/src/plugins/bearer/corewlan/corewlan.pro
+++ b/src/plugins/bearer/corewlan/corewlan.pro
@@ -1,7 +1,7 @@
TARGET = qcorewlanbearer
include(../../qpluginbase.pri)
-QT += network
+QT = core gui network
LIBS += -framework Foundation -framework SystemConfiguration
contains(QT_CONFIG, corewlan) {
diff --git a/src/plugins/bearer/corewlan/main.cpp b/src/plugins/bearer/corewlan/main.cpp
index 5be8c0e..628ec61 100644
--- a/src/plugins/bearer/corewlan/main.cpp
+++ b/src/plugins/bearer/corewlan/main.cpp
@@ -45,6 +45,8 @@
#include <QtCore/qdebug.h>
+#ifndef QT_NO_BEARERMANAGEMENT
+
QT_BEGIN_NAMESPACE
class QCoreWlanEnginePlugin : public QBearerEnginePlugin
@@ -82,3 +84,5 @@ Q_EXPORT_STATIC_PLUGIN(QCoreWlanEnginePlugin)
Q_EXPORT_PLUGIN2(qcorewlanbearer, QCoreWlanEnginePlugin)
QT_END_NAMESPACE
+
+#endif // QT_NO_BEARERMANAGEMENT
diff --git a/src/plugins/bearer/corewlan/qcorewlanengine.h b/src/plugins/bearer/corewlan/qcorewlanengine.h
index 11f5d96..5c69299 100644
--- a/src/plugins/bearer/corewlan/qcorewlanengine.h
+++ b/src/plugins/bearer/corewlan/qcorewlanengine.h
@@ -48,6 +48,8 @@
#include <QTimer>
#include <SystemConfiguration/SystemConfiguration.h>
+#ifndef QT_NO_BEARERMANAGEMENT
+
QT_BEGIN_NAMESPACE
class QNetworkConfigurationPrivate;
@@ -107,5 +109,6 @@ protected:
QT_END_NAMESPACE
-#endif
+#endif // QT_NO_BEARERMANAGEMENT
+#endif
diff --git a/src/plugins/bearer/corewlan/qcorewlanengine.mm b/src/plugins/bearer/corewlan/qcorewlanengine.mm
index e418432..268126a 100644
--- a/src/plugins/bearer/corewlan/qcorewlanengine.mm
+++ b/src/plugins/bearer/corewlan/qcorewlanengine.mm
@@ -67,6 +67,10 @@
#include <private/qt_cocoa_helpers_mac_p.h>
#include "private/qcore_mac_p.h"
+#ifndef QT_NO_BEARERMANAGEMENT
+
+QT_BEGIN_NAMESPACE
+
@interface QNSListener : NSObject
{
NSNotificationCenter *center;
@@ -126,8 +130,6 @@
QNSListener *listener = 0;
-QT_BEGIN_NAMESPACE
-
void networkChangeCallback(SCDynamicStoreRef/* store*/, CFArrayRef changedKeys, void *info)
{
for ( long i = 0; i < CFArrayGetCount(changedKeys); i++) {
@@ -778,3 +780,5 @@ void QCoreWlanEngine::getUserConfigurations()
}
QT_END_NAMESPACE
+
+#endif // QT_NO_BEARERMANAGEMENT
diff --git a/src/plugins/bearer/generic/generic.pro b/src/plugins/bearer/generic/generic.pro
index 1d141fd..c967f8c 100644
--- a/src/plugins/bearer/generic/generic.pro
+++ b/src/plugins/bearer/generic/generic.pro
@@ -1,7 +1,7 @@
TARGET = qgenericbearer
include(../../qpluginbase.pri)
-QT += network
+QT = core network
HEADERS += qgenericengine.h \
../qnetworksession_impl.h \
diff --git a/src/plugins/bearer/generic/main.cpp b/src/plugins/bearer/generic/main.cpp
index ba85d93..ec1b689 100644
--- a/src/plugins/bearer/generic/main.cpp
+++ b/src/plugins/bearer/generic/main.cpp
@@ -45,6 +45,8 @@
#include <QtCore/qdebug.h>
+#ifndef QT_NO_BEARERMANAGEMENT
+
QT_BEGIN_NAMESPACE
class QGenericEnginePlugin : public QBearerEnginePlugin
@@ -82,3 +84,5 @@ Q_EXPORT_STATIC_PLUGIN(QGenericEnginePlugin)
Q_EXPORT_PLUGIN2(qgenericbearer, QGenericEnginePlugin)
QT_END_NAMESPACE
+
+#endif // QT_NO_BEARERMANAGEMENT
diff --git a/src/plugins/bearer/generic/qgenericengine.cpp b/src/plugins/bearer/generic/qgenericengine.cpp
index d65025b..41ff3e0 100644
--- a/src/plugins/bearer/generic/qgenericengine.cpp
+++ b/src/plugins/bearer/generic/qgenericengine.cpp
@@ -64,6 +64,8 @@
#include <unistd.h>
#endif
+#ifndef QT_NO_BEARERMANAGEMENT
+
QT_BEGIN_NAMESPACE
#ifndef QT_NO_NETWORKINTERFACE
@@ -349,3 +351,4 @@ bool QGenericEngine::requiresPolling() const
QT_END_NAMESPACE
+#endif // QT_NO_BEARERMANAGEMENT
diff --git a/src/plugins/bearer/generic/qgenericengine.h b/src/plugins/bearer/generic/qgenericengine.h
index 616a3fd..82d22af 100644
--- a/src/plugins/bearer/generic/qgenericengine.h
+++ b/src/plugins/bearer/generic/qgenericengine.h
@@ -47,6 +47,8 @@
#include <QMap>
#include <QTimer>
+#ifndef QT_NO_BEARERMANAGEMENT
+
QT_BEGIN_NAMESPACE
class QNetworkConfigurationPrivate;
@@ -89,5 +91,7 @@ private:
QT_END_NAMESPACE
+#endif // QT_NO_BEARERMANAGEMENT
+
#endif
diff --git a/src/plugins/bearer/icd/main.cpp b/src/plugins/bearer/icd/main.cpp
index ad1a918..491112b 100644
--- a/src/plugins/bearer/icd/main.cpp
+++ b/src/plugins/bearer/icd/main.cpp
@@ -45,6 +45,8 @@
#include <QtCore/qdebug.h>
+#ifndef QT_NO_BEARERMANAGEMENT
+
QT_BEGIN_NAMESPACE
class QIcdEnginePlugin : public QBearerEnginePlugin
@@ -82,3 +84,5 @@ Q_EXPORT_STATIC_PLUGIN(QIcdEnginePlugin)
Q_EXPORT_PLUGIN2(qicdbearer, QIcdEnginePlugin)
QT_END_NAMESPACE
+
+#endif
diff --git a/src/plugins/bearer/icd/qicdengine.cpp b/src/plugins/bearer/icd/qicdengine.cpp
index a6cf0c2..fc9b469 100644
--- a/src/plugins/bearer/icd/qicdengine.cpp
+++ b/src/plugins/bearer/icd/qicdengine.cpp
@@ -47,6 +47,8 @@
#include <iapconf.h>
#include <iapmonitor.h>
+#ifndef QT_NO_BEARERMANAGEMENT
+
QT_BEGIN_NAMESPACE
IcdNetworkConfigurationPrivate::IcdNetworkConfigurationPrivate()
@@ -988,3 +990,5 @@ QNetworkSessionPrivate *QIcdEngine::createSessionBackend()
#include "qicdengine.moc"
QT_END_NAMESPACE
+
+#endif // QT_NO_BEARERMANAGEMENT
diff --git a/src/plugins/bearer/icd/qicdengine.h b/src/plugins/bearer/icd/qicdengine.h
index a2e9a2f..841874f 100644
--- a/src/plugins/bearer/icd/qicdengine.h
+++ b/src/plugins/bearer/icd/qicdengine.h
@@ -67,13 +67,13 @@ public:
QByteArray network_id; // typically WLAN ssid or similar
QString iap_type; // is this one WLAN or GPRS
- // Network attributes for this IAP, this is the value returned by icd and
- // passed to it when connecting.
- uint32_t network_attrs;
-
QString service_type;
QString service_id;
uint32_t service_attrs;
+
+ // Network attributes for this IAP, this is the value returned by icd and
+ // passed to it when connecting.
+ uint32_t network_attrs;
};
inline IcdNetworkConfigurationPrivate *toIcdConfig(QNetworkConfigurationPrivatePointer ptr)
diff --git a/src/plugins/bearer/icd/qnetworksession_impl.cpp b/src/plugins/bearer/icd/qnetworksession_impl.cpp
index 2928a31..a6acce0 100644
--- a/src/plugins/bearer/icd/qnetworksession_impl.cpp
+++ b/src/plugins/bearer/icd/qnetworksession_impl.cpp
@@ -52,6 +52,8 @@
#include <netinet/in.h>
#include <arpa/inet.h>
+#ifndef QT_NO_BEARERMANAGEMENT
+
QT_BEGIN_NAMESPACE
QDBusArgument &operator<<(QDBusArgument &argument,
@@ -1044,3 +1046,5 @@ void QNetworkSessionPrivateImpl::clearProxyInformation()
}
QT_END_NAMESPACE
+
+#endif // QT_NO_BEARERMANAGEMENT
diff --git a/src/plugins/bearer/icd/qnetworksession_impl.h b/src/plugins/bearer/icd/qnetworksession_impl.h
index d15f401..c43b1f0 100644
--- a/src/plugins/bearer/icd/qnetworksession_impl.h
+++ b/src/plugins/bearer/icd/qnetworksession_impl.h
@@ -66,6 +66,8 @@
#include <icd/dbus_api.h>
+#ifndef QT_NO_BEARERMANAGEMENT
+
QT_BEGIN_NAMESPACE
class QIcdEngine;
@@ -210,5 +212,7 @@ Q_DECLARE_METATYPE(ICd2DetailsList);
QT_END_NAMESPACE
+#endif // QT_NO_BEARERMANAGEMENT
+
#endif //QNETWORKSESSIONPRIVATE_H
diff --git a/src/plugins/bearer/nativewifi/main.cpp b/src/plugins/bearer/nativewifi/main.cpp
index d77462e..98789aa 100644
--- a/src/plugins/bearer/nativewifi/main.cpp
+++ b/src/plugins/bearer/nativewifi/main.cpp
@@ -50,6 +50,8 @@
#include <QtCore/qdebug.h>
+#ifndef QT_NO_BEARERMANAGEMENT
+
QT_BEGIN_NAMESPACE
static void resolveLibrary()
@@ -137,3 +139,5 @@ Q_EXPORT_STATIC_PLUGIN(QNativeWifiEnginePlugin)
Q_EXPORT_PLUGIN2(qnativewifibearer, QNativeWifiEnginePlugin)
QT_END_NAMESPACE
+
+#endif // QT_NO_BEARERMANAGEMENT
diff --git a/src/plugins/bearer/nativewifi/nativewifi.pro b/src/plugins/bearer/nativewifi/nativewifi.pro
index f277a04..36dd36d 100644
--- a/src/plugins/bearer/nativewifi/nativewifi.pro
+++ b/src/plugins/bearer/nativewifi/nativewifi.pro
@@ -1,7 +1,7 @@
TARGET = qnativewifibearer
include(../../qpluginbase.pri)
-QT += network
+QT = core network
HEADERS += qnativewifiengine.h \
platformdefs.h \
diff --git a/src/plugins/bearer/nativewifi/qnativewifiengine.cpp b/src/plugins/bearer/nativewifi/qnativewifiengine.cpp
index 6c74159..e796df3 100644
--- a/src/plugins/bearer/nativewifi/qnativewifiengine.cpp
+++ b/src/plugins/bearer/nativewifi/qnativewifiengine.cpp
@@ -49,6 +49,8 @@
#include <QtCore/qdebug.h>
+#ifndef QT_NO_BEARERMANAGEMENT
+
QT_BEGIN_NAMESPACE
WlanOpenHandleProto local_WlanOpenHandle = 0;
@@ -558,3 +560,5 @@ bool QNativeWifiEngine::requiresPolling() const
}
QT_END_NAMESPACE
+
+#endif // QT_NO_BEARERMANAGEMENT
diff --git a/src/plugins/bearer/nativewifi/qnativewifiengine.h b/src/plugins/bearer/nativewifi/qnativewifiengine.h
index 2005b2b..77764e4 100644
--- a/src/plugins/bearer/nativewifi/qnativewifiengine.h
+++ b/src/plugins/bearer/nativewifi/qnativewifiengine.h
@@ -57,6 +57,8 @@
#include <QtCore/qtimer.h>
+#ifndef QT_NO_BEARERMANAGEMENT
+
QT_BEGIN_NAMESPACE
class QNetworkConfigurationPrivate;
@@ -101,4 +103,6 @@ private:
QT_END_NAMESPACE
+#endif // QT_NO_BEARERMANAGEMENT
+
#endif
diff --git a/src/plugins/bearer/networkmanager/main.cpp b/src/plugins/bearer/networkmanager/main.cpp
index 88068fc..9ab2c39 100644
--- a/src/plugins/bearer/networkmanager/main.cpp
+++ b/src/plugins/bearer/networkmanager/main.cpp
@@ -45,6 +45,7 @@
#include <QtCore/qdebug.h>
+#ifndef QT_NO_BEARERMANAGEMENT
#ifndef QT_NO_DBUS
QT_BEGIN_NAMESPACE
@@ -91,3 +92,4 @@ Q_EXPORT_PLUGIN2(qnmbearer, QNetworkManagerEnginePlugin)
QT_END_NAMESPACE
#endif // QT_NO_DBUS
+#endif // QT_NO_BEARERMANAGEMENT
diff --git a/src/plugins/bearer/networkmanager/networkmanager.pro b/src/plugins/bearer/networkmanager/networkmanager.pro
index bf0d29a..e396263 100644
--- a/src/plugins/bearer/networkmanager/networkmanager.pro
+++ b/src/plugins/bearer/networkmanager/networkmanager.pro
@@ -1,7 +1,7 @@
TARGET = qnmbearer
include(../../qpluginbase.pri)
-QT += network dbus
+QT = core network dbus
HEADERS += qnmdbushelper.h \
qnetworkmanagerservice.h \
diff --git a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp
index 06533a1..13b2252 100644
--- a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp
+++ b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp
@@ -56,6 +56,7 @@
#include <QDBusMessage>
#include <QDBusReply>
+#ifndef QT_NO_BEARERMANAGEMENT
#ifndef QT_NO_DBUS
QT_BEGIN_NAMESPACE
@@ -918,3 +919,4 @@ QNetworkConfigurationPrivatePointer QNetworkManagerEngine::defaultConfiguration(
QT_END_NAMESPACE
#endif // QT_NO_DBUS
+#endif // QT_NO_BEARERMANAGEMENT
diff --git a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.h b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.h
index 964726e..7f8badb 100644
--- a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.h
+++ b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.h
@@ -60,6 +60,7 @@
#include <QMap>
#include <QVariant>
+#ifndef QT_NO_BEARERMANAGEMENT
#ifndef QT_NO_DBUS
QT_BEGIN_NAMESPACE
@@ -140,6 +141,7 @@ private:
QT_END_NAMESPACE
#endif // QT_NO_DBUS
+#endif // QT_NO_BEARERMANAGEMENT
#endif
diff --git a/src/plugins/bearer/nla/nla.pro b/src/plugins/bearer/nla/nla.pro
index 5148b09..5dfb6d7 100644
--- a/src/plugins/bearer/nla/nla.pro
+++ b/src/plugins/bearer/nla/nla.pro
@@ -1,7 +1,7 @@
TARGET = qnlabearer
include(../../qpluginbase.pri)
-QT += network
+QT = core network
!wince* {
LIBS += -lWs2_32
diff --git a/src/plugins/bearer/qbearerengine_impl.h b/src/plugins/bearer/qbearerengine_impl.h
index 740def3..6c30d0f 100644
--- a/src/plugins/bearer/qbearerengine_impl.h
+++ b/src/plugins/bearer/qbearerengine_impl.h
@@ -44,6 +44,8 @@
#include <QtNetwork/private/qbearerengine_p.h>
+#ifndef QT_NO_BEARERMANAGEMENT
+
QT_BEGIN_NAMESPACE
class QBearerEngineImpl : public QBearerEngine
@@ -78,4 +80,5 @@ Q_SIGNALS:
QT_END_NAMESPACE
+#endif // QT_NO_BEARERMANAGEMENT
#endif
diff --git a/src/plugins/bearer/qnetworksession_impl.cpp b/src/plugins/bearer/qnetworksession_impl.cpp
index 33cce69..ef5f347 100644
--- a/src/plugins/bearer/qnetworksession_impl.cpp
+++ b/src/plugins/bearer/qnetworksession_impl.cpp
@@ -49,6 +49,8 @@
#include <QtCore/qdebug.h>
#include <QtCore/qmutex.h>
+#ifndef QT_NO_BEARERMANAGEMENT
+
QT_BEGIN_NAMESPACE
static QBearerEngineImpl *getEngineFromId(const QString &id)
@@ -439,3 +441,6 @@ void QNetworkSessionPrivateImpl::decrementTimeout()
}
QT_END_NAMESPACE
+
+#endif // QT_NO_BEARERMANAGEMENT
+
diff --git a/src/plugins/bearer/qnetworksession_impl.h b/src/plugins/bearer/qnetworksession_impl.h
index 3becbf0..a4902eb 100644
--- a/src/plugins/bearer/qnetworksession_impl.h
+++ b/src/plugins/bearer/qnetworksession_impl.h
@@ -60,6 +60,8 @@
#include <QtCore/qdatetime.h>
+#ifndef QT_NO_BEARERMANAGEMENT
+
QT_BEGIN_NAMESPACE
class QBearerEngineImpl;
@@ -116,18 +118,20 @@ private Q_SLOTS:
void decrementTimeout();
private:
- bool opened;
-
QBearerEngineImpl *engine;
- QNetworkSession::SessionError lastError;
-
quint64 startTime;
+ QNetworkSession::SessionError lastError;
+
int sessionTimeout;
+
+ bool opened;
};
QT_END_NAMESPACE
+#endif // QT_NO_BEARERMANAGEMENT
+
#endif //QNETWORKSESSION_IMPL_H
diff --git a/src/plugins/bearer/symbian/main.cpp b/src/plugins/bearer/symbian/main.cpp
index 0321451..c4f539b 100644
--- a/src/plugins/bearer/symbian/main.cpp
+++ b/src/plugins/bearer/symbian/main.cpp
@@ -45,6 +45,8 @@
#include <QtCore/qdebug.h>
+#ifndef QT_NO_BEARERMANAGEMENT
+
QT_BEGIN_NAMESPACE
class QSymbianEnginePlugin : public QBearerEnginePlugin
@@ -82,3 +84,5 @@ Q_EXPORT_STATIC_PLUGIN(QSymbianEnginePlugin)
Q_EXPORT_PLUGIN2(qsymbianbearer, QSymbianEnginePlugin)
QT_END_NAMESPACE
+
+#endif // QT_NO_BEARERMANAGEMENT
diff --git a/src/plugins/bearer/symbian/qnetworksession_impl.cpp b/src/plugins/bearer/symbian/qnetworksession_impl.cpp
index 36fbc51..1b9c8cc 100644
--- a/src/plugins/bearer/symbian/qnetworksession_impl.cpp
+++ b/src/plugins/bearer/symbian/qnetworksession_impl.cpp
@@ -48,6 +48,8 @@
#include <stdapis/sys/socket.h>
#include <stdapis/net/if.h>
+#ifndef QT_NO_BEARERMANAGEMENT
+
QT_BEGIN_NAMESPACE
QNetworkSessionPrivateImpl::QNetworkSessionPrivateImpl(SymbianEngine *engine)
@@ -1367,3 +1369,6 @@ void ConnectionProgressNotifier::RunL()
}
QT_END_NAMESPACE
+
+#endif //QT_NO_BEARERMANAGEMENT
+
diff --git a/src/plugins/bearer/symbian/symbianengine.cpp b/src/plugins/bearer/symbian/symbianengine.cpp
index 440f463..c629d02 100644
--- a/src/plugins/bearer/symbian/symbianengine.cpp
+++ b/src/plugins/bearer/symbian/symbianengine.cpp
@@ -69,6 +69,8 @@
#include <aputils.h>
#endif
+#ifndef QT_NO_BEARERMANAGEMENT
+
QT_BEGIN_NAMESPACE
static const int KValueThatWillBeAddedToSNAPId = 1000;
@@ -1130,3 +1132,5 @@ void AccessPointsAvailabilityScanner::RunL()
}
QT_END_NAMESPACE
+
+#endif // QT_NO_BEARERMANAGEMENT
diff --git a/src/plugins/bearer/symbian/symbianengine.h b/src/plugins/bearer/symbian/symbianengine.h
index 2e7ae60..dfd12bd 100644
--- a/src/plugins/bearer/symbian/symbianengine.h
+++ b/src/plugins/bearer/symbian/symbianengine.h
@@ -84,14 +84,14 @@ public:
QString bearerName() const;
+ QNetworkConfigurationPrivatePointer serviceNetworkPtr;
+
+ QString mappingName;
+
Bearer bearer;
TUint32 numericId;
TUint connectionId;
-
- QNetworkConfigurationPrivatePointer serviceNetworkPtr;
-
- QString mappingName;
};
inline SymbianNetworkConfigurationPrivate *toSymbianConfig(QNetworkConfigurationPrivatePointer ptr)
diff --git a/src/plugins/gfxdrivers/powervr/QWSWSEGL/pvrqwsdrawable.c b/src/plugins/gfxdrivers/powervr/QWSWSEGL/pvrqwsdrawable.c
index e6ac418..d05dd5d 100644
--- a/src/plugins/gfxdrivers/powervr/QWSWSEGL/pvrqwsdrawable.c
+++ b/src/plugins/gfxdrivers/powervr/QWSWSEGL/pvrqwsdrawable.c
@@ -95,7 +95,7 @@ static int pvrQwsInitFbScreen(int screen)
width = var.xres;
height = var.yres;
bytesPerPixel = var.bits_per_pixel / 8;
- stride = var.xres * bytesPerPixel;
+ stride = fix.line_length;
format = PVR2D_1BPP;
if (var.bits_per_pixel == 16) {
if (var.red.length == 5 && var.green.length == 6 &&
diff --git a/src/plugins/phonon/ds9/ds9.pro b/src/plugins/phonon/ds9/ds9.pro
index f40c561..301808e 100644
--- a/src/plugins/phonon/ds9/ds9.pro
+++ b/src/plugins/phonon/ds9/ds9.pro
@@ -22,7 +22,6 @@ HEADERS += \
$$PHONON_DS9_DIR/mediaobject.h \
$$PHONON_DS9_DIR/videowidget.h \
$$PHONON_DS9_DIR/videorenderer_soft.h \
- $$PHONON_DS9_DIR/videorenderer_vmr9.h \
$$PHONON_DS9_DIR/volumeeffect.h \
$$PHONON_DS9_DIR/qbasefilter.h \
$$PHONON_DS9_DIR/qpin.h \
@@ -45,7 +44,6 @@ SOURCES += \
$$PHONON_DS9_DIR/mediaobject.cpp \
$$PHONON_DS9_DIR/videowidget.cpp \
$$PHONON_DS9_DIR/videorenderer_soft.cpp \
- $$PHONON_DS9_DIR/videorenderer_vmr9.cpp \
$$PHONON_DS9_DIR/volumeeffect.cpp \
$$PHONON_DS9_DIR/qbasefilter.cpp \
$$PHONON_DS9_DIR/qpin.cpp \
@@ -53,6 +51,15 @@ SOURCES += \
$$PHONON_DS9_DIR/qaudiocdreader.cpp \
$$PHONON_DS9_DIR/qmeminputpin.cpp
+#the EVR renderer (only available on desktop)
+!wince*:SOURCES += $$PHONON_DS9_DIR/videorenderer_evr.cpp \
+ $$PHONON_DS9_DIR/videorenderer_vmr9.cpp
+!wince*:HEADERS += $$PHONON_DS9_DIR/qevr9.h \
+ $$PHONON_DS9_DIR/videorenderer_evr.h \
+ $$PHONON_DS9_DIR/videorenderer_vmr9.h
+wince*:SOURCES += $$PHONON_DS9_DIR/videorenderer_default.cpp
+wince*:HEADERS += $$PHONON_DS9_DIR/videorenderer_default.h
+
target.path = $$[QT_INSTALL_PLUGINS]/phonon_backend
INSTALLS += target
diff --git a/src/s60installs/bwins/QtCoreu.def b/src/s60installs/bwins/QtCoreu.def
index cf7fe6f..c2692f6 100644
--- a/src/s60installs/bwins/QtCoreu.def
+++ b/src/s60installs/bwins/QtCoreu.def
@@ -382,7 +382,7 @@ EXPORTS
??1QDateTime@@QAE@XZ @ 381 NONAME ; QDateTime::~QDateTime(void)
??1QDateTimeParser@@UAE@XZ @ 382 NONAME ; QDateTimeParser::~QDateTimeParser(void)
??1QDebug@@QAE@XZ @ 383 NONAME ; QDebug::~QDebug(void)
- ??1QDeclarativeData@@UAE@XZ @ 384 NONAME ; QDeclarativeData::~QDeclarativeData(void)
+ ??1QDeclarativeData@@UAE@XZ @ 384 NONAME ABSENT ; QDeclarativeData::~QDeclarativeData(void)
??1QDir@@QAE@XZ @ 385 NONAME ; QDir::~QDir(void)
??1QDirIterator@@UAE@XZ @ 386 NONAME ; QDirIterator::~QDirIterator(void)
??1QDynamicPropertyChangeEvent@@UAE@XZ @ 387 NONAME ; QDynamicPropertyChangeEvent::~QDynamicPropertyChangeEvent(void)
@@ -885,7 +885,7 @@ EXPORTS
??_EQCoreApplicationPrivate@@UAE@I@Z @ 884 NONAME ; QCoreApplicationPrivate::~QCoreApplicationPrivate(unsigned int)
??_EQDataStream@@UAE@I@Z @ 885 NONAME ; QDataStream::~QDataStream(unsigned int)
??_EQDateTimeParser@@UAE@I@Z @ 886 NONAME ; QDateTimeParser::~QDateTimeParser(unsigned int)
- ??_EQDeclarativeData@@UAE@I@Z @ 887 NONAME ; QDeclarativeData::~QDeclarativeData(unsigned int)
+ ??_EQDeclarativeData@@UAE@I@Z @ 887 NONAME ABSENT ; QDeclarativeData::~QDeclarativeData(unsigned int)
??_EQDirIterator@@UAE@I@Z @ 888 NONAME ; QDirIterator::~QDirIterator(unsigned int)
??_EQDynamicPropertyChangeEvent@@UAE@I@Z @ 889 NONAME ; QDynamicPropertyChangeEvent::~QDynamicPropertyChangeEvent(unsigned int)
??_EQEvent@@UAE@I@Z @ 890 NONAME ; QEvent::~QEvent(unsigned int)
@@ -4457,4 +4457,7 @@ EXPORTS
?toEasingCurve@QVariant@@QBE?AVQEasingCurve@@XZ @ 4456 NONAME ; class QEasingCurve QVariant::toEasingCurve(void) const
?toMSecsSinceEpoch@QDateTime@@QBE_JXZ @ 4457 NONAME ; long long QDateTime::toMSecsSinceEpoch(void) const
?transitions@QState@@QBE?AV?$QList@PAVQAbstractTransition@@@@XZ @ 4458 NONAME ; class QList<class QAbstractTransition *> QState::transitions(void) const
+ ?validCodecs@QTextCodec@@CA_NXZ @ 4459 NONAME ; bool QTextCodec::validCodecs(void)
+ ?destroyed@QDeclarativeData@@2P6AXPAV1@PAVQObject@@@ZA @ 4460 NONAME ; void (*QDeclarativeData::destroyed)(class QDeclarativeData *, class QObject *)
+ ?parentChanged@QDeclarativeData@@2P6AXPAV1@PAVQObject@@1@ZA @ 4461 NONAME ; void (*QDeclarativeData::parentChanged)(class QDeclarativeData *, class QObject *, class QObject *)
diff --git a/src/s60installs/bwins/QtDeclarativeu.def b/src/s60installs/bwins/QtDeclarativeu.def
index 89049a9..3eba5e7 100644
--- a/src/s60installs/bwins/QtDeclarativeu.def
+++ b/src/s60installs/bwins/QtDeclarativeu.def
@@ -98,7 +98,7 @@ EXPORTS
??0QDeclarativeFontLoader@@QAE@PAVQObject@@@Z @ 97 NONAME ; QDeclarativeFontLoader::QDeclarativeFontLoader(class QObject *)
??0QDeclarativeGradient@@QAE@PAVQObject@@@Z @ 98 NONAME ; QDeclarativeGradient::QDeclarativeGradient(class QObject *)
??0QDeclarativeGradientStop@@QAE@PAVQObject@@@Z @ 99 NONAME ; QDeclarativeGradientStop::QDeclarativeGradientStop(class QObject *)
- ??0QDeclarativeGraphicsObjectContainer@@QAE@PAVQDeclarativeItem@@@Z @ 100 NONAME ; QDeclarativeGraphicsObjectContainer::QDeclarativeGraphicsObjectContainer(class QDeclarativeItem *)
+ ??0QDeclarativeGraphicsObjectContainer@@QAE@PAVQDeclarativeItem@@@Z @ 100 NONAME ABSENT ; QDeclarativeGraphicsObjectContainer::QDeclarativeGraphicsObjectContainer(class QDeclarativeItem *)
??0QDeclarativeGrid@@QAE@PAVQDeclarativeItem@@@Z @ 101 NONAME ; QDeclarativeGrid::QDeclarativeGrid(class QDeclarativeItem *)
??0QDeclarativeGridScaledImage@@QAE@ABV0@@Z @ 102 NONAME ; QDeclarativeGridScaledImage::QDeclarativeGridScaledImage(class QDeclarativeGridScaledImage const &)
??0QDeclarativeGridScaledImage@@QAE@PAVQIODevice@@@Z @ 103 NONAME ; QDeclarativeGridScaledImage::QDeclarativeGridScaledImage(class QIODevice *)
@@ -268,7 +268,7 @@ EXPORTS
??1QDeclarativeFontLoader@@UAE@XZ @ 267 NONAME ; QDeclarativeFontLoader::~QDeclarativeFontLoader(void)
??1QDeclarativeGradient@@UAE@XZ @ 268 NONAME ; QDeclarativeGradient::~QDeclarativeGradient(void)
??1QDeclarativeGradientStop@@UAE@XZ @ 269 NONAME ; QDeclarativeGradientStop::~QDeclarativeGradientStop(void)
- ??1QDeclarativeGraphicsObjectContainer@@UAE@XZ @ 270 NONAME ; QDeclarativeGraphicsObjectContainer::~QDeclarativeGraphicsObjectContainer(void)
+ ??1QDeclarativeGraphicsObjectContainer@@UAE@XZ @ 270 NONAME ABSENT ; QDeclarativeGraphicsObjectContainer::~QDeclarativeGraphicsObjectContainer(void)
??1QDeclarativeGrid@@UAE@XZ @ 271 NONAME ; QDeclarativeGrid::~QDeclarativeGrid(void)
??1QDeclarativeGridScaledImage@@QAE@XZ @ 272 NONAME ; QDeclarativeGridScaledImage::~QDeclarativeGridScaledImage(void)
??1QDeclarativeGridView@@UAE@XZ @ 273 NONAME ; QDeclarativeGridView::~QDeclarativeGridView(void)
@@ -449,7 +449,7 @@ EXPORTS
??_EQDeclarativeFontLoader@@UAE@I@Z @ 448 NONAME ; QDeclarativeFontLoader::~QDeclarativeFontLoader(unsigned int)
??_EQDeclarativeGradient@@UAE@I@Z @ 449 NONAME ; QDeclarativeGradient::~QDeclarativeGradient(unsigned int)
??_EQDeclarativeGradientStop@@UAE@I@Z @ 450 NONAME ; QDeclarativeGradientStop::~QDeclarativeGradientStop(unsigned int)
- ??_EQDeclarativeGraphicsObjectContainer@@UAE@I@Z @ 451 NONAME ; QDeclarativeGraphicsObjectContainer::~QDeclarativeGraphicsObjectContainer(unsigned int)
+ ??_EQDeclarativeGraphicsObjectContainer@@UAE@I@Z @ 451 NONAME ABSENT ; QDeclarativeGraphicsObjectContainer::~QDeclarativeGraphicsObjectContainer(unsigned int)
??_EQDeclarativeGrid@@UAE@I@Z @ 452 NONAME ; QDeclarativeGrid::~QDeclarativeGrid(unsigned int)
??_EQDeclarativeGridView@@UAE@I@Z @ 453 NONAME ; QDeclarativeGridView::~QDeclarativeGridView(unsigned int)
??_EQDeclarativeImage@@UAE@I@Z @ 454 NONAME ; QDeclarativeImage::~QDeclarativeImage(unsigned int)
@@ -910,8 +910,8 @@ EXPORTS
?d_func@QDeclarativeFlow@@ABEPBVQDeclarativeFlowPrivate@@XZ @ 909 NONAME ; class QDeclarativeFlowPrivate const * QDeclarativeFlow::d_func(void) const
?d_func@QDeclarativeFontLoader@@AAEPAVQDeclarativeFontLoaderPrivate@@XZ @ 910 NONAME ; class QDeclarativeFontLoaderPrivate * QDeclarativeFontLoader::d_func(void)
?d_func@QDeclarativeFontLoader@@ABEPBVQDeclarativeFontLoaderPrivate@@XZ @ 911 NONAME ; class QDeclarativeFontLoaderPrivate const * QDeclarativeFontLoader::d_func(void) const
- ?d_func@QDeclarativeGraphicsObjectContainer@@AAEPAVQDeclarativeGraphicsObjectContainerPrivate@@XZ @ 912 NONAME ; class QDeclarativeGraphicsObjectContainerPrivate * QDeclarativeGraphicsObjectContainer::d_func(void)
- ?d_func@QDeclarativeGraphicsObjectContainer@@ABEPBVQDeclarativeGraphicsObjectContainerPrivate@@XZ @ 913 NONAME ; class QDeclarativeGraphicsObjectContainerPrivate const * QDeclarativeGraphicsObjectContainer::d_func(void) const
+ ?d_func@QDeclarativeGraphicsObjectContainer@@AAEPAVQDeclarativeGraphicsObjectContainerPrivate@@XZ @ 912 NONAME ABSENT ; class QDeclarativeGraphicsObjectContainerPrivate * QDeclarativeGraphicsObjectContainer::d_func(void)
+ ?d_func@QDeclarativeGraphicsObjectContainer@@ABEPBVQDeclarativeGraphicsObjectContainerPrivate@@XZ @ 913 NONAME ABSENT ; class QDeclarativeGraphicsObjectContainerPrivate const * QDeclarativeGraphicsObjectContainer::d_func(void) const
?d_func@QDeclarativeGridView@@AAEPAVQDeclarativeGridViewPrivate@@XZ @ 914 NONAME ; class QDeclarativeGridViewPrivate * QDeclarativeGridView::d_func(void)
?d_func@QDeclarativeGridView@@ABEPBVQDeclarativeGridViewPrivate@@XZ @ 915 NONAME ; class QDeclarativeGridViewPrivate const * QDeclarativeGridView::d_func(void) const
?d_func@QDeclarativeImage@@AAEPAVQDeclarativeImagePrivate@@XZ @ 916 NONAME ; class QDeclarativeImagePrivate * QDeclarativeImage::d_func(void)
@@ -1096,7 +1096,7 @@ EXPORTS
?event@QDeclarativeSystemPalette@@EAE_NPAVQEvent@@@Z @ 1095 NONAME ; bool QDeclarativeSystemPalette::event(class QEvent *)
?event@QDeclarativeTextEdit@@MAE_NPAVQEvent@@@Z @ 1096 NONAME ; bool QDeclarativeTextEdit::event(class QEvent *)
?event@QDeclarativeTextInput@@MAE_NPAVQEvent@@@Z @ 1097 NONAME ; bool QDeclarativeTextInput::event(class QEvent *)
- ?eventFilter@QDeclarativeGraphicsObjectContainer@@MAE_NPAVQObject@@PAVQEvent@@@Z @ 1098 NONAME ; bool QDeclarativeGraphicsObjectContainer::eventFilter(class QObject *, class QEvent *)
+ ?eventFilter@QDeclarativeGraphicsObjectContainer@@MAE_NPAVQObject@@PAVQEvent@@@Z @ 1098 NONAME ABSENT ; bool QDeclarativeGraphicsObjectContainer::eventFilter(class QObject *, class QEvent *)
?eventFilter@QDeclarativeLoader@@MAE_NPAVQObject@@PAVQEvent@@@Z @ 1099 NONAME ; bool QDeclarativeLoader::eventFilter(class QObject *, class QEvent *)
?eventFilter@QDeclarativeSystemPalette@@EAE_NPAVQObject@@PAVQEvent@@@Z @ 1100 NONAME ; bool QDeclarativeSystemPalette::eventFilter(class QObject *, class QEvent *)
?execute@QDeclarativeAnchorChanges@@UAEXXZ @ 1101 NONAME ; void QDeclarativeAnchorChanges::execute(void)
@@ -1223,7 +1223,7 @@ EXPORTS
?getStaticMetaObject@QDeclarativeFontLoader@@SAABUQMetaObject@@XZ @ 1222 NONAME ; struct QMetaObject const & QDeclarativeFontLoader::getStaticMetaObject(void)
?getStaticMetaObject@QDeclarativeGradient@@SAABUQMetaObject@@XZ @ 1223 NONAME ; struct QMetaObject const & QDeclarativeGradient::getStaticMetaObject(void)
?getStaticMetaObject@QDeclarativeGradientStop@@SAABUQMetaObject@@XZ @ 1224 NONAME ; struct QMetaObject const & QDeclarativeGradientStop::getStaticMetaObject(void)
- ?getStaticMetaObject@QDeclarativeGraphicsObjectContainer@@SAABUQMetaObject@@XZ @ 1225 NONAME ; struct QMetaObject const & QDeclarativeGraphicsObjectContainer::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeGraphicsObjectContainer@@SAABUQMetaObject@@XZ @ 1225 NONAME ABSENT ; struct QMetaObject const & QDeclarativeGraphicsObjectContainer::getStaticMetaObject(void)
?getStaticMetaObject@QDeclarativeGrid@@SAABUQMetaObject@@XZ @ 1226 NONAME ; struct QMetaObject const & QDeclarativeGrid::getStaticMetaObject(void)
?getStaticMetaObject@QDeclarativeGridView@@SAABUQMetaObject@@XZ @ 1227 NONAME ; struct QMetaObject const & QDeclarativeGridView::getStaticMetaObject(void)
?getStaticMetaObject@QDeclarativeImage@@SAABUQMetaObject@@XZ @ 1228 NONAME ; struct QMetaObject const & QDeclarativeImage::getStaticMetaObject(void)
@@ -1282,7 +1282,7 @@ EXPORTS
?getStaticMetaObject@QPacketProtocol@@SAABUQMetaObject@@XZ @ 1281 NONAME ; struct QMetaObject const & QPacketProtocol::getStaticMetaObject(void)
?gradient@QDeclarativeGradient@@QBEPBVQGradient@@XZ @ 1282 NONAME ; class QGradient const * QDeclarativeGradient::gradient(void) const
?gradient@QDeclarativeRectangle@@QBEPAVQDeclarativeGradient@@XZ @ 1283 NONAME ; class QDeclarativeGradient * QDeclarativeRectangle::gradient(void) const
- ?graphicsObject@QDeclarativeGraphicsObjectContainer@@QBEPAVQGraphicsObject@@XZ @ 1284 NONAME ; class QGraphicsObject * QDeclarativeGraphicsObjectContainer::graphicsObject(void) const
+ ?graphicsObject@QDeclarativeGraphicsObjectContainer@@QBEPAVQGraphicsObject@@XZ @ 1284 NONAME ABSENT ; class QGraphicsObject * QDeclarativeGraphicsObjectContainer::graphicsObject(void) const
?gridBottom@QDeclarativeGridScaledImage@@QBEHXZ @ 1285 NONAME ; int QDeclarativeGridScaledImage::gridBottom(void) const
?gridLeft@QDeclarativeGridScaledImage@@QBEHXZ @ 1286 NONAME ; int QDeclarativeGridScaledImage::gridLeft(void) const
?gridRight@QDeclarativeGridScaledImage@@QBEHXZ @ 1287 NONAME ; int QDeclarativeGridScaledImage::gridRight(void) const
@@ -1350,7 +1350,7 @@ EXPORTS
?imageProvider@QDeclarativeEngine@@QBEPAVQDeclarativeImageProvider@@ABVQString@@@Z @ 1349 NONAME ; class QDeclarativeImageProvider * QDeclarativeEngine::imageProvider(class QString const &) const
?implicitHeight@QDeclarativeItem@@QBEMXZ @ 1350 NONAME ; float QDeclarativeItem::implicitHeight(void) const
?implicitWidth@QDeclarativeItem@@QBEMXZ @ 1351 NONAME ; float QDeclarativeItem::implicitWidth(void) const
- ?importExtension@QDeclarativeEngine@@QAE_NABVQString@@0@Z @ 1352 NONAME ; bool QDeclarativeEngine::importExtension(class QString const &, class QString const &)
+ ?importExtension@QDeclarativeEngine@@QAE_NABVQString@@0@Z @ 1352 NONAME ABSENT ; bool QDeclarativeEngine::importExtension(class QString const &, class QString const &)
?imports@QDeclarativeDomDocument@@QBE?AV?$QList@VQDeclarativeDomImport@@@@XZ @ 1353 NONAME ; class QList<class QDeclarativeDomImport> QDeclarativeDomDocument::imports(void) const
?inSync@QDeclarativeSpringFollow@@QBE_NXZ @ 1354 NONAME ; bool QDeclarativeSpringFollow::inSync(void) const
?incrementCurrentIndex@QDeclarativeListView@@QAEXXZ @ 1355 NONAME ; void QDeclarativeListView::incrementCurrentIndex(void)
@@ -1484,7 +1484,7 @@ EXPORTS
?item@QDeclarativeVisualDataModel@@UAEPAVQDeclarativeItem@@H_N@Z @ 1483 NONAME ; class QDeclarativeItem * QDeclarativeVisualDataModel::item(int, bool)
?item@QDeclarativeVisualItemModel@@UAEPAVQDeclarativeItem@@H_N@Z @ 1484 NONAME ; class QDeclarativeItem * QDeclarativeVisualItemModel::item(int, bool)
?itemChange@QDeclarativeBasePositioner@@MAE?AVQVariant@@W4GraphicsItemChange@QGraphicsItem@@ABV2@@Z @ 1485 NONAME ; class QVariant QDeclarativeBasePositioner::itemChange(enum QGraphicsItem::GraphicsItemChange, class QVariant const &)
- ?itemChange@QDeclarativeGraphicsObjectContainer@@MAE?AVQVariant@@W4GraphicsItemChange@QGraphicsItem@@ABV2@@Z @ 1486 NONAME ; class QVariant QDeclarativeGraphicsObjectContainer::itemChange(enum QGraphicsItem::GraphicsItemChange, class QVariant const &)
+ ?itemChange@QDeclarativeGraphicsObjectContainer@@MAE?AVQVariant@@W4GraphicsItemChange@QGraphicsItem@@ABV2@@Z @ 1486 NONAME ABSENT ; class QVariant QDeclarativeGraphicsObjectContainer::itemChange(enum QGraphicsItem::GraphicsItemChange, class QVariant const &)
?itemChange@QDeclarativeItem@@MAE?AVQVariant@@W4GraphicsItemChange@QGraphicsItem@@ABV2@@Z @ 1487 NONAME ; class QVariant QDeclarativeItem::itemChange(enum QGraphicsItem::GraphicsItemChange, class QVariant const &)
?itemChange@QDeclarativeLoader@@MAE?AVQVariant@@W4GraphicsItemChange@QGraphicsItem@@ABV2@@Z @ 1488 NONAME ; class QVariant QDeclarativeLoader::itemChange(enum QGraphicsItem::GraphicsItemChange, class QVariant const &)
?itemChange@QDeclarativeRepeater@@MAE?AVQVariant@@W4GraphicsItemChange@QGraphicsItem@@ABV2@@Z @ 1489 NONAME ; class QVariant QDeclarativeRepeater::itemChange(enum QGraphicsItem::GraphicsItemChange, class QVariant const &)
@@ -1625,7 +1625,7 @@ EXPORTS
?metaObject@QDeclarativeFontLoader@@UBEPBUQMetaObject@@XZ @ 1624 NONAME ; struct QMetaObject const * QDeclarativeFontLoader::metaObject(void) const
?metaObject@QDeclarativeGradient@@UBEPBUQMetaObject@@XZ @ 1625 NONAME ; struct QMetaObject const * QDeclarativeGradient::metaObject(void) const
?metaObject@QDeclarativeGradientStop@@UBEPBUQMetaObject@@XZ @ 1626 NONAME ; struct QMetaObject const * QDeclarativeGradientStop::metaObject(void) const
- ?metaObject@QDeclarativeGraphicsObjectContainer@@UBEPBUQMetaObject@@XZ @ 1627 NONAME ; struct QMetaObject const * QDeclarativeGraphicsObjectContainer::metaObject(void) const
+ ?metaObject@QDeclarativeGraphicsObjectContainer@@UBEPBUQMetaObject@@XZ @ 1627 NONAME ABSENT ; struct QMetaObject const * QDeclarativeGraphicsObjectContainer::metaObject(void) const
?metaObject@QDeclarativeGrid@@UBEPBUQMetaObject@@XZ @ 1628 NONAME ; struct QMetaObject const * QDeclarativeGrid::metaObject(void) const
?metaObject@QDeclarativeGridView@@UBEPBUQMetaObject@@XZ @ 1629 NONAME ; struct QMetaObject const * QDeclarativeGridView::metaObject(void) const
?metaObject@QDeclarativeImage@@UBEPBUQMetaObject@@XZ @ 1630 NONAME ; struct QMetaObject const * QDeclarativeImage::metaObject(void) const
@@ -1988,7 +1988,7 @@ EXPORTS
?qt_metacall@QDeclarativeFontLoader@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1987 NONAME ; int QDeclarativeFontLoader::qt_metacall(enum QMetaObject::Call, int, void * *)
?qt_metacall@QDeclarativeGradient@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1988 NONAME ; int QDeclarativeGradient::qt_metacall(enum QMetaObject::Call, int, void * *)
?qt_metacall@QDeclarativeGradientStop@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1989 NONAME ; int QDeclarativeGradientStop::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?qt_metacall@QDeclarativeGraphicsObjectContainer@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1990 NONAME ; int QDeclarativeGraphicsObjectContainer::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeGraphicsObjectContainer@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1990 NONAME ABSENT ; int QDeclarativeGraphicsObjectContainer::qt_metacall(enum QMetaObject::Call, int, void * *)
?qt_metacall@QDeclarativeGrid@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1991 NONAME ; int QDeclarativeGrid::qt_metacall(enum QMetaObject::Call, int, void * *)
?qt_metacall@QDeclarativeGridView@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1992 NONAME ; int QDeclarativeGridView::qt_metacall(enum QMetaObject::Call, int, void * *)
?qt_metacall@QDeclarativeImage@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1993 NONAME ; int QDeclarativeImage::qt_metacall(enum QMetaObject::Call, int, void * *)
@@ -2083,7 +2083,7 @@ EXPORTS
?qt_metacast@QDeclarativeFontLoader@@UAEPAXPBD@Z @ 2082 NONAME ; void * QDeclarativeFontLoader::qt_metacast(char const *)
?qt_metacast@QDeclarativeGradient@@UAEPAXPBD@Z @ 2083 NONAME ; void * QDeclarativeGradient::qt_metacast(char const *)
?qt_metacast@QDeclarativeGradientStop@@UAEPAXPBD@Z @ 2084 NONAME ; void * QDeclarativeGradientStop::qt_metacast(char const *)
- ?qt_metacast@QDeclarativeGraphicsObjectContainer@@UAEPAXPBD@Z @ 2085 NONAME ; void * QDeclarativeGraphicsObjectContainer::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeGraphicsObjectContainer@@UAEPAXPBD@Z @ 2085 NONAME ABSENT ; void * QDeclarativeGraphicsObjectContainer::qt_metacast(char const *)
?qt_metacast@QDeclarativeGrid@@UAEPAXPBD@Z @ 2086 NONAME ; void * QDeclarativeGrid::qt_metacast(char const *)
?qt_metacast@QDeclarativeGridView@@UAEPAXPBD@Z @ 2087 NONAME ; void * QDeclarativeGridView::qt_metacast(char const *)
?qt_metacast@QDeclarativeImage@@UAEPAXPBD@Z @ 2088 NONAME ; void * QDeclarativeImage::qt_metacast(char const *)
@@ -2430,7 +2430,7 @@ EXPORTS
?setFromState@QDeclarativeTransition@@QAEXABVQString@@@Z @ 2429 NONAME ; void QDeclarativeTransition::setFromState(class QString const &)
?setFront@QDeclarativeFlipable@@QAEXPAVQDeclarativeItem@@@Z @ 2430 NONAME ABSENT ; void QDeclarativeFlipable::setFront(class QDeclarativeItem *)
?setGradient@QDeclarativeRectangle@@QAEXPAVQDeclarativeGradient@@@Z @ 2431 NONAME ; void QDeclarativeRectangle::setGradient(class QDeclarativeGradient *)
- ?setGraphicsObject@QDeclarativeGraphicsObjectContainer@@QAEXPAVQGraphicsObject@@@Z @ 2432 NONAME ; void QDeclarativeGraphicsObjectContainer::setGraphicsObject(class QGraphicsObject *)
+ ?setGraphicsObject@QDeclarativeGraphicsObjectContainer@@QAEXPAVQGraphicsObject@@@Z @ 2432 NONAME ABSENT ; void QDeclarativeGraphicsObjectContainer::setGraphicsObject(class QGraphicsObject *)
?setGridScaledImage@QDeclarativeBorderImage@@AAEXABVQDeclarativeGridScaledImage@@@Z @ 2433 NONAME ; void QDeclarativeBorderImage::setGridScaledImage(class QDeclarativeGridScaledImage const &)
?setHAlign@QDeclarativeText@@QAEXW4HAlignment@1@@Z @ 2434 NONAME ; void QDeclarativeText::setHAlign(enum QDeclarativeText::HAlignment)
?setHAlign@QDeclarativeTextEdit@@QAEXW4HAlignment@1@@Z @ 2435 NONAME ; void QDeclarativeTextEdit::setHAlign(enum QDeclarativeTextEdit::HAlignment)
@@ -2587,7 +2587,7 @@ EXPORTS
?setSourceComponent@QDeclarativeLoader@@QAEXPAVQDeclarativeComponent@@@Z @ 2586 NONAME ; void QDeclarativeLoader::setSourceComponent(class QDeclarativeComponent *)
?setSourceLocation@QDeclarativeExpression@@QAEXABVQString@@H@Z @ 2587 NONAME ; void QDeclarativeExpression::setSourceLocation(class QString const &, int)
?setSourceValue@QDeclarativeEaseFollow@@QAEXM@Z @ 2588 NONAME ABSENT ; void QDeclarativeEaseFollow::setSourceValue(float)
- ?setSourceValue@QDeclarativeSpringFollow@@QAEXM@Z @ 2589 NONAME ; void QDeclarativeSpringFollow::setSourceValue(float)
+ ?setSourceValue@QDeclarativeSpringFollow@@QAEXM@Z @ 2589 NONAME ABSENT ; void QDeclarativeSpringFollow::setSourceValue(float)
?setSpacing@QDeclarativeBasePositioner@@QAEXH@Z @ 2590 NONAME ; void QDeclarativeBasePositioner::setSpacing(int)
?setSpacing@QDeclarativeListView@@QAEXM@Z @ 2591 NONAME ; void QDeclarativeListView::setSpacing(float)
?setSpring@QDeclarativeSpringFollow@@QAEXM@Z @ 2592 NONAME ; void QDeclarativeSpringFollow::setSpring(float)
@@ -2605,7 +2605,7 @@ EXPORTS
?setStyle@QDeclarativeText@@QAEXW4TextStyle@1@@Z @ 2604 NONAME ; void QDeclarativeText::setStyle(enum QDeclarativeText::TextStyle)
?setStyleColor@QDeclarativeText@@QAEXABVQColor@@@Z @ 2605 NONAME ; void QDeclarativeText::setStyleColor(class QColor const &)
?setSuperClass@QMetaObjectBuilder@@QAEXPBUQMetaObject@@@Z @ 2606 NONAME ; void QMetaObjectBuilder::setSuperClass(struct QMetaObject const *)
- ?setSynchronizedResizing@QDeclarativeGraphicsObjectContainer@@QAEX_N@Z @ 2607 NONAME ; void QDeclarativeGraphicsObjectContainer::setSynchronizedResizing(bool)
+ ?setSynchronizedResizing@QDeclarativeGraphicsObjectContainer@@QAEX_N@Z @ 2607 NONAME ABSENT ; void QDeclarativeGraphicsObjectContainer::setSynchronizedResizing(bool)
?setTag@QMetaMethodBuilder@@QAEXABVQByteArray@@@Z @ 2608 NONAME ; void QMetaMethodBuilder::setTag(class QByteArray const &)
?setTarget@QDeclarativeBehavior@@UAEXABVQDeclarativeProperty@@@Z @ 2609 NONAME ; void QDeclarativeBehavior::setTarget(class QDeclarativeProperty const &)
?setTarget@QDeclarativeConnections@@QAEXPAVQObject@@@Z @ 2610 NONAME ; void QDeclarativeConnections::setTarget(class QObject *)
@@ -2703,7 +2703,7 @@ EXPORTS
?sourceComponent@QDeclarativeLoader@@QBEPAVQDeclarativeComponent@@XZ @ 2702 NONAME ; class QDeclarativeComponent * QDeclarativeLoader::sourceComponent(void) const
?sourceFile@QDeclarativeExpression@@QBE?AVQString@@XZ @ 2703 NONAME ; class QString QDeclarativeExpression::sourceFile(void) const
?sourceValue@QDeclarativeEaseFollow@@QBEMXZ @ 2704 NONAME ABSENT ; float QDeclarativeEaseFollow::sourceValue(void) const
- ?sourceValue@QDeclarativeSpringFollow@@QBEMXZ @ 2705 NONAME ; float QDeclarativeSpringFollow::sourceValue(void) const
+ ?sourceValue@QDeclarativeSpringFollow@@QBEMXZ @ 2705 NONAME ABSENT ; float QDeclarativeSpringFollow::sourceValue(void) const
?spacing@QDeclarativeBasePositioner@@QBEHXZ @ 2706 NONAME ; int QDeclarativeBasePositioner::spacing(void) const
?spacing@QDeclarativeListView@@QBEMXZ @ 2707 NONAME ; float QDeclarativeListView::spacing(void) const
?spacingChanged@QDeclarativeBasePositioner@@IAEXXZ @ 2708 NONAME ; void QDeclarativeBasePositioner::spacingChanged(void)
@@ -2756,7 +2756,7 @@ EXPORTS
?styleColorChanged@QDeclarativeText@@IAEXABVQColor@@@Z @ 2755 NONAME ; void QDeclarativeText::styleColorChanged(class QColor const &)
?superClass@QMetaObjectBuilder@@QBEPBUQMetaObject@@XZ @ 2756 NONAME ; struct QMetaObject const * QMetaObjectBuilder::superClass(void) const
?syncChanged@QDeclarativeSpringFollow@@IAEXXZ @ 2757 NONAME ; void QDeclarativeSpringFollow::syncChanged(void)
- ?synchronizedResizing@QDeclarativeGraphicsObjectContainer@@QBE_NXZ @ 2758 NONAME ; bool QDeclarativeGraphicsObjectContainer::synchronizedResizing(void) const
+ ?synchronizedResizing@QDeclarativeGraphicsObjectContainer@@QBE_NXZ @ 2758 NONAME ABSENT ; bool QDeclarativeGraphicsObjectContainer::synchronizedResizing(void) const
?tag@QMetaMethodBuilder@@QBE?AVQByteArray@@XZ @ 2759 NONAME ; class QByteArray QMetaMethodBuilder::tag(void) const
?target@QDeclarativeConnections@@QBEPAVQObject@@XZ @ 2760 NONAME ; class QObject * QDeclarativeConnections::target(void) const
?target@QDeclarativeDrag@@QBEPAVQDeclarativeItem@@XZ @ 2761 NONAME ABSENT ; class QDeclarativeItem * QDeclarativeDrag::target(void) const
@@ -2892,8 +2892,8 @@ EXPORTS
?tr@QDeclarativeGradient@@SA?AVQString@@PBD0H@Z @ 2891 NONAME ; class QString QDeclarativeGradient::tr(char const *, char const *, int)
?tr@QDeclarativeGradientStop@@SA?AVQString@@PBD0@Z @ 2892 NONAME ; class QString QDeclarativeGradientStop::tr(char const *, char const *)
?tr@QDeclarativeGradientStop@@SA?AVQString@@PBD0H@Z @ 2893 NONAME ; class QString QDeclarativeGradientStop::tr(char const *, char const *, int)
- ?tr@QDeclarativeGraphicsObjectContainer@@SA?AVQString@@PBD0@Z @ 2894 NONAME ; class QString QDeclarativeGraphicsObjectContainer::tr(char const *, char const *)
- ?tr@QDeclarativeGraphicsObjectContainer@@SA?AVQString@@PBD0H@Z @ 2895 NONAME ; class QString QDeclarativeGraphicsObjectContainer::tr(char const *, char const *, int)
+ ?tr@QDeclarativeGraphicsObjectContainer@@SA?AVQString@@PBD0@Z @ 2894 NONAME ABSENT ; class QString QDeclarativeGraphicsObjectContainer::tr(char const *, char const *)
+ ?tr@QDeclarativeGraphicsObjectContainer@@SA?AVQString@@PBD0H@Z @ 2895 NONAME ABSENT ; class QString QDeclarativeGraphicsObjectContainer::tr(char const *, char const *, int)
?tr@QDeclarativeGrid@@SA?AVQString@@PBD0@Z @ 2896 NONAME ; class QString QDeclarativeGrid::tr(char const *, char const *)
?tr@QDeclarativeGrid@@SA?AVQString@@PBD0H@Z @ 2897 NONAME ; class QString QDeclarativeGrid::tr(char const *, char const *, int)
?tr@QDeclarativeGridView@@SA?AVQString@@PBD0@Z @ 2898 NONAME ; class QString QDeclarativeGridView::tr(char const *, char const *)
@@ -3082,8 +3082,8 @@ EXPORTS
?trUtf8@QDeclarativeGradient@@SA?AVQString@@PBD0H@Z @ 3081 NONAME ; class QString QDeclarativeGradient::trUtf8(char const *, char const *, int)
?trUtf8@QDeclarativeGradientStop@@SA?AVQString@@PBD0@Z @ 3082 NONAME ; class QString QDeclarativeGradientStop::trUtf8(char const *, char const *)
?trUtf8@QDeclarativeGradientStop@@SA?AVQString@@PBD0H@Z @ 3083 NONAME ; class QString QDeclarativeGradientStop::trUtf8(char const *, char const *, int)
- ?trUtf8@QDeclarativeGraphicsObjectContainer@@SA?AVQString@@PBD0@Z @ 3084 NONAME ; class QString QDeclarativeGraphicsObjectContainer::trUtf8(char const *, char const *)
- ?trUtf8@QDeclarativeGraphicsObjectContainer@@SA?AVQString@@PBD0H@Z @ 3085 NONAME ; class QString QDeclarativeGraphicsObjectContainer::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeGraphicsObjectContainer@@SA?AVQString@@PBD0@Z @ 3084 NONAME ABSENT ; class QString QDeclarativeGraphicsObjectContainer::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeGraphicsObjectContainer@@SA?AVQString@@PBD0H@Z @ 3085 NONAME ABSENT ; class QString QDeclarativeGraphicsObjectContainer::trUtf8(char const *, char const *, int)
?trUtf8@QDeclarativeGrid@@SA?AVQString@@PBD0@Z @ 3086 NONAME ; class QString QDeclarativeGrid::trUtf8(char const *, char const *)
?trUtf8@QDeclarativeGrid@@SA?AVQString@@PBD0H@Z @ 3087 NONAME ; class QString QDeclarativeGrid::trUtf8(char const *, char const *, int)
?trUtf8@QDeclarativeGridView@@SA?AVQString@@PBD0@Z @ 3088 NONAME ; class QString QDeclarativeGridView::trUtf8(char const *, char const *)
@@ -3309,8 +3309,8 @@ EXPORTS
?windowText@QDeclarativeSystemPalette@@QBE?AVQColor@@XZ @ 3308 NONAME ; class QColor QDeclarativeSystemPalette::windowText(void) const
?wrap@QDeclarativeText@@QBE_NXZ @ 3309 NONAME ; bool QDeclarativeText::wrap(void) const
?wrap@QDeclarativeTextEdit@@QBE_NXZ @ 3310 NONAME ; bool QDeclarativeTextEdit::wrap(void) const
- ?wrapChanged@QDeclarativeText@@IAEX_N@Z @ 3311 NONAME ; void QDeclarativeText::wrapChanged(bool)
- ?wrapChanged@QDeclarativeTextEdit@@IAEX_N@Z @ 3312 NONAME ; void QDeclarativeTextEdit::wrapChanged(bool)
+ ?wrapChanged@QDeclarativeText@@IAEX_N@Z @ 3311 NONAME ABSENT ; void QDeclarativeText::wrapChanged(bool)
+ ?wrapChanged@QDeclarativeTextEdit@@IAEX_N@Z @ 3312 NONAME ABSENT ; void QDeclarativeTextEdit::wrapChanged(bool)
?write@QDeclarativeBehavior@@UAEXABVQVariant@@@Z @ 3313 NONAME ; void QDeclarativeBehavior::write(class QVariant const &)
?write@QDeclarativeProperty@@QBE_NABVQVariant@@@Z @ 3314 NONAME ; bool QDeclarativeProperty::write(class QVariant const &) const
?write@QDeclarativeProperty@@SA_NPAVQObject@@ABVQString@@ABVQVariant@@@Z @ 3315 NONAME ; bool QDeclarativeProperty::write(class QObject *, class QString const &, class QVariant const &)
@@ -3320,7 +3320,7 @@ EXPORTS
?x@QDeclarativeParentChange@@QBEMXZ @ 3319 NONAME ; float QDeclarativeParentChange::x(void) const
?xAttractor@QDeclarativeParticleMotionGravity@@QBEMXZ @ 3320 NONAME ABSENT ; float QDeclarativeParticleMotionGravity::xAttractor(void) const
?xIsSet@QDeclarativeParentChange@@QBE_NXZ @ 3321 NONAME ; bool QDeclarativeParentChange::xIsSet(void) const
- ?xToPos@QDeclarativeTextInput@@QAEHH@Z @ 3322 NONAME ; int QDeclarativeTextInput::xToPos(int)
+ ?xToPos@QDeclarativeTextInput@@QAEHH@Z @ 3322 NONAME ABSENT ; int QDeclarativeTextInput::xToPos(int)
?xVariance@QDeclarativeParticleMotionWander@@QBEMXZ @ 3323 NONAME ABSENT ; float QDeclarativeParticleMotionWander::xVariance(void) const
?xattractorChanged@QDeclarativeParticleMotionGravity@@IAEXXZ @ 3324 NONAME ABSENT ; void QDeclarativeParticleMotionGravity::xattractorChanged(void)
?xflick@QDeclarativeFlickable@@IBE_NXZ @ 3325 NONAME ; bool QDeclarativeFlickable::xflick(void) const
@@ -3351,7 +3351,7 @@ EXPORTS
?staticMetaObject@QDeclarativeItem@@2UQMetaObject@@B @ 3350 NONAME ; struct QMetaObject const QDeclarativeItem::staticMetaObject
?staticMetaObject@QDeclarativeColumn@@2UQMetaObject@@B @ 3351 NONAME ; struct QMetaObject const QDeclarativeColumn::staticMetaObject
?staticMetaObject@QDeclarativeGradient@@2UQMetaObject@@B @ 3352 NONAME ; struct QMetaObject const QDeclarativeGradient::staticMetaObject
- ?staticMetaObject@QDeclarativeGraphicsObjectContainer@@2UQMetaObject@@B @ 3353 NONAME ; struct QMetaObject const QDeclarativeGraphicsObjectContainer::staticMetaObject
+ ?staticMetaObject@QDeclarativeGraphicsObjectContainer@@2UQMetaObject@@B @ 3353 NONAME ABSENT ; struct QMetaObject const QDeclarativeGraphicsObjectContainer::staticMetaObject
?staticMetaObject@QDeclarativeDebugWatch@@2UQMetaObject@@B @ 3354 NONAME ; struct QMetaObject const QDeclarativeDebugWatch::staticMetaObject
?staticMetaObject@QDeclarativeStateGroup@@2UQMetaObject@@B @ 3355 NONAME ; struct QMetaObject const QDeclarativeStateGroup::staticMetaObject
?staticMetaObject@QPacketProtocol@@2UQMetaObject@@B @ 3356 NONAME ; struct QMetaObject const QPacketProtocol::staticMetaObject
@@ -3749,7 +3749,7 @@ EXPORTS
?setSize@QDeclarativeItem@@QAEXABVQSizeF@@@Z @ 3748 NONAME ; void QDeclarativeItem::setSize(class QSizeF const &)
?setSnapMode@QDeclarativeGridView@@QAEXW4SnapMode@1@@Z @ 3749 NONAME ; void QDeclarativeGridView::setSnapMode(enum QDeclarativeGridView::SnapMode)
?setSource@QDeclarativeWorkerScript@@QAEXABVQUrl@@@Z @ 3750 NONAME ; void QDeclarativeWorkerScript::setSource(class QUrl const &)
- ?setSourceSize@QDeclarativeImageBase@@QAEXABVQSize@@@Z @ 3751 NONAME ; void QDeclarativeImageBase::setSourceSize(class QSize const &)
+ ?setSourceSize@QDeclarativeImageBase@@QAEXABVQSize@@@Z @ 3751 NONAME ABSENT ; void QDeclarativeImageBase::setSourceSize(class QSize const &)
?setTarget@QDeclarativeDrag@@QAEXPAVQGraphicsObject@@@Z @ 3752 NONAME ; void QDeclarativeDrag::setTarget(class QGraphicsObject *)
?setTop@QDeclarativeAnchors@@QAEXABUQDeclarativeAnchorLine@@@Z @ 3753 NONAME ; void QDeclarativeAnchors::setTop(struct QDeclarativeAnchorLine const &)
?setVelocity@QDeclarativeSmoothedAnimation@@QAEXM@Z @ 3754 NONAME ; void QDeclarativeSmoothedAnimation::setVelocity(float)
@@ -3818,4 +3818,79 @@ EXPORTS
?staticMetaObject@QDeclarativeSmoothedAnimation@@2UQMetaObject@@B @ 3817 NONAME ; struct QMetaObject const QDeclarativeSmoothedAnimation::staticMetaObject
?staticMetaObject@QDeclarativeTranslate@@2UQMetaObject@@B @ 3818 NONAME ; struct QMetaObject const QDeclarativeTranslate::staticMetaObject
?consistentTime@QDeclarativeItemPrivate@@2HA @ 3819 NONAME ; int QDeclarativeItemPrivate::consistentTime
+ ??0QDeclarativeAction@@QAE@PAVQObject@@ABVQString@@PAVQDeclarativeContext@@ABVQVariant@@@Z @ 3820 NONAME ; QDeclarativeAction::QDeclarativeAction(class QObject *, class QString const &, class QDeclarativeContext *, class QVariant const &)
+ ??0QDeclarativeSmoothedFollow@@QAE@PAVQObject@@@Z @ 3821 NONAME ; QDeclarativeSmoothedFollow::QDeclarativeSmoothedFollow(class QObject *)
+ ??1QDeclarativeSmoothedFollow@@UAE@XZ @ 3822 NONAME ; QDeclarativeSmoothedFollow::~QDeclarativeSmoothedFollow(void)
+ ??_EQDeclarativeSmoothedFollow@@UAE@I@Z @ 3823 NONAME ; QDeclarativeSmoothedFollow::~QDeclarativeSmoothedFollow(unsigned int)
+ ?addPluginPath@QDeclarativeEngine@@QAEXABVQString@@@Z @ 3824 NONAME ; void QDeclarativeEngine::addPluginPath(class QString const &)
+ ?autoScroll@QDeclarativeTextInput@@QBE_NXZ @ 3825 NONAME ; bool QDeclarativeTextInput::autoScroll(void) const
+ ?autoScrollChanged@QDeclarativeTextInput@@IAEX_N@Z @ 3826 NONAME ; void QDeclarativeTextInput::autoScrollChanged(bool)
+ ?createFunction@QDeclarativeType@@QBEP6AXPAX@ZXZ @ 3827 NONAME ; void (*)(void *) QDeclarativeType::createFunction(void) const
+ ?createSize@QDeclarativeType@@QBEHXZ @ 3828 NONAME ; int QDeclarativeType::createSize(void) const
+ ?d_func@QDeclarativeSmoothedFollow@@AAEPAVQDeclarativeSmoothedFollowPrivate@@XZ @ 3829 NONAME ; class QDeclarativeSmoothedFollowPrivate * QDeclarativeSmoothedFollow::d_func(void)
+ ?d_func@QDeclarativeSmoothedFollow@@ABEPBVQDeclarativeSmoothedFollowPrivate@@XZ @ 3830 NONAME ; class QDeclarativeSmoothedFollowPrivate const * QDeclarativeSmoothedFollow::d_func(void) const
+ ?displayText@QDeclarativeTextInput@@QBE?AVQString@@XZ @ 3831 NONAME ; class QString QDeclarativeTextInput::displayText(void) const
+ ?displayTextChanged@QDeclarativeTextInput@@IAEXABVQString@@@Z @ 3832 NONAME ; void QDeclarativeTextInput::displayTextChanged(class QString const &)
+ ?duration@QDeclarativeSmoothedFollow@@QBEHXZ @ 3833 NONAME ; int QDeclarativeSmoothedFollow::duration(void) const
+ ?durationChanged@QDeclarativeSmoothedFollow@@IAEXXZ @ 3834 NONAME ; void QDeclarativeSmoothedFollow::durationChanged(void)
+ ?enabled@QDeclarativeSmoothedFollow@@QBE_NXZ @ 3835 NONAME ; bool QDeclarativeSmoothedFollow::enabled(void) const
+ ?enabledChanged@QDeclarativeSmoothedFollow@@IAEXXZ @ 3836 NONAME ; void QDeclarativeSmoothedFollow::enabledChanged(void)
+ ?getStaticMetaObject@QDeclarativeSmoothedFollow@@SAABUQMetaObject@@XZ @ 3837 NONAME ; struct QMetaObject const & QDeclarativeSmoothedFollow::getStaticMetaObject(void)
+ ?highlightMoveDuration@QDeclarativeGridView@@QBEHXZ @ 3838 NONAME ; int QDeclarativeGridView::highlightMoveDuration(void) const
+ ?highlightMoveDuration@QDeclarativeListView@@QBEHXZ @ 3839 NONAME ; int QDeclarativeListView::highlightMoveDuration(void) const
+ ?highlightMoveDuration@QDeclarativePathView@@QBEHXZ @ 3840 NONAME ; int QDeclarativePathView::highlightMoveDuration(void) const
+ ?highlightMoveDurationChanged@QDeclarativeGridView@@IAEXXZ @ 3841 NONAME ; void QDeclarativeGridView::highlightMoveDurationChanged(void)
+ ?highlightMoveDurationChanged@QDeclarativeListView@@IAEXXZ @ 3842 NONAME ; void QDeclarativeListView::highlightMoveDurationChanged(void)
+ ?highlightMoveDurationChanged@QDeclarativePathView@@IAEXXZ @ 3843 NONAME ; void QDeclarativePathView::highlightMoveDurationChanged(void)
+ ?highlightResizeDuration@QDeclarativeListView@@QBEHXZ @ 3844 NONAME ; int QDeclarativeListView::highlightResizeDuration(void) const
+ ?highlightResizeDurationChanged@QDeclarativeListView@@IAEXXZ @ 3845 NONAME ; void QDeclarativeListView::highlightResizeDurationChanged(void)
+ ?importPlugin@QDeclarativeEngine@@QAE_NABVQString@@0@Z @ 3846 NONAME ; bool QDeclarativeEngine::importPlugin(class QString const &, class QString const &)
+ ?isExtendedType@QDeclarativeType@@QBE_NXZ @ 3847 NONAME ; bool QDeclarativeType::isExtendedType(void) const
+ ?maximumEasingTime@QDeclarativeSmoothedFollow@@QBEHXZ @ 3848 NONAME ; int QDeclarativeSmoothedFollow::maximumEasingTime(void) const
+ ?maximumEasingTimeChanged@QDeclarativeSmoothedFollow@@IAEXXZ @ 3849 NONAME ; void QDeclarativeSmoothedFollow::maximumEasingTimeChanged(void)
+ ?metaObject@QDeclarativeSmoothedFollow@@UBEPBUQMetaObject@@XZ @ 3850 NONAME ; struct QMetaObject const * QDeclarativeSmoothedFollow::metaObject(void) const
+ ?mouseMoveEvent@QDeclarativeTextInput@@MAEXPAVQGraphicsSceneMouseEvent@@@Z @ 3851 NONAME ; void QDeclarativeTextInput::mouseMoveEvent(class QGraphicsSceneMouseEvent *)
+ ?moveCursorSelection@QDeclarativeTextInput@@QAEXH@Z @ 3852 NONAME ; void QDeclarativeTextInput::moveCursorSelection(int)
+ ?passwordCharacter@QDeclarativeTextInput@@QBE?AVQString@@XZ @ 3853 NONAME ; class QString QDeclarativeTextInput::passwordCharacter(void) const
+ ?passwordCharacterChanged@QDeclarativeTextInput@@IAEXXZ @ 3854 NONAME ; void QDeclarativeTextInput::passwordCharacterChanged(void)
+ ?pluginPathList@QDeclarativeEngine@@QBE?AVQStringList@@XZ @ 3855 NONAME ; class QStringList QDeclarativeEngine::pluginPathList(void) const
+ ?qt_metacall@QDeclarativeSmoothedFollow@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 3856 NONAME ; int QDeclarativeSmoothedFollow::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacast@QDeclarativeSmoothedFollow@@UAEPAXPBD@Z @ 3857 NONAME ; void * QDeclarativeSmoothedFollow::qt_metacast(char const *)
+ ?resetTarget@QDeclarativeDrag@@QAEXXZ @ 3858 NONAME ; void QDeclarativeDrag::resetTarget(void)
+ ?reversingMode@QDeclarativeSmoothedFollow@@QBE?AW4ReversingMode@1@XZ @ 3859 NONAME ; enum QDeclarativeSmoothedFollow::ReversingMode QDeclarativeSmoothedFollow::reversingMode(void) const
+ ?reversingModeChanged@QDeclarativeSmoothedFollow@@IAEXXZ @ 3860 NONAME ; void QDeclarativeSmoothedFollow::reversingModeChanged(void)
+ ?setAutoScroll@QDeclarativeTextInput@@QAEX_N@Z @ 3861 NONAME ; void QDeclarativeTextInput::setAutoScroll(bool)
+ ?setDuration@QDeclarativeSmoothedFollow@@QAEXH@Z @ 3862 NONAME ; void QDeclarativeSmoothedFollow::setDuration(int)
+ ?setEnabled@QDeclarativeSmoothedFollow@@QAEX_N@Z @ 3863 NONAME ; void QDeclarativeSmoothedFollow::setEnabled(bool)
+ ?setHighlightMoveDuration@QDeclarativeGridView@@QAEXH@Z @ 3864 NONAME ; void QDeclarativeGridView::setHighlightMoveDuration(int)
+ ?setHighlightMoveDuration@QDeclarativeListView@@QAEXH@Z @ 3865 NONAME ; void QDeclarativeListView::setHighlightMoveDuration(int)
+ ?setHighlightMoveDuration@QDeclarativePathView@@QAEXH@Z @ 3866 NONAME ; void QDeclarativePathView::setHighlightMoveDuration(int)
+ ?setHighlightResizeDuration@QDeclarativeListView@@QAEXH@Z @ 3867 NONAME ; void QDeclarativeListView::setHighlightResizeDuration(int)
+ ?setMaximumEasingTime@QDeclarativeSmoothedFollow@@QAEXH@Z @ 3868 NONAME ; void QDeclarativeSmoothedFollow::setMaximumEasingTime(int)
+ ?setPasswordCharacter@QDeclarativeTextInput@@QAEXABVQString@@@Z @ 3869 NONAME ; void QDeclarativeTextInput::setPasswordCharacter(class QString const &)
+ ?setPluginPathList@QDeclarativeEngine@@QAEXABVQStringList@@@Z @ 3870 NONAME ; void QDeclarativeEngine::setPluginPathList(class QStringList const &)
+ ?setReversingMode@QDeclarativeSmoothedFollow@@QAEXW4ReversingMode@1@@Z @ 3871 NONAME ; void QDeclarativeSmoothedFollow::setReversingMode(enum QDeclarativeSmoothedFollow::ReversingMode)
+ ?setSourceSize@QDeclarativeImageBase@@UAEXABVQSize@@@Z @ 3872 NONAME ; void QDeclarativeImageBase::setSourceSize(class QSize const &)
+ ?setTarget@QDeclarativeSmoothedFollow@@UAEXABVQDeclarativeProperty@@@Z @ 3873 NONAME ; void QDeclarativeSmoothedFollow::setTarget(class QDeclarativeProperty const &)
+ ?setTo@QDeclarativeSmoothedFollow@@QAEXM@Z @ 3874 NONAME ; void QDeclarativeSmoothedFollow::setTo(float)
+ ?setTo@QDeclarativeSpringFollow@@QAEXM@Z @ 3875 NONAME ; void QDeclarativeSpringFollow::setTo(float)
+ ?setVelocity@QDeclarativeSmoothedFollow@@QAEXM@Z @ 3876 NONAME ; void QDeclarativeSmoothedFollow::setVelocity(float)
+ ?setWrapMode@QDeclarativeText@@QAEXW4WrapMode@1@@Z @ 3877 NONAME ; void QDeclarativeText::setWrapMode(enum QDeclarativeText::WrapMode)
+ ?setWrapMode@QDeclarativeTextEdit@@QAEXW4WrapMode@1@@Z @ 3878 NONAME ; void QDeclarativeTextEdit::setWrapMode(enum QDeclarativeTextEdit::WrapMode)
+ ?sourceSizeChanged@QDeclarativeAnimatedImage@@IAEXXZ @ 3879 NONAME ; void QDeclarativeAnimatedImage::sourceSizeChanged(void)
+ ?to@QDeclarativeSmoothedFollow@@QBEMXZ @ 3880 NONAME ; float QDeclarativeSmoothedFollow::to(void) const
+ ?to@QDeclarativeSpringFollow@@QBEMXZ @ 3881 NONAME ; float QDeclarativeSpringFollow::to(void) const
+ ?tr@QDeclarativeCompiler@@AAE?AVQString@@PBD@Z @ 3882 NONAME ; class QString QDeclarativeCompiler::tr(char const *)
+ ?tr@QDeclarativeSmoothedFollow@@SA?AVQString@@PBD0@Z @ 3883 NONAME ; class QString QDeclarativeSmoothedFollow::tr(char const *, char const *)
+ ?tr@QDeclarativeSmoothedFollow@@SA?AVQString@@PBD0H@Z @ 3884 NONAME ; class QString QDeclarativeSmoothedFollow::tr(char const *, char const *, int)
+ ?trUtf8@QDeclarativeSmoothedFollow@@SA?AVQString@@PBD0@Z @ 3885 NONAME ; class QString QDeclarativeSmoothedFollow::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeSmoothedFollow@@SA?AVQString@@PBD0H@Z @ 3886 NONAME ; class QString QDeclarativeSmoothedFollow::trUtf8(char const *, char const *, int)
+ ?velocity@QDeclarativeSmoothedFollow@@QBEMXZ @ 3887 NONAME ; float QDeclarativeSmoothedFollow::velocity(void) const
+ ?velocityChanged@QDeclarativeSmoothedFollow@@IAEXXZ @ 3888 NONAME ; void QDeclarativeSmoothedFollow::velocityChanged(void)
+ ?wrapMode@QDeclarativeText@@QBE?AW4WrapMode@1@XZ @ 3889 NONAME ; enum QDeclarativeText::WrapMode QDeclarativeText::wrapMode(void) const
+ ?wrapMode@QDeclarativeTextEdit@@QBE?AW4WrapMode@1@XZ @ 3890 NONAME ; enum QDeclarativeTextEdit::WrapMode QDeclarativeTextEdit::wrapMode(void) const
+ ?wrapModeChanged@QDeclarativeText@@IAEXXZ @ 3891 NONAME ; void QDeclarativeText::wrapModeChanged(void)
+ ?wrapModeChanged@QDeclarativeTextEdit@@IAEXXZ @ 3892 NONAME ; void QDeclarativeTextEdit::wrapModeChanged(void)
+ ?xToPosition@QDeclarativeTextInput@@QAEHH@Z @ 3893 NONAME ; int QDeclarativeTextInput::xToPosition(int)
+ ?staticMetaObject@QDeclarativeSmoothedFollow@@2UQMetaObject@@B @ 3894 NONAME ; struct QMetaObject const QDeclarativeSmoothedFollow::staticMetaObject
diff --git a/src/s60installs/bwins/QtGuiu.def b/src/s60installs/bwins/QtGuiu.def
index 1c33477..c34690e 100644
--- a/src/s60installs/bwins/QtGuiu.def
+++ b/src/s60installs/bwins/QtGuiu.def
@@ -12724,7 +12724,7 @@ EXPORTS
?visibilityChanged@QToolBar@@IAEX_N@Z @ 12723 NONAME ; void QToolBar::visibilityChanged(bool)
??0FileInfo@QZipReader@@QAE@ABU01@@Z @ 12724 NONAME ; QZipReader::FileInfo::FileInfo(struct QZipReader::FileInfo const &)
??0QStaticText@@QAE@ABVQString@@@Z @ 12725 NONAME ; QStaticText::QStaticText(class QString const &)
- ?append@QGraphicsItemPrivate@@SAXPAV?$QDeclarativeListProperty@VQGraphicsObject@@@@PAVQGraphicsObject@@@Z @ 12726 NONAME ; void QGraphicsItemPrivate::append(class QDeclarativeListProperty<class QGraphicsObject> *, class QGraphicsObject *)
+ ?append@QGraphicsItemPrivate@@SAXPAV?$QDeclarativeListProperty@VQGraphicsObject@@@@PAVQGraphicsObject@@@Z @ 12726 NONAME ABSENT ; void QGraphicsItemPrivate::append(class QDeclarativeListProperty<class QGraphicsObject> *, class QGraphicsObject *)
?bitPlaneCount@QImage@@QBEHXZ @ 12727 NONAME ; int QImage::bitPlaneCount(void) const
?childrenChanged@QGraphicsObject@@IAEXXZ @ 12728 NONAME ; void QGraphicsObject::childrenChanged(void)
?childrenList@QGraphicsItemPrivate@@QAE?AV?$QDeclarativeListProperty@VQGraphicsObject@@@@XZ @ 12729 NONAME ; class QDeclarativeListProperty<class QGraphicsObject> QGraphicsItemPrivate::childrenList(void)
@@ -12767,4 +12767,7 @@ EXPORTS
?updateMicroFocus@QGraphicsObject@@IAEXXZ @ 12766 NONAME ; void QGraphicsObject::updateMicroFocus(void)
?width@QGraphicsItemPrivate@@UBEMXZ @ 12767 NONAME ; float QGraphicsItemPrivate::width(void) const
?widthChanged@QGraphicsObject@@IAEXXZ @ 12768 NONAME ; void QGraphicsObject::widthChanged(void)
+ ?children_append@QGraphicsItemPrivate@@SAXPAV?$QDeclarativeListProperty@VQGraphicsObject@@@@PAVQGraphicsObject@@@Z @ 12769 NONAME ; void QGraphicsItemPrivate::children_append(class QDeclarativeListProperty<class QGraphicsObject> *, class QGraphicsObject *)
+ ?children_at@QGraphicsItemPrivate@@SAPAVQGraphicsObject@@PAV?$QDeclarativeListProperty@VQGraphicsObject@@@@H@Z @ 12770 NONAME ; class QGraphicsObject * QGraphicsItemPrivate::children_at(class QDeclarativeListProperty<class QGraphicsObject> *, int)
+ ?children_count@QGraphicsItemPrivate@@SAHPAV?$QDeclarativeListProperty@VQGraphicsObject@@@@@Z @ 12771 NONAME ; int QGraphicsItemPrivate::children_count(class QDeclarativeListProperty<class QGraphicsObject> *)
diff --git a/src/s60installs/bwins/QtMultimediau.def b/src/s60installs/bwins/QtMultimediau.def
index 6c98fdf..ad33993 100644
--- a/src/s60installs/bwins/QtMultimediau.def
+++ b/src/s60installs/bwins/QtMultimediau.def
@@ -946,4 +946,6 @@ EXPORTS
?volume@QSoundEffect@@QBEHXZ @ 945 NONAME ; int QSoundEffect::volume(void) const
?volumeChanged@QSoundEffect@@IAEXXZ @ 946 NONAME ; void QSoundEffect::volumeChanged(void)
?staticMetaObject@QSoundEffect@@2UQMetaObject@@B @ 947 NONAME ; struct QMetaObject const QSoundEffect::staticMetaObject
+ ?event@QGraphicsVideoItem@@MAE_NPAVQEvent@@@Z @ 948 NONAME ; bool QGraphicsVideoItem::event(class QEvent *)
+ ?sceneEvent@QGraphicsVideoItem@@MAE_NPAVQEvent@@@Z @ 949 NONAME ; bool QGraphicsVideoItem::sceneEvent(class QEvent *)
diff --git a/src/s60installs/eabi/QtCoreu.def b/src/s60installs/eabi/QtCoreu.def
index 79fd0ce..e54e03f 100644
--- a/src/s60installs/eabi/QtCoreu.def
+++ b/src/s60installs/eabi/QtCoreu.def
@@ -803,9 +803,9 @@ EXPORTS
_ZN16QCoreApplicationD0Ev @ 802 NONAME
_ZN16QCoreApplicationD1Ev @ 803 NONAME
_ZN16QCoreApplicationD2Ev @ 804 NONAME
- _ZN16QDeclarativeDataD0Ev @ 805 NONAME
- _ZN16QDeclarativeDataD1Ev @ 806 NONAME
- _ZN16QDeclarativeDataD2Ev @ 807 NONAME
+ _ZN16QDeclarativeDataD0Ev @ 805 NONAME ABSENT
+ _ZN16QDeclarativeDataD1Ev @ 806 NONAME ABSENT
+ _ZN16QDeclarativeDataD2Ev @ 807 NONAME ABSENT
_ZN16QEventTransition11qt_metacallEN11QMetaObject4CallEiPPv @ 808 NONAME
_ZN16QEventTransition11qt_metacastEPKc @ 809 NONAME
_ZN16QEventTransition12onTransitionEP6QEvent @ 810 NONAME
@@ -3332,7 +3332,7 @@ EXPORTS
_ZTI15QPauseAnimation @ 3331 NONAME
_ZTI15QSocketNotifier @ 3332 NONAME
_ZTI16QCoreApplication @ 3333 NONAME
- _ZTI16QDeclarativeData @ 3334 NONAME
+ _ZTI16QDeclarativeData @ 3334 NONAME ABSENT
_ZTI16QEventTransition @ 3335 NONAME
_ZTI16QIODevicePrivate @ 3336 NONAME
_ZTI16QTextCodecPlugin @ 3337 NONAME
@@ -3407,7 +3407,7 @@ EXPORTS
_ZTV15QPauseAnimation @ 3406 NONAME
_ZTV15QSocketNotifier @ 3407 NONAME
_ZTV16QCoreApplication @ 3408 NONAME
- _ZTV16QDeclarativeData @ 3409 NONAME
+ _ZTV16QDeclarativeData @ 3409 NONAME ABSENT
_ZTV16QEventTransition @ 3410 NONAME
_ZTV16QIODevicePrivate @ 3411 NONAME
_ZTV16QTextCodecPlugin @ 3412 NONAME
@@ -3692,4 +3692,7 @@ EXPORTS
_ZN9QDateTime18setMSecsSinceEpochEx @ 3691 NONAME
_ZN9QDateTime19fromMSecsSinceEpochEx @ 3692 NONAME
_ZNK9QDateTime17toMSecsSinceEpochEv @ 3693 NONAME
+ _ZN10QTextCodec11validCodecsEv @ 3694 NONAME
+ _ZN16QDeclarativeData13parentChangedE @ 3695 NONAME DATA 4
+ _ZN16QDeclarativeData9destroyedE @ 3696 NONAME DATA 4
diff --git a/src/s60installs/eabi/QtDeclarativeu.def b/src/s60installs/eabi/QtDeclarativeu.def
index 17a57d0..0f0e886 100644
--- a/src/s60installs/eabi/QtDeclarativeu.def
+++ b/src/s60installs/eabi/QtDeclarativeu.def
@@ -179,7 +179,7 @@ EXPORTS
_ZN16QDeclarativeText11qt_metacallEN11QMetaObject4CallEiPPv @ 178 NONAME
_ZN16QDeclarativeText11qt_metacastEPKc @ 179 NONAME
_ZN16QDeclarativeText11textChangedERK7QString @ 180 NONAME
- _ZN16QDeclarativeText11wrapChangedEb @ 181 NONAME
+ _ZN16QDeclarativeText11wrapChangedEb @ 181 NONAME ABSENT
_ZN16QDeclarativeText12colorChangedERK6QColor @ 182 NONAME
_ZN16QDeclarativeText12setElideModeENS_13TextElideModeE @ 183 NONAME
_ZN16QDeclarativeText12styleChangedENS_9TextStyleE @ 184 NONAME
@@ -337,7 +337,7 @@ EXPORTS
_ZN18QDeclarativeEngine11qt_metacastEPKc @ 336 NONAME
_ZN18QDeclarativeEngine11rootContextEv @ 337 NONAME
_ZN18QDeclarativeEngine13addImportPathERK7QString @ 338 NONAME
- _ZN18QDeclarativeEngine15importExtensionERK7QStringS2_ @ 339 NONAME
+ _ZN18QDeclarativeEngine15importExtensionERK7QStringS2_ @ 339 NONAME ABSENT
_ZN18QDeclarativeEngine15objectOwnershipEP7QObject @ 340 NONAME
_ZN18QDeclarativeEngine16addImageProviderERK7QStringP25QDeclarativeImageProvider @ 341 NONAME
_ZN18QDeclarativeEngine16contextForObjectEPK7QObject @ 342 NONAME
@@ -897,7 +897,7 @@ EXPORTS
_ZN20QDeclarativeTextEdit11qt_metacastEPKc @ 896 NONAME
_ZN20QDeclarativeTextEdit11setReadOnlyEb @ 897 NONAME
_ZN20QDeclarativeTextEdit11textChangedERK7QString @ 898 NONAME
- _ZN20QDeclarativeTextEdit11wrapChangedEb @ 899 NONAME
+ _ZN20QDeclarativeTextEdit11wrapChangedEb @ 899 NONAME ABSENT
_ZN20QDeclarativeTextEdit12colorChangedERK6QColor @ 900 NONAME
_ZN20QDeclarativeTextEdit12drawContentsEP8QPainterRK5QRect @ 901 NONAME
_ZN20QDeclarativeTextEdit13keyPressEventEP9QKeyEvent @ 902 NONAME
@@ -1234,7 +1234,7 @@ EXPORTS
_ZN21QDeclarativeTextInput24selectedTextColorChangedERK6QColor @ 1233 NONAME
_ZN21QDeclarativeTextInput26horizontalAlignmentChangedENS_10HAlignmentE @ 1234 NONAME
_ZN21QDeclarativeTextInput5eventEP6QEvent @ 1235 NONAME
- _ZN21QDeclarativeTextInput6xToPosEi @ 1236 NONAME
+ _ZN21QDeclarativeTextInput6xToPosEi @ 1236 NONAME ABSENT
_ZN21QDeclarativeTextInput7setFontERK5QFont @ 1237 NONAME
_ZN21QDeclarativeTextInput7setTextERK7QString @ 1238 NONAME
_ZN21QDeclarativeTextInput8acceptedEv @ 1239 NONAME
@@ -1652,7 +1652,7 @@ EXPORTS
_ZN24QDeclarativeSpringFollow11syncChangedEv @ 1651 NONAME
_ZN24QDeclarativeSpringFollow12valueChangedEf @ 1652 NONAME
_ZN24QDeclarativeSpringFollow14modulusChangedEv @ 1653 NONAME
- _ZN24QDeclarativeSpringFollow14setSourceValueEf @ 1654 NONAME
+ _ZN24QDeclarativeSpringFollow14setSourceValueEf @ 1654 NONAME ABSENT
_ZN24QDeclarativeSpringFollow16staticMetaObjectE @ 1655 NONAME DATA 16
_ZN24QDeclarativeSpringFollow19getStaticMetaObjectEv @ 1656 NONAME
_ZN24QDeclarativeSpringFollow7setMassEf @ 1657 NONAME
@@ -2130,19 +2130,19 @@ EXPORTS
_ZN34QDeclarativeDebugPropertyReferenceC2ERKS_ @ 2129 NONAME
_ZN34QDeclarativeDebugPropertyReferenceC2Ev @ 2130 NONAME
_ZN34QDeclarativeDebugPropertyReferenceaSERKS_ @ 2131 NONAME
- _ZN35QDeclarativeGraphicsObjectContainer10itemChangeEN13QGraphicsItem18GraphicsItemChangeERK8QVariant @ 2132 NONAME
- _ZN35QDeclarativeGraphicsObjectContainer11eventFilterEP7QObjectP6QEvent @ 2133 NONAME
- _ZN35QDeclarativeGraphicsObjectContainer11qt_metacallEN11QMetaObject4CallEiPPv @ 2134 NONAME
- _ZN35QDeclarativeGraphicsObjectContainer11qt_metacastEPKc @ 2135 NONAME
- _ZN35QDeclarativeGraphicsObjectContainer16staticMetaObjectE @ 2136 NONAME DATA 16
- _ZN35QDeclarativeGraphicsObjectContainer17setGraphicsObjectEP15QGraphicsObject @ 2137 NONAME
- _ZN35QDeclarativeGraphicsObjectContainer19getStaticMetaObjectEv @ 2138 NONAME
- _ZN35QDeclarativeGraphicsObjectContainer23setSynchronizedResizingEb @ 2139 NONAME
- _ZN35QDeclarativeGraphicsObjectContainerC1EP16QDeclarativeItem @ 2140 NONAME
- _ZN35QDeclarativeGraphicsObjectContainerC2EP16QDeclarativeItem @ 2141 NONAME
- _ZN35QDeclarativeGraphicsObjectContainerD0Ev @ 2142 NONAME
- _ZN35QDeclarativeGraphicsObjectContainerD1Ev @ 2143 NONAME
- _ZN35QDeclarativeGraphicsObjectContainerD2Ev @ 2144 NONAME
+ _ZN35QDeclarativeGraphicsObjectContainer10itemChangeEN13QGraphicsItem18GraphicsItemChangeERK8QVariant @ 2132 NONAME ABSENT
+ _ZN35QDeclarativeGraphicsObjectContainer11eventFilterEP7QObjectP6QEvent @ 2133 NONAME ABSENT
+ _ZN35QDeclarativeGraphicsObjectContainer11qt_metacallEN11QMetaObject4CallEiPPv @ 2134 NONAME ABSENT
+ _ZN35QDeclarativeGraphicsObjectContainer11qt_metacastEPKc @ 2135 NONAME ABSENT
+ _ZN35QDeclarativeGraphicsObjectContainer16staticMetaObjectE @ 2136 NONAME DATA 16 ABSENT
+ _ZN35QDeclarativeGraphicsObjectContainer17setGraphicsObjectEP15QGraphicsObject @ 2137 NONAME ABSENT
+ _ZN35QDeclarativeGraphicsObjectContainer19getStaticMetaObjectEv @ 2138 NONAME ABSENT
+ _ZN35QDeclarativeGraphicsObjectContainer23setSynchronizedResizingEb @ 2139 NONAME ABSENT
+ _ZN35QDeclarativeGraphicsObjectContainerC1EP16QDeclarativeItem @ 2140 NONAME ABSENT
+ _ZN35QDeclarativeGraphicsObjectContainerC2EP16QDeclarativeItem @ 2141 NONAME ABSENT
+ _ZN35QDeclarativeGraphicsObjectContainerD0Ev @ 2142 NONAME ABSENT
+ _ZN35QDeclarativeGraphicsObjectContainerD1Ev @ 2143 NONAME ABSENT
+ _ZN35QDeclarativeGraphicsObjectContainerD2Ev @ 2144 NONAME ABSENT
_ZN36QDeclarativeDomValueValueInterceptorC1ERKS_ @ 2145 NONAME
_ZN36QDeclarativeDomValueValueInterceptorC1Ev @ 2146 NONAME
_ZN36QDeclarativeDomValueValueInterceptorC2ERKS_ @ 2147 NONAME
@@ -2765,7 +2765,7 @@ EXPORTS
_ZNK24QDeclarativeScriptString6scriptEv @ 2764 NONAME
_ZNK24QDeclarativeScriptString7contextEv @ 2765 NONAME
_ZNK24QDeclarativeSpringFollow10metaObjectEv @ 2766 NONAME
- _ZNK24QDeclarativeSpringFollow11sourceValueEv @ 2767 NONAME
+ _ZNK24QDeclarativeSpringFollow11sourceValueEv @ 2767 NONAME ABSENT
_ZNK24QDeclarativeSpringFollow4massEv @ 2768 NONAME
_ZNK24QDeclarativeSpringFollow5valueEv @ 2769 NONAME
_ZNK24QDeclarativeSpringFollow6inSyncEv @ 2770 NONAME
@@ -2933,9 +2933,9 @@ EXPORTS
_ZNK34QDeclarativeDebugPropertyReference4nameEv @ 2932 NONAME
_ZNK34QDeclarativeDebugPropertyReference5valueEv @ 2933 NONAME
_ZNK34QDeclarativeDebugPropertyReference7bindingEv @ 2934 NONAME
- _ZNK35QDeclarativeGraphicsObjectContainer10metaObjectEv @ 2935 NONAME
- _ZNK35QDeclarativeGraphicsObjectContainer14graphicsObjectEv @ 2936 NONAME
- _ZNK35QDeclarativeGraphicsObjectContainer20synchronizedResizingEv @ 2937 NONAME
+ _ZNK35QDeclarativeGraphicsObjectContainer10metaObjectEv @ 2935 NONAME ABSENT
+ _ZNK35QDeclarativeGraphicsObjectContainer14graphicsObjectEv @ 2936 NONAME ABSENT
+ _ZNK35QDeclarativeGraphicsObjectContainer20synchronizedResizingEv @ 2937 NONAME ABSENT
_ZNK36QDeclarativeDomValueValueInterceptor6objectEv @ 2938 NONAME
_ZNK38QDeclarativeDebugObjectExpressionWatch10expressionEv @ 2939 NONAME
_ZNK38QDeclarativeDebugObjectExpressionWatch10metaObjectEv @ 2940 NONAME
@@ -3039,7 +3039,7 @@ EXPORTS
_ZTI31QDeclarativePropertyValueSource @ 3038 NONAME
_ZTI32QDeclarativeDebugExpressionQuery @ 3039 NONAME
_ZTI33QDeclarativeDebugRootContextQuery @ 3040 NONAME
- _ZTI35QDeclarativeGraphicsObjectContainer @ 3041 NONAME
+ _ZTI35QDeclarativeGraphicsObjectContainer @ 3041 NONAME ABSENT
_ZTI36QDeclarativePropertyValueInterceptor @ 3042 NONAME
_ZTI38QDeclarativeDebugObjectExpressionWatch @ 3043 NONAME
_ZTI39QDeclarativeNetworkAccessManagerFactory @ 3044 NONAME
@@ -3142,7 +3142,7 @@ EXPORTS
_ZTV31QDeclarativePropertyValueSource @ 3141 NONAME
_ZTV32QDeclarativeDebugExpressionQuery @ 3142 NONAME
_ZTV33QDeclarativeDebugRootContextQuery @ 3143 NONAME
- _ZTV35QDeclarativeGraphicsObjectContainer @ 3144 NONAME
+ _ZTV35QDeclarativeGraphicsObjectContainer @ 3144 NONAME ABSENT
_ZTV36QDeclarativePropertyValueInterceptor @ 3145 NONAME
_ZTV38QDeclarativeDebugObjectExpressionWatch @ 3146 NONAME
_ZTV39QDeclarativeNetworkAccessManagerFactory @ 3147 NONAME
@@ -3198,8 +3198,8 @@ EXPORTS
_ZThn16_N26QDeclarativeBasePositioner17componentCompleteEv @ 3197 NONAME
_ZThn16_N26QDeclarativeBasePositionerD0Ev @ 3198 NONAME
_ZThn16_N26QDeclarativeBasePositionerD1Ev @ 3199 NONAME
- _ZThn16_N35QDeclarativeGraphicsObjectContainerD0Ev @ 3200 NONAME
- _ZThn16_N35QDeclarativeGraphicsObjectContainerD1Ev @ 3201 NONAME
+ _ZThn16_N35QDeclarativeGraphicsObjectContainerD0Ev @ 3200 NONAME ABSENT
+ _ZThn16_N35QDeclarativeGraphicsObjectContainerD1Ev @ 3201 NONAME ABSENT
_ZThn8_N16QDeclarativeBind17componentCompleteEv @ 3202 NONAME
_ZThn8_N16QDeclarativeBindD0Ev @ 3203 NONAME
_ZThn8_N16QDeclarativeBindD1Ev @ 3204 NONAME
@@ -3351,9 +3351,9 @@ EXPORTS
_ZThn8_N29QDeclarativeStateChangeScript7executeEv @ 3350 NONAME
_ZThn8_N29QDeclarativeStateChangeScriptD0Ev @ 3351 NONAME
_ZThn8_N29QDeclarativeStateChangeScriptD1Ev @ 3352 NONAME
- _ZThn8_N35QDeclarativeGraphicsObjectContainer10itemChangeEN13QGraphicsItem18GraphicsItemChangeERK8QVariant @ 3353 NONAME
- _ZThn8_N35QDeclarativeGraphicsObjectContainerD0Ev @ 3354 NONAME
- _ZThn8_N35QDeclarativeGraphicsObjectContainerD1Ev @ 3355 NONAME
+ _ZThn8_N35QDeclarativeGraphicsObjectContainer10itemChangeEN13QGraphicsItem18GraphicsItemChangeERK8QVariant @ 3353 NONAME ABSENT
+ _ZThn8_N35QDeclarativeGraphicsObjectContainerD0Ev @ 3354 NONAME ABSENT
+ _ZThn8_N35QDeclarativeGraphicsObjectContainerD1Ev @ 3355 NONAME ABSENT
_ZThn8_NK16QDeclarativeItem12boundingRectEv @ 3356 NONAME
_ZThn8_NK16QDeclarativeItem16inputMethodQueryEN2Qt16InputMethodQueryE @ 3357 NONAME
_ZThn8_NK19QDeclarativeBinding10expressionEv @ 3358 NONAME
@@ -3394,4 +3394,81 @@ EXPORTS
_ZNK18QDeclarativeParser7Variant8asScriptEv @ 3393 NONAME
_ZNK18QDeclarativeParser7Variant8asStringEv @ 3394 NONAME
_ZNK18QDeclarativeParser7Variant9asBooleanEv @ 3395 NONAME
+ _ZN16QDeclarativeDrag11resetTargetEv @ 3396 NONAME
+ _ZN16QDeclarativeText11setWrapModeENS_8WrapModeE @ 3397 NONAME
+ _ZN16QDeclarativeText15wrapModeChangedEv @ 3398 NONAME
+ _ZN18QDeclarativeActionC1EP7QObjectRK7QStringP19QDeclarativeContextRK8QVariant @ 3399 NONAME
+ _ZN18QDeclarativeActionC2EP7QObjectRK7QStringP19QDeclarativeContextRK8QVariant @ 3400 NONAME
+ _ZN18QDeclarativeEngine12importPluginERK7QStringS2_ @ 3401 NONAME
+ _ZN18QDeclarativeEngine13addPluginPathERK7QString @ 3402 NONAME
+ _ZN18QDeclarativeEngine17setPluginPathListERK11QStringList @ 3403 NONAME
+ _ZN20QDeclarativeCompiler2trEPKc @ 3404 NONAME
+ _ZN20QDeclarativeGridView24setHighlightMoveDurationEi @ 3405 NONAME
+ _ZN20QDeclarativeGridView28highlightMoveDurationChangedEv @ 3406 NONAME
+ _ZN20QDeclarativeListView24setHighlightMoveDurationEi @ 3407 NONAME
+ _ZN20QDeclarativeListView26setHighlightResizeDurationEi @ 3408 NONAME
+ _ZN20QDeclarativeListView28highlightMoveDurationChangedEv @ 3409 NONAME
+ _ZN20QDeclarativeListView30highlightResizeDurationChangedEv @ 3410 NONAME
+ _ZN20QDeclarativePathView24setHighlightMoveDurationEi @ 3411 NONAME
+ _ZN20QDeclarativePathView28highlightMoveDurationChangedEv @ 3412 NONAME
+ _ZN20QDeclarativeTextEdit11setWrapModeENS_8WrapModeE @ 3413 NONAME
+ _ZN20QDeclarativeTextEdit15wrapModeChangedEv @ 3414 NONAME
+ _ZN21QDeclarativeTextInput11xToPositionEi @ 3415 NONAME
+ _ZN21QDeclarativeTextInput13setAutoScrollEb @ 3416 NONAME
+ _ZN21QDeclarativeTextInput14mouseMoveEventEP24QGraphicsSceneMouseEvent @ 3417 NONAME
+ _ZN21QDeclarativeTextInput17autoScrollChangedEb @ 3418 NONAME
+ _ZN21QDeclarativeTextInput18displayTextChangedERK7QString @ 3419 NONAME
+ _ZN21QDeclarativeTextInput19moveCursorSelectionEi @ 3420 NONAME
+ _ZN21QDeclarativeTextInput20setPasswordCharacterERK7QString @ 3421 NONAME
+ _ZN21QDeclarativeTextInput24passwordCharacterChangedEv @ 3422 NONAME
+ _ZN24QDeclarativeSpringFollow5setToEf @ 3423 NONAME
+ _ZN25QDeclarativeAnimatedImage17sourceSizeChangedEv @ 3424 NONAME
+ _ZN26QDeclarativeSmoothedFollow10setEnabledEb @ 3425 NONAME
+ _ZN26QDeclarativeSmoothedFollow11qt_metacallEN11QMetaObject4CallEiPPv @ 3426 NONAME
+ _ZN26QDeclarativeSmoothedFollow11qt_metacastEPKc @ 3427 NONAME
+ _ZN26QDeclarativeSmoothedFollow11setDurationEi @ 3428 NONAME
+ _ZN26QDeclarativeSmoothedFollow11setVelocityEf @ 3429 NONAME
+ _ZN26QDeclarativeSmoothedFollow14enabledChangedEv @ 3430 NONAME
+ _ZN26QDeclarativeSmoothedFollow15durationChangedEv @ 3431 NONAME
+ _ZN26QDeclarativeSmoothedFollow15velocityChangedEv @ 3432 NONAME
+ _ZN26QDeclarativeSmoothedFollow16setReversingModeENS_13ReversingModeE @ 3433 NONAME
+ _ZN26QDeclarativeSmoothedFollow16staticMetaObjectE @ 3434 NONAME DATA 16
+ _ZN26QDeclarativeSmoothedFollow19getStaticMetaObjectEv @ 3435 NONAME
+ _ZN26QDeclarativeSmoothedFollow20reversingModeChangedEv @ 3436 NONAME
+ _ZN26QDeclarativeSmoothedFollow20setMaximumEasingTimeEi @ 3437 NONAME
+ _ZN26QDeclarativeSmoothedFollow24maximumEasingTimeChangedEv @ 3438 NONAME
+ _ZN26QDeclarativeSmoothedFollow5setToEf @ 3439 NONAME
+ _ZN26QDeclarativeSmoothedFollow9setTargetERK20QDeclarativeProperty @ 3440 NONAME
+ _ZN26QDeclarativeSmoothedFollowC1EP7QObject @ 3441 NONAME
+ _ZN26QDeclarativeSmoothedFollowC2EP7QObject @ 3442 NONAME
+ _ZN26QDeclarativeSmoothedFollowD0Ev @ 3443 NONAME
+ _ZN26QDeclarativeSmoothedFollowD1Ev @ 3444 NONAME
+ _ZN26QDeclarativeSmoothedFollowD2Ev @ 3445 NONAME
+ _ZNK16QDeclarativeText8wrapModeEv @ 3446 NONAME
+ _ZNK16QDeclarativeType10createSizeEv @ 3447 NONAME
+ _ZNK16QDeclarativeType14createFunctionEv @ 3448 NONAME
+ _ZNK16QDeclarativeType14isExtendedTypeEv @ 3449 NONAME
+ _ZNK18QDeclarativeEngine14pluginPathListEv @ 3450 NONAME
+ _ZNK20QDeclarativeGridView21highlightMoveDurationEv @ 3451 NONAME
+ _ZNK20QDeclarativeListView21highlightMoveDurationEv @ 3452 NONAME
+ _ZNK20QDeclarativeListView23highlightResizeDurationEv @ 3453 NONAME
+ _ZNK20QDeclarativePathView21highlightMoveDurationEv @ 3454 NONAME
+ _ZNK20QDeclarativeTextEdit8wrapModeEv @ 3455 NONAME
+ _ZNK21QDeclarativeTextInput10autoScrollEv @ 3456 NONAME
+ _ZNK21QDeclarativeTextInput11displayTextEv @ 3457 NONAME
+ _ZNK21QDeclarativeTextInput17passwordCharacterEv @ 3458 NONAME
+ _ZNK24QDeclarativeSpringFollow2toEv @ 3459 NONAME
+ _ZNK26QDeclarativeSmoothedFollow10metaObjectEv @ 3460 NONAME
+ _ZNK26QDeclarativeSmoothedFollow13reversingModeEv @ 3461 NONAME
+ _ZNK26QDeclarativeSmoothedFollow17maximumEasingTimeEv @ 3462 NONAME
+ _ZNK26QDeclarativeSmoothedFollow2toEv @ 3463 NONAME
+ _ZNK26QDeclarativeSmoothedFollow7enabledEv @ 3464 NONAME
+ _ZNK26QDeclarativeSmoothedFollow8durationEv @ 3465 NONAME
+ _ZNK26QDeclarativeSmoothedFollow8velocityEv @ 3466 NONAME
+ _ZTI26QDeclarativeSmoothedFollow @ 3467 NONAME
+ _ZTV26QDeclarativeSmoothedFollow @ 3468 NONAME
+ _ZThn8_N21QDeclarativeTextInput14mouseMoveEventEP24QGraphicsSceneMouseEvent @ 3469 NONAME
+ _ZThn8_N26QDeclarativeSmoothedFollow9setTargetERK20QDeclarativeProperty @ 3470 NONAME
+ _ZThn8_N26QDeclarativeSmoothedFollowD0Ev @ 3471 NONAME
+ _ZThn8_N26QDeclarativeSmoothedFollowD1Ev @ 3472 NONAME
diff --git a/src/s60installs/eabi/QtGuiu.def b/src/s60installs/eabi/QtGuiu.def
index 59e63ea..353603e 100644
--- a/src/s60installs/eabi/QtGuiu.def
+++ b/src/s60installs/eabi/QtGuiu.def
@@ -11943,7 +11943,7 @@ EXPORTS
_ZN20QGraphicsItemPrivate14setFocusHelperEN2Qt11FocusReasonEbb @ 11942 NONAME
_ZN20QGraphicsItemPrivate16clearFocusHelperEb @ 11943 NONAME
_ZN20QGraphicsItemPrivate24prependGraphicsTransformEP18QGraphicsTransform @ 11944 NONAME
- _ZN20QGraphicsItemPrivate6appendEP24QDeclarativeListPropertyI15QGraphicsObjectEPS1_ @ 11945 NONAME
+ _ZN20QGraphicsItemPrivate6appendEP24QDeclarativeListPropertyI15QGraphicsObjectEPS1_ @ 11945 NONAME ABSENT
_ZN20QGraphicsItemPrivate8setWidthEf @ 11946 NONAME
_ZN20QGraphicsItemPrivate9setHeightEf @ 11947 NONAME
_ZN7QWizard11pageRemovedEi @ 11948 NONAME
@@ -11970,4 +11970,7 @@ EXPORTS
_ZNK12QPaintBuffer15frameStartIndexEi @ 11969 NONAME
_ZNK12QPaintBuffer15processCommandsEP8QPainterii @ 11970 NONAME
_ZNK12QPaintBuffer18commandDescriptionEi @ 11971 NONAME
+ _ZN20QGraphicsItemPrivate11children_atEP24QDeclarativeListPropertyI15QGraphicsObjectEi @ 11972 NONAME
+ _ZN20QGraphicsItemPrivate14children_countEP24QDeclarativeListPropertyI15QGraphicsObjectE @ 11973 NONAME
+ _ZN20QGraphicsItemPrivate15children_appendEP24QDeclarativeListPropertyI15QGraphicsObjectEPS1_ @ 11974 NONAME
diff --git a/src/s60installs/eabi/QtMultimediau.def b/src/s60installs/eabi/QtMultimediau.def
index 384796d..64a6dc6 100644
--- a/src/s60installs/eabi/QtMultimediau.def
+++ b/src/s60installs/eabi/QtMultimediau.def
@@ -972,4 +972,7 @@ EXPORTS
_ZNK12QSoundEffect7isMutedEv @ 971 NONAME
_ZTI12QSoundEffect @ 972 NONAME
_ZTV12QSoundEffect @ 973 NONAME
+ _ZN18QGraphicsVideoItem10sceneEventEP6QEvent @ 974 NONAME
+ _ZN18QGraphicsVideoItem5eventEP6QEvent @ 975 NONAME
+ _ZThn8_N18QGraphicsVideoItem10sceneEventEP6QEvent @ 976 NONAME
diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp
index 2417d80..58c8d83 100644
--- a/src/script/api/qscriptengine.cpp
+++ b/src/script/api/qscriptengine.cpp
@@ -42,6 +42,7 @@
#include <math.h>
+#include "CodeBlock.h"
#include "Error.h"
#include "JSLock.h"
#include "Interpreter.h"
@@ -792,9 +793,18 @@ JSC::JSValue JSC_HOST_CALL functionQsTr(JSC::ExecState *exec, JSC::JSObject*, JS
return JSC::throwError(exec, JSC::GeneralError, "qsTranslate(): third argument (n) must be a number");
#ifndef QT_NO_QOBJECT
JSC::UString context;
- QScriptContext *ctx = QScriptEnginePrivate::contextForFrame(exec);
- if (ctx && ctx->parentContext())
- context = QFileInfo(QScriptContextInfo(ctx->parentContext()).fileName()).baseName();
+ // The first non-empty source URL in the call stack determines the translation context.
+ {
+ JSC::ExecState *frame = exec->removeHostCallFrameFlag();
+ while (frame) {
+ if (frame->codeBlock() && frame->codeBlock()->source()
+ && !frame->codeBlock()->source()->url().isEmpty()) {
+ context = QFileInfo(frame->codeBlock()->source()->url()).baseName();
+ break;
+ }
+ frame = frame->callerFrame()->removeHostCallFrameFlag();
+ }
+ }
#endif
JSC::UString text = args.at(0).toString(exec);
#ifndef QT_NO_QOBJECT