Skip to content

Commit

Permalink
Try to support Qt 4.4-style Phonon includes in Qt.
Browse files Browse the repository at this point in the history
This introduces an undocumented "phonon_compat" subdir and also adds
it to the INCLUDEPATH when QT += phonon is specified. With this, these
styles of #includes should be supported:

 #include <Phonon>
 #include <Phonon/Phonon>
 #include <phonon>
 #include <phonon/phonon>
 #include <Phonon/MediaObject>
 #include <phonon/mediaobject.h>

Still need to check if the headers get installed during "make
install". I couldn't find where in our code that is done.

BT: yes
Reviewed-By: Trust Me
  • Loading branch information
Thiago Macieira committed Sep 23, 2009
1 parent bbcef4e commit 0cb5038
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
10 changes: 8 additions & 2 deletions bin/syncqt
Original file line number Diff line number Diff line change
Expand Up @@ -843,9 +843,15 @@ foreach (@modules_to_sync) {
$master_contents .= "#endif\n";

unless($showonly) {
unless ($lib eq "phonon") {
my @master_includes;
if ($lib eq "phonon") {
push @master_includes, "$out_basedir/include/phonon_compat/phonon/phonon";
push @master_includes, "$out_basedir/include/phonon/Phonon/Phonon";
} else {
push @master_includes, "$out_basedir/include/$lib/$lib";
}
foreach my $master_include (@master_includes) {
#generate the "master" include file
my $master_include = "$out_basedir/include/$lib/$lib";
$pri_install_files .= fixPaths($master_include, "$modules{$lib}") . " "; #get the master file installed too
if($master_include && -e "$master_include") {
open MASTERINCLUDE, "<$master_include";
Expand Down
8 changes: 6 additions & 2 deletions mkspecs/features/qt.prf
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,12 @@ for(QTLIB, $$list($$lower($$unique(QT)))) {
else:isEqual(QTLIB, scripttools):qlib = QtScriptTools
else:isEqual(QTLIB, testlib):qlib = QtTest
else:isEqual(QTLIB, dbus):qlib = QtDBus
else:isEqual(QTLIB, phonon):qlib = phonon
else:isEqual(QTLIB, webkit):qlib = QtWebKit
else:isEqual(QTLIB, phonon) {
qlib = phonon
INCLUDEPATH += $$QMAKE_INCDIR_QT/phonon_compat/phonon
INCLUDEPATH += $$QMAKE_INCDIR_QT/phonon_compat
INCLUDEPATH += $$QMAKE_INCDIR_QT/phonon/Phonon
} else:isEqual(QTLIB, webkit):qlib = QtWebKit
else:isEqual(QTLIB, multimedia):qlib = QtMultimedia
else:message("Unknown QT: $$QTLIB"):qlib =
!isEmpty(qlib) {
Expand Down

0 comments on commit 0cb5038

Please sign in to comment.