Summary: | KDevelop crashes when the name of the Code Completion Database is "C/C++" | ||
---|---|---|---|
Product: | [Applications] kdevelop | Reporter: | Filip Papadopoulos <filip> |
Component: | Language Support: CPP (old) | Assignee: | kdevelop-bugs-null |
Status: | RESOLVED FIXED | ||
Severity: | crash | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | backtrace |
Description
Filip Papadopoulos
2005-05-20 16:09:07 UTC
Created attachment 11116 [details]
backtrace
I haven't tested, but it sounds very plausible. IIRC, the name used for the database is simply used as the database file name. '/' will surely break that. SVN commit 557193 by mattr: fix bug 106025. Patch by Bernd Buschinski. Thanks for the patch! BUG: 106025 CCMAIL: b.buschinski@web.de M +1 -1 parser.cpp --- branches/kdevelop/3.4/lib/cppparser/parser.cpp #557192:557193 @@ -4282,7 +4282,7 @@ bool Parser::parseWinDeclSpec( GroupAST::Node & node ) { - if( lex->lookAhead(0) == Token_identifier && lex->lookAhead(0).text() == "__declspec" && lex->lookAhead(1) == '(' ){ + if( lex->lookAhead(0) == Token_identifier && lex->lookAhead(0).text() == "__declspec" && lex->lookAhead(1) == '(' && lex->lookAhead(2) != ')'){ int start = lex->index(); nextToken(); nextToken(); // skip '(' SVN commit 566385 by mattr: Patch from Bernd Buschinski. "another tyr to fix bug 106025" Thanks for the patch! CCBUG: 106025 M +3 -3 ccconfigwidget.cpp M +1 -1 createpcsdialog.cpp --- branches/kdevelop/3.4/languages/cpp/ccconfigwidget.cpp #566384:566385 @@ -160,7 +160,7 @@ { Catalog* c = *it; QFileInfo dbInfo( c->dbName() ); - QCheckListItem* item = new QCheckListItem( advancedOptions, dbInfo.baseName(), QCheckListItem::CheckBox ); + QCheckListItem* item = new QCheckListItem( advancedOptions, KURL::decode_string( dbInfo.baseName() ), QCheckListItem::CheckBox ); item->setOn( c->enabled() ); m_catalogs[ item ] = c; @@ -219,7 +219,7 @@ QString question = i18n( "Are you sure you want to remove the \"%1\" database?" ).arg( db ); KStandardDirs *dirs = m_pPart->instance() ->dirs(); - QString dbName = dirs->saveLocation( "data", "kdevcppsupport/pcs" ) + db + ".db"; + QString dbName = dirs->saveLocation( "data", "kdevcppsupport/pcs" ) + KURL::encode_string_no_slash( db ) + ".db"; #if KDE_VERSION >= KDE_MAKE_VERSION(3,3,0) @@ -238,7 +238,7 @@ void CCConfigWidget::catalogRegistered( Catalog * c ) { QFileInfo dbInfo( c->dbName() ); - QCheckListItem* item = new QCheckListItem( advancedOptions, dbInfo.baseName(), QCheckListItem::CheckBox ); + QCheckListItem* item = new QCheckListItem( advancedOptions, KURL::decode_string( dbInfo.baseName() ), QCheckListItem::CheckBox ); item->setOn( c->enabled() ); m_catalogs[ item ] = c; --- branches/kdevelop/3.4/languages/cpp/createpcsdialog.cpp #566384:566385 @@ -327,7 +327,7 @@ KStandardDirs *dirs = m_part->instance() ->dirs(); - QString dbName = dirs->saveLocation( "data", "kdevcppsupport/pcs" ) + filename_edit->text() + ".db"; + QString dbName = dirs->saveLocation( "data", "kdevcppsupport/pcs" ) + KURL::encode_string_no_slash(filename_edit->text()) + ".db"; kdDebug( 9007 ) << "================================> dbName = " << dbName << endl; m_part->removeCatalog( dbName ); Moving all the bugs from the CPP Parser. It was not well defined the difference between it and C++ Language Support and people kept reporting in both places indistinctively |