[PATCH] Prevent crash in Mac OS X when opening project

Andreas Pakulat apaku at gmx.de
Mon Feb 6 08:29:20 UTC 2012


On 05.02.12 20:09:40, David Narvaez wrote:
> On Sun, Feb 5, 2012 at 1:44 PM, Aleix Pol <aleixpol at kde.org> wrote:
> > On Mon, Jan 30, 2012 at 11:54 AM, Jens Bäckman <jens.backman at gmail.com> wrote:
> >> ---
> >>  projectmanagers/cmake/cmakemanager.cpp |    3 ++-
> >>  1 files changed, 2 insertions(+), 1 deletions(-)
> >>
> >> diff --git a/projectmanagers/cmake/cmakemanager.cpp b/projectmanagers/cmake/cmakemanager.cpp
> >> index 2b38fac..5ed7875 100644
> >> --- a/projectmanagers/cmake/cmakemanager.cpp
> >> +++ b/projectmanagers/cmake/cmakemanager.cpp
> >> @@ -859,7 +859,8 @@ QList<KDevelop::ProjectFolderItem*> CMakeManager::parse( KDevelop::ProjectFolder
> >>                 a->defineVariables(targetProps["COMPILE_DEFINITIONS"]);
> >>
> >>             DescriptorAttatched* datt=dynamic_cast<DescriptorAttatched*>(targetItem);
> >> -            datt->setDescriptor(t.desc);
> >> +            if(datt)
> >> +                datt->setDescriptor(t.desc);
> >>
> >>             KUrl::List tfiles;
> >>             foreach( const QString & sFile, t.files)
> >> --
> >> 1.7.5.4
> >>
> >>
> >> --
> >> KDevelop-devel mailing list
> >> KDevelop-devel at kdevelop.org
> >> https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel
> >
> > Well, in the cmake code, all targets inherit DescriptorAttatched, so I
> > don't see why this is happening at all. Further information would be
> > really appreciated.
> 
> I used to have problems with a dynamic cast in the cmakemanager.cpp
> file[0] until I upgraded from GCC 4.3 to GCC 4.5 and it got fixed. I
> wonder what version of GCC could Mac OS X be using.

4.2 (Apple has a problem with newer gcc's license IIUC), Lion ships with
clang as default though IIRC.

Andreas





More information about the KDevelop-devel mailing list