Commit Graph

68216 Commits

Author SHA1 Message Date
Cristian Adam 392bda1160 CMakePM: Save cmake parameters in qtcsettings.cmake also for initial run
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>
2021-06-01 09:22:41 +00:00
Eike Ziller fbeaa774b5 CMakePM: stop file api reader future on stop()
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>
2021-05-31 13:58:26 +00:00
Cristian Adam 637a20c34c CMakePM: Have only one "Scan project tree" task
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>
2021-05-31 08:30:33 +00:00
Eike Ziller 07b0aa89f5 CMake build: Improve default qmake for dumper tests
We can do better than just "qmake" and instead take the path to
the qmake that the test was compiled with.
(Can still be overridden with environment variables.)

Change-Id: Icc045d4f96946aeb1f324e6f1334dc9747215f3f
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2021-05-28 16:17:59 +00:00
Thomas Hartmann de2e106475 QmlDesigner: Properly convert <cpp> types
This is something that requires a close look when we update the
meta system.

Task-number: QDS-4407
Change-Id: Ibb2bc79142bd4ae166c47ac261a3fe2aa5464a57
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2021-05-28 15:39:22 +00:00
Eike Ziller 0f64c88510 CMake build: Fix running tst_sdktool from different directory
It would only run exactly from the Qt Creator build directory.

Change-Id: Ifd105bdaab7405f93b6fb6084a85014fc4023b2f
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-05-28 12:15:47 +00:00
Cristian Adam ab55fb2446 CMakePM: Fix conan compiler path setup
The conan toolchain.file was not passed to the cmake process that
was setting up conan install, only inside for conan.

Task-number: QTCREATORBUG-21785
Change-Id: I5f315e7de823d4ef3237081da9b294b236fedebb
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-05-28 11:53:46 +00:00
Christian Stenger 95ff7a6c80 LSP: Fix logic to avoid nullptr access
Change-Id: I5511d266b52b1bc1763bdf3cd430f49f30ae3f37
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-05-28 08:03:58 +00:00
Cristian Adam 9237f66bc9 GitHub Actions: Fix Ubuntu Linux test runs
By using the "offscreen" platform plugin we can get away by not
having an X sesion for the default "xcb" plugin.

Change-Id: Ie274036f9f3efb2ec37a8dcbc0feb8a847788500
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-05-28 07:04:48 +00:00
Thomas Hartmann 4a1e195978 QmlDesigner: Set size of root item when showing the widget
Change-Id: I6cdbed1015bdb32a8e91919563624a7a0a829a9a
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-05-27 11:24:37 +00:00
Thomas Hartmann a045d3ecc6 QmlDesigner: Check if view is attached
Task-number: QDS-4382
Change-Id: Ic44d1fad30c5cec65be2cce611fbb37b62c69a6f
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2021-05-27 11:16:37 +00:00
Thomas Hartmann b32d03bf89 QmlDesigner: Fix crash
If the view is not attached we should not access a nullptr.

Task-number: QDS-4382
Change-Id: I885f2b1b810d4ffd7b87749ca50e06cbdac3a7e2
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2021-05-27 11:16:31 +00:00
Christiaan Janssen 4616c134aa McuSupport: default path for STM32CubeProgrammer for non-Windows
Task-number: QTCREATORBUG-25788
Change-Id: If29351eaee6f14315df2a2471d2de4c254ef1c8a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-05-27 08:00:56 +00:00
Marco Bubke 588ce3a390 Sqlite: Increase default maximum cache size
The default maximum size is 2MB which is quite small for bigger
transactions. Increasing it to 100MB will give sqlite enough memory
so it doesn't need to swap that often. This is not important for
reading because we use mmap.

Change-Id: I9a07bbd8f1ce594e66b46936480d69b0fb8c3d84
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-05-26 14:31:20 +00:00
Leena Miettinen 4b551f6e0a Doc: Move remaining Qt Quick Studio Component docs to appropriate places
...and remove the QML module and type docs from the qtcreator repository.
They are now in the qtquickdesigner-components repository.

Also use "Qt Quick Studio Components" as the component category and
module name everywhere.

