Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Dev

libMyth fails to build in managedlist.cpp/h

 

 

MythTV dev RSS feed   Index | Next | Previous | View Threaded


Christian at FamilieHoehle

Jul 3, 2008, 3:03 AM

Post #1 of 3 (274 views)
Permalink
libMyth fails to build in managedlist.cpp/h

i can't get trunk to build since a while (libMyth fails). Last tried
with rev. 17692.
any hint how to get it to compile again? qt version i use is 4.4.0.
Error message is the following:

In file included from managedlist.cpp:7:
/usr/local/Trolltech/Qt-4.4.0/include/QtCore/qpointer.h: In member
function `
QPointer<T>::operator T*() const [with T = ManagedList]':
managedlist.h:42: instantiated from here
/usr/local/Trolltech/Qt-4.4.0/include/QtCore/qpointer.h:80: error: invalid
static_cast from type `QObject*' to type `ManagedList*'

Thanks,
Christian
Attachments: signature.asc (0.24 KB)


awithers at anduin

Jul 3, 2008, 10:34 AM

Post #2 of 3 (246 views)
Permalink
Re: libMyth fails to build in managedlist.cpp/h [In reply to]

> In file included from managedlist.cpp:7:
> /usr/local/Trolltech/Qt-4.4.0/include/QtCore/qpointer.h: In member
> function `
> QPointer<T>::operator T*() const [with T = ManagedList]':
> managedlist.h:42: instantiated from here
> /usr/local/Trolltech/Qt-4.4.0/include/QtCore/qpointer.h:80: error: invalid
> static_cast from type `QObject*' to type `ManagedList*'

It should not be related to your Qt version (in this instance), probably some mix of compiler version/options.

ManagedList is forward declared at the top of managedlist.h, when one instantiates QPointer<ManagedList>::operator T*() in ManagedListItem::getParentList(), well the QPointer template would be unaware of ManagedList's inheritance from QObject.

Essentially the difference between:

struct base {};
template <typename T> struct qp { operator T*() { base *ret = 0; return static_cast<T *>(ret);}};
struct d;
int main() { qp<d> dinst; d *p = dinst; }
struct d : public base {};

and

struct base {};
template <typename T> struct qp { operator T*() { base *ret = 0; return static_cast<T *>(ret);}};
struct d : public base {};
int main() { qp<d> dinst; d *p = dinst; }

So, which compiler version are you using?

And yes, things should probably be moved around.

--
Anduin Withers

_______________________________________________
mythtv-dev mailing list
mythtv-dev[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


Christian at FamilieHoehle

Jul 3, 2008, 12:16 PM

Post #3 of 3 (247 views)
Permalink
Re: libMyth fails to build in managedlist.cpp/h [In reply to]

> It should not be related to your Qt version (in this instance), probably some mix of compiler version/options.
> ...
> So, which compiler version are you using?
>
GCC output says:
gcc (GCC) 3.3.4 (pre 3.3.5 20040809)

I'll get a current gcc and try again to see if that works.
Attachments: signature.asc (0.24 KB)

MythTV dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.