Failed to add to the project QT creator
detachedblue opened this issue · comments
Can you provide more details:
- Which build system are you using? (catkin_make, catkin tools)
- Does the workspace compile from the command line?
- Which Qt Creator and plugin version are you using?
Does the new.cpp
file actually exist in the file system? Or did you try to add it from the Qt Creator GUI?
Can you provide more details:
1. Which build system are you using? (catkin_make, catkin tools) 2. Does the workspace compile from the command line? 3. Which Qt Creator and plugin version are you using?
Does the
new.cpp
file actually exist in the file system? Or did you try to add it from the Qt Creator GUI?
Hi, thanks for your reply.
- I'm using catkin_make.
- I complied from the Qt creator, completely new project.
- I'm using Qt Creator 5.0.0 (Qt 5.15.2) with the latest plugin 0.4.0.
I tried to add "new.cpp" from the Qt Creator, it showed this error however it was still created in the file system after, but the common problem "file is not part of any project" warning appears in this cpp file.
Thanks
You said you also have issues with the CMake files. So I was wondering, if you can compile your workspace on the command line, outside of Qt Creator.
I just tested now to create a new ROS workspace with a ROS node using the Qt Creator GUI only, and I got the message:
Failed to add one or more files to project
"/home/christian/Development/test_ws" (/home/christian/Development/test_ws/src/my_node/package.xml,/home/christian/Development/test_ws/src/my_node/CMakeLists.txt).
and the node package was not created. The workspace file structure in the end only contained test_ws.workspace
without any other folders or files.
@detachedblue Is this the problem that you mean?
Edit: If I create the src
folder manually, I still get the same error message but the package is created in test_ws/src/my_node
in the end.
Hi,
My issue with the Cmakefiles is not critical. It can be complied from the terminal or Qt Creator.
It's just the error messages (every time I tried to add a new file) and the "file is not part of any project" problem.
Best
Bobby
The package is created by catkin_create_pkg
at:
ros_qtc_plugin/src/project_manager/ros_package_wizard.cpp
Lines 350 to 351 in 6f763a6
However, it seems that
waitForFinished
returns before the project files are actually created. At the end of ROSPackageWizard::writeFiles
a true success
is returned, but no files have been created. A subsequent check for these files then throws the error that these files could not be created. But just after this, the files appear in the filesystem.
@Levi-Armstrong Any idea why this might happen? Does catkin_create_pkg
somehow run asynchronously?
@detachedblue Are you trying to create a new package or just adding a file to the existing project through the Qt Creator Add New...?
@detachedblue I think #446 should fix your issue. Can you verify that this MR fixes your issue? You can use the CI asset (https://github.com/ros-industrial/ros_qtc_plugin/actions/runs/1258978044) to test this without compiling from source.
Edit: For convenience, the plugin archive from the CI pipeline: ROSProjectManager-0.4.0-Linux-x86_64.zip.