Skip adding object libraries paths to runtime PATH.
Also add only the paths that contain the dll files.
Fixes: QTCREATORBUG-29662
Change-Id: I58cd9b24c6c079b99ed51ae2ebd315a1aa195f04
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
CMake can generate backgraces with absolute paths, and the commit
246f33c20d removed this support from Qt
Creator.
This commit fixes this issue with absolute paths.
Fixes: QTCREATORBUG-29914
Change-Id: Ib911e80aee1ff9f4a26435f7e693f7766551cc90
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
For the cases of:
source_group(TREE ${CMAKE_SOURCE_DIR} FILES my/subdir/file.cpp)
Treat the "my\\subdir" part in the project view as part of the source
group name.
Fixes: QTCREATORBUG-29799
Change-Id: I92bf581be25d085783bcdadd8a418b849a29c708
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
They are reasonably standardized, and generally usable cross-plugin,
so this can help to avoid a few cross-plugin compiletime dependencies.
Change-Id: Icb2b010c3e12dee69df54ab16f6f8e90d9cffba6
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Previously only "Source Files" and "Header Files" were treated as
sourceOrHeaders project nodes.
But source_group can introduce a new source group which needs to be also
treated as sourcesOrHeaders project node.
Fixes: QTCREATORBUG-29799
Change-Id: I833d80155fba3fb0269aeab149ea74b0d2edd271
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Only set the compiler flags for the active language.
Select source and header files accordingly to the active language.
Fixes: QTCREATORBUG-29707
Change-Id: Ieeaa56f85ccc937f31253ac047538fa19ae4166f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Qt Creator will display the header / source files based on the
sourceDirectory of the target as base directory.
The source_group(TREE <dir>) will result CMake in making a source group
named "TREE" which should not be displayed in the project view.
Amends 9280f7f757
Fixes: QTCREATORBUG-23942
Fixes: QTCREATORBUG-29105
Change-Id: Ib71ffcc559376ea1596a5b21cb7e7fa779bd8d79
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This triggered soft asserts in FileUtils::copyIfDifferent() when
opening top-level qt.
Amends 246f33c20d which introduced a unwanted extra .parentDir() call
which removed part of the path.
Change-Id: Id0475a74a589372d37b7ec65d33d3faf6194013c
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Check more often for canceled future.
Make more functions static.
Fixes: QTCREATORBUG-27729
Change-Id: I8dd787acea6343008c7515fb6a4fdfde50b37aee
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
To improve the speed of parsing the result of a remote
cmake call, we move the file fetching and parsing into a
mapped concurrent call.
We also first uniquify the list of files to remove duplicates.
Fixes: QTCREATORBUG-29618
Change-Id: I18108928ba3b5f4f8ec3d5610b216c5ccf060877
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
A Unity build can be enabled by specifying CMAKE_UNITY_BUILD set to ON
globally or per target bases via the UNITY_BUILD property.
CMake would then add unity_NN_[cxx|c].[cxx|c] sources files that would
include the existing project files.
The existing project files would then be added as "headers" to the
project and exported via the CMake file-api.
This patch makes sure that these new "headers" are added to the Qt
Creator's code model and have proper syntax highlighting, be available
to plugins (e.g. Todo) and so on.
Fixes: QTCREATORBUG-23635
Fixes: QTCREATORBUG-26822
Fixes: QTCREATORBUG-29080
Change-Id: Ie8dd542504f632c01f91691f8736e51be8b19a01
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
These trigger over 120k file exist check on my machine on startup,
just for a handful icons.
Change-Id: Ic73f0783142ed329c2f8c8b852f622e69fc306da
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
We should not only exclude children of system directories, but also the
directories themselves.
Fixes: QTCREATORBUG-29478
Change-Id: I1aa18b2faa03d241b8cc43eb157b5fa49285a12b
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
They are set and modified, but never read.
Change-Id: I6f21ae325e21513678f1534cd05e1a2470b9627b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This will add the new added source files (.cpp, .h, .qrc, .ui) to the
corresponding CMake source file as last arguments for known CMake
functions like add_executable, add_library as well for the Qt
counterprarts qt_add_executable or qt_add_library.
For custom functions the code will insert a target_sources() call.
Subsequent calls will add the files to the last target_sources.
The previous copy to clipboard mechanism and settings have been removed.
Fixes: QTCREATORBUG-26006
Fixes: QTCREATORBUG-27213
Fixes: QTCREATORBUG-28493
Fixes: QTCREATORBUG-29006
Change-Id: Ia6e075e4e5718e4106c1236673d469139611a677
Reviewed-by: hjk <hjk@qt.io>
Utils::mimeTypesForFileName would only return "text/x-c++hdr" for .h
files. This is perfectly fine for C++ source files.
The ancestor "text/x-chdr" is required for C source files though.
Fixes: QTCREATORBUG-28991
Change-Id: I21f038787e48e88b5e4b9e8ca386b3af80d098ea
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Basically a.onDevice(b) == b.withNewMappedPath(a), matching the order
of b.withNewPath(a).
Whether the (curretly docker-specific) path mapping is useful /there/, and
whether some of the calls are needed at all is dubious. I added some
FIXME and changed a few cases directly.
Change-Id: I7514736ce922f632f1f737bc496f6783389a42b6
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0,
this applies only to a hypothetical newer version of GPL, that doesn't
exist yet. If such a version emerges, we can still decide to relicense...
While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only
Change was done by running
find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \;
Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
When running on the remote build device. And make it work with CMake.
Change-Id: If25bef8ab836c1d59a586116b3c3447a29c4e7e8
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Replace the current license disclaimer in files by
a SPDX-License-Identifier.
Task-number: QTBUG-67283
Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
An option is added to change the default behavior that
would create subfolders inside source groups for files
based on their location on disk.
When disabling the option, files will be added directly
under their respective source group.
The virtual folders <build-folder> and <other-files>
is also omitted when the option is disabled.
Fixes: QTCREATORBUG-27432
Change-Id: Id78e178011c5299d4f7257bf855a5d791eebf91c
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
CMake splits sources files into groups "Source Files" and "Header
Files".
CMake also has compiler groups when source files are compiled
differently.
Qt Creator is mapping the compiler groups as RawProjectParts.
In order to get the header files as part of a RawProjectPart the target
sources (which contains all sources) is mapping the header files that
match the mime type of the compiler group language type.
.h header files were considered ambigous headers, and in this
commit we treat them as the compile group language header.
Fixes: QTCREATORBUG-27117
Change-Id: If68e847846cc270f06fc2231ec44a29ea6a987c1
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
So far we only looked at a target and added all paths of actually linked
libraries to the ((DY)LD_LIBRARY_)PATH, if the "Add build library search
path" option is on (the default).
That often is fine, but
- if the library to link to is only given as a library name, not a path
and not a CMake target, then CMake file-api doesn't give us a path to
the library either
- on Windows, where the .lib is needed for compiletime linking, but the
.dll is needed for runtime linking this only helps if the .dll was in
the same directory as the .lib
We already have a hack on Windows, if the directory ends in /lib, that
we also add /lib/../bin, but that again only helps for that specific
layout.
Instead actually add the "build library search path", by adding the
directories from target_link_directories, even if no libraries are
linked from there. This fixes the "linked only by name" issue, and
allows users to add a build library search path to the .dll too, and
have that used by Qt Creator for running the application.
Fixes: QTCREATORBUG-27201
Change-Id: I7b9210b791b4dae3a6d1747ff36e4b82235db2f9
Reviewed-by: Cristian Adam <cristian.adam@qt.io>