Commit Graph

72473 Commits

Author SHA1 Message Date
Janne Koskinen
53ed379314 Fix compilation after API change in QtDeclarative
Change-Id: Ibaeaa4b089a508b1cb44b5f90921675b49b3beb3
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-02-07 06:26:47 +00:00
Orgad Shaneh
dd70101d7b Git: Block branch refresh for actions that open a new editor
Refresh is called twice - first time when the editor is just opened, on
this call the repository can be either empty, or the active project (even
if the current file is from another repository). After the editor is
initialized, setSource is called, and the state is recovered.

But between these 2 calls, m_repository is empty, and synchronous actions
are still executed (and fail).

Fixes: QTCREATORBUG-26952
Change-Id: I1767b35f0e9f24da2c447d0b565b410742c560d9
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2022-02-06 06:20:28 +00:00
Cristian Adam
612529f2a7 CMakePM: Update generator label in Kit's CMake settings
Now only the parts of the generator that have a value are displayed.
Previously the label had "<none>" for the missing values.

Change-Id: I666bd04c94c47410ee71912dc0cebbcc6c6c79d2
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-02-04 19:37:45 +00:00
Cristian Adam
924862093e CMakePM: Apply Kit CMake configuration to Initial Configuration
When the user changes or adds new CMake Kit parameters, the changes
are reflected in the Initial Configuration.

Change-Id: Icca1c76749c772e946ff250f94b7965cf7cf9ee8
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-02-04 19:37:20 +00:00
Cristian Adam
201f91b867 CMakePM: Mark as changed only the changed values in "Batch Edit..."
Previously all values coming from "Batch Edit..." would be considered
as user changed values and be displayed with bold font.

This means that if I had -DMY_VAR:BOOL=ON and do a Copy and paste
in "Batch Edit..." I would have it displayed as user changed and
it would be passed to CMake as changed value.

Also it should be possible to start with -DMY_VAR:BOOL=ON, click
the check box to make it OFF and then do a "Batch Edit..." with
-DMY_VAR:BOOL=ON to set the value back to original value.

Change-Id: I5f6cb915b32a3288c1339135dabfd182ca16feda
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-02-04 19:36:10 +00:00
Cristian Adam
577ad6fa3e CMakePM: Fix crash when switching CMake tools and clicking help links
The crash scenario:
1. Switch CMake tool in Kit CMake Configuration in Settings
2. Click on the "options" help link

Change-Id: Ifdb2809789748926a5ee0e127db0c87a22efa9dc
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-02-04 18:11:43 +00:00
Cristian Adam
869b7810db CMakePM: Add "Help" context menu entry for CMake variables
This way one could easily jump to the documentation of a CMake
variable e.g. CMAKE_BUILD_TYPE.

Change-Id: I1b348f0a1b6c18f0f7cee29ff6409b43c6263f44
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-02-04 18:11:17 +00:00
Thomas Hartmann
85e3061b7a QmlDesigner: Move wizard registration to StudioWelcome
Change-Id: Iacaac80420da96f6757236db6c15ac23a6f723cf
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-02-04 17:31:27 +00:00
Thomas Hartmann
b8c8a6a2bb QmlProject: Add single isQtDesignStudio method
Change-Id: Idf9d07e6318af8d6934adcbc0afa3695e262836f
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-02-04 17:31:14 +00:00
Alessandro Portale
a8a1f036cd Core: Explicitly detach QPalette in WelcomePageHelpers
Workaround for QPalette behavior change Qt 6.2.2 -> 6.2.3

Task-number: QTBUG-100439
Fixes: QTCREATORBUG-26981
Change-Id: If28195023929baf7dfeb2b0196c8339b84658488
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-02-04 17:25:30 +00:00
Cristian Adam
270d448eb1 CMakePM: Add "generator" link to the kit's CMake settings
This way the user can access all the details from the CMake's generator
documentation.

Change-Id: I90990bf7ec0062122bc3f32d611e19da8f5f9afc
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-02-04 17:24:24 +00:00
Alessandro Portale
08535a7e63 Make share/qtcreator/cplusplus/examples compilable
Builds now, but does not link (which is fine). And unrelated,
unintentional warnings were removed.

Change-Id: I6ece33933bc20e6e36fb3859de7c2b774b0e67d5
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-02-04 16:21:21 +00:00
Thomas Hartmann
96ec295fc6 QmlProject: Search in content for .ui.qml files first
Change-Id: I1cf8a0bc83c24a0207e68a12a9a441cc7432a013
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-02-04 15:39:26 +00:00
Cristian Adam
d408e4c22c CMakePM: Add "variable" link to CMake offline/online documentation
This way an user can find quickly a CMake variable if needed.

Change-Id: Ie885a34321cf2ce31ee662659e669de88b28801c
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-02-04 15:34:07 +00:00
Thomas Hartmann
4fa399fbcb QmlProject: Do not allow "." in importPaths
Adding the root folder to importPaths can create all kind of issues
and is not supported.

Change-Id: I03fe8924f08b11704fc472ed9cfa0b765ab7cf06
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-02-04 15:12:28 +00:00
Christian Kandeler
0a9acad18c ClangCodeModel: Fix tooltip for clangd text mark copy action
Change-Id: Ie551971a114f1f45004a0eac0283507627c26be2
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-02-04 13:50:26 +00:00
Cristian Adam
68cb80f276 CMakePM: Add options link to the CMake offline/online documentation
This way a user can quickly find out which options can be used.

Change-Id: I6347759689a4a1431a82ff9414da0c79e357eb45
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-02-04 13:12:15 +00:00
Leena Miettinen
da95472eb7 Doc: Describe using precompiled headers in generic projects
Users can add the pch tag after a file path in .files.

Task-number: QTCREATORBUG-26610
Change-Id: I55cc6ef86c6371658845d233614bebad2a20e35d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-02-04 12:48:15 +00:00
hjk
75ef67615d ProjectExplorer: Remove IDeviceFactory::setCanCreate
That's implicit now by using setCreator()

The Android case looks odd as this is (and was) effectively static
information at startup. This will be addressed in a follow-up patch,
for now keep it functionally equivalent.

Change-Id: I4e6082f88dcd21379186340189acb581caef172a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-02-04 12:10:07 +00:00
Christian Kandeler
41fee90d8e CppEditor: Fix testing
Now that clangd is enabled by default, we must explicitly turn it off to
test the built-in follow symbol functionality.

Change-Id: Ib275893a920145868b314ce02e9dd80f656bade4
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-04 11:58:52 +00:00
Eike Ziller
e24b91555b Android: Remove unused include
Change-Id: I98d59fd17dbaca1fcfdf82506ec1fe669fe86f69
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-02-04 11:15:24 +00:00
Eike Ziller
8e900a83e8 CMake build: Fix static build of cdbext and sdktool
Remove workaround for building statically, which was required for CMake
< 3.15. Since we increase the CMake requirement to 3.16, the /MD option
is no longer part of the CXX_FLAGS variables, so the old workaround
breaks the static build of these tools.

Change-Id: Ifc4b1c81210777e1274b4907feb3b023f7454191
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-04 11:05:31 +00:00
Christian Stenger
394bfb508f Scripts: Fix output for python 3
Change-Id: Ie914e04b25bdd4e41a9d2b3a9002385f5867ad6b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-02-04 10:26:01 +00:00
Thomas Hartmann
0d812cd59b QmlDesigner: Update wizard templates
These are the latest changes from qtquickdesigner/6.0 branch.
Since 7.0 these templates are now part of qt-creator.

Change-Id: I533c005734518eaf7dcd94f3f94167d973af68a5
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-02-04 09:29:40 +00:00
hjk
9ff851a204 Docker/RL: Be more lazy with output decoding
Conversion to QString is often not needed.

Change-Id: I22fe0ec89419f784d2fe02245094fbe6da719f75
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-02-04 08:35:48 +00:00
hjk
7c128638ea Docker/Linux: Fix outputForRunInShell
... in case there is embedded NUL in the output.

Change-Id: Ic899bcf8d01cceed4ea6e16d4991fb80b7ac70ca
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-02-04 08:35:21 +00:00
hjk
9007c12a5e TextEditor: Initialize TextStyles::mainStyle
Avoids some valgrind warnings.

Change-Id: Ib93af9655149e79829b6477469554368f54e0d08
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-02-04 05:28:37 +00:00
Eike Ziller
ac41f83232 Core: Split branded logo from other resources
We only need the special resource generation for the logo. Keep the
other resources shared with Qbs, so issues like QTCREATORBUG-26969 don't
happen.

Change-Id: Ibe418dffba19e342d0aa5ff30c34409cee184fc0
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-02-03 22:57:55 +00:00
Robert Löhning
b8b5687f21 Squish: Fix availableTargetClasses()
Amends 40caa8a4ba.

Change-Id: Ib48a70fa641c5d3c65f53aad2dd1ce8fd3abce54
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-02-03 17:49:44 +00:00
Christian Stenger
4e716c0db5 Squish: Fix unknown global variable
Amends 40caa8a4ba.

Change-Id: I014210c2035fa0a69ca273718df726a523a23786
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2022-02-03 17:49:35 +00:00
Cristian Adam
8d12fd07e2 CMakePM: Rename "Additional CMake parameters" to "... options"
CMake documentation calls them Options, and we should use the same
terminology.

See https://cmake.org/cmake/help/v3.22/manual/cmake.1.html?#options

Change-Id: Ibb8ed9dd5a830290770a7fa89e7e5e1ce2d8c74a
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-02-03 17:46:20 +00:00
Cristian Adam
633a9a04e2 CMakePM: Add "Kit Configuration" button in Settings page
This "Kit Configuration" button opens a dialog with the kit's
CMake settings.

This way a user can change all CMake related settings in the
project's Settings page.

Change-Id: I76b6e69ea7a9b96823f6583aef007cf413410407
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-02-03 17:18:30 +00:00
Christian Kandeler
b243a8d728 Wizards: Modernize qbs project templates
Change-Id: Ib6f6315f9730425d4fd3b566f66ed26aa1718695
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-03 15:40:33 +00:00
Eike Ziller
9bc9fb5a0d Fix avdmanageroutputparser test
- There is no PLUGIN_DEPENDS for tests, and it wouldn't work anyhow
  because of duplicated symbols. It was interpreted as a dependency and
  the test disabled because no such target exists.
- Move the platformNameToApiLevel(...) function to
  avdmanageroutputparser.h to break the dependency to a lot of Android
  support code.

Amends 78da7e2922

Change-Id: I6933684a76e5291d415c72388caa3df2bee7cbfb
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-02-03 15:31:13 +00:00
hjk
1e34d6ee22 Debugger: Fix autodetection
Fixes: QTCREATORBUG-26978
Change-Id: I32585251d47729f7fde9ee6e707d9e9cfed4c1a7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-03 14:38:43 +00:00
Jarek Kobus
f5b946abbe LinuxDevice: Implement runProcess()
Change-Id: I5300d36119ffb9fdd82a2ba7e02f76edc0fe2eda
Reviewed-by: hjk <hjk@qt.io>
2022-02-03 14:20:18 +00:00
Christian Stenger
9a5cb5896e Tests: Fix cmake file
Change-Id: Iebe454bee2037c0d150d5ea537419044745abc10
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
2022-02-03 14:13:39 +00:00
Christian Stenger
eb2fc79a3f Docker: Fix handling of ui applications on macOS
Using graphical applications inside a docker image needs
the same handling on macOS as on Windows.

Change-Id: Ic9fb6a8330164f7acdaab4146a70e7e308192f4e
Reviewed-by: hjk <hjk@qt.io>
2022-02-03 14:13:22 +00:00
hjk
748cc38c26 BareMetal: Allow stlink_version to stay unspecified
Fixes: QTCREATORBUG-26928
Change-Id: Ia6dedb62c1e41472e176d8d247c7967fe5a430ee
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-03 13:42:03 +00:00
Thomas Hartmann
ca5d52dcd6 QmlDesigner: Update studioplugin.metainfo
These are the last updates from qtquickdesigner/6.0.

Change-Id: I81302a42f4dfb3da6379eea0e5d2a3f09a2c9e7e
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-02-03 11:30:19 +00:00
hjk
5af00873cf FakeVim: Support backslashes in substitute command patterns
Change-Id: Ibfcea7fdc550082e4975e1fc4d2fba6563dbfd02
Done-by: Jochen Baier
Fixes: QTCREATORBUG-26955
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-03 11:25:12 +00:00
Christian Kandeler
2f925e2098 qbs build: Update minimum qbs version
Change-Id: If734b0051b98c8d3963afa54ad66b9b990db2a88
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-03 11:16:55 +00:00
Mahmoud Badri
10fe71546c QmlDesigner: Implement renaming assets folders
Fixes: QDS-6123
Change-Id: I1923f78fe2a6739f1cf32fd86c0919965190d8ca
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-02-03 10:58:29 +00:00
Mats Honkamaa
4e10170ccd Update loginui examples folder names
Folder names need to start with capital letter.

Task-number: QDS-6160
Change-Id: I5a77e693f9bfe0d85775a7b1e71ad9d0081025a2
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2022-02-03 10:40:05 +00:00
Jarek Kobus
239688180d Fix running as root
There is no need for TerminalRunner::setRunAsRoot()
as debugger is already being run as root.
Implement runAsRoot for non-terminal QtcProcess, too.

Fixes: QTCREATORBUG-26964
Change-Id: Id5110db86b7b809a5608714464241cee73875f2b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-02-03 10:23:25 +00:00
hjk
2be0fc2537 ProjectExplorer: Use CommandLine instead of Runnable
Lighter and sufficient for all use cases.

Change-Id: Ic6749a1a9e3e6906ce71b87b237cc94a6d8a4cbf
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-02-03 10:15:44 +00:00
Christian Stenger
b822b3f9e2 Tests: Provide qbs files for some manual tests
Change-Id: I6c5c839dc199379edaf4c43ae4d6a0ed6ebdf751
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-02-03 05:27:56 +00:00
Christian Stenger
841bd52e07 PluginView: Fix crash
Without a running QC we still need to initialize the
plugin manager properly.

Change-Id: Ia2a83080f68de9f88d214f5afbcb6a07f31daea9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-02-03 05:27:44 +00:00
Cristian Adam
bc160ebe63 CMakePM: Revert selectedRows back to selectedItems
As it turns out changing to selectedRows resulted in having
the keys copied twice to clipboard.

The change would require some code adaptation.

Amends 0020ef7e30

Change-Id: Ie1decd154f7d22825f4d4eecd0bf544ecac7aa26
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-02-02 21:21:26 +00:00
Alessandro Portale
ccafc11fa6 Utils: Remove unused theme role TextColorHighlight
TextColorHighlight is a harsh "egineer red" #ff0000 in all themes except
one, where it is grey. Actually, TextColorHighlight was used in one
place, which now instead uses TextColorError.

Change-Id: Idcd61637edaa045fc718cf35a9d34ff1d5a64dad
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-02-02 21:19:03 +00:00