If a project fails to load it will be displayed with a warning icon.
If the CMake configuration fails and the backup configuration is
restored, the project is also marked with a warning icon.
Change-Id: I95ccc5d171f5b789fe317fbb1da9e13dcd81a5dd
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
There was already a similar function taking a QString.
After that, the remaining no-argument version of absolutePath()
can be deprecated.
Change-Id: I5b9ad8c8b68a5723891b0aa9f5a37e90db0fe09e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reuse ProcessReaper inside process launcher.
Automatically reap all internal QProcesses of QtcProcess
(either direct child of QtcProcess in QProcessImpl
or indirectly inside process launcher).
Make ProcessReaper work again on QProcess instead of on
QtcProcess, so it may still be reused for non-QtcProcesses.
Change-Id: I950cac5cec28f17ae97fe474d6a4e48c01d6aaa2
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
There was no proper separation of responsibilities between these
plugins. In particular, CppTools had lots of editor-related
functionality, so it's not clear why it was separated out in the first
place.
In fact, for a lot of code, it seemed quite arbitrary where it was put
(just one example: switchHeaderSource() was in CppTools, wheras
switchDeclarationDefinition() was in CppEditor).
Merging the plugins will enable us to get rid of various convoluted
pseudo-abstractions that were only introduced to keep up the artificial
separation.
Change-Id: Iafc3bce625b4794f6d4aa03df6cddc7f2d26716a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Similar to QT_RESTRICTED_CAST_FROM_ASCII to avoid the need for
decorations in user code.
At the same time, drop some convenience constructors and functions
in CommandLine and Icon essentially serving the same purpose.
Change-Id: Ida4e5ac19c2da0a4298a97b2a8e1511d56bbb79d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
CMAKE_PREFIX_PATH and CMAKE_FIND_ROOT_PATH can have multiple
values, and now all the values are taken into account.
Ammends e1a68f2598 which had only
one value with all the items separated by semicolon.
Change-Id: I88d98fbbf165e7e61d70ab4a4e84eb4de4cc9f82
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
Less conversions cycles at the price of a few more temporary bytes.
Change-Id: Ibda82e02d7b83944f5db38ac7cf75c4bae4f55ec
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Each call of CppModelManager::updateSourceFiles detaches the current
snapshot.
The extra compilers where set up and triggered individually, and
resulted in individual updateSourceFiles calls with the single result
file of the extra compiler. For Qt Creator this would lead to 200
calls in quick succession after project load, potentially leading to a
freeze of multiple seconds.
Instead of updating the result files of the extra compilers individually
after project load, integrate the update into the regular project source
file update. So we end up with only a single call of updateSourceFiles.
For this the project updater needs to trigger the extra compilers, and
wait for all to finish as well as the regular project part update,
before
triggering the parser.
Task-number: QTCREATORBUG-25783
Change-Id: I34f6df0fc0f96bcb42ee65019bee39cf49176c1f
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This simplify the interface by removing a possibly wrong choice
ensures it works also on remote paths.
Change-Id: I01e198958900a91b99dcf2dbb491a593485493ba
Reviewed-by: David Schulz <david.schulz@qt.io>
The following variables:
"CMAKE_C_COMPILER",
"CMAKE_CXX_COMPILER",
"QT_QMAKE_EXECUTABLE",
"QT_HOST_PATH",
"CMAKE_PREFIX_PATH",
"CMAKE_FIND_ROOT_PATH",
"CMAKE_PROJECT_INCLUDE_BEFORE",
"CMAKE_TOOLCHAIN_FILE"
will be checked to see if the existing values have the same values
from the initial cmake parameters list.
Only the CMakeCache.txt values that do not exist on the file system
will be updated.
If not, the updated value will be presented in the dialog for upgrade,
or marked as bold in the settings dialog.
CMAKE_PROJECT_INCLUDE_BEFORE is dependent on Qt Creator version / path
and needs to be updated.
Fixes: QTCREATORBUG-24443
Change-Id: I1eeb44df3a7914051084ef405af5f5621cc5a4e2
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
The ctest information regarding the test case itself cannot be as
adequate as the information coming from the code model.
Nevertheless depending on the used mechanism we might end up in
places that will not be helpful when using the test tree to open
files of ctest. Try to get closer to the real declaration source
if we can.
Change-Id: Ia9d217f0cdc6de6230d89dd342b60856cf1312b8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
This will allow for the Qt Creator's CMake build only qtcreator
target to be selected as runnable.
Similar to qmake's qtc_runnable or Qbs's qtcRunnable features.
Fixes: QTCREATORBUG-25908
Change-Id: I6416873d0ad9cfec4960d98fc4b289ec98cc58b1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
The file system scanning was already in a thread, but creating a tree
from the flat list of file nodes was still done in the main thread.
Creating the tree looks for and creates folder nodes as needed for each
file node, which is not that big of a deal but still takes 1/3 of a
second for the Qt Creator source tree.
Task-number: QTCREATORBUG-25783
Change-Id: I28948ed3ff5233f6fc4b86e93da94d882b81e231
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reduces lock-up in main thread after loading projects
Task-number: QTCREATORBUG-25783
Change-Id: Ie769074f1689698379bd6fd60f74957086cfce37
Reviewed-by: hjk <hjk@qt.io>
Depending on the size of projects and the underlying toolchain we
may end up with no tests as the timeout for the ctest run was just
too small.
Fixes: QTCREATORBUG-25851
Change-Id: I5617987a9e43b16c02a2c0b4afd598a3ff909299
Reviewed-by: David Schulz <david.schulz@qt.io>
If tests are not set up using add_test() but are supported
by ctest due to a different registering mechanism we failed
to get these right.
Expect also tests configured differently and just omit the
respective file information.
Fixes: QTCREATORBUG-25847
Change-Id: I16fcbec1a3a262f7d77ffdf15e4114e5a15e3757
Reviewed-by: David Schulz <david.schulz@qt.io>
Having two configurations for a project, one in /tmp and one in the
right build directory is confusing and for big projects can take some
time.
Fixes: QTCREATORBUG-25532
Change-Id: Ib0dad267117b3c025d668646ef076b0f77bff166
Reviewed-by: hjk <hjk@qt.io>
Qt Creator 4.15 added the "<File System>" project node containing all
the files in the source directory.
Qt Creator for its "find extra compilers" step needs only the files
from the project and not all the files in the system.
Task-number: QTCREATORBUG-25783
Change-Id: I5d33d5296f67ab3f321c232e5071f32e56d29101
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
If CMake is being triggered when C/C++ parsing is running, make sure
to cancel() the C/C++ parsing before running CMake.
The C/C++ parsing is issued after the CMake project is loaded,
so for a subsequent CMake run there is no need to have the
system busy with C/C++ parsing and at the same time run CMake.
Change-Id: Ib9a2e057a90d9572e904ff449666bb9b12d1accc
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This way projects can have access to all CMake parameters that were
issued from Qt Creator.
Previously the initial run was skipped, only the subsequent changes
were picked up.
Change-Id: I7a2262cdb9754ff666f78fd2e39663466f494f5f
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
The future that would trigger the result of a cmake api file parsing
would not be removed if the stop parsing would be triggered.
This could be triggered by fast switching between build configurations.
It could also lead to forever parsing states having the project's
wheel always spinning.
Fixes: QTCREATORBUG-25588
Fixes: QTCREATORBUG-25287
Change-Id: I4f92806ebdb703b4910952cd8db1e52816daf9cf
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Check if asyncScanForFiles returns true, which means it added
a future, which then can be used for Core::ProgressManager::addTask
Task-number: QTCREATORBUG-24564
Change-Id: I347c027e676023a782e7d4822fe2d51385888a64
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Do not use a pattern to address tests when running selected. Instead
get their respective test number and use this.
This avoids executing unchecked test cases that match a shorter selected
one. Beside this it shortens the commandline which might be also a
benefit on Windows.
Change-Id: Ic1c0cf8eedab478564f04fb494679eca4521f402
Reviewed-by: David Schulz <david.schulz@qt.io>
add_custom_target will be set as UTILITY target, which one might
want to reference as "cm <target>" or "--target <target>".
Filter out instead the "_autogen" and "_autogen_timestamp_deps".
Fixes: QTCREATORBUG-25726
Change-Id: Ia73d6e87e4b230114d068649964792ff3f626378
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
CMake will reconfigure itself if you have modified the CMakeLists.txt
files. Qt Creator needs to reparse the file-api json structure even
if the "Auto-run CMake" is being disabled.
"Auto-run CMake" will run CMake when the project files themselves
have been changed e.g. modify and then save.
CMake will use ninja / make to reconfigure itself, generate the file-api
structure and Qt Creator needs to keep up.
Change-Id: I12d8683b86f35bd6e0ebccec5300cd7ae8dce0b2
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
In the build target list there is no reason to have <target>_autogen
or <target>_autogen_timestamps targets.
Also do not sort the target list, so that the special targets stay
at top (all, clean, install etc)
Change-Id: I3107150bb40d68cc95246d4d09abc300a6e3d3fc
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
- use newer approach to settings page layout building
- no SHOUTING enums
- namespaces
- proper dialog parent for message
Change-Id: I7adfb7487d502b8fd706c4a0c5645f4d2153e39c
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Also remove the CMakeCache.txt.prev, .cmake/api/v1/reply, and
.cmake/api/v1/reply.prev which might cause problems in
case of CMake configuration failure.
Change-Id: I24f049e5e0338b78393b68ab3680276388ffc6bf
Reviewed-by: Eike Ziller <eike.ziller@qt.io>