[Qt-creator] completion crash for define

Roberto Raggi roberto.raggi at trolltech.com
Mon Mar 9 12:48:54 CET 2009


Hi,

Sorry but I can't reproduce this crash. By the way there is no  
`symbol' associated to a macro-completion, so i'm not surprised that  
you crash Creator when calling symbol->fileName().

ciao robe


On 08.03.2009, at 15:33, Marek Jasovsky wrote:

> Hi Roberto
>
> as I mentioned today to Thorbjorn, there is one nasty crash if I try  
> to autocomplete CPLUSPLUS_BEGIN_NAMESPACE at the beginning of the  
> line.
>
> when attaching, code stops in qDebug() shown below with symbol  
> pointer still having value of zero.
>
> I suppose this is due to the fact, that I am inserting the define  
> directive at the beginning of the line where there's no valid symbol  
> to start with...
>
> thanks a lot
>
>
> Marek
>
>
>
> void CppCodeCompletion::complete(const TextEditor::CompletionItem  
> &item)
> {
>  Symbol *symbol = 0;
>
>     if (item.m_data.isValid())
>         symbol = item.m_data.value<Symbol *>();
>
>     qDebug() << "*** complete symbol:" << symbol->fileName() <<  
> symbol->line(); // crash here
> .....
> }
> _______________________________________________
> Qt-creator mailing list
> Qt-creator at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-creator




More information about the Qt-creator-old mailing list