Change-Id: Icf0e8dfec38c533a822aa6d90750de17a067ef6a
Reviewed-by: Johanna Vanhatapio <johanna.vanhatapio@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-05-26 14:18:58 +00:00
Christian Stenger 0980ef7e49 Tests: Adapt test after changing diagnostics
Blocks are no more considered bad per se. Only if they
contain a var statement they are considered as bad and
worth a warning.
Amends 2447d1d69c.

Change-Id: I93b5e43c01059b66f3fb287772e54f3ae3e157af
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-05-25 13:47:52 +00:00
Knud Dollereder af4ce2fbe6 Set QSG_RHI_BACKEND to opengl
in order to prevent a crash ancompanying the console output:
QQuickWidget is only supported on OpenGL.
Use QQuickWindow::setGraphicsApi() to override the default

Change-Id: Iab7c0cc486b150723000cc11ba4c6d9cd4be8b03
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-05-25 13:31:59 +00:00
Eike Ziller ef5423d6ce Fix another unguarded access to a QScreen
QGuiApplication::screenAt(pos) can be nullptr.

Task-number: QTCREATORBUG-25466
Change-Id: I0dd4b8afbc5e63927f6b910479db8ca68eea9c3e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-05-25 12:52:02 +00:00
Christian Stenger 4956be9935 AutoTest: Take failed to run ctests into account as well
Otherwise the result will not be displayed and may lead to
wrong test results with a contrary correct summary.

Change-Id: Id041dbac441eea8a1a1d623acd87e049bca9a281
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-05-25 12:27:28 +00:00
Alessandro Portale 20604cedd8 Android: Lower the time-out for license checks
An issue in SynchronousProcess causes a time-out when the process output
is not terminated with a \n or \r.

This workaround lowers the timeout from 600 to 4 so that the
unterminated output gets consumed nevertheless, and the user needs to
wait only 4 seconds for that.

Task-number: QTCREATORBUG-25667
Change-Id: I40f3053c7c4948c27003e9ec73d00a9d660024a4
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2021-05-25 10:24:22 +00:00
Eike Ziller 627f298ce1 COIN: Increase number of CPUs
There is some fancy logic in COIN that sets different number of
CPUs depending on configuration, which lead to our Linux machines
crawling, while macOS and Windows at least got 4 CPUs.

Fix (and increase) the number of CPUs for all platforms.

Change-Id: I3191f1645420805f5899af8966fd1d377a89bf85
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-05-25 06:55:24 +00:00
Cristian Adam 9449bfbf04 CMake: Fix build with MSVC 2019 and Qt 6.2
Qt 6.2 requires __cplusplus preprocessor set to at least 201703L

According to https://docs.microsoft.com/en-us/cpp/build/reference/zc-cplusplus
one needs to add the compiler flag /Zc:__cplusplus

CMake doesn't set the flag, there is an issue opened at
https://gitlab.kitware.com/cmake/cmake/-/issues/18837

This flag is passed to any target that links to Qt6::Core, unless
the flags are not manually copied for some reason.

Task-number: QTCREATORBUG-25730
Change-Id: I271e85fe857b5d4ac8980f77c723e5704a8eb743
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-05-21 14:02:33 +00:00
Christian Stenger ad16790140 AutoTest: Do not ignore crashing tests
If a test crashes we need to take its output into account
to avoid not displaying a result for the respective test
and having a wrong visual view of the results.

Change-Id: I349153192fa06c5d61bc51f8274d32ceb8cf8731
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-05-21 06:04:17 +00:00
Knud Dollereder e7f923e9f1 Fix InvalidArgumentException for variant properties
Attempting to convert a QVariant to type QVariant::QVariant
fails with Qt6. This is now solved by constructing the QVariant
with the QVariant in question.

Fixes: QDS-4391
Change-Id: I20f64a3f2b3360705c73b3c1e1fd9e8987a31f3c
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-05-20 17:11:12 +00:00
Knud Dollereder 415be13be2 Add missing includes
in order to be able to compile creator with Qt6 on macOS

Change-Id: Idea6feafe63ec099a4f4e552bb97df497f9254b1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-05-20 14:58:58 +00:00
Eike Ziller e4db67b523 GLSL: Fix crash when built with Qt 6
In Qt 6 references (and pointers) to elements in a container are
invalidated when the container size changes. Simply move to
std::unordered_set which guarantees references to stay valid.

Fixes: QTCREATORBUG-25641
Task-number: QTCREATORBUG-24098
Change-Id: I9f1110419bd2940c182b4a24629d9ab718ca2af6
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-05-20 13:22:31 +00:00
Jarek Kobus 76d8483d16 Add a test for parsing properly [Thread ...] data
This test is based on real data processed during debugging.

Task-number: QTCREATORBUG-25745
Change-Id: Ia400367e37b799a93f66fc07c5532c6b90b08be6
Reviewed-by: hjk <hjk@qt.io>
2021-05-20 12:59:34 +00:00
Jarek Kobus 3dc360f728 Fix matching closing square bracket
Task-number: QTCREATORBUG-25745
Change-Id: I63ceb93d6208fb3fe19b4c11c6963a69bc01f260
Reviewed-by: hjk <hjk@qt.io>
2021-05-20 11:13:39 +00:00
hjk 1d9f535c8a Debugger: Make GDBMI parser more robust
Task-number: QTCREATORBUG-25745
Change-Id: I1a4f89fc72433548d44461c3c7c02bd53708d12d
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2021-05-20 10:57:44 +00:00
Eike Ziller 9156c25c9b Fix environment selection of external tools
The run environment was missing, and instead build environment was
duplicated.

Amends b55825a420 which accidentally
changed this.

Fixes: QTCREATORBUG-25634
Change-Id: I9d01452f603e9592a8e1e46adfd861e260c5eabd
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-05-20 10:05:11 +00:00
Cristian Adam b5428d0903 CMakePM: Do not filter out all UTILITY targets
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>
2021-05-20 07:28:16 +00:00
Eike Ziller 97b6b2c091 Fix compile warning about redefinition of SRCDIR
<command line>:24:9: warning: 'SRCDIR' macro redefined [-Wmacro-redefined]
    #define SRCDIR "/Users/Shared/qt/creator/4.15/src/qtcreator/src/plugins/coreplugin/locator"
    <command line>:23:9: note: previous definition is here
    #define SRCDIR "/Users/Shared/qt/creator/4.15/src/qtcreator/src/plugins/coreplugin"

add_qtc_plugin already defines SRCDIR to CMAKE_CURRENT_LIST_DIR, so it
already is set to src/plugins/coreplugin. Fix the creation of the
TestDataDir instead of redefining the macro.

Change-Id: Id2a0359748b22c30a91a6dbe7fa5a3d4d9c2fa5d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-05-19 08:17:29 +00:00
Eike Ziller 801dbdf932 Android/Qbs: Improve startup time
At startup the Android plugin looks at the NDK(s) for tool chains, and
the for matching tool chains already registered in Qt Creator. If it
finds one, it doesn't register a new one, but simply force-marks the
found one as auto-detected.
(See AndroidToolChainFactory::autodetectToolChainsFromNdks)

Unfortunately changing the auto-detected property of a tool chain
triggers a full update down the line, which for example Qbs takes as a
hint to re-create profiles.

This simply doesn't make sense. Setting the auto-detection flag
shouldn't result in these updates.

Task-number: QTCREATORBUG-25463
Change-Id: I22a5f6fbe08124a08041bf871e683bdbda279c01
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-05-19 07:41:24 +00:00
Mikhail Khachayants 2c2a3a9bef Utils: Fix crash on showing tooltips when screen configuration changed
Check QGuiApplication::screenAt(QPoint) return value. TextTip will use
QGuiApplication::primaryScreen() if it's nullptr.

Fixes: QTCREATORBUG-25747
Change-Id: If02648966e24f96f8c9a92e91b2bd27c1efc5f9e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-05-19 07:30:30 +00:00
Eike Ziller 5b828f84fb COIN: Turn off python output buffering for all platforms
Was missing for some.

Change-Id: I53aad1dbe352ed62c0c41376771c961aeca960e9
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-05-18 11:15:50 +00:00
Eike Ziller 712c1b9fb6 COIN: Do not zip results
Not needed for pre-checks and takes a considerable amount of time.

