[Bug 63787] trollproject: Relative url's to files subdirs are handled wrong.
Alexander Dymo
cloudtemple at mksat.net
Tue Nov 18 20:33:05 UTC 2003
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=63787
cloudtemple at mksat.net changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
------- Additional Comments From cloudtemple at mksat.net 2003-11-18 20:31 -------
Subject: kdevelop/buildtools/qmake
CVS commit by dymo:
Allow to use relative paths with "new file" wizard.
CCMAIL: 63787-done at 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);
More information about the KDevelop-devel
mailing list