Summary: | trollproject: Relative url's to files subdirs are handled wrong. | ||
---|---|---|---|
Product: | [Applications] kdevelop | Reporter: | Stephan Heigl <steve> |
Component: | Build tools: QMake | Assignee: | KDevelop Developers <kdevelop-devel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Stephan Heigl
2003-09-06 09:50:32 UTC
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); |