Version: (using KDE KDE 3.1.1) Installed from: Compiled From Sources Compiler: gcc 3.3.1 OS: Linux When maintaining one .pro file for the whole project and not having a separate .pro for each subdir KDevelop/Gideon (latest CVS) just links to the file as if it was in the projects root dir when creating a new file (header/source doesn't matter). The file is created in the right directory, but the link in the header/source listbox discharges the path. example: / project root (there's the .pro file) Insert new File -> subdir/File.h Then we get a new entry in the listbox linking to / File.h instead of subdir/File.h
Please specify your version. Are you using CVS HEAD? If not, please update.
It's CVS HEAD (from 01-sept-2003).
Subject: kdevelop/buildtools/qmake CVS commit by dymo: Allow to use relative paths with "new file" wizard. CCMAIL: 63787-done@bugs.kde.org M +25 -0 trollprojectwidget.cpp 1.141 --- kdevelop/buildtools/qmake/trollprojectwidget.cpp #1.140:1.141 @@ -1632,4 +1632,29 @@ void TrollProjectWidget::addFiles( QStri noPathFileName = info.fileName(); + GroupItem *gitem = 0; + QPtrListIterator<GroupItem> it(m_shownSubproject->groups); + for (; it.current(); ++it) + { + if ((*it)->groupType == GroupItem::groupTypeForExtension(ext)) + { + gitem = *it; + break; + } + } + if (gitem && !noPathTruncate) + { + QString addName; + if (fileName.startsWith("/")) + addName = URLUtil::relativePath(gitem->owner->path, fileName); + else + addName = URLUtil::relativePath(gitem->owner->relpath, "/" + fileName); + if (!addName.isEmpty()) + { + if (addName[0] == '/') + addName = addName.mid(1); + noPathFileName = addName; + } + } + addFileToCurrentSubProject(GroupItem::groupTypeForExtension(ext), noPathFileName); updateProjectFile(m_shownSubproject);