Commit Graph

67787 Commits

Author SHA1 Message Date
Orgad Shaneh
44023c8f43 Clang: Fix build with Clang/LLVM 10
Change-Id: I740286c9dcfd325b1c31ab863fb5c91bf9c6ec70
Reviewed-by: hjk <hjk@qt.io>
2020-02-20 17:30:27 +00:00
hjk
5a47cd0d50 GenericProjectManager: De-O_OBJECT-ify GenericMakeStep
Change-Id: I8f65d9461a48d27e6cf21b32f7b364127a7036b5
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-02-20 16:36:30 +00:00
Henning Gruendl
79612417e3 Integrate ADS in QtCreator
- Integrate DockManager in DesignModeWidget (create factory default
   workspace, create menu items, add qds constants, remove unused
   shortcuts)
 - Remove unused functions and variables due to new docking system usage
 - Add DockWidget style sheet to resources
 - Fix scrollbar style by merging base and scrollbar style sheets
 - Fix update of StatesEditorWidget when switching tabs
 - Add missing unique ids in widget info
 - Set minimum size on ItemLibraryWidget

Change-Id: I08be6d753233fc767037a33b41af335cec6d43b1
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-02-20 16:15:03 +00:00
Henning Gruendl
8f686e985c Add Advanced Docking System library
This library is a fork of the following repository
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System
Development started from the following commit
1de42a9766134eecd2611c2b4e209d3e0ede74d2
Incorporate all commits until
3ffbbfb6d01ff211d8349027221a19b1419296b5

 - Rename variables and files to follow the Qt style guide
 - General code cleanup (remove goto, fix typos, add overrides, remove
   explicit slots specifier, replace string-based with functor-based
   connections, replace dynamic_cast with qobject_cast)
 - Replace most preprocessor instructions Q_OS_LINUX/Q_OS_MACOS with
   Utils::HostOsInfo
 - Remove all QT_VERSION preprocessor instructions below 5.11
 - Change loading and storage of workspaces. Store workspaces in
   separate file instead of a list in the Settings.ini
 - Add workspace dialog, model and view for managing workspaces
 - Rename XML tags and use enum/bool instead of ascii art/numbers as
   attribute values. Use base64 instead of hex for storing geometry info
 - Remove internal style sheets
 - Add more build systems (qmake, qbs)
 - Adapt copyright header
 - Remove unix specific build rules
 - Replace ADS_PRINT with QLoggingCategory
 - Replace Java-style with STL-style iterators

Change-Id: Icf8c2fbaccec9680df83c6e2100e3446a090a437
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-02-20 16:14:52 +00:00
Christian Kandeler
61932b5d4b QbsProjectManager: Use the same build key as in previous versions
We changed the build key derivation method in commit 6913947986 under
the assumption that it doesn't really matter as long as it's unique.
However, this value gets serialized, so the change broke restoring
existing qbs run configurations.
As we don't want users to lose all their run configs when upgrading to
4.12, we switch back to the old pattern.

Change-Id: Ia4a353af08cca33dbc3c60bd9fc0e28f42dcfe20
Reviewed-by: hjk <hjk@qt.io>
2020-02-20 15:49:12 +00:00
Cristian Adam
f65f260c91 CMakeBuildSystem: Don't re-update code model on CMakeLists.txt saves
Currently if you edit a CMakeLists.txt and then press save, the code
model will be reindexed.

On projects like Qt Creator this operation is quite significant.

Note that the code model is updated after CMake has run on the project,
which is what I would expect.

Saving the CMakeLists.txt and not running CMake has no effect on the
project, and the code model shoudn't be reindexed.

Change-Id: I61289fda60752ef002cf3625d339d4fcaf144d1b
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2020-02-20 15:41:28 +00:00
Christian Kandeler
65e244b238 Qbs: Use more sensible build step summaries
It makes no sense to use the "equivalent command line" value as the step
summary. It's much too long and will never fit into that label.

Change-Id: I55f291c370c97481d37e9f9ba9baec48d7215774
Reviewed-by: hjk <hjk@qt.io>
2020-02-20 15:35:22 +00:00
Christian Kandeler
344a8f5622 Qmake: Do not list all the command-line arguments in the step summary
They will often not fit.

Change-Id: I749242a576e57dd1ffc721ca14b85d1e0fa1ac98
Reviewed-by: hjk <hjk@qt.io>
2020-02-20 15:12:48 +00:00
Christian Kandeler
74a38b9716 Qmake: Do not repeat build directory in warning message
The build directory line edit is right above the label containing the
message, so repeating the build dir value just widens the label
unnesessarily.

Change-Id: I650a4ce76a82582b2710a4673c134dbb4faf306e
Reviewed-by: hjk <hjk@qt.io>
2020-02-20 15:11:52 +00:00
Assam Boudjelthia
b9b2145396 Android: parse Android 11 (R) packages
Allow parsing packages of the latest Android 11 (R) with API level 30.

Change-Id: Ia50d2ff23395b79828d47a8f9aeb3880aa131d83
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-02-20 15:00:13 +00:00
Assam Boudjelthia
267cb34542 Androdi: set m_isDeploying to false if deployment is cancelled
If Android deploy dialog is cancelled, then "Run" is clicked again,
the deploy dialog will not show again. Instead, a build is started then
fail in deploying because no device was actually selected. This makes
sure d->m_isDeploying = false in BuildManager.

Change-Id: I8cb899fa57df30b3669e42d30d0f280f8f73fb38
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-02-20 15:00:09 +00:00
Alessandro Portale
bad2d31747 Python: Fix MSVCs struct vs. class (forward) declaration warning
src\plugins\python\pythonutils.cpp(67): warning C4099:
'Python::Internal::PythonLanguageServerState': type name first seen
using 'class' now seen using 'struct'
src\plugins\python\pythonutils.cpp(66): note: see declaration of
'Python::Internal::PythonLanguageServerState'

Change-Id: Ibec8b0b990ee88fcd274961db4c8d8d0ee29533a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-02-20 14:41:27 +00:00
hjk
3f178e4ee3 Qdb: De-Q_OBJECT-ify deploy steps
Also, use the usual file layout, and make one displayed step name
translatable.

Change-Id: I3c8a466227fcca906f431fc169bc90e73fe880fb
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-02-20 14:32:42 +00:00
hjk
af8120a05c iOS: De-Q_OBJECT-ify and hide IosDeployStep implementation
Change-Id: I8c0589e5c5c2ac69f3c48f299a97c0dbea9b5922
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-02-20 14:31:09 +00:00
Assam Boudjelthia
1f4028d834 Android: remove repeated call to AndroidConfig::connectedDevices()
This causes a delay when clicking the deploy button for an Android
project. Also, it is a repeated call as this will be called inside
AndroidDeviceDialog::device() then refreshDeviceList().

Change-Id: I9203e746e4e9b3e5bfa42133d9a5246863c87e5a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-02-20 14:22:59 +00:00
Cristian Adam
b7bfcc3786 CppTools: Do not reindex all sources on project update
When CMake was run it would cause an update, which would have a
cancelAndWaitForFinished on the future interface.

The CppTools would have the future interface added on all updates, and
even though an indexing job would be finished, it would be picked up as
active and cancelled, which would be interpreted as action from the user
to cancel the indexing and cause a full reindex.

This patch makes sure that if an indexing job has finished, it doesn't
register as active, and only the jobs that actually do some work, and
will be finished will wait for the cancel signal.

Change-Id: If8a4db2a4a7a5707a360db84affe794ab0678d38
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2020-02-20 13:53:36 +00:00
Christian Stenger
1d513ecd06 ProjectExplorer: Fix compile for gcc 5.3
Change-Id: I52d8b5d33d5d04e52749b755a61b36a9f4b573b9
Reviewed-by: hjk <hjk@qt.io>
2020-02-20 13:01:54 +00:00
David Schulz
552ccd6a61 CodeAssistant: add cancel to asynchronous processors
Fixes crash when the processor reports a result after the code assistant
was destroyed.

Change-Id: I8588d3d6acad69f1ec6302e8ba09d642ebbb77f1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-02-20 12:59:55 +00:00
Thiago Macieira
86fae567fa TerminalControllingProcess: don't use qWarning in the child process
qWarning() and all of QMessageLogger will get to qFormatLogMessage(),
which locks a mutex. Additionally, qWarning may call a number of
different backends that, in turn, may have mutexes of their own. Locking
mutexes in child processes between fork() and execve() is a big no-no:
it may have been locked by another thread before fork(), so it's still
locked in the child process and will never get unlocked. Result:
deadlock.

Plus, qWarning reacts to QT_FATAL_WARNINGS, which I guess was not
intended for this class.

So just use a plain perror(), which is guaranteed by POSIX to be
"MT-Safe race:stderr".

Change-Id: I4e559af2a9a1455ab770fffd15f4a37a3fd113ca
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-02-20 12:53:00 +00:00
David Schulz
aee78bd58d Editor: do not split on nbsp in rewrap paragraph
Change-Id: I443400056f647a58a98d9bb6a221b10852470ba2
Fixes: QTCREATORBUG-23643
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-02-20 12:45:28 +00:00
hjk
6033c31e23 ProjectExplorer: Un-export BuildEnvironmentWidget
Apparently not needed anymore outside.

Change-Id: I9f4f1a65f56a86ba75a37a9b96db71472b3e0af2
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-02-20 12:10:22 +00:00
Eike Ziller
6f1ad0b0cb Fix extensionsystem API documentation for new qdoc
Change-Id: I2303e46a3e5840a3c23c84a9126237eeb2eb21d9
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2020-02-20 12:01:54 +00:00
David Schulz
db7d12b78c LanguageClient: fix memory leak in client initialization
Change-Id: I30e4032cea5fff46ffd790336729cc6fbaf4b104
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-02-20 11:56:58 +00:00
hjk
7f1c8aea5d ProjectExplorer: Make communication between target and selector direct
Architecture-wise, this now means that Target knows about the
MiniProjectTargetSelector, otoh, Project does less, and quite
a bit of signal, slot and qobject_cast is gone.

Change-Id: I0feef9328144282c7c4ca710a12ac0e495810684
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-02-20 11:45:48 +00:00
Christian Stenger
94ee0a575d Debugger: Avoid crash when settings change after debugging
If the debugger engine is not running there is anyway no need
to update its data.

Change-Id: I8cda9218985db8b88d96046254847e8916ca37eb
Reviewed-by: hjk <hjk@qt.io>
2020-02-20 11:15:19 +00:00
Orgad Shaneh
3c0b89f697 VCS: Refactor annotationChanges() in VcsBaseEditor
Devirtualize the function, and use QRegularExpression with globalMatch.

Change-Id: I18c92cb37b535c616f03f45dff8b18249c961d5d
Reviewed-by: hjk <hjk@qt.io>
2020-02-20 10:42:31 +00:00
Orgad Shaneh
3cdbd8683d VCS: Fix connect failure
QObject::connect(Git::Internal::GitSubmitEditorWidget, Git::Internal::GitSubmitEditor): invalid null parameter

Change-Id: Iaf9a46d9922c7d4e124b94146d85bc5374a2195c
Reviewed-by: hjk <hjk@qt.io>
2020-02-20 10:11:52 +00:00
Christian Kandeler
5451b78367 Project Tree: Add functionality to expand a single node recursively
From time to time, I find myself wanting to fully expand
a specific sub-tree.

Change-Id: Ie49b76a7a7a6fae3684bbdfb5735638bbc41b301
Reviewed-by: hjk <hjk@qt.io>
2020-02-20 09:56:31 +00:00
hjk
04f933fd67 Android: Inline aabPath computation
Mainly to avoid an explicit use of BuildStep::buildConfiguration()

Change-Id: I96f1403d0aa2b9f5bcde06e994809466700b1357
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-02-20 09:47:39 +00:00
Christian Kandeler
72d83fddf2 MiniProjectTargetSelector: Merge two pairs of classes
Change-Id: I7b6e1c603da2c6457e150fcb5f60c11a844b2f34
Reviewed-by: hjk <hjk@qt.io>
2020-02-20 09:12:23 +00:00
Aleksei German
3f8da54e7d QmlDesigner: Annotation Multiselect
Change-Id: Ia7a84c321d5cd1e2522bf277a903c78ec24ce156
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-02-20 08:50:59 +00:00
Assam Boudjelthia
0a8d675c66 Android: fix Android options page blocking behavior
The change 286266 was causing an unwanted modal dialog upon entering
Options > Devices page, this fixes that.
Also, this fixes the synchronous SDK and AVD list reloading that was
causing some hang time upon opening Devices page.

Fixes: QTCREATORBUG-23581
Change-Id: I1a55aaadb873c77612aced1c687cc5a0ded3441d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-02-20 08:40:38 +00:00
Leena Miettinen
09ab60ffa2 Doc: Fix Editor Manager docs
- Fix issues that cause QDoc warnings for documented classes
- Mark undocumented classes \internal

Fixes: QTCREATORBUG-23618
Change-Id: I436ab501858a2a469b910e863139d2b1296dea19
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-02-20 08:35:06 +00:00
David Schulz
29dc8e740f LanguageClient: fix soft assert for uninitialized server
Do not send close documents notifications to an uninitialized server

Fixes: QTCREATORBUG-23598
Change-Id: Iaabd082203a91a56ebcd60f93e6a0c97048e89c1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-02-20 07:50:40 +00:00
David Schulz
5a2de2609e Python: detect language server for python asynchron
Change-Id: I775e4cc21dc443b9ec6af81fabef9cf2bfd4e7d2
Fixes: QTCREATORBUG-23599
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-02-20 05:42:17 +00:00
Junker, Gregory
e7f784ca73 Support configurable trailing-whitespace cleanup
Allow the user to configure how trailing whitespace is handled. In some
file types, for example, Markdown, trailing whitespace is semantically
important. This change allows the user to select, via delimited list of
wildcard filename patterns, which files to ignore for trailing
whitespace cleanup.

Task-number: QTCREATORBUG-13358
Change-Id: Ie6814d8c178bed8e3de78e6d359b9940d2ba0ead
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-02-19 18:09:13 +00:00
Orgad Shaneh
dec8113377 Git: Fix accelerator for reflog
R is already used for Rebase.

Change-Id: I64575c98bf22aef0a2825b68b1c9a92061821923
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-02-19 17:48:19 +00:00
hjk
3fe1911d46 ProjectExplorer: Introduce some BuildStep convenience accessors
... and use in ProcessStep and related classes.

Change-Id: Ie6f1403d0aa2b9f5bcde06e994809466700b1357
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-02-19 16:11:05 +00:00
hjk
3f68292dbe ProjectExplorer: Introduce ToolChainKitAspect::{c,cxx}ToolChain
Special accessors to the repeatedly used C and C++ cases to denoise
and slim down user code.  Plus some code cosmetics nearby.

Change-Id: Iba4662bd4731d8c4256e658529f39d5c995691ce
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-02-19 15:59:12 +00:00
Thomas Hartmann
bbf5ff61ea QmlJSCheck: Allow animations in ui.qml files
Task-number: QDS-1613
Change-Id: I4beecff16d0b67652abbdb16945614d2497d3921
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-02-19 15:47:14 +00:00
Christian Kandeler
0634b34c48 ProjectExplorer: Do not disable "Deploy" action if step list is empty
We do not listen for changes to the step lists, so the state of the menu
actions is not properly updated at the moment. Doing so would incur an
aonnying amount of book-keeping, which is simply not necessary
considering there is no harm running an empty deploy configuration.

Change-Id: Ia0b0ea6369d4c17c6049872e285b2968474027e1
Reviewed-by: hjk <hjk@qt.io>
2020-02-19 15:46:36 +00:00
Cristian Adam
193fa40b34 GitHub Actions: Fix MSVC CDB debugger
Install the VC Runtime for the qtcreatorcdbext component

Change-Id: I22a7620be51acca53313bcac4b54746214d7b13f
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-02-19 14:36:26 +00:00
Tobias Hunger
57662de841 CMake: Remove tealeaf reader mode
*** This removes support for CMake < 3.7 ***

Change-Id: Iddb0bab1a61b814adb4cb7ffa217284e96cb1140
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-02-19 14:05:42 +00:00
Cristian Adam
266991740b CMake Build: Set CXX_EXTENSIONS to OFF for QtCreator plugins
This makes sure that if you have a plugin and set the
C++ standard to 14, but forget to set CXX_EXTENSIONS to OFF
you don't get weird PCH compilation failures.

Change-Id: I66edf6431624f667ba400e8ef79f2ad6170e3ca2
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-02-19 13:59:01 +00:00
Aleksei German
9a09dd8a88 QmlDesigner: minor fixes for Annotations
- Mac dialog window fix
 - Changed behavior on add new tabs action
 - Removed unused code

Change-Id: I0579b1ba85fb535464b2d5160a85a898f2e78a76
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-02-19 13:55:35 +00:00
Thomas Hartmann
34f417a2e4 Qml tooling: Support Qt 5.15
...and keep the default at 5.12

Change-Id: I15439c2d71a0610971dc39246e8b98e9653b8f04
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-02-19 13:22:24 +00:00
Tobias Hunger
39cddf5d03 DebuggerAspect: Simplify handling of Qml debugging
There should not be a need to have the linkQmlDebuggingLibrary Q_PROPERTY
anymore. The property is added for the benefit of the DebuggerAspect, which
can just check relevant BuildConfigurationAspect directly.

Change-Id: Ic47ca9e26911e096564fe77bd14bebe959b4f116
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-02-19 12:58:40 +00:00
Alessandro Portale
bc25c7b3fe McuSupport: Remove flashing of bootloader for STM
An earlier version of Qt for MCUs had run CMake targets like
flash_<application>_and_bootloader.

At some point they were removed. Now, Qt Creator will not use that CMake
target, as-well.

Change-Id: Ie122acd042f816fafd27779d164e87ec00c509a5
Reviewed-by: hjk <hjk@qt.io>
2020-02-19 12:57:37 +00:00
Eike Ziller
c34864ccab macOS: Disable library validation when signing
So we can load 3rdparty plugins even when the app is signed and notarized.
Also give Qt Creator "debugging" capabilities, allowing it to attach
to processes.

Change-Id: Ia6bb8ab279920b75a96777eafebbb4e7454fda46
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-02-19 12:53:02 +00:00
Robert Loehning
fd2653bdc2 Squish: Remove outdated error handling
Change-Id: If3bb6f8dd5c79e11139801623f63ce88ea46cf42
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-02-19 11:58:57 +00:00