Commit Graph

47434 Commits

Author SHA1 Message Date
Raphaël Cotty
8f8fa81c30 Qbs: Fix executable path in equivalent command line
Use QbsSettings to get qbs executable file path.

Change-Id: Ie8e9dc85712a2a51ee14b5715cf5529ecd3b44c0
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-12-07 11:38:03 +00:00
Eike Ziller
3f0e7bcbe1 Merge remote-tracking branch 'origin/4.14'
Change-Id: I9d1931b7862f4541ac7a064ff987128afd835cbe
2020-12-07 12:29:44 +01:00
Alessandro Portale
7622cc4c09 QmlDesigner: Bring back the preview zoom factor combobox
Fixes: QTCREATORBUG-25057
Change-Id: I52dadc8798a5271cef2dbca718a3e33dc3998958
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-12-07 10:39:07 +00:00
Christian Stenger
40d83926a2 AutoTest: Use more specific types for test tree model
Allows to move over some static casts to the base tree model.

Change-Id: I19e322714a6026771139eeb0ded4645afb45aabe
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-12-07 05:33:16 +00:00
Andre Hartmann
1d9be08e90 Git: Pass only project path to Init Repository dialog
It makes no sense to have the project file here,
and under Windows it even creates confusion
as you have to delete the project file name
from the "Get Existing Directory" dialog.

Change-Id: I51887d5665b4c61b507d64f8bdcc50f3d10c49c4
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-12-06 17:43:38 +00:00
Alessandro Portale
79c4df1ea1 McuSupport: Register all .qch files in the SDK's docs/ directory
Instead of having a hard-coded list of .qch file names to register,
register all .qch files that are present in the Qt for MCUs SDK's docs/
directory.

Turning docs registration into a self-maintaining feature.

Fixes: QTCREATORBUG-25043
Change-Id: Idc7afb78b256bcbb3e8cd7f80fab6a356eb47aa3
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-12-04 17:58:38 +00:00
Aleksei German
60e2a1b128 QmlDesigner: Fix for Rotation tool for FlowItem
Change-Id: Ic4c8c488d91e5983da6da1b424b52a4b240ded37
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-12-04 14:45:19 +00:00
Eike Ziller
c5a70e7daa CMake: Use new MessageManager API
Flash when CMake is started, write all other output silently.
This avoids re-popping up the general messages pane all the time.

When an error occurs, that is put into the issues pane, so no need
to pop up the general messages pane for that either.

Task-number: QTCREATORBUG-24430
Change-Id: I07ae4182cbc43147fbb343b360baf9da7e65f224
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-12-04 10:52:52 +00:00
Michael Weghorn
7cded0af3f Debugger: Fix editing breakpoints via breakpoints view
As the comment for the 'm_parameters' member
in the 'BreakpointItem' class says, that member is
supposed to hold the "Parameters acknowledged by engine",
which the parameters newly set in the dialog are not
yet at this point in time.

Therefore, if a global breakpoint exists, apply the
new parameters there, so they are considered as pending
changes (also returned by 'Breakpoint::requestedParameters')
when 'BreakHandler::requestBreakpointUpdate' is
called a few lines below, and new values get applied
properly.

Task-number: QTCREATORBUG-25035
Change-Id: I8bfd9123785ee911ff180d8311fa2559b55be580
Reviewed-by: hjk <hjk@qt.io>
2020-12-04 09:19:47 +00:00
Miikka Heikkinen
98af1e5033 QmlDesigner: Reset puppet alive timer when connection is cleared
It is simpler to just recreate the timer than reuse the existing one.

Change-Id: I50a8507a69b83917ff522bb5ae472285135c351c
Fixes: QDS-3026
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2020-12-04 09:01:44 +00:00
Eike Ziller
37ed5cc5e5 General Messages: Add more descriptive methods for posting messages
Make API users explicitly choose the severity of what is posted, giving
the methods evocative names.

Document best practices.

The goal is to move all API users to the new API and then remove the old
one.

Task-number: QTCREATORBUG-24430
Change-Id: Ic095cc34b887694b5b5779f0c3daddfde40950f7
Reviewed-by: hjk <hjk@qt.io>
2020-12-04 08:33:52 +00:00
Eike Ziller
41b73594ad Add API for saving settings with default value
We should never actually write default values into the settings, because

- if the default value changes in a later Qt Creator version, the new
  default should automatically take effect if the user didn't change the
  value
- it senselessly grows the settings file

Add a QtcSettings class that extends QSettings by a
"setValueWithDefault" method, which does not write default values to the
settings, and actually removes the settingskey if the user switches back
to the default.

Use it at the places where we already do this manually.

Task-number: QTCREATORBUG-24762
Change-Id: Ia76414cb21e8521f3aeed1e37b43ae4fb3393ea3
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-12-04 08:25:17 +00:00
Jarek Kobus
7a85771c20 Fix a warning about conversion from size_t to uint
Fix a warning: conversion from ‘size_t’ {aka ‘long unsigned int’}
to ‘uint’ {aka ‘unsigned int’} changes value
from ‘4939931809569846361’ to ‘3557831769’ [-Woverflow]

Task-number: QTCREATORBUG-24098
Change-Id: Ibc123d8e28c7072dd947a1f8058dc8561ff7f6df
Reviewed-by: hjk <hjk@qt.io>
2020-12-03 21:00:03 +00:00
Thomas Hartmann
de3faf853d QmlDesigner: Update transitions if position changes
Change-Id: Ie971ee68f9f0ea9b200955487fe53e6465030129
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-12-03 16:31:45 +00:00
Christian Stenger
42bc7af96f Python: Do not pretend being C++
This avoids checking the debugger engine on Windows
which may fail when using a wrong kit.

Change-Id: I427281f6749cbccc3d3d85f6bdafa0138e1d54f0
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2020-12-03 14:03:11 +00:00
Christian Kandeler
b385bf8eb5 RemoteLinux: Classify executables correctly
... in the MakeInstallStep.
See also d56e88d36a.

Fixes: QTCREATORBUG-25022
Change-Id: I0824355e0604cd4a7cc2ac9cdb4a55733cb0f706
Reviewed-by: hjk <hjk@qt.io>
2020-12-03 13:18:24 +00:00
Knud Dollereder
a02be5442e Restore zoom-all special case for the flowview
Change-Id: Ifbed53253b0f00773dcd040f0bd2b06a2b941bd4
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-12-03 12:52:51 +00:00
Eike Ziller
eeea1e6c32 CMake: Apply configuration changes to fresh build directories
Fixes opening a new project without existing build folder, changing
some configuration values, and pressing apply or choosing Run CMake.

extraCMakeArguments contains the arguments needed to apply any changes
done in e.g. the CMake configuration list in projects mode.
When pressing Apply, the build directory gets created, and CMake run
with REPARSE_FORCE_INITIAL_CONFIGURATION. But we may not remove
REPARSE_FORCE_EXTRA_CONFIGURATION which might even just have been added
a few lines above after asking the user via mustApplyExtraArguments().

Amends af4e74a972

Task-number: QTCREATORBUG-24936
Change-Id: I5e5547611262490ebdebb30dc1bfc690f1cdedde
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-12-03 10:59:14 +00:00
Eike Ziller
7aa96780ed CMake: Improve handling of QML Debugging and Profiling option
The additional parameters to pass to CMake are set in a
"extraCMakeArguments" property, but we had two places where this was
set, overwriting each other: from the list widget where the user makes
changes, and from the QML debugging option.

Combine the two code paths. This has the additional advantage that the
changing QML Debugging and Profiling option behaves the same as changing
variables in the list - the "Apply Configuration Changes" button gets
enabled when changing the option, and one can use it to apply the
change.

Task-number: QTCREATORBUG-24988
Change-Id: I785c6804c9597a9eba471f56babaae966ce84b17
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-12-03 10:58:58 +00:00
Eike Ziller
1e78fdb71f Merge remote-tracking branch 'origin/4.14'
Change-Id: Id4c4c06b086dfe38960f4d68694ae23f3e00109f
2020-12-03 11:57:42 +01:00
Christian Kandeler
3a6e4860c4 Wizards: Delay validity check in LineEditField
... until the values have actually been set up.

Fixes: QTCREATORBUG-24971
Change-Id: Ia967fe95545eda1c9044faf8ab1ee885bf3d9e02
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-12-03 08:32:03 +00:00
Knud Dollereder
6efb484868 Create zoomaction widget for the live-preview
Fixes: QDS-3203
Change-Id: I460fdc5882ff22c6a8c590402e0efe06dece435a
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-12-02 14:28:14 +00:00
Thomas Hartmann
88c13153b3 QmlDesigner: Add flag to usage statistics for stand alone mode
Change-Id: I5cc001ccd59059174c7f34978fda7c682900ad3d
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-12-01 14:21:25 +00:00
Jarek Kobus
b281d6f00a Don't call CppTypeHierarchyWidget::perform() twice
In case a Type Hierarchy widget isn't visible,
the CppIncludeHierarchyWidget::perform() is called
twice when requested from "Open Type Hierarchy" context menu.

The instances of CppIncludeHierarchyWidget class
are created only when Type Hierarchy item is selected
form the combobox, and are destroyed when different item
is selected. A call to:
NavigationWidget::activateSubWidget(Constants::TYPE_HIERARCHY_ID,
Side::Left) may be ignored (in case Type Hierarchy widget was
visible) or may recreate the widget and invoke
CppTypeHierarchyWidget::perform() for the first time
(in case when Type Hierarchy wasn't visible).
Just after this we emit typeHierarchyRequested(), which in turn
invokes perform() one more time unconditionally.

In order to fix it, we emit the signal typeHierarchyRequested()
first (which will invoke perform() only when the Type Hierarchy
widget was visible), and later call activateSubWidget(), which
invoke perform only when we are recreating a widget.

This shorten the freeze time for calculating big hierarchies,
like for ExtensionSystem::IPlugin, by 50%.

We do the same for CppIncludeHierarchyWidget.

Change-Id: If58fba4ba1dc32999d106fc2faa712e05442caf3
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-12-01 13:08:33 +00:00
hjk
dda6775325 Debugger: Fix crash in GdbMi::parseValue with Qt 6
QString::begin/end may be null in Qt 6.

Fixes: QTCREATORBUG-25018
Change-Id: If50cb79c58096d5fa68e494e33bea131063968fb
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2020-12-01 10:03:17 +00:00
Christian Kandeler
4f45319e80 QmlDesigner: Fix warnings
Change-Id: I818bd2d6a7512609ee7f7c1345ba314ab304850d
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-11-30 16:37:13 +00:00
Christian Kandeler
cb2a241e02 Utils: Filter adjacent carriage returns in OutputFormatter
It shouldn't change the semantics, and it helps on some systems with
strange line endings.

Fixes: QTCREATORBUG-24556
Change-Id: I8158ddda458e5500bce6ce7b9ff4d5d981f88d7d
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-11-30 16:36:43 +00:00
Michael Winkelmann
7048a89fa1 FormEditor: Return correct bounding rect for rendered QPicture
The bounding rect is calculated by union of all child item boundings rect
of all FormEditorItems.

Change-Id: I908e9d08b581671436bc7334b3b7eb0a5cd25aa8
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2020-11-30 16:25:00 +00:00
Eike Ziller
d02afbe6b4 Merge remote-tracking branch 'origin/4.14'
Conflicts:
	src/plugins/projectexplorer/gcctoolchain.cpp

Change-Id: I2136ba89d3aa3c4c2a0e7a4f9d8ba9cec32924ce
2020-11-30 16:14:32 +01:00
Alessandro Portale
43c73b20e4 Android: Prevent multiple concurrent downloads of SDK tools
...by making the "Downloading SDK Tools package..." progress dialog
application modal.

Fixes: QTCREATORBUG-25013
Change-Id: I59979350d8f1ce5632ec520e1c661fff3399a283
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2020-11-30 15:01:11 +00:00
Jarek Kobus
448cdb7bb5 Fix a crash when editing cpp file
std::mismach() overload taking 3 arg assumes, that
second string is at least as long as the first one.
We don't guarantee this, as somethimes filePath2 is
empty string. Use 4 arg overload instead, which
ensure we don't exceed the valid range.

Fixes: QTCREATORBUG-24970
Change-Id: I8b7b11d124f69c7c9cb3246ee969f134fa026e08
Reviewed-by: hjk <hjk@qt.io>
2020-11-30 12:43:54 +00:00
Christian Kandeler
1a8fdb1379 ProjectExplorer: Remove unused virtual Toolchain::builtInHeaderPaths()
Change-Id: I684b4b7fba9b74baf0834e7d5a0815673c666112
Reviewed-by: hjk <hjk@qt.io>
2020-11-30 12:40:05 +00:00
Bernhard Beschow
51fd8f5f70 Nim: Remove unused code
Change-Id: I989b951c0fa3a7bc732105c5b3985ea6b61a2fab
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Filippo Cucchetto <filippocucchetto@gmail.com>
2020-11-30 11:44:45 +00:00
Bernhard Beschow
75c1b8d582 Nim: Remove unneeded wrapper method
Change-Id: I12b6a42a0611342644b2ff448cd33cedd3eb6ec8
Reviewed-by: Filippo Cucchetto <filippocucchetto@gmail.com>
Reviewed-by: hjk <hjk@qt.io>
2020-11-30 11:44:18 +00:00
Bernhard Beschow
287196a008 Nim: Remove unused attribute
Change-Id: If8961425f658cac96f49e1d78f083c20aed6d818
Reviewed-by: hjk <hjk@qt.io>
2020-11-30 11:43:31 +00:00
Christian Kandeler
f772f09853 ProjectExplorer: Remove unused virtual Toolchain::predefinedMacros()
Change-Id: I24e515ba1767c72cbf43ae250908f571f0229e9f
Reviewed-by: hjk <hjk@qt.io>
2020-11-30 11:41:30 +00:00
Christian Kandeler
16bc10a66f ClangTools: Finish "disable checks" logic
- Take project settings into account.
- Fix some bugs in the initial implementation.

Task-number: QTCREATORBUG-24852
Change-Id: I4960fc68ef0b27777a152ca871dfa554fea72c51
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-11-30 11:38:08 +00:00
David Schulz
7853c6ba4d AutoTest: add ITestBase::type() for better readability
Change-Id: I67133f4940329483f2d8d25d1212f4e07f57d39d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-11-30 05:15:15 +00:00
Eike Ziller
18e3e70887 qmake: Do not bring general messages pane to front
- message(): Print to general messages and blink
- warning(), error(): create item in Issues pane
- parse error and other errors: create item in Issues pane

Task-number: QTCREATORBUG-24430
Change-Id: I6b37cef0b9e53e2207341bd179e2c60a40da9ee0
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-11-27 15:43:33 +00:00
Christian Kandeler
370804c2ab CppTools: Work around problems with our definition of __FUNCSIG__
This basically extends the existing hack to cover one more case. It may
very well break again in some other context, in which case we will
remove the custom definitions entirely, as the reason they exist in the
first place does not seem terribly relevant.

Fixes: QTCREATORBUG-24580
Change-Id: I757ac23682c81c647a5d968fa549baac5716010c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-11-27 13:46:45 +00:00
Michael Winkelmann
68e1247d99 FormEditor: Check that widget and graphicsView still exist after timeout
Change-Id: Ie1c3ea49221611240e58d738dccc6e350866d640
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-11-27 13:37:14 +00:00
Alessandro Portale
a3857a996a Don't access static functions/fields via instance
Courtesy of readability-static-accessed-through-instance

Amends: b2a766a79a

Round #2: This time done with Qt Creator's Analyzer, which
found other occurences than run-clang-tidy.py

Change-Id: I479e280c7abcf2d24baccbb0af69ae4bda05198e
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2020-11-27 13:26:07 +00:00
Jarek Kobus
a0dd5d2b4f Fix a warning about using deprecated Qt::AA_EnableHighDpiScaling
Task-number: QTCREATORBUG-24098
Change-Id: Ieb58a74e32fd55d95a701299f831d073ebbf4f8e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-11-27 11:13:11 +00:00
Orgad Shaneh
b801fc7ae7 BinEditor: Fix MSVC warning
warning: C4309: 'argument': truncation of constant value

Change-Id: I5da62c2534474f65d5b4d1b44b995dd765d02265
Reviewed-by: hjk <hjk@qt.io>
2020-11-27 11:09:47 +00:00
hjk
0cc5ee12c5 Test: Compile fix
Change-Id: I99a62c2534474f65d5b4d1b44b995dd765d02265
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-11-27 10:56:09 +00:00
hjk
4ac7bb5a01 Debugger: Use -file-symbol-file for cores, not for remote debugging
In 5467faa0d7 the replacement of -file-exec-and-symbols with
-file-symbol-file accidentally ended up in the wrong branch.

Task-number: QTCREATORBUG-24996
Change-Id: I2d6cb5432c0b11b02c3f8d3517075a7c00b05c9f
Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-11-27 10:35:41 +00:00
Christian Stenger
c217f0694d AutoTest: Allow registering ITestTools
Task-number: QTCREATORBUG-23332
Change-Id: I529b1cc1f110739c264c7a021aada063f697b1db
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-11-27 09:53:43 +00:00
Alessandro Portale
81f3452e1c Aggregation/Utils/ExtensionSystem: Make member functions const/static
readability-make-member-function-const finds lots of member functions
that could be made const. This change just picks getter functions that
really should be const.

readability-convert-member-functions-to-static finds non-static member
functions which do not access this. This change turns most of them
into static ones, but leaves some non static to keep the class API
consistent.

readability-static-accessed-through-instance fixes the places where
the originally non-static, now static functions were called through
instance.

Change-Id: I8cf16c01f7988a7c9d073b5f8ede6a9706b94fb0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-11-27 09:16:08 +00:00
Orgad Shaneh
08972d1952 ProjectExplorer: Fix crash on close while tree is scanned
* Open CMakeLists.txt of Qt Creator
* While it scans the tree, close Qt Creator

Change-Id: Ieabec0f7fe0495f68e833d7ced03076bc1ceddbb
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-11-27 09:15:42 +00:00
Christian Kandeler
ae794d5914 MSVC: Also understand the "-D" syntax
... when filtering defines from the compiler command line.

Fixes: QTCREATORBUG-24985
Change-Id: I28b06aa640638578d384f744c63d1430cb4b99bd
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-11-27 09:12:21 +00:00