Details
-
Bug
-
Resolution: Duplicate
-
Not Evaluated
-
None
-
Qt Creator 4.6.2
-
Windows 10, ASUS A209J
Description
Unfortunately due to the nature of this bug I did not find an isolated case to provide, but I can describe steps to reproduce:
I was working on the DockWindow example for QMainWIndow, and I decided I wanted to integrate DarkStyle from a repo, but manually had to copy and add files to the project.
https://github.com/Jorgen-VikingGod/Qt-Frameless-Window-DarkStyle
I added a few new files and folders from DarkStyle in something like this order:
The files DarkStyle.cpp and DarkStyle.h
The darkstyle/ folder (copied from inside an archive download)
The images/ folder
Then I copied framelesswindow/ folder and its contents to qt-mainapp/ but had not yet added it to the project or resources, however I did add darkstyle/ and images/ at this point.
I "Add Existing Items..." and added the DarkStyle.cpp and Darkstyle.h files
Then, I built and it threw LNK4042 on DarkStyle.h
Caught off guard, I added some #pragma once and the issue went away, it built.
Everything built and ran correctly, but the title bar was not changed because I only used the DarkStyle object. I wanted to add the framelesswindow object.
I then added framelesswindow/ after further consideration, but for a reason the framelesswindow.ui was not included (its a form)
I then added the images/ folder and the darkstyle/ folder to the .qrc from Add Existing Items.. context menu.
When I went to manually add
FORMS += framelesswindow.ui
to the .pro file for the project, I noticed the HEADERS and SOURCES lists were really, really long, but I added the FORMS line and proceeded to build.
I then built and it came back with something like 24 issues LNK4042
After examining the .pro file, I saw that all of my original files (before adding DarkStyle files at all) in the HEADERS and SOURCES section were duplicated somewhat randomly twice.
So if before it was:
HEADERS = a.h\ b.h\ c.h\ d.h
it now read:
HEADERS = a.h\ b.h\ c.h\ b.h\ c.h\ d.h\ b.h\ c.h\ d.h
This was repeated for SOURCES as well.
Attachments
Issue Links
- duplicates
-
QTCREATORBUG-20278 "Add Existing Directory ..." causes multiple include of source files in .pro file
- Closed
-
QTCREATORBUG-19546 adding .cpp and .h files that are already in the project results in double entries in the .pro file
- Closed
- relates to
-
QTCREATORBUG-18926 Duplicate filenames added to .pro file when overwriting existing files while adding new files
- Closed
-
QTCREATORBUG-19546 adding .cpp and .h files that are already in the project results in double entries in the .pro file
- Closed