[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/kdevelop/3.4/languages/cpp
From: Jens Dagerbo <jens.dagerbo () swipnet ! se>
Date: 2007-02-08 19:33:55
Message-ID: 1170963235.458944.23499.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 631692 by dagerbo:
This appears to have worked by mistake before.. reorder() was called with both \
relative and absolute paths.. and the relative paths worked as long as current dir \
happened to be the project directory..
M +13 -5 cppsupportpart.cpp
--- branches/kdevelop/3.4/languages/cpp/cppsupportpart.cpp #631691:631692
@@ -865,15 +865,23 @@
QStringList headerExtensions = QStringList::split( ",", "h,H,hh,hxx,hpp,tlh" );
+ QString projectPath = project()->projectDirectory();
+
QStringList::ConstIterator it;
for ( it = list.begin(); it != list.end(); ++it )
{
- if( !isValidSource( *it ) ) continue;
- QString fileName = *it;
- if ( headerExtensions.contains( QFileInfo( *it ).extension() ) )
- headers << ( *it );
+ QString filePath = *it;
+ // brilliant stuff.. this method is apparently called both with
+ // relative and absolute paths..
+ if ( !filePath.startsWith("/") )
+ {
+ filePath = projectPath + "/" + filePath;
+ }
+ if( !isValidSource( filePath ) ) continue;
+ if ( headerExtensions.contains( QFileInfo( filePath ).extension() ) )
+ headers << ( filePath );
else
- others << ( *it );
+ others << ( filePath );
}
return makeListUnique( headers + others );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic