From d2bceb693aa26937f3def5e1b32fc4411d1b646a Mon Sep 17 00:00:00 2001 From: Gareth Stockwell Date: Mon, 28 Sep 2009 13:42:35 +0100 Subject: Fixed build errors due to header filename clashes between epoc32/include and Phonon. Both epoc32/include and $QTDIR/include/Phonon contain a file called videoplayer.h. Both of these directories are listed as SYSTEMINCLUDE paths in the generated MMP file, with the Phonon path coming first. This means that '#include ' picks up the Phonon header rather than (as intended) the Symbian one. A new qmake variable, PREPEND_INCLUDEPATH, is defined, allowing the .pro file to specify that /epoc32/include should be the first SYSTEMINCLUDE. --- mkspecs/features/symbian/qt.prf | 15 +++++++++++++++ src/3rdparty/phonon/mmf/mmf_videoplayer.h | 2 +- src/plugins/phonon/mmf/plugin/plugin.pro | 17 +++++------------ 3 files changed, 21 insertions(+), 13 deletions(-) diff --git a/mkspecs/features/symbian/qt.prf b/mkspecs/features/symbian/qt.prf index dd4a4d5..3b24355 100644 --- a/mkspecs/features/symbian/qt.prf +++ b/mkspecs/features/symbian/qt.prf @@ -6,6 +6,21 @@ CONFIG += qtmain load(qt) +# Allow .pro files to specify include path(s) to be prepended to the list. +# +# This allows the project to override the default ordering, whereby paths +# relative to $$QMAKE_INCDIR_QT always come first. This ordering can cause +# problems when both the epoc32/include tree and a Qt include directory +# contain a header of the same name - in this case, the Qt header is always +# included by virtue of its path appearing first in the SYSTEMINCLUDE +# directives in the generated MMP file. +# +# To work around this situation, the following line can be added to the .pro +# file: +# PREPEND_INCLUDEPATH = /epoc32/include +# +INCLUDEPATH = $$PREPEND_INCLUDEPATH $$INCLUDEPATH + # Add dependency to QtLibs package to all other projects besides QtLibs. # Note: QtLibs with full capabilities has UID3 of 0x2001E61C, # while self-signed version typically has temporary UID3 of 0xE001E61C. diff --git a/src/3rdparty/phonon/mmf/mmf_videoplayer.h b/src/3rdparty/phonon/mmf/mmf_videoplayer.h index 2878d6a..a805135 100644 --- a/src/3rdparty/phonon/mmf/mmf_videoplayer.h +++ b/src/3rdparty/phonon/mmf/mmf_videoplayer.h @@ -19,7 +19,7 @@ along with this library. If not, see . #ifndef PHONON_MMF_VIDEOPLAYER_H #define PHONON_MMF_VIDEOPLAYER_H -#include +#include // from epoc32/include #include "abstractmediaplayer.h" #include "videooutput.h" diff --git a/src/plugins/phonon/mmf/plugin/plugin.pro b/src/plugins/phonon/mmf/plugin/plugin.pro index de108a6..eb7fd27 100644 --- a/src/plugins/phonon/mmf/plugin/plugin.pro +++ b/src/plugins/phonon/mmf/plugin/plugin.pro @@ -10,15 +10,16 @@ PHONON_MMF_DIR = $$QT_SOURCE_TREE/src/3rdparty/phonon/mmf phonon_mmf_audio_drm { LIBS += -lDrmAudioPlayUtility - DEFINES += QT_PHONON_MMF_AUDIO_DRM } else { LIBS += -lmediaclientaudio } -# In the internal 5th SDK, DrmAudioSamplePlayer.h is placed in this folder, as -# opposed to the public, where it is placed in epoc32/include. In some cases -# it's needed for other headers as well. +# This is necessary because both epoc32/include and Phonon contain videoplayer.h. +# By making /epoc32/include the first SYSTEMINCLUDE, we ensure that +# '#include ' picks up the Symbian header, as intended. +PREPEND_INCLUDEPATH = /epoc32/include + INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE HEADERS += \ @@ -72,10 +73,6 @@ LIBS += -lws32 # For RWindow LIBS += -lefsrv # For file server LIBS += -lapgrfx -lapmime # For recognizer -# *** Temporary hack, necessitated by -# inline QSymbianControl::setTransparentBlit -LIBS += -lfbscli - # These are for effects. LIBS += -lAudioEqualizerEffect -lBassBoostEffect -lDistanceAttenuationEffect -lDopplerBase -lEffectBase -lEnvironmentalReverbEffect -lListenerDopplerEffect -lListenerLocationEffect -lListenerOrientationEffect -lLocationBase -lLoudnessEffect -lOrientationBase -lSourceDopplerEffect -lSourceLocationEffect -lSourceOrientationEffect -lStereoWideningEffect @@ -87,9 +84,5 @@ INSTALLS += target include(../../../qpluginbase.pri) -# We need this to be able to resolve ambiguity for VideoPlayer.h. Phonon and -# the SDK has the header. -INCLUDEPATH *= /epoc32 - TARGET.UID3=0x2001E629 -- cgit v0.12