[Okular-devel] [okular] [Bug 345765] [OS X] okular crashing opening PDF from URL

RJVB rjvbertin at gmail.com
Sat Apr 4 08:34:18 UTC 2015


https://bugs.kde.org/show_bug.cgi?id=345765

--- Comment #13 from RJVB <rjvbertin at gmail.com> ---
RIght, it's a cast that's done at runtime, and I'm pretty sure that when I
followed what happened a while ago, the original and cast objects were not at
the same memory address, which is why I wrote the new statement above. Maybe
that indeed happens in some cases. (And I don't mean that the cast object was
NULL after the operation :))

So I come back to my earlier question: why use dynamic_cast, why not use 

(Okular::ViewInterface*)(part)

or however you'd write the equivalent of int(foo)? I can see why it would be
necessary when casting a parent class to a child class, but Okular::Part
inherits Okular::ViewInterface. Can I assume that the ViewInterface ctor has
been called when the Okular::Part instance was created?

And is what I wrote above at least equivalent, in other words, could it be used
as a workaround?

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Okular-devel mailing list