KDE/kdevelop
Andreas Pakulat
apaku at gmx.de
Sat Feb 16 21:21:13 UTC 2008
SVN commit 775956 by apaku:
Adapt to changes in the platform, possibly need to do something more sensible than just using the first element.
CCMAIL:kdevelop-devel at kdevelop.org
M +3 -1 buildtools/managers/custommake/custommaketreesynchronizer.cpp
M +7 -3 languages/cpp/cpplanguagesupport.cpp
--- trunk/KDE/kdevelop/buildtools/managers/custommake/custommaketreesynchronizer.cpp #775955:775956
@@ -136,7 +136,9 @@
KUrl url(file);
project = m_customMan->core()->projectController()->findProjectForUrl( url );
Q_ASSERT(project);
- makefileItem = project->fileForUrl( KUrl(file) );
+ QList<KDevelop::ProjectFileItem*> files = project->filesForUrl( KUrl(file) );
+ if( !files.isEmpty() )
+ makefileItem = files.first();
}
else
{
--- trunk/KDE/kdevelop/languages/cpp/cpplanguagesupport.cpp #775955:775956
@@ -274,8 +274,7 @@
KUrl::List projectFileList;
foreach (KDevelop::IProject *project, core()->projectController()->projects()) {
- KDevelop::ProjectFileItem *file = project->fileForUrl(url);
- if (file) {
+ if (project->inProject(url)) {
QList<ProjectFileItem*> files = project->files();
foreach(ProjectFileItem* file, files)
projectFileList << file->url();
@@ -480,13 +479,18 @@
bool gotPathsFromManager = false;
foreach (KDevelop::IProject *project, core()->projectController()->projects()) {
- KDevelop::ProjectFileItem *file = project->fileForUrl(source);
+ QList<KDevelop::ProjectFileItem*> files = project->filesForUrl(source);
+ ProjectFileItem* file = 0;
+ if( !files.isEmpty() )
+ file = files.first();
if (!file) {
+ kDebug() << "Didn't find file for url:" << source << "in project" << project->name();
continue;
}
KDevelop::IBuildSystemManager* buildManager = project->buildSystemManager();
if (!buildManager) {
+ kDebug() << "didn't get build manager for project:" << project->name();
// We found the project, but no build manager!!
continue;
}
More information about the KDevelop-devel
mailing list