Commit Graph

6116 Commits

Author SHA1 Message Date
Eike Ziller
6d43aaf134 Merge remote-tracking branch 'origin/4.9'
Change-Id: I7bdb6a4658c5fca1a7e1dda5adbb5613dabc6d18
2019-02-19 09:08:53 +01:00
Ivan Donchevskii
29492ecf24 ClangPchManager: Do not build pch and index inactive project parts
Some project parts should not be built as well as some files
can be inactive inside project part.
We should not try to build pch-s or index them.

Change-Id: I8e62365b817a424ae38a0df94b6703820a4cde9d
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2019-02-19 07:34:19 +00:00
Ivan Donchevskii
7f461b2e22 ClangFormat: Clean up some code and and few unit-tests
Check the context related stuff and remove the restriction
to format after the stream operator.

Change-Id: Iaa2d32c9bffe7a0eeb7e8ade39f109b529e1eab0
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2019-02-19 07:33:20 +00:00
Ivan Donchevskii
9bcc871ece ClangFormat: Format multiple text ranges at once
'reformat' function in LibFormat accepts mutilple ranges.
Let's provide the ranges for the same file together when
formatting on save and formatting after fix-its.

Change-Id: I27789da83a1efc27beb57acf238508a191562bb9
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2019-02-19 07:33:13 +00:00
Marco Bubke
1ce0db8270 ClangPchManager: Filter system include search paths
We want the include paths from outside the project handled as system
include paths. This is speeding up the PCH creation.

Task-number: QTCREATORBUG-21955
Change-Id: Ic80102f46f5a14897c7ef43da5efd4c0f88abbbc
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-02-18 14:30:15 +00:00
Marco Bubke
337155a648 CppTools: Add project directory filter to HeaderPathFilter
For the indexer we want to filter every not builtin include search path to
as system include search path which is not inside of the project or build
directory.

Change-Id: I33663a1f3eb53ec39d5b16a8ca64b57d1b57bd9c
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-02-18 14:30:02 +00:00
Marco Bubke
35c9e65d3e Clang: Disable min and max macros
Change-Id: I75f930053ca514dbd32366c628e7e4916ba8550a
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-02-18 12:42:00 +00:00
Marco Bubke
2bd0c7c276 ClangPchManager: Don't watch generated files
Task-number: QTCREATORBUG-21983
Change-Id: I80af39278140c48c8740c83af85596d3ee9bf2da
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-02-18 12:41:40 +00:00
Marco Bubke
3154002fb6 ClangPchManager: Fix PchTaskMerger
We forgot to remove the duplicates for used macros.

Task-number: QTCREATORBUG-21955
Change-Id: I051b8199ba5dd0a173d80c9e526bf745d3bcd777
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-02-18 12:41:28 +00:00
Marco Bubke
716a96a55b ClangPchManager: Add dependency building to progress counter
Task-number: QTCREATORBUG-21950
Change-Id: I409b03d53b374c5bf66ba6c7c9e50e98a7b239c4
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-02-18 12:40:58 +00:00
Ivan Donchevskii
29758d8364 ClangFormat: Add missing .clang-format file for tests
Change-Id: Ia15b4d7c4546be2375807b1d59b5e3d65b06ab4f
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2019-02-18 12:26:50 +00:00
Orgad Shaneh
6fc532f812 Merge remote-tracking branch 'origin/4.9'
Change-Id: If4e8f52fc94c4e5fd9ec69c9000436d4ded913ff
2019-02-15 13:42:44 +02:00
Alessandro Portale
603191ba77 Application icons refresh: Qt Creator == "QC"
This change replaces the existing application icons with the newly
designed ones.

Task-number: QTBUG-70826
Change-Id: I379ac8b5f64c4394c45c95fc4f8d7feb8bdfac69
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-02-15 10:28:51 +00:00
Christian Stenger
f3110a4c1c Squish: Fix tests for Qml locals view
Nowadays the locals and expression view displays the
QQmlEngine as well, adapt tests accordingly.

Change-Id: Ide6d3ae4e6dd8a136e44f196773a88a8aa29c702
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2019-02-15 06:44:45 +00:00
Christian Stenger
f9b8f1471f Squish: Fix expected file content
Change-Id: Ie47b63593e5fae203fdf329ede46d425f27cf735
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2019-02-14 14:04:03 +00:00
Christian Stenger
a112ca317b Squish: Fix verification of tool tips
Change-Id: I12487c784cf784ca7ddf705895c99f0ed912b0f4
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2019-02-14 12:58:43 +00:00
Christian Stenger
ac4ec98735 Squish: Adapt test for wizard pages
There are nowadays two additional application templates
for Qt for Python.
Additionally remove no more existing template.

