dynamic cast (--> christian couder)
Christian Couder
chcouder at club-internet.fr
Tue Mar 13 11:09:48 UTC 2001
Falk Brettschneider wrote :
>
> Hi Christian + other developers,
>
> Christian, thanks a lot for your commit. :-)
You are welcome !
> Just a little hint:
>
> void CKDevelop::slotBookmarksClear(){
> ..
> QList<int> allDocs = m_docViewManager->docs(DocViewMan::Header |
> DocViewMan::Source);
>
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> //This makes sure the KWriteDocs are returned, only
>
> ..
>
> KWriteDoc* pDoc = dynamic_cast<KWriteDoc*>
> (m_docViewManager->docPointer( curDocId));
> if(pDoc)
> pDoc->clearBookmarks();
> }
> ^^^^^^^^^^^^^
> That's why you can avoid the dynamic cast check. You can cast to
> KWriteDoc, directly.
Ok, this solution is perhaps better than a dynamic cast.
Regards,
Christian.
-
to unsubscribe from this list send an email to kdevelop-devel-request at kdevelop.org with the following body:
unsubscribe »your-email-address«
More information about the KDevelop-devel
mailing list