Change-Id: I2ab7d51bd75cfbafd5f7dd696f73740b9be035bb
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-05-18 11:15:39 +00:00
Christian Stenger 2e24d4b0cc Wizards: Fix generation of dynamically populated models
This was implemented for QAbstractItemModel based classes, but
forgotten for QAbstractListModel and QAbstractTableModel based
classes.

Change-Id: I807f445e48d2906580abd0a65bb794d6e766c1a7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-05-18 09:41:11 +00:00
Eike Ziller b87c3cc03e Fix Qt Creator plugin wizard's GitHub action
for the changed location of build_plugin.py

Fixes: QTCREATORBUG-25727
Change-Id: I6bda26b1820b86ac4cf12a55821eed879ee818bc
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-05-18 07:27:49 +00:00
Christian Stenger b3ad100016 Core: Fix build on Windows
Amends 06fd916348.

Change-Id: I143cc60d3f7b0a6ba16c2e341e4cd170b54914de
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-05-18 06:05:27 +00:00
Tim Jenssen 5bf162a26f qmldesigner: add PLUGIN_RECOMMENDS QmlPreview
QmlPreview should be initiliazed before qmldesigner

Change-Id: I43f093e9af0728068e939a95a40c9405ff585283
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-05-17 14:17:01 +00:00
Eike Ziller 06fd916348 Do not show pane if external tool output is ignored
Fixes: QTCREATORBUG-25728
Change-Id: I85650abb0227bdabe014ba324c1b3a3f35de4916
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-05-17 13:40:37 +00:00
Christian Kandeler 32653e1a7b CppTools: Fix possible crash when testing
Change-Id: I9ade8c861c44329376c8f1dcc9506561b7689de5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-05-17 13:40:34 +00:00
Christian Stenger c79a4fab6e Revert "ProjectExplorer: Remove ClangClToolChain::m_clangPath"
This reverts commit 7a2e49435c
as it broke handling clang-cl toolchains on Windows.

Fixes: QTCREATORBUG-25690
Fixes: QTCREATORBUG-25693
Fixes: QTCREATORBUG-25698
Change-Id: Idfc7bc86ad8dd97f645908d4fe9530c760085347
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-05-17 13:39:42 +00:00
Tim Jenssen 99cc306e0f qdoc: no need to use ssh here
Change-Id: I09b1995cb1d029158a808afd54f4842ced4350f5
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-05-17 12:14:35 +00:00
Christian Kandeler 2182993b97 clangbackend: Add another exception to our "find real cursor" heuristic
Leave preprocessor directives alone.

Fixes: QTCREATORBUG-25692
Change-Id: I1c31f4120e9b86a58123f8877cebd354e800fb8b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-05-17 11:44:49 +00:00
David Schulz ba83b852b6 Editor: Close function hint proposal on destroyContext
Fixes: QTCREATORBUG-25691
Change-Id: I2cb1b52fdda386cbfe3ca7f54746edd3e5562ea0
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-05-17 09:57:52 +00:00
Christian Kandeler 5139c04c21 ResourceEditor: Do not lose the compress-algo attribute
...when editing via the UI.

Fixes: QTCREATORBUG-25706
Change-Id: I6ffef2d79188e42182dcb680a22f8b3b933a61e2
Reviewed-by: hjk <hjk@qt.io>
2021-05-14 12:10:36 +00:00
Christian Stenger 0cef9a8554 AutoTest: Fix crash in gtest support
If the parser processes a test with an empty test name
it crashed QC.

Change-Id: Ic377f609ecdd74724ee7a272be3d5b60f0101afa
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-05-12 13:11:28 +00:00
Christian Stenger 5574deebe0 LSP: Fix MinGW build
While at it correct a typo for the inner class name.

Change-Id: I9026f4c35ccf43744e64b1337f056b5e43669502
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-05-12 12:43:07 +00:00
Jarek Kobus 671b71406b Fix a crash in Find Usages
Set the current index of SearchResultWindow to a valid one
_before_ deleting the last SerachResultWidget inside the m_widget
QStackedWidget, as this triggers the call to
updateFilterButton() which uses in turn the current index of
SearchResultWindow (out or range in case it's not adjusted beforehand).

Fixes: QTCREATORBUG-25713
Change-Id: Ie155c5f9bacee8d647e4fa7f622ff403192cb6bc
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-05-12 11:31:56 +00:00