Change-Id: I717adb78e1873f0609a050364034694a7c270055
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2019-02-14 12:58:27 +00:00
Christian Stenger
605fe1dfd9 Squish: Update menu item for 'Find Usage'
Change-Id: I6fdf9f9a1c697ad403473b795d4848aa4e519cb0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2019-02-14 10:39:56 +00:00
Marco Bubke
a33bce9e91 Clang: Fix command line builder
Add "-nostdinc++" only for C++.

Change-Id: I21228fca80045b040877328f41ca0edb4f227fcc
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-02-14 10:09:38 +00:00
Robert Loehning
80cd9cfa8a Squish: Update tst_APTW03
Change-Id: Iace2557625f538ebac09191043ae0d653face121
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-02-13 14:43:54 +00:00
Christian Stenger
5e1167facd Tests: Fix contradicting declarations
Change-Id: I684bad06ff0f1dbc6375da96457135d6f7287120
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2019-02-13 13:58:40 +00:00
Christian Kandeler
babb0166fe qrc parser autotest: Fix qmake build
Amends 2f7f1aaec3.

Change-Id: Ice5db9b7e789edcf9aa9b15f3dd49eacc1ca09a2
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-02-13 13:20:31 +00:00
Christian Kandeler
2f7f1aaec3 Move qrc parser from QmlJS to Utils
We'd like to make use of it in a more general context, and it's not
directly related to QML.

Change-Id: I025ec67829f85544667684cdb8c99d1ee4c18197
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-02-13 11:48:27 +00:00
Robert Loehning
4b8200086b Squish: Fix handling of "Take a Tour" in startCreatorVerifyingClang
Change-Id: Ica4414c6e284af69aedf06b7d56b7e72587c7e90
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-02-13 10:05:42 +00:00
Andre Hartmann
456bcc2da8 ProWriter: Remove foreach and forever
Change-Id: I817cbab3b126d2e246a00c36bf3ecfb138dffdbe
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2019-02-12 16:16:46 +00:00
Marco Bubke
44d5e10185 ClangRefactoring: Fix progress counter
We use threads now and the code had to be adapted.

Task-number: QTCREATORBUG-21950
Change-Id: Ie96c5bea1fa045588d0c5a8b18bfd1ccb5d9fdd9
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-02-12 14:02:12 +00:00
Marco Bubke
97ec6b9ad2 ClangRefactoring: Don't update the database if something went wrong
We can get an compile error. In that case we should not update the
database. In the future we should have a mechanism to report about the
database state.

Task-number: QTCREATORBUG-21949
Change-Id: I203346d536b007171f7bf255047409431c44a85a
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-02-12 14:02:02 +00:00
Marco Bubke
c52c531c3f UnitTests: Move symbolscollector data to sub directory
Change-Id: Id1a123f745a0f092aeff9589aa146feb49d31661
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-02-12 14:01:50 +00:00
Robert Loehning
c2f57e51d6 Squish: Small fixes in tst_APTW03
Change-Id: I3ef8de3c994b34368cbe218e8a5141e47e08723f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-02-12 12:20:33 +00:00
Marco Bubke
ffa043fb99 Clang: Improve performance by reducing parsing
We generate one big file per project part so the preprocessor is skipping
the recurring includes.

This generated many errors about missing macros but we don't care
much about them during dependency collection step so we just
silence these errors with ignoring diagnostics consumer.

Change-Id: I5581d623b5d5f9995496252735577ea6b54790d9
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-02-11 15:23:26 +00:00
Ivan Donchevskii
7fe65851d9 Clang: Extend ClangTool and CommandLineBuilder
We now support source file and not only header files and the file path is
now automatically added to the end. This removes quite some clutter.

Change-Id: I74eabd262e6c7e5f4d523e3a3cd194bd3efe1ef3
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-02-11 15:22:58 +00:00
Christian Stenger
0a28cf70fe Squish: Fix generic highlighter test
This is now using KSyntaxHighlighter, adapt accordingly.

Change-Id: Ie5dac469d326c5165f5f8513bc3adc5f6be5e48b
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2019-02-11 14:19:58 +00:00
Christian Stenger
0624944a24 Squish: Fix expected color
Change-Id: I9f0b1ceb1b927c86b1f4fc08c0fb2f17ce4f2975
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2019-02-08 15:59:20 +00:00
Christian Stenger
b0795c3210 Squish: Fix expected Qml error
Change-Id: I06395d6c0643c86a13f97a77c3c82771be9a1de3
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2019-02-08 15:45:13 +00:00
Ivan Donchevskii
1f804e7fc7 ProjectExplorer: Add MSVC2019 flavor support
It is promised to be compatible with prior versions.

