[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    Re: branches/KDE/3.5
From:       David Faure <faure () kde ! org>
Date:       2007-01-15 9:43:42
Message-ID: 200701151043.44162.faure () kde ! org
[Download RAW message or body]

On Sunday 14 January 2007 20:50, Hasso Tepper wrote:
> +      KHTMLPart* const part = static_cast<KHTMLPart *>((KParts::ReadOnlyPart *)(*it)->m_part);
> +      if (part->inherits("KHTMLPart"))

Static-casting and then checking the type with inherits(), looks wrong/dangerous.
Please use 
KHTMLPart* const part = ::qt_cast<KHTMLPart *>( (*it)->m_part );
if (part) 
{
}

-- 
David Faure, faure@kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic