Commit Graph

88532 Commits

Author SHA1 Message Date
Cristian Adam
d2cb8f0ccb QtSingleApplication: Fix unreliable '-client' option
QLockFile documention states:

  When protecting a resource over a long time, however, the
  application should always call setStaleLockTime(0ms) and then
  tryLock() with a short timeout.

Without the 0ms stale lock time the new Qt Creator instance would think
that the lockfile is stale and starts a new instance!

Amends dd1c9d1b71

Fixes: QTCREATORBUG-30624
Change-Id: I0c0166239242895e25c7bf05d59a371cd0295758
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2024-05-27 07:56:28 +00:00
Miikka Heikkinen
72b3f2a090 EffectComposer: Simplify temporary file handling
QTemporaryFile was used just to generate file names for shader files,
and the actual files didn't get removed at shutdown. There was also
a possibility of reloading effect quickly, which left additional
dangling compiled qsb files because they are generated asynchronously
with a separate process.

Now temporary shader files are gathered into one temporary directory,
which removes itself at shutdown, so dangling files won't be an issue.

Fixes: QDS-12711
Change-Id: I7ce682acb1a0d8d58b84129c4e0442c8fb63ac2f
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2024-05-27 07:32:05 +00:00
Teea Poldsam
7724da3027 Doc: Add topics to Best Practices section
Fixes: QDS-12756
Change-Id: I34db98abb6c1b30e0df94440711ff1979552a25d
Reviewed-by: Mats Honkamaa <mats.honkamaa@qt.io>
2024-05-27 06:41:38 +00:00
David Schulz
a454a7f282 LanguageClient: Automate setup of rust-analyzer
Change-Id: I6f97840ec55675219071d4a9644b8cba7f70f24e
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-05-27 06:10:05 +00:00
David Schulz
3b8d4c968c Lua: track meta files in CMakeLists.txt
Change-Id: I72d0358b675f76fb39f340c748602dc24da7b08e
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-05-27 03:59:31 +00:00
Christian Kandeler
389b7b211c TextEditor: Make RefactoringFile::apply() a no-op for empty change sets
To simplify some calling sites.

Change-Id: I9736e88053659e5e90bca7b70e6d7e84b0d4fb4e
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-05-26 15:54:13 +00:00
hjk
3697aac20e Debugger: Speed up QObject recognition
Change-Id: Ib9847725c1e97ad774173ecb95094791ff5d1bbc
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-05-24 13:52:51 +00:00
Leena Miettinen
8cf1247d5f Doc: Add docs for Utils::TypedAspect
- Updated the description of Utils::BaseAspect docs
- Documented Utils::TypedAspect
- Fixed the \fn for setDefaultValue(const ValueType &value)

Change-Id: Ief1acee1b4f6fbf33e2cd3e870c109878a6b9e7c
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-05-24 12:26:47 +00:00
Christian Stenger
13ba5ac62b Lua: Fix qbs build
Install lua files to shared data by default.

Change-Id: I550f0f3a888376c93ad8b68bc7630b6f5f029979
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-05-24 12:22:12 +00:00
Christian Stenger
731068a6a3 Lua: Fix qbs build
Amends eec48b8f8e.

Change-Id: I0328f44a6cd33116f5ac51f8127519bf734b1879
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-05-24 12:22:05 +00:00
Christian Kandeler
09f747f7d1 TextEditor: Add a convenience overload for RefactoringFile::apply()
... and make use of it.
In most contexts, apply() immediately follows setChangeSet(), so
combining the two can save a lot of code on the call site.

Change-Id: I421001bd47000cb64678a57b19760becf59a4863
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-05-24 11:36:58 +00:00
Miikka Heikkinen
c5d0263b32 QmlDesigner: Add look-at gizmo to visualize 3D edit camera look-at pos
Look-at gizmo can be toggled from visibility toggles submenu.
Look-at gizmo is hidden when fly mode crosshairs is visible.

Fixes: QDS-12767
Change-Id: I2c71b23f14e403c9774498937764607cfea3bd1d
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2024-05-24 11:17:07 +00:00
hjk
708adca904 Fix deprecation warnings about QLocale and the C-word
Change-Id: I1a9101cfdbaea040601916bb3c519518ab8caa54
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-05-24 11:15:14 +00:00
Mahmoud Badri
c881408e5c QmlDesigner: Prevent adding bundle items back to content lib
Change-Id: I65e2eb936fa741599ffd087f903e33a71d01de99
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2024-05-24 10:13:51 +00:00
Miikka Heikkinen
411d74cbce QmlDesigner: Improve 3D import dialog logic
Got rid of the separate accept button. Now the import button turns into
accept button after preview is shown, as long as user hasn't changed
any options.

Import preview is also generated automatically using default options.

Fixes: QDS-12822
Change-Id: I5f1080f855cf1ba09e917cef7741534c0fb16d8c
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2024-05-24 10:03:55 +00:00
Marcus Tillmanns
eec48b8f8e Lua: Add Install module
Allows plugins to install packages they might need.

Change-Id: I4948dd0a6568e093fc35e4486d2e2a084090e103
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-05-24 09:10:20 +00:00
Marcus Tillmanns
f54a83ff45 Compiler Explorer: Add Qt template
Change-Id: Ib071ceeb4dd1274f353b939f5bea53e0b0ed2bdc
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-05-24 09:09:50 +00:00
Mahmoud Badri
5cc9cf63b7 QmlDesigner: Confirm overwriting 3d items in content library
Fixes: QDS-12826
Change-Id: I29ee10f670ba38e219375f0217f89809a496f45c
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2024-05-24 08:24:54 +00:00
Jarek Kobus
3a84314772 MessageManager: Get rid of instance() method
Don't schedule queued calls to MessageManager::writeSilently()
because the implementation is already thread-safe.

Change-Id: I389afb9400afe6b3bc2716c0e352828c5c2cb909
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-05-24 08:03:32 +00:00
Christian Kandeler
940bb0f27d QbsProjectManager: Fix moving files between project nodes
E.g. from one group to another.
After removing the file from the first group/product, we need to wait for
a re-resolve before we can add it to the new group/product, because
otherwise the location stored in the build graph might not match the file
contents anymore, causing the insert operation to fail.

Change-Id: I0a6a92cf0a1aca6ecedeb9c4606809e5d65bb97d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-05-24 07:59:56 +00:00
Mahmoud Badri
2a8de8ab8e QmlDesigner: Handle abort reason in PreviewTooltipBackend::showTooltip()
Change-Id: Ib71d4e7e2e74d7c8fbcc74188a155a08d610be00
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2024-05-24 07:59:00 +00:00
Christian Kandeler
5cc44b8cab CppEditor: Make more use of CppQuickFixInterface::currentFile()
A CppRefactoringFile is created for us when quickfixes are collected, so
make use of it instead of creating a new one.

Change-Id: I133b43f92d1fbea82aa25df025cfc257691de2a6
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-05-24 07:58:48 +00:00
Christian Kandeler
8577ab8bcb ClangCodeModel: Bump minimum clangd version
... and throw away old workarounds.
The current clangd version, to be shipped with Qt Creator 14, is 18.1, so
we can safely bump the minimum version to 17.

Change-Id: I74fd5997196d774b6c47dcb522284953ef82ad9c
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-05-24 07:58:22 +00:00
hjk
01568f5d75 Warn about deprecated Qt functionality (only) for Qt <= 6.4
These are the once that we could actually handle.

Change-Id: I3c49779e9aabee76d357285a9210062d580f01ca
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-05-24 07:29:53 +00:00
Leena Miettinen
07b5c96194 Doc: Fix more QDoc warnings
Change-Id: Ic7f4170276aa40a32c9394c9fad0d920971bf873
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-05-24 07:19:27 +00:00
hjk
917523d7e3 Fix a few {QByteArray,QList}::count related deprecation warnings
Change-Id: I493e557a2ec976560c9e37312d8ae860490a2831
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-05-24 07:06:47 +00:00
hjk
1e9c11c3b3 Utils: Make injected default dialog parent better re-usable
... and use it for CheckableMessageBox. This enables using
the proper parent e.g. in upcoming changes to ExtensionSystem.

Change-Id: Ib0e52cbd3e73dc628955918e3f443ff65cccb189
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-05-24 07:06:41 +00:00
Eike Ziller
a87ed65dbb Editors/Help: Open navigation history menu on right-click
Change-Id: I216dde672d84485511c3ac277eb5ab091095d4e1
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-05-24 06:55:54 +00:00
Teea Poldsam
b21fe3c7b1 Doc: Add info about live previewing in different sizes
Fixes: QDS-12821
Change-Id: I4753d48ea47f92870594633a45672921ca3da031
Reviewed-by: Johanna Vanhatapio <johanna.vanhatapio@qt.io>
Reviewed-by: Mats Honkamaa <mats.honkamaa@qt.io>
2024-05-24 06:52:43 +00:00
Teea Poldsam
d2e4a980bf Doc: Document fly mode speed shortcuts
Fixes: QDS-12664
Change-Id: I4cf001ec3f98c364323b1389e024df5f06055c59
Reviewed-by: Johanna Vanhatapio <johanna.vanhatapio@qt.io>
2024-05-24 06:44:03 +00:00
David Schulz
cc190fc71b ProjectExplorer: filepathify recursive scan for files
This allows using the scanner on remote paths and avoids some unneeded
FilePath::fromString and FilePath::toString calls.

Change-Id: I4871613a9d36daf78607b196f4dfb6e165be8305
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-05-24 02:39:53 +00:00
Jarek Kobus
2e7da60b6c Android: Use more AndroidConfig specifiers for static method calls
There is no need to operate on AndroidConfig instance.

Change-Id: Ie58f8e5aca8214efe0bb857b3d62a137f42a918c
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-05-23 14:23:31 +00:00
Jarek Kobus
22435ba7fb Android: Hide displayNameFromInfo() in cpp
Change-Id: Iaec548c4b2b56c7515ccf945234f4f59367b006b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-05-23 14:11:33 +00:00
Jarek Kobus
c6174e8f1c Android: Hide getDeviceProperty() in cpp
Use a new CommandLine's c'tor.

Change-Id: I7e0809e97ae265cc83bd05a335beb4fa815e2a4e
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-05-23 14:11:23 +00:00
Jarek Kobus
5edbbbcb67 Android: Hide getAvdName() in cpp
Simplify it a bit.

Change-Id: I862eea2a388be3b83b73667a872f9cf9854c5c8a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-05-23 14:11:16 +00:00
Jarek Kobus
b5ec6c4855 Android: Make parseDeployError() static
Rename DeployErrorCode into DeployErrorFlag and make
it a flag type.

Change-Id: I459a72a3a0a1dcddc275cd649a7f55c15369359d
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-05-23 14:11:09 +00:00
Jarek Kobus
df01213641 Android: Remove unused stuff from AndroidManager
Change-Id: I394da4690c6acf8ae904cd23fbc2fd2527decdba
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-05-23 14:11:00 +00:00
Jarek Kobus
7b0a3aa0dc Android: Simplify reading manifest files
Change-Id: I8be86a26fd1f37ce59af7e5cdbdaf12519937da0
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-05-23 14:10:53 +00:00
Jarek Kobus
3380c3f968 Android: Make enum parsing readable
Fix tr() messages so that they don't contain newlines.

Change-Id: I705e56796393501da1a2917adb6673a24c1cbcf6
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-05-23 13:28:37 +00:00
Alessandro Portale
0db878c2f8 Docs: Reencode number overlay images as full rgb+alpha
By default, optipng reduces pngs with very few colors to using a
palette. That happens also for images with alpha channel. Some tools do
not support palette+alpha well, though.

The images in this change were re-saved as 24-bit version and then
optimized via optipng using the "-nx" option, which prevents color
reductions.

Change-Id: Ib6f04c64724913ea02fcaa442a914b6b79b92a55
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2024-05-23 13:14:26 +00:00
hjk
f30d369b99 Fix QMetaType::type() related deprecation warnings
Not in sdktool, which still builds with Qt 5.15

Change-Id: I6e6f4331127b821e471e2840e7959cd65e6419e9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-05-23 13:04:22 +00:00
Jarek Kobus
af3ab760ad Android: Transform AndroidAvdManager class into namespace
Hide waitForBooted() in cpp.
Move avdManagerCommand() into avddialog.cpp, as it's the only
one usage of this method.

Change-Id: Id88ecbb5532a7d2594c65dddc8245573efd41018
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-05-23 12:52:54 +00:00
Cristian Adam
6eaa9f099a Help: Allow open online documentation for CMake
Qt Creator opens by default the offline documentation of CMake.
But the user can click on the "Globe" to go to the online version
of the documentation.

Change-Id: I0b3a6bceb13784b232b539f1c04bd09aa3a11034
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-05-23 12:50:27 +00:00
Marcus Tillmanns
44afba5254 Lua: Add missing documentation
Change-Id: If171bc8725e4d3f5bcb9db6ca8e6b42324f7b764
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2024-05-23 12:21:41 +00:00
Marcus Tillmanns
969f3845c1 Lua: Add HostOsInfo.architecture
Change-Id: I6acbb9d960cc070335454d0d87674a782a7c930e
Reviewed-by: hjk <hjk@qt.io>
2024-05-23 12:21:28 +00:00
hjk
a8c80cada6 Sol2: Work around a compiler warning
Qt and std container like different size types

creator/src/libs/3rdparty/sol2/include/sol/sol.hpp:13844:15: warning: comparison of integers of different signs: 'std::size_t' (aka 'unsigned long') and 'qsizetype' (aka 'long long') [-Wsign-compare]
 13844 |                         return idx >= cont.max_size();
       |                                ~~~ ^  ~~~~~~~~~~~~~~~
creator/src/libs/3rdparty/sol2/include/sol/sol.hpp:13902:9: note: in instantiation of member function 'sol::stack::unqualified_getter<sol::as_table_t<QList<int>>>::max_size_check' requested here
 13902 |                                 if (max_size_check(meta::has_max_size<Tu>(), cont, idx)) {
       |                                     ^
creator/src/libs/3rdparty/sol2/include/sol/sol.hpp:14140:15: note: in instantiation of function template specialization 'sol::stack::unqualified_getter<sol::as_table_t<QList<int>>>::get<sol::nested<int>>' requested here
 14140 |                                         return g.get(types<nested<V>>(), L, index, tracking);
       |                                                  ^
creator/src/libs/3rdparty/sol2/include/sol/sol.hpp:11719:15: note: in instantiation of member function 'sol::stack::unqualified_getter<sol::nested<QList<int>>>::get' requested here
 11719 |                                         return g.get(L, index, tracking);
       |                                                  ^
creator/src/plugins/lua/bindings/settings.cpp:269:55: note: in instantiation of function template specialization 'Lua::Internal::typedAspectCreate<Utils::IntegersAspect>' requested here
  269 |             return createAspectFromTable<T>(options, &typedAspectCreate<T>);
      |                                                       ^
creator/src/plugins/lua/bindings/settings.cpp:314:9: note: in instantiation of function template specialization 'Lua::Internal::addTypedAspect<Utils::IntegersAspect>' requested here
  314 |         addTypedAspect<IntegersAspect>(settings, "IntegersAspect");
      |         ^

Change-Id: If67ca19aa995622ef476386544b02a77b5af5916
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-05-23 11:52:03 +00:00
Leena Miettinen
6fdcc5a3e5 Doc: Move changing the UI language from FAQ to a how-to
Add instructions for setting the language when running from CLI.

Change-Id: I5c9562e41e665a70154cdbe4f231274006ec98aa
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-05-23 11:49:03 +00:00
Eike Ziller
8b5f5744dc Rename Qt Designer -> Qt Widgets Designer
Fixes: QTCREATORBUG-30756
Change-Id: Icb4a2513e230b71b5bb5033ead6a09ad3a8963ab
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2024-05-23 11:37:08 +00:00
Mahmoud Badri
2eb396b83d QmlDesigner: Allow adding imported 3D components to content library
Fixes: QDS-12784
Change-Id: I87edf8f6c14fabb066c85e8536c91b58e439e5d0
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Ali Kianian <ali.kianian@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2024-05-23 11:20:19 +00:00
Christian Stenger
4d98ffab57 Debugger: Fix displaying LLDB states
Do not update states label with empty strings while
debugging as this overrides real state information
when performing additional actions like fetching
variables, stack, and so on  inside the debugger.

Change-Id: Ic026644931c845b6f3fb5bb422acc6e36e4a4142
Reviewed-by: hjk <hjk@qt.io>
2024-05-23 11:20:15 +00:00