Change-Id: I85e433382a66c82e9880401c3a983fef06c03606
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-02-08 14:04:06 +00:00
Ivan Donchevskii
dd778bcb23 Clang: Use full paths in compilation database for symbol collector
We we FilePath and NativeFilePath so that compiler warns us if we mix them
up.

Change-Id: I33d7abc7e4e724dff2a9b2b9b23deea8b358ccfd
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2019-02-07 15:03:39 +00:00
Robert Loehning
8e888df852 Squish: Update FancyToolButton
Change-Id: Ia8c8b270ee2147a63eb1b90d14ff0792bfa95cd2
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-02-07 13:34:44 +00:00
Marco Bubke
4da11c355f ClangPchManager: Don't generate a PCH header file any more
We used an extra process to generate the PCH but now we use clang tooling
so we can utilize the in memory file system.

Task-number: QTCREATORBUG-21933
Change-Id: I1c1d39248e9513c87269d854c35d38b373b0f515
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-02-07 12:51:00 +00:00
Eike Ziller
a0969a3c09 Merge remote-tracking branch 'origin/4.8' into 4.9
Change-Id: I216c7dcbef1e840751332e7a6558c9d633444af3
2019-02-07 10:03:28 +01:00
Ivan Donchevskii
7d64c9e3ec Clang: Fix some issues with running indexer over Qt Creator
- fix qDebug channels on Windows
 - fix the number of perameters in the sql statement
 - fix nullptr access
 - speed up preprocessor a little bit

Change-Id: Ic9b32fbcc6b409c4064c4f522b94391cbff8654e
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2019-02-07 07:45:24 +00:00
Eike Ziller
f369556dca Merge remote-tracking branch 'origin/master' into 4.9
Change-Id: I0768e59f13f2fae0bdf13047431de9fac870bf74
2019-02-07 07:43:26 +01:00
Nikolai Kosjar
b9d3055e72 Clang: Allow to forward warnings flags from build system
Change-Id: I47ebb1ce4f3b5544408eb1d0f891ed5090394282
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-02-05 11:36:55 +00:00
Christian Kandeler
69565d6c88 QmakePM: Respect editor settings when adding files to project
If the user wants to indent with tabs, then consider that when adding
source files via the UI. But try not to mix: If the respective variable
already uses a different indentation consistently, then keep using that
one.

Fixes: QTCREATORBUG-8016
Change-Id: I037c9ac4d4e7fbbe5753a846e57d938bbb440d6a
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-02-05 11:31:52 +00:00
Marco Bubke
0082a82fc6 ClangPchManager: Merge system pch tasks
The merging of the include search paths is quite heuristic but we could
provide an option to disable pch merging so users can decide themselves.
Maybe we could give user feedback why we cannot merge but this is quite
advanced.

Task-number: QTCREATORBUG-21381
Change-Id: Iac6af0c587b631d2151f63d6d97215ed6919819f
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-02-05 11:07:14 +00:00
Marco Bubke
14a44948d8 ClangPchManager: Fix deferred project parts
Change-Id: Ie760c0dd269c643a147d7edf3f1b812cd27fe4c4
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-02-05 10:16:47 +00:00
Marco Bubke
cd868e8a7b Clang: Fix crash on exit
There were threads running but the instances they called were already
deleted. Now we delete the scheduler first which is the thread holder and
which is waiting that all threads are finished.

Task-number: QTCREATORBUG-21882
Change-Id: I2e9f4d8381d79fab9a93346cef6598ab8e8f7850
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-02-05 10:16:14 +00:00
Ivan Donchevskii
536b733f29 ClangFormat: Format more code while typing
With the extra option "Format while typing" checked try to format
text before the current position without breaking the current input.
To accomplish that we make proper choices which replacements to apply.

The advantage of this change is to decrease the need to manually
format code which is just written.

Some minor bugs are fixed during the testing of this change.

Change-Id: Ibed569042e6c46a881e7a83b1882cf2bb23b3626
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2019-02-05 08:36:06 +00:00
Robert Loehning
2cb872a192 Squish: Close "Take a tour" popup after startup
Change-Id: Ie5edf4a3a9a90b52e3a5e74e7e17e2bd66c38841
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-02-04 14:20:56 +00:00
Robert Loehning
522a90913a Squish: Add name of FancyTabBar object
Change-Id: I1cbd1af800731e2c9908604ecaa5c0513410e55c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-02-04 13:37:55 +00:00
Robert Loehning
a7bbcb8e39 Squish: Stabilize tst_simple_analyze
The total time may be more than 1s when
the CPU is busy. Ignoring this column.

Change-Id: I9c80fecb618bcad1bc3e7922c5a573964cd019a4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-02-04 13:14:24 +00:00