[Development] Build errors with custom plugin

Thiago Macieira thiago.macieira at intel.com
Wed Jan 11 14:32:05 CET 2012


On Wednesday, 11 de January de 2012 16.39.52, Lincoln Ramsay wrote:
> On 01/11/2012 04:06 PM, ext Ismael Luceno wrote:
> > error: invalid static_cast from type 'QObject*' to type
> > 'QAndroidPlatformScreen*'
> 
> Is this GCC 4.6 by any chance?
> 
> I've had a report of it failing to compile some moc-generated code in my
> project too. I don't know this code but in my code's case, the error
> looked bogus to me (ie. it was a perfectly valid use of static_cast as
> far as I'm aware).

If a static_cast fails, it's because the compiler cannot prove that the two 
classes are related by non-virtual inheritance.

You probably forgot an #include.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
     Intel Sweden AB - Registration Number: 556189-6027
     Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/development/attachments/20120111/ba4a6888/attachment.sig>


More information about the Development mailing list