Commit Graph

61895 Commits

Author SHA1 Message Date
hjk
c802a1b12a Qmake: Set QmakeBuildConfig aspect values more directly
Change-Id: I759371e4f71cd4270f1bf82152ceb2f851c3c06b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-12-05 16:54:19 +00:00
Christian Kandeler
cf9249a905 ProjectExplorer: Rework RunConfiguration::isConfigured()
The old code had a number of problems:
    - There was one function isConfigured() to report whether the
      run config has issues, and a second one, ensureConfigured(),
      needed to be called to retrieve the details. At least one subclass
      implementor forgot to re-implement the first one, so the second
      one was never called.
    - The ensureConfigured() function could show a dialog and thereby
      delay execution of the run configuration, leading to additional
      state and a more complicated execution logic. Also, the dialog
      duplicated the run configuration UI.

We now have only one function returning a list of Task objects. If the
list is not empty, we present them to the user in a non-blocking way and
abort the execution.

Change-Id: I5f2a8126a2c1bd2ca51345b9e37b979bfc0c0b98
Reviewed-by: hjk <hjk@qt.io>
2019-12-05 16:35:48 +00:00
hjk
85b7833a3e Qmake: Simplify collection of available builds
No need for temporary list.

Change-Id: I77c2bace2c4b4eea95b36f8a075e07850ca8a4f6
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-12-05 16:16:01 +00:00
Christian Kandeler
b6363ef7b8 Turn ProjectExplorerSettings::StopBeforeBuild into an enum class
For consistency with related settings.

Change-Id: Iebc3303b98f4e22d63cedcce5ca956f0a52018f8
Reviewed-by: hjk <hjk@qt.io>
2019-12-05 14:33:14 +00:00
Christian Kandeler
9809628c59 "Build & Run" settings: Improve combo box
- Do not rely on the order of entries.
- Use a more sensible order of entries.

Change-Id: I368b21b2e40a7cfa87771273e5f82640da2b2ff0
Reviewed-by: hjk <hjk@qt.io>
2019-12-05 14:18:32 +00:00
Christian Kandeler
4933f79111 ProjectExplorer: Provide the option to build only the app to be run
... instead of the entire project.
This can speed up the development cycle by ignoring irrelevant changes
in the project, potentially at the cost of missing parts that actually
should be re-built (in particular with build systems where a product
does not have full knowledge of its dependencies).
Supported by qmake and qbs for now.

Change-Id: Ic7101aa243e92ba139798d13366d256c1919dcc3
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2019-12-05 14:18:06 +00:00
hjk
24f7c2b8fa Qmake: Accept global build settings as authorative
... when initializing build configuration.

Potential re-alignment with contents of pre-existing Makefiles
is confusing at best, and depends on the presence of Makefiles
that are typically close to invisble when using an IDE.

Change-Id: Iadbab4f32badfbf948cfa2a1b256932acbfe858f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-12-05 13:39:45 +00:00
Leena Miettinen
6edb2290b8 Doc: Remove "Exporting Designs from Graphics Software" topic
Users are confused, because we now have Qt Bridge for Photoshop.

Change-Id: I63220cd2c2df5bc552b96c4cf7a5df72d2fe89b4
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2019-12-05 12:52:29 +00:00
David Schulz
a07053853b CMakeBuild: fix unittest msvc compile
by adding /bigobj cxx flag for msvc builds

Change-Id: I73e6afc820556454c2886fd2a55b296229c50649
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2019-12-05 11:56:36 +00:00
Christian Stenger
2375dcab67 Wizard: Fix test registration to ctest
Change-Id: Ia30cdf1ce690a2ebbc2e991e4e3f8a029e4768ed
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-12-05 11:55:16 +00:00
Orgad Shaneh
6025a62c2a Fix cmake build
This amends commit 0aa95576c2.

Change-Id: I956743690d4f42e8631d1f274d4a390642daf6d1
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2019-12-05 11:42:15 +00:00
Tobias Hunger
39095944ff ClangSupport: Clean up destructors
Clean up destructors in the class hierarchy based on IpcInterface.

Change-Id: Ia79784243858fff619a9df534384a7bca18f2bd0
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2019-12-05 10:33:28 +00:00
Tobias Hunger
d29611be86 ClangSupport: Delete move constructor/assignment operator
They are deleted implicitly by their base class having deleted
these. So make this explicit.

Change-Id: Ia19ff74436e800af0d86fe7bb73fa087ce00872a
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2019-12-05 10:33:19 +00:00
Orgad Shaneh
83be2cc026 ProjectExplorer: Fix FolderNode::addNestedNode
std::lower_bound returns the first entry that is greater than or
equal to the argument. It should never return anything smaller
than the argument, so the condition did not make sense.

This broke the project tree of Qt Creator's cmake project (and likely other
projects as well).

Invert the condition to make it clearer.

This amends commit 18ecbb9b14.

Change-Id: I99a002b5fb2c4ea6639b896ce8d2ef2b01f0815b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-12-05 10:08:10 +00:00
hjk
d3b2c01c11 Utils: Move FileUtils::resolvePath to FilePath
In line with the general move toward use of FilePath nowadays.

Change-Id: I1c50e1479f7d9100ff8ded3ce3c22dd82b7fe6aa
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-12-05 08:38:03 +00:00
Christian Stenger
fa2c95f221 CppCheck: Fix compile for namespaced Qt
Change-Id: I676799ff449cffb129df10f8a8ef29a8af012ced
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-12-05 08:21:07 +00:00
hjk
1d32219eca Qmake: Simplify use of helper for creation of shadow dir paths
Change-Id: Iabe22a53f51e3475854e47af9e7f7efae6e16d1b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-12-05 08:15:19 +00:00
Sergey Morozov
0aa95576c2 Cppcheck: Add ability to manually run cppcheck
Run cppcheck on selected files from current project via "Analyze"->"Cppcheck...."
Show results in a separate view in the same manner as ClangTools plugin.

Fixes: QTCREATORBUG-21673
Change-Id: Ibcaf4057a387a990f1da59025f15ba58f996953f
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2019-12-04 18:15:41 +00:00
Miikka Heikkinen
f021680513 QmlDesigner: Fix selection box size calculations
Selection box for zero size items ended up being infinite, which broke
some functionality like fit to camera. Now boxes should be correctly
zero sized for non-model items. This also fixes issues with parent
box size if it has zero size children.

Change-Id: I3c8fae3ee971fbb0cf9e0de2615c107ce97a76f8
Fixes: QDS-1287
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2019-12-04 14:24:53 +00:00
Nikolai Kosjar
07490e76de ClangTools: Print elapsed time on finish
...as this is useful to know for some bigger runs.

Change-Id: Ib4cc68ea4a3bed21ac7e632213e92e26be03d978
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2019-12-04 14:08:33 +00:00
Nikolai Kosjar
ab47d562a1 ClangTools: Provide more information if plugin tests fail
Print the error text we are showing in the info bar. For example:

  QWARN  : ...testProject(simple.pro) Error: Failed to build the project.
  FAIL!  : ...testProject(simple.pro) 'finishedSuccessfully' returned FALSE. ()

Change-Id: I7df91909dc4974a2c3aa9d44cb7511222517198c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-12-04 14:07:36 +00:00
Nikolai Kosjar
07ec6de8d9 ClangTools: Improve filtering
Replace the filter line edit in the toolbar by a tool button that pop
ups a dialog. In the dialog, the available checkers can be
selectd/unselected to filter the diagnostic view. Also, the diagnostic
view can be limited to diagnostics with fixits so that these can be
selected and applied as the next step.

For convience, add also some context menu entries to modify the filter
with regard to the current diagnostic.

Change-Id: Ifba3028805840658d72a39516c2b02da9864d4a6
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2019-12-04 14:07:04 +00:00
hjk
92bb42dd36 ProjectExplorer: Drop calling updates on RunConfiguration creation
Likely a leftover, and not needed anymore. All user visible
RunConfiguration go through Target::setActiveRunConfiguration
sooner or later, which trigger ProjectExplorerPluginPrivate
::activeRunConfigurationChanged which also updates actions.

Change-Id: I9e7b570f74a83d353155249e183cee1755196c51
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-12-04 12:52:57 +00:00
hjk
f2065b32b5 iOS: Remove no-op reimplementations of IosDeployStep::{from,to}Map
Change-Id: I8e3a6faf931faa8f67bd97ed9d381cd62079602d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-12-04 12:41:57 +00:00
Alessandro Portale
b5499f0360 Android: Don't attempt to handle a non-existing qt_live_viewer.apk
This remove 4 failed adb calls if the qt_live_viewer.apk is missing
(which it always is).

Task-number: QTCREATORBUG-23313
Change-Id: I8dbf833b35a9386d8d87f72c043dd019c62b4467
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2019-12-04 11:56:19 +00:00
hjk
bd63a47d67 iOS: Use new central RunConfiguration::update
Change-Id: If19926aac16b501aee7a1117c7915f915af061fc
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-12-04 10:16:34 +00:00
Christian Kandeler
62455bea60 Output panes: Handle the case where an output chunk is split
...right between '\r' and '\n'.

Change-Id: Id372cd9a099ef933af4836e20aebc1fc0fd8d5a8
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2019-12-04 10:08:46 +00:00
Miikka Heikkinen
0758b58ceb QmlDesigner: Fix planar scaling randomly setting the third axis to zero
All the math before checking if the scaling axis is zero can cause
enough rounding errors to make qFuzzyIsNull to not think the value is
zero anymore, so check increase the check range.

Change-Id: I776d44886f061be6c1fd91c09eb8efcfb29e0936
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2019-12-04 09:54:37 +00:00
Miikka Heikkinen
4ce7f39e4e QmlDesigner: Fix 3D edit gizmos orientation and rotation order
When selected node has non-default rotation order or orientation,
gizmos need to account for that.

Change-Id: Ie3817fd057b43f708ac1feea3e98e1e44f56d66a
Fixes: QDS-1290
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2019-12-04 09:54:26 +00:00
hjk
d79c76eb11 ProjectExplorer: Make enabled state updating part of runconfig updates
RunConfiguration::update() is becoming a central place acting on
requests to act on interesting changes, triggering notifications
to "the outside" from there is natural.

Change-Id: I159cb548c159a607e2628a178362987fb37b59e3
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-12-04 09:43:51 +00:00
hjk
6771a46928 Cmake: Remove unused code
Change-Id: I7305ad6f853c6645cc34ca66fc602f0b58982f60
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-12-04 09:24:52 +00:00
Christian Kandeler
056080b599 Output panes: Fix newline handling
On repeated invocations of OutputWindow::appendMessage(), embedded
newlines would simply disappear because of an off-by-one error.
The only reason this was not observed all the time is that the relevant
code is only run for process output, which usually comes in larger
chunks, so that the whole output would get procecessed in a single call
to appendMessage().

Fixes: QTCREATORBUG-23300
Change-Id: Ibd10d33462d1922671c3cd9325adbbf2841bfa06
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2019-12-04 09:18:11 +00:00
Leena Miettinen
a198b37eda Doc: Remove known issue that has been fixed
Change-Id: Ib9d1b25373070647c99eb756232d426253094b18
Reviewed-by: hjk <hjk@qt.io>
2019-12-04 09:06:43 +00:00
hjk
d61773fa25 QmlDesigner: Suppress warnings if Quick3D is not used
Amends d076c59429.

Change-Id: I3cba673b7cdd4e99541581008bedfb6d0d333339
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2019-12-04 09:01:04 +00:00
Leena Miettinen
02c1fc0def Doc: Fix navigation links after structure changes
...in Qt Design Studio manual

Change-Id: I6ff4aac1d142fc474fcafa85bc5cb3b5b8fa7675
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2019-12-04 08:44:10 +00:00
Nikolai Kosjar
26b34a0cd4 Debugger/Dumper: Fix dumping CPlusPlus::Token
Change-Id: I368f5227ecb675a653f65d76e83622305390b5ff
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-12-04 07:38:01 +00:00
Christian Stenger
5311f8c20f Squish: Fix compiler detection
Find clang and clang++ in more than one location. If they could
be found in more than a single path provided inside PATH we
expected only the first occurrence.

Change-Id: Ibcd7b7b6dff1153fd4b52b055c0fb2a0c5d9d7fc
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2019-12-04 06:28:45 +00:00
Cristian Adam
ba31c5d554 CMake Build: do not fail to install on missing targets
The install target will install all targets that what have been built.

If some plugin is not being built (all Clang* plugins) by not having
the necesssary dependencies, it's not a failure not to have that plugin
at installation time.

Change-Id: I78b71a3fcae462d3eae7520744bfebab3f924bb4
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2019-12-03 15:00:37 +00:00
BogDan Vatra
ce95e31766 Fix debugging armv7a & x86 when running on 64 bit targets
We need to choose the preferred ABI based on what it's in the package
not based on what Qt supports.

Change-Id: I243fbf67913af7804af868d507323c0934ad3752
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2019-12-03 14:15:20 +00:00
BogDan Vatra
6954e51174 Android: Don't add contains(ANDROID_TARGET_ARCH,..) scope for Qt 5.14
Starting with Qt 5.14 we don't need "contains(ANDROID_TARGET_ARCH" scope
as we are doing multi abi builds in one go, therefore
contains(ANDROID_TARGET_ARCH,...) won't work anymore.

Fixes: QTBUG-79948
Change-Id: Icc989e4dfd48c765340569dcb547e8d0d2b1e8f1
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2019-12-03 14:12:58 +00:00
BogDan Vatra
23de4630fc Android: Fix pid type
PIDs on Android (also on linux) are int64 not int

Change-Id: I6611361d4f7ab66018b3174e8fe64a41fa111350
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2019-12-03 14:01:24 +00:00
Ulf Hermann
0f239f6c48 QML Designer: Link qtquickplugin against QtQml
Otherwise you cannot use the qtquickcompiler.

Fixes: QTBUG-80470
Change-Id: I6f03dddb79d17ee8a784831b91e46910909e3ec4
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2019-12-03 13:38:49 +00:00
Leander Schulten
6168c3b675 GenericProject: Do not ignore flags that are not in the first line
Now flags in all lines of the .cxxflags and the .cflags files are parsed. Not only the flags in the first lines of these files.

Change-Id: I2abddbfce9888dd9cb94aa75b562dc86997bdf48
Reviewed-by: hjk <hjk@qt.io>
2019-12-03 13:28:33 +00:00
Nikolai Kosjar
ccc81cc760 ClangTools: Clean up handling of output files
Do not remove the output files after the runner invocation since they
will be removed later anyway due to the use of a temporary dir.

For debugging, allow to prevent deleting the temporary dir. This allows
easier inspection of the actually generated output files and also
enables us to import the diagnostics again without actually running the
tools.

Change-Id: I39e04d6debc2ffa5c15e836729a4b7c7d8a3798c
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2019-12-03 13:24:35 +00:00
Nikolai Kosjar
fbd350f31f ClangTools: Introduce an info bar
...displaying status information and errors.

Change-Id: I4f86b440b28e82786299700dee572e77de7334f3
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2019-12-03 13:24:24 +00:00
Nikolai Kosjar
7bb333f15a CppTools: Add convenience functions to ClangDiagnosticConfig
Change-Id: Iebf01e1ab71dc3500cc6e492c525735f300272ca
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2019-12-03 13:24:11 +00:00
Nikolai Kosjar
4d09e77719 ClangTools: Move checkbox from view's header to toolbar
Avoid the following issues with the diagnostic view's header:
* Clicking on the header to reverse the sorting is somewhat pointless as
  there is only one column.
* It takes vertical space.
* The checkbox to select/unselect all fixits for application is hacky,
  not drawn nicely on Windows and macOS and its position is somewhat
  problematic as on hover the dock widgets handles are popping up.
* To check the check box, one needs to click within the check box
  rectangle, which is a pretty small area of the screen.

Instead, add a proper checkbox with a label to the toolbar (apparently
this needs some adaptions to our ManhattenStyle). By positioning it
before the "Apply Fixits" button, we can streamline the work flow.

Change-Id: I4ff40c3641487428feb1cd8305470dc5219d048c
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2019-12-03 13:23:58 +00:00
Nikolai Kosjar
dcb35676df Clang: Clean up TidyMode/ClazyMode enumerators
Change-Id: Ie3ff0d629fd3c115df9c527e9ae8d7962fcfa156
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2019-12-03 13:23:38 +00:00
Nikolai Kosjar
7d851c12ed ClangTools: Remove pointless "Disable" setting for clang-tidy
...as unchecking the root item in the tree has the same effect.

Change-Id: I960ea2c09a71dad3b0ba3dfb38a19055653354cd
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2019-12-03 13:23:26 +00:00
Nikolai Kosjar
0d7a30cdfe ClangTools: Query the tools for supported checks
...instead of hardcoding them for a particular version of
clang-tidy/clazy.

While at it, move also the tidy/clazy widgets to ClangTools as this
simplifies feeding data to them.

Reduce also the built-in configs to a single one using clang-tidy's and
clazy's default checks as they look very reasonable and saves us some
porting effort. Also, our previous built-in configs were just too
numerous.

Change-Id: Ib9297acb7810a940b86a23a8695530506a570394
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2019-12-03 13:23:13 +00:00