gcc 4 compatibility for phonon in kdelibs rev 536322 (patch)

Adriaan Moors adriaan.moors at cs.kuleuven.be
Wed May 3 22:02:34 BST 2006


Hi,

While trying to compile kdelibs on os x 10.4 using apple's gcc 4.0, I  
got a compile error:
> Building CXX object phonon/CMakeFiles/phononcore.dir/ 
> audiooutputdevice.o
> /Users/adriaan/nospotlight/src/clean/kdelibs-kde4-snapshot-svn- 
> r504748/phonon/factory.h:64: error: explicit specialization of  
> 'void KStaticDeleter<Phonon::Factory>::destructObject()' must be  
> introduced by `template <>'
> /Users/adriaan/nospotlight/src/clean/kdelibs-kde4-snapshot-svn- 
> r504748/phonon/factory.h:64: error: template-id 'destructObject<>'  
> for 'void KStaticDeleter<Phonon::Factory>::destructObject()' does  
> not match any template declaration

It looks like I fixed this using the following patch (but I'm no C++  
expert by any means...):

precious:~/nospotlight/src/clean/kdelibs-kde4-snapshot-svn-r504748/ 
phonon adriaan$ svn diff backendcapabilities.h
Index: backendcapabilities.h
===================================================================
--- backendcapabilities.h       (revision 536322)
+++ backendcapabilities.h       (working copy)
@@ -43,7 +43,7 @@
   */
class PHONONCORE_EXPORT BackendCapabilities : public QObject
{
-       friend  
void ::KStaticDeleter<BackendCapabilities>::destructObject();
+       template<class BackendCapabilities> friend  
void ::KStaticDeleter<BackendCapabilities>::destructObject();
         Q_OBJECT

precious:~/nospotlight/src/clean/kdelibs-kde4-snapshot-svn-r504748/ 
phonon adriaan$ svn diff factory.h
Index: factory.h
===================================================================
--- factory.h   (revision 536322)
+++ factory.h   (working copy)
@@ -61,7 +61,7 @@
   */
class PHONONCORE_EXPORT Factory : public QObject, public DCOPObject
{
-       friend void ::KStaticDeleter<Factory>::destructObject();
+       template<class Factory> friend  
void ::KStaticDeleter<Factory>::destructObject();
         friend class Phonon::BasePrivate;
         Q_OBJECT

I hope this is the right way to report this, apologies if it is not  
(please point my to the right mailing list for next time).

regards,
adriaan

Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm





More information about the kde-core-devel mailing list