[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdevelop/parts/classview
From: Roberto Raggi <roberto () kdevelop ! org>
Date: 2003-09-08 11:01:58
[Download RAW message or body]
CVS commit by raggi:
improved ClassViewWidget::openImplementation()
M +20 -5 classviewwidget.cpp 1.42
--- kdevelop/parts/classview/classviewwidget.cpp #1.41:1.42
@@ -679,10 +679,25 @@ void FunctionDomBrowserItem::openImpleme
return;
- FunctionDefinitionDom fun = lst.front();
- QString path = QFileInfo( m_dom->fileName() ).dirPath( true );
+ FunctionDefinitionDom fun;
+ QFileInfo fileInfo( m_dom->fileName() );
+ QString path = fileInfo.dirPath( true );
- for( FunctionDefinitionList::Iterator it=lst.begin(); it!=lst.end(); ++it ){
- if( path == QFileInfo((*it)->fileName()).dirPath(true) )
+ for( FunctionDefinitionList::Iterator it=lst.begin(); it!=lst.end(); ++it )
+ {
+ QFileInfo defFileInfo( (*it)->fileName() );
+ QString defPath = defFileInfo.dirPath( true );
+
+ if( path != defPath )
+ continue;
+
+ if( defFileInfo.baseName() == fileInfo.baseName() ) {
+ fun = *it;
+ } else if( !fun ) {
fun = *it;
+ }
+ }
+
+ if( !fun ) {
+ fun = lst.front();
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic