Commit Graph

61529 Commits

Author SHA1 Message Date
Marco Bubke
ec3c7946af UnitTests: Fix compile without Clang
I moved the clang depend code under the condition that it is only compiled
if LLVM is present.

Change-Id: If1e37f677464ff38833c81dbebdfe8eaa563cdde
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-07-16 08:19:06 +00:00
Andre Hartmann
9146d5bd3a FileSystemFilter: Simplify directory handling
Change-Id: I28fbbafdef70c12112aa8803eabdd757aa7c3f09
Reviewed-by: Nikita Baryshnikov <nib952051@gmail.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-07-16 08:16:18 +00:00
Eike Ziller
5af1f95f25 Merge remote-tracking branch 'origin/4.9' into 4.10
Conflicts:
	src/libs/utils/mimetypes/mimeprovider.cpp

Change-Id: If771d3fba60b670cb0de3a43c9039e24c74aabb1
2019-07-16 09:17:45 +02:00
Christian Stenger
1c438aadde Tests: Skip ssh related test conditionally
If there is no ssh tool present in PATH the test will
fail, so do not expect all machines having ssh explicitly
defined in PATH.

Change-Id: Ic56898ac6a31e75cd2efae6f10464a9aab04b326
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-07-16 04:54:16 +00:00
Thiago Macieira
9693882d6d Re-fix QtCore resource path changing and prepare for Qt 5.13
Commit 9cf8ab3b3d added the #ifdef, but
that of course only works if you don't upgrade Qt compared to what Qt
Creator was compiled with. Instead, attempt both paths and only do that
if the system copy is not found.

Searching the system copy is required to address Qt 5.13's configure
option -no-mimetype-database (used by Linux distributions because the
system copy is always present).

This code will still need work to deal with Qt 5.14 changes.

Task-number: QTCREATORBUG-19600
Task-number: QTCREATORBUG-22636
Change-Id: I6aed4df6a12e43c3ac8efffd15ac952a6e9d4770
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-07-16 00:38:52 +00:00
Christian Kandeler
9c39956eab Project tree: Add warning icon to unconfigured project
Task-number: QTCREATORBUG-22682
Change-Id: Ia44a1a518aa842cd13feae945dd87b9318d51f6e
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2019-07-15 14:05:00 +00:00
Christian Kandeler
dcb1e83002 ProjectExplorer: Make sure the target setup page is shown
... when switching to a project that is unconfigured.

Task-number: QTCREATORBUG-22682
Change-Id: I91c6f791677054d2f86a5a5d81003f38ecc812fb
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2019-07-15 13:58:54 +00:00
Christian Kandeler
375e4dee2b Utils: Remove NameValueDictionary::expandVariables()
These functions were inadvertently copied from the Environment class in
4bae5de36b.

Change-Id: Iede8d4b43bd97e8d6d3a0641bd3224e5829fe4b0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-07-15 13:58:26 +00:00
Denis Shienkov
4077bc869c ProjectExplorer: Auto-detect installed GNU tools for AVR on Windows
This patch implements the auto-detection for the installed
GCC embedded toolchains for AVR architecture provided
by "Microchip" (e.g. located in Atmel Studio):

https://www.microchip.com/mplab/avr-support/atmel-studio-7

The detection algorithm does search a toolchain path in a
Windows registry; this will work only if the Atmel Studio
was installed.

Tested on Windows 10 with Atmel Studio v6.2 installed.

Change-Id: Ibd2dd95daf7e9da272611fc32d679852a7f20952
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-07-15 13:34:14 +00:00
Denis Shienkov
68ac9d51a6 ProjectExplorer: Add additional GCC name filters
... which are cover the following names, like:

* "avr-gcc", "avr32-gcc"
* "avr-gcc-4.8.1", "avr32-gcc-4.4.7"

This toolchains can be provided by Atmel for AVR architectures.

Change-Id: Id0928a9464aaf434f4986996068c008d4730a964
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-07-15 13:14:20 +00:00
David Schulz
5da5116cb1 Utils: Add path search function to environment
In contrast to Environment::searchInPath This function
returns _all_ executables found in the path variable.

Change-Id: Ic62b8f70d0690ff9a3261db3ead2c919a2486c89
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-07-15 13:01:25 +00:00
Robert Loehning
9750f2cd67 Squish: Update BuildDirectoryLineEdit
Fixes error in tst_simple_debug on Windows.

Change-Id: Ibb122619539d386010c5015e2f8748aeb936baef
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-07-15 11:21:32 +00:00
Christian Stenger
7e63ca97de Designer: Fix possible endless loop
Opening a ui file listed in a pri file may trigger this
endless loop by returning always the same project node.

Change-Id: Id1697ea77c39c4693d36fbc3fcd9600b05022e58
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-07-15 11:03:13 +00:00
Christian Kandeler
b4708181c7 ProjectExplorer: Fix ABI unit tests
Amends 6e1595c1b3.

Change-Id: Ib13740e0649114e0389559ac80e73b3e967faa07
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-07-15 10:29:39 +00:00
Alessandro Portale
663e9003a3 Application wizards: Remove duplicate entry in a generated .qrc file
qml.qrc: Warning: potential duplicate alias detected: 'main.qml'

Change-Id: I949fda863175c3de4a828a93ca01620010a44e93
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-07-15 05:38:12 +00:00
Andre Hartmann
b5badf97b7 GenericProposalModel: Modernize and cleanup
Change-Id: Iae0733c9734f63900af32c89f553d6a337b49daf
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-07-14 11:36:43 +00:00
Andre Hartmann
81d417ce36 GenericProposalWidget: Fix typo
Change-Id: I131ccffa3e80092c1b79a28305974c57d32844ea
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-07-14 11:23:01 +00:00
Andre Hartmann
9f136678be FuzzyMatcher: Handle digits as camel hump
Allow searching for "Fancy4PartThingy" with the
more intuitive pattern "f4pt" as well as with the
pattern "fpt" that already worked before.

Fixes: QTCREATORBUG-22671
Change-Id: I3a7c1a5b7f57d2f2bdd7d0c6e23b46f6bbb64d77
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-07-13 19:02:20 +00:00
Christian Kandeler
52a58afc79 ProjectExplorer: Add lld output parser
Fixes: QTCREATORBUG-22623
Change-Id: I2c38466cf7206e07d1cb77520ce502179e3cc82f
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-07-12 14:36:05 +00:00
Tim Jenssen
333b33edbe Merge remote-tracking branch 'origin/4.10'
Change-Id: Iaf27911e4e9fb762c1a24c84c458462bafe95728
2019-07-12 15:53:56 +02:00
Christian Kandeler
f7520b7d99 Make the project managers tell the code model about include paths
... from the environment.

Fixes: QTCREATORBUG-17985
Change-Id: I9b54e550121cfcc0684a6e173337d59d235c6107
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2019-07-12 09:13:42 +00:00
Denis Shienkov
6e1595c1b3 ProjectExplorer: Interpret 'none' compiler part as BareMetalOS
Usually, the GCC compilers with a names like "arm-none-eabi-gcc"
are used for a bare-metal devices.

Change-Id: I30acd554b44ae625383ec615454d258361e78074
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-07-11 14:10:10 +00:00
Nikolai Kosjar
51cd2885ef CppTools: Allow enabling debugging of locator filter tests by environment
Change-Id: I9786b7c6959b77eebb1bc774d2e7bd4c8ed3edeb
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-07-11 14:02:21 +00:00
Christian Stenger
8f6d99dc29 AutoTest: Avoid unclosable progress bar widget
The progress bar widget gets automatically closed if the
underlying future reports that it has finished or got
canceled. This patch ensures to emit the respective signal.

Fixes: QTCREATORBUG-22699
Change-Id: I5c7d2169194e90165fb1c90831cf69c02e029268
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-07-11 13:55:09 +00:00
Christian Stenger
3ea670d207 QmlJSEditor: Remove registration of json files
Do not open json files with the QmlJSEditor as this produces
strange warnings and Json is not JavaScript at all.
Rely on the correct syntax highlighting by the generic
highlighter and KSyntaxHighlighting respectively.
Beside this it helps also when using a json language server.

Task-number: QTCREATORBUG-22697
Change-Id: Iebd0009c550d9ea701d504797d528226dc32b0ec
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-07-11 13:54:57 +00:00
Leena Miettinen
526163cc16 Doc: Add info on Live Preview
The documentation was moved from the Qt Design Studio repository
and edited to make it applicable to Qt Creator, too.

Change-Id: I3072fc712b5ee002cd6e7486927de31f9117d7bc
Reviewed-by: Brook Cronin <brook.cronin@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-07-11 12:51:31 +00:00
Leena Miettinen
f8bebf501b Doc: Fix the batch editing example
Fixes: QTCREATORBUG-20332
Change-Id: I1010ed105fdc5b953f058be578aef62b70be7506
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-07-11 11:22:41 +00:00
Marco Bubke
1841cb1fa5 ClangPchManager: Fix path for excluded include files
Still used the old approach but now it is using the new one.

Change-Id: I4bf4da3a5d41d46afff261f3d77bd9190737038a
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-07-11 09:03:01 +00:00
Marco Bubke
56277de27f ClangPchManager: Protect fetchPchSources
It was not protected by a transaction so it was not thread save.

Change-Id: Ib4529d0e94942d3cbafb46705a0256812908c8c6
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-07-11 09:02:43 +00:00
Marco Bubke
d7e5935396 Sqlite: Handle cases that the database is busy
This should be not be happen but better be save than sorry.

Change-Id: I7b4afe491c07f8d5da2dc13aaffd2f354384a3ae
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-07-11 09:02:23 +00:00
Marco Bubke
10f3621cf1 ClangRefactoring: Test for non existing client
This can be happen as we shutdown the process.

Change-Id: I69f30ed65ef4456abe6d59b4ea188a67c482efe0
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-07-11 09:02:10 +00:00
Marco Bubke
2eb4050acb ClangRefactoring: Make the indexer more robust
We check now if the database is busy. This should not be happen but better
be careful.

Change-Id: I8b667ff183368977991974ea1fe7fcde837e968a
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-07-11 08:59:16 +00:00
Marco Bubke
4526a02e31 ClangRefactoring: Add WAL checkpoint at the end of the symbol storage
Change-Id: I70fde54947a302ae0e45bff083cd5654c86b3891
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-07-11 08:59:04 +00:00
Marco Bubke
b16b8db48b Sqlite: Use newest version
Change-Id: Ic3951b9b38d5bc8cfa658e9cce0d6effaaa329c1
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-07-11 08:58:54 +00:00
Denis Shienkov
e358c169a2 ProjectExplorer: Auto-detect installed GNU tools for ARM on Windows
This patch implements the auto-detection for the installed
GCC embedded toolchains provided by "ARM Holdings":

https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads

The detection algorithm does search a toolchain path in a
Windows registry; this will work only if a toolchain was
installed using the installer.

Change-Id: Ide71fa57e5fa060372439923c8422c33ab81a8a0
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-07-10 16:31:26 +00:00
Denis Shienkov
77c419ee5f Debugger: Auto-detect installed GNU debuggers for ARM on Windows
This patch implements the auto-detection for the installed
GDB debuggers provided by "ARM Holdings":

https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads

The detection algorithm does search a toolchain path in a
Windows registry; this will work only if a toolchain was
installed using the installer.

Change-Id: Ifc55b464f295e2116bf76dcb9555274b65091de9
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-07-10 16:31:12 +00:00
Christian Kandeler
14aa0122e6 Macro expander: Allow alternative substitution character
The forward slash is a poor choice on Windows for fields containing file
paths, as it gets auto-converted to a backslash when used in a path
chooser.

Fixes: QTCREATORBUG-22276
Change-Id: I1d22d2031909b24c72aad4781995418efd394039
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-07-10 13:38:26 +00:00
Leena Miettinen
fc7d505bee Doc: Update info on Clang diagnostics
Update screenshots.

Task-number: QTCREATORBUG-22701
Change-Id: I5c597aba9a99551e18a98bb019ea1f858a8ba8cc
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2019-07-10 13:28:04 +00:00
Christian Kandeler
61b4ef6bfa QbsProjectManager: Correctly categorize cpp.systemIncludePaths
... for the code model.

Change-Id: Ibcbd8d42929373a765adb6bf2a9e9f7f730bdb57
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2019-07-10 11:01:29 +00:00
Leena Miettinen
ff8360921b Doc: Update info on zooming in output panes
Zooming is also available in the General Messages and
Version Control output panes.

Change-Id: I306c9be485640d298d1223f04bf5e7db26dd403c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-07-10 08:51:43 +00:00
Nikolai Kosjar
b6346369eb ClangTools: Fix showing diagnostics outside the project root dir
Accept diagnostics from files that are known to the project
(Project::files()) instead of checking whether they are below the
project root directory (Project::projectDirectory()).

Fixes: QTCREATORBUG-22213
Change-Id: I2f96374d6de3f53b1bd42be875dfe44b25a55fb1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-07-10 07:56:57 +00:00
Nikolai Kosjar
2aa067f28e Clang: Fix adding snippets after opening brace
The regression was introduced by

    commit 82d6d20acb
    Clang: Do not show completions after comma in initializer list

This fixes ClangCodeCompletionTest::testCompleteGlobals().

Change-Id: Ic126f1e3eaed158196268e3682ff32bc02deb7b9
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-07-10 07:56:48 +00:00
Christian Stenger
0d9e8d3e9d Unittest: Fix compile due to ambiguity for older gcc
Change-Id: I4eb2ce1cd0892a50702eacb1b0d6bdf844718c20
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2019-07-10 07:50:52 +00:00
Nikolai Kosjar
44e3e1a43c ClangTools: Sanitize ClangToolsUnitTests
This fixes the currently failing tests

	ClangToolsUnitTests::testProject(simple.qbs)
	ClangToolsUnitTests::testProject(simple.pro)

which produce more diagnostics now due to the upgrade to clang 8.

Sanitize the test by specifying exactly the tidy/clazy checks we are interested
in. This should avoid maintenance on clang upgraded (pulling in new checks that
will fail the test).

While at it, fix writing the settings for the tests, which worked by accident
so far.

Change-Id: If8bf5076ad7141faa93eced611334ac609f0cf92
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-07-10 06:46:48 +00:00
David Schulz
46f7cd08ac Utils: return ChildType iterator in ListModel
Change-Id: I2eeb710ddc8954fe64c6421b8684fb80ed59c13d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-07-10 05:49:32 +00:00
David Schulz
fe61cd6a9e Test: Fix double semicolon
Change-Id: I8f858ef2345f19a0067cbfb4437cb432360e490d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-07-10 05:49:16 +00:00
Robert Loehning
f858eaa9e8 Squish: Update tst_CSUP02
Change-Id: I56fd0375b973141fae4e53352997d0752bfbfcb0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-07-09 16:17:24 +00:00
Nikolai Kosjar
5121c009f6 Clang: Fix use-after-free
...introduced with

  commit d52ac9a708
  Clang: Fix unresolved #includes for ui_*.h headers

ClangCodeModelServer::onJobFinished might take over ownership of the
jobs object. This should be reflected in the JobFinishedCallback as
otherwise we will continue in Jobs::onJobFinished() right into a use-
after-free.

Change-Id: I4b5cbdf781a8e66f45a743c451b4484bf922f720
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2019-07-09 14:21:38 +00:00
Tim Jenssen
cc2b8923dc update image paths in dev package script
Change-Id: I169709e0f7746fdd9b44cf095c2c5249f03658f4
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2019-07-09 12:36:34 +00:00
Thomas Hartmann
cd8b064d76 QmlDesigner: Fix potential crashes
Change-Id: Ieb3211090d16150943fd4d2dd15a4a63ecdae078
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-07-09 12:35:28 +00:00