[Bug 73420] New: One can add the same file twice in QMake Manager
Stefan Zickler
szickler at buffalo.edu
Sat Jan 24 18:16:02 UTC 2004
------- 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=73420
Summary: One can add the same file twice in QMake Manager
Product: kdevelop
Version: unspecified
Platform: Gentoo Packages
OS/Version: Linux
Status: UNCONFIRMED
Severity: normal
Priority: NOR
Component: general
AssignedTo: kdevelop-devel at kdevelop.org
ReportedBy: szickler at buffalo.edu
Version: 3.0 RC 1 (using KDE KDE 3.1.5)
Installed from: Gentoo Packages
Compiler: gcc 3.3.2-r5
OS: Linux
Ok, this is actually two bugs:
1) One can add the exact same file multiple times in the qmake manager, which will (of course) result in compilation errors. I am not sure if this is behavior is desired, at least I can't think of any scenario where you wanted the same file twice in your soruces.
This bug is really annoying when I am copying a bunch of external source into my project and simply add all of it to the qmake manager which will sometimes result in files being added twice.
2) Worse, when one tries to remove one of those doubles from the qmake-manager, it will remove the one desired instance of the icons. However, internally it seems to remove BOTH instances from the makefiles, which means it won't compile anymore either, due to undefined references etc.
To make it more clear, here Directions To reproduce:
1)
Start kdevelop and create a new C++ -> QMake project -> Application.
Now in the QMake manager (for subproject 'src'), there should already be a 'main.cpp' under sources.
Click the button to 'Add existing files' and select that exact same file 'main.cpp'. It will be added another time, so now there are two main.cpp's in the qmake manager.
Trying to compile will naturally give a compiler error due to multiple declarations.
2)
Assuming you did the above.
Select one of those 'main.cpp' and select 'Remove File'.
Now that one selected icon will disappear as expected, leaving only one main.cpp in the qmake manager.
However, trying to compile will give a compiler error due to "undefined reference to 'main'" which means that even though main.cpp is listed once in the qmake manager it has been completely removed from the makefiles.
3) workaround:
remove all main.cpp's from the qmake manager and add it again once. Now it will all compile just fine.
More information about the KDevelop-devel
mailing list