Commit Graph

6116 Commits

Author SHA1 Message Date
Marco Bubke
7595c9f305 ClangPchManager: Handle non generated PCHs
Sometimes we start generation of PCHs but not finish it. In that case we
should redo it at the next start of the backend process. So we now
remove the old precompiled header if we add the task to the queue.
If we successfully generated the PCH it will be set again. But if we
did not it will be read from the database and set to false.

Task-number: QTCREATORBUG-22035
Change-Id: Id53c2b4e4f501fc5ef7830558085607baa6a49f1
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-04-02 12:38:12 +00:00
Robert Loehning
c24fb7c9e9 Squish: Update expected project tree for qbs
Change-Id: Ic6fc1afb7d9ccac526928f596d160573c67be97e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-04-02 11:42:28 +00:00
Ivan Donchevskii
01a528c77a ClangFormat: Fix indentation when empty lines are involved
Unify continuation and new statement to get less false indentations.
Handle one-statement if/else as a special case.
Properly handle empty lines after
 - includes
 - preprocessor directives
 - beginning of the file
 - if/else

Fixes: QTCREATORBUG-22238
Change-Id: Ic334eeca7de47d9fcb74963d2e31711838d04bde
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2019-04-02 11:32:39 +00:00
Eike Ziller
b5e7522237 Merge remote-tracking branch 'origin/4.9'
Conflicts:
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri
	src/plugins/pythoneditor/pythoneditorplugin.cpp

Change-Id: I9a95df5e16b34538539ced7dfc5d326b700794e6
2019-04-02 12:22:48 +02:00
hjk
ad889d6707 Debugger: Avoid looking up QList<QFileInfo> in QDir dumper
Task-number: QTCREATORBUG-22000
Change-Id: Ibb24dc81282118c1f6fe97af451647a54ffcc8dd
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-04-02 06:38:44 +00:00
hjk
c58d56a69f Debugger: Add dumper test for QDir's entryList and entryInfoList
Change-Id: Id3145d0e385120926ef5ff9d8acc743de5b000a8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-04-01 11:58:08 +00:00
Marco Bubke
6effa1822b Clang: Improve project part updating
The project part ids are now already created very early in the database.
This removes some checks because we can assume that an id already exists.
The project part are now completely persistent, so we can read them from
the database and compare them with new generated from a new creator
session. This should help to not recreate the same PCH again and again.

Task-number: QTCREATORBUG-21151
Change-Id: Iced818ff9f7431eaed3e37978087cc0a43b9afda
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-04-01 10:31:38 +00:00
Eike Ziller
60c22e8549 Merge remote-tracking branch 'origin/4.9'
Conflicts:
	src/plugins/qmldesigner/components/propertyeditor/gradientmodel.cpp

Change-Id: I170de608eaae795133105dedb76ae6f93f6e0d92
2019-03-25 11:55:48 +01:00
Christian Stenger
7483ad1f1d Squish: Fix helper function for small resolutions
Depending on the screen size the context menu may be
oriented differently depending on the point where the
context menu had been triggered.

Change-Id: Iae3834283e8e34ed44e57237561f1367cdaae108
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2019-03-21 11:51:01 +00:00
Eike Ziller
b3baed58c6 Merge remote-tracking branch 'origin/4.9'
Change-Id: If36258b8e572b5c7875433a31a836e4f06e27286
2019-03-21 11:28:21 +01:00
Christian Stenger
25f5c26306 Squish: Remove unreachable code
Change-Id: Idc9ced7cbac247cd9333e56be6f78bab70b542f9
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2019-03-20 05:47:51 +00:00
Christian Stenger
89c86cee8d Squish: Add exception logging
Might help to figure out a problem on the build machines.

Change-Id: I1483a508d490e3cd4312d91c62d3e4a2891d0b10
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2019-03-19 18:30:17 +00:00
Robert Loehning
2b33d15bbc Squish: Update menu entry for QML Debugger Console
Change-Id: I0079bfcc22a0d45da72bd8b8ee2728a49d73ef4f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-03-19 10:15:18 +00:00
Eike Ziller
c53ccceff1 Merge remote-tracking branch 'origin/4.9'
Conflicts:
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri
	src/plugins/debugger/debuggerkitinformation.cpp
	src/plugins/languageclient/languageclientmanager.cpp
	src/plugins/plugins.pro
	src/plugins/projectexplorer/kit.cpp
	src/plugins/projectexplorer/kitmanager.cpp

Change-Id: I66fb941202991f35f7d7761430b21e42dfc678a8
2019-03-14 15:51:15 +01:00
Ivan Donchevskii
1b0cba38dd Clang: Fix access specifier for variables
Static members have a variable declaration kind so
we need to check their access specifiers in order to
provide proper information about tokens.

Fixes: QTCREATORBUG-22082
Change-Id: If455174bd346398a2df3499fa6cf1ea2b4e26965
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2019-03-12 14:19:48 +00:00
Ivan Donchevskii
d7eeb0bd90 ClangFormat: Reduce dummy text to minimum size
... and tweak continuation dummy text to fix the indentation
for the line with existing text inside parenthesis.

Change-Id: Iaebd2f58823fcbeed24bb7e47769af53261c18ca
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2019-03-12 10:45:46 +00:00
Ivan Donchevskii
5333331362 ClangFormat: Tweak dummy text for consecutive empty lines
If empty lines follow each other it makes sense to use
the empty comment as dummy text for all but the last one of them.

This prevents increasing indentation lengths after if (foo) when
there are multiple new empty lines inserted.

Change-Id: I4c948161b674b3af0a131bfb85e7a45a80ed3fb0
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2019-03-12 10:11:12 +00:00
Ivan Donchevskii
cb3a553583 ClangFormat: Indent closing brace on the new line
Sometimes the curly brace also requires indentation.
These are the cases when it comes directly after the
comma, for example inside the initializer list.

Lets handle such cases in the similar way we do it for
the closing parenthesis.

Change-Id: Ia0d25fa08f7224567dd41dd17f9757d9d8b27362
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2019-03-12 10:10:28 +00:00
Ivan Donchevskii
5006bfb157 ClangFormat: Simplify the dummy text for empty line heuristics
The text to fill the empty line mostly depends not on the
fact of being inside parenthesis or not but rather on the
last preceding meaningful character.

Let's check for this character and sometimes for the following
one to better understand the current context and pick the
proper dummy text.

With this behavior improvement we can better indent empty lines
inside initializer lists with empty lines inside.

Change-Id: Id2f27454ef56dfdf8c15b5efb14c4d09242908a9
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2019-03-11 10:32:23 +00:00
Ivan Donchevskii
df23fbdc89 ClangFormat: Improve dummy text guessing for empty lines
Improve detection of the cases when the empty line is inside
the parenthesis to get more proper indentation.

Change-Id: I4aa37c29b17bedcd0e4a781d12c7066e818a07f3
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2019-03-07 14:03:36 +00:00
Ivan Donchevskii
7e5e99d551 ClangFormat: Add whitespace unit-tests and fix bugs
Check that extra whitespace does not prevent the indentation
and that indentation is the same for the consecutive empty lines.

Change-Id: I04aa12c4cd31aaf07daf9320c98d2eea7afcc9a8
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2019-03-06 14:24:07 +00:00
Ivan Donchevskii
35b0b44b21 ClangFormat: Enable includes sorting
Sort includes only in modes when all replacements are
used (manual indentation with "Format instead of indent" selected
and saving with "Format on save" activated).

Change-Id: I73dfa1d3211760269fe7d33a141f4d831ff65c15
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2019-03-06 14:23:55 +00:00
Marco Bubke
70d4e46552 Clang: Rename ProjectParts in ProjectPartsManager
Change-Id: Ia60d78e34a296b0b379339ebc14efd0e81dc8989
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-03-06 11:27:27 +00:00
Marco Bubke
e7fd132d47 Clang: Disable warnings in CommandLineBuilder
Change-Id: I7597d57a0bb97facefb08c9c1bbe6e909c146080
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-03-06 11:24:45 +00:00
Marco Bubke
3e1faec230 Clang: Don't filter source with missing includes
We do now tag and save them. So we can reliably track them.

Task-number: QTCREATORBUG-22035
Change-Id: I49aaeeb76150b7e2d77b863eeb0aedefc9ab50f4
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-03-06 11:24:28 +00:00
Marco Bubke
1a63297d9b Clang: Improve dependency building
We want to use the cached values in the database because it is faster than
to parse the the files again.

Task-number: QTCREATORBUG-22035
Change-Id: I7ada7073887b1d89a06332fdb617701cb69ccd68
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-03-06 11:24:20 +00:00
Ivan Donchevskii
ad8cabdf45 ClangFormat: Do not remove empty lines while only indenting
Insert dummy text into empty lines also for the electic characters
not to remove empty lines when only indentation is intended.

Fixes: QTCREATORBUG-22050
Change-Id: Ife5374459feb510a0587880a6772c90a2d68d70e
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2019-03-06 08:44:22 +00:00
Ivan Donchevskii
2484a5e209 ClangFormat: Do not apply "smart" formatting before new lines
In the concept that behavior seemed fine but in practive it
looks quite strange.

Add comma to the dummy text inserted into the empty line to have
a proper indentation for the following empty lines.

Change-Id: I770af02a475e6489bdc8f44d9f84eb3c5e7398d7
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2019-03-05 13:06:30 +00:00
Orgad Shaneh
495f98b256 UnitTest: Add missing enum
Amends commit f009dad9ef.

Change-Id: I5288297525edc153c1aea81d2cabb1f230a8fcce
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2019-03-05 12:19:35 +00:00
Eike Ziller
0619de8681 Merge remote-tracking branch 'origin/4.9'
Conflicts:
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri
	src/tools/clangpchmanagerbackend/source/taskscheduler.h

Change-Id: I518adaf647df412887c2a372416634359f09ad2a
2019-03-05 10:22:45 +01:00
Marco Bubke
0c177cd0d1 Add ICore::cacheResourcePath()
We need some directory where we save the index database and the precompiled
headers. This files should be persistent but the user can delete them
if he wants because we will rebuild them.

Task-number: QTCREATORBUG-22012
Change-Id: I9f25eb48a9992d6385a96427ef9c10bc739a3567
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-03-04 16:43:09 +00:00
Marco Bubke
2358415b58 Clang: Move fetchPrecompiledHeader to PrecompiledHeaderStorage
It went for historical reasons in the symbol storage.

Change-Id: If05edb868901884f3951d0eb2f152566e99b4d1a
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-03-04 13:40:39 +00:00
Christian Stenger
e31020a60e Squish: Fix expected default setting
Pre-compiled headers are no more ignored by default.

Change-Id: Ia107495626f8050fb2537443ef69ea732a93b530
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2019-03-01 13:54:32 +00:00
Orgad Shaneh
cbfc6e522d Merge remote-tracking branch 'origin/4.9'
Change-Id: I801042a53ae4d02d1891ea582ca9ea89b00d3181
2019-03-01 13:06:57 +02:00
Christian Stenger
87f9429807 Squish: Adapt to changed menu entry
Change-Id: I4d3d49c4feb11cbdca9390748d99891928a35c00
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2019-02-25 18:07:27 +00:00
Christian Stenger
3621079f76 Squish: Fix tst_APT03
This patch amends 80cd9cfa8a.

Change-Id: I9d70708e76cc1cf409d4b9a177ccf58ae3ecc496
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-02-25 12:06:53 +00:00
Christian Kandeler
1487997551 Qt plugin wizard: Fix excess whitespace
Amends 075e1da67e.

Fixes: QTCREATORBUG-21974
Change-Id: I4216b06ac9753e552e34575ff10f3789ff5ad8dc
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2019-02-25 08:40:11 +00:00
Ivan Donchevskii
8a93074d0e ClangFormat: Fix the indentation for lines starting with ')'
Fix the insetred text position for such cases.
In the 'smart indentation mode" do not indent empty lines above
the current one but apply the formatting for them instead.

Change-Id: I4cfe7f9778bac5e311aa339e2fcfc717f436cb20
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2019-02-22 13:05:18 +00:00
Marco Bubke
f009dad9ef ClangPchManager: Show extra progress for dependency building
Task-number: QTCREATORBUG-21956
Change-Id: Id244c9ef9fc7825489daa143b21fcca78164d8c7
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-02-22 12:09:09 +00:00
Marco Bubke
8c781f7e6a Clang: Fix progress bar
Sometimes the messages are not send immediately, so we force it.

Task-number: QTCREATORBUG-21957
Change-Id: I9526cb4b4e3dd8b7a02e15f77bffdc51917d47c8
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-02-22 12:09:00 +00:00
Nikolai Kosjar
61775a844e Clang: Build clangformat only if clang/Format/Format.h exists
...in the LLVM_INSTALL_DIR.

Change-Id: I974f32759bca7fb467524bf61ff7967098748f0e
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-02-21 09:10:03 +00:00
Nikolai Kosjar
56584b1dde Clang: Fix unit test build without QTC_ENABLE_CLANG_LIBTOOLING
Change-Id: Ifa6588d1427489e8ae98ea8093d5d94049c270ee
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2019-02-20 13:20:56 +00:00
Ivan Donchevskii
2c6bda5950 ClangRefactoring: Map unsaved files with non-native paths in ClangTool
Otherwise the ClangTool complains that it does not see them.

Change-Id: Ib616058584f8f95229213224cec98fa6b6f7522b
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2019-02-20 13:20:31 +00:00
Christian Stenger
c219b00ca3 Tests: Fix test expectation
And disable the check for Qt < 5.11 as we fail
to get the respective information there.

Change-Id: Ie21115f4de81c046028ab1df6f5cd8397d0f75dd
Reviewed-by: hjk <hjk@qt.io>
2019-02-20 12:15:20 +00:00
Eike Ziller
7f4c6e38bf Merge remote-tracking branch 'origin/4.9'
Change-Id: I0d3db14e583628b906d7fdeb800e004d98e52632
2019-02-20 10:05:07 +01:00
Christian Stenger
064f43fecf Dumper: Add dumper test for QSizePolicy
Beside this fix handling of QSizePolicy for
namespaced Qt.

Change-Id: Icf4e3574f97653a7bd4d8b696c87c17ef4defefa
Reviewed-by: hjk <hjk@qt.io>
2019-02-20 05:53:36 +00:00
Ivan Donchevskii
d3ceb9ce62 Unit-tests: Fix the debug build with MSVC
Change-Id: I99fd6db6406b088cab0538b07cd20ca1427a5f71
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2019-02-19 15:22:04 +00:00
Nikolai Kosjar
0f8612f20f Clang: Move unexported classes to Internal
Change-Id: I3ea197b734f146d4b11431aaf927aed9be7d8756
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-02-19 14:09:43 +00:00
Ivan Donchevskii
be65a57935 ClangFormat: Fix unit-tests
Amends dcf763c7ee.
Change the logic in empty lines modification to properly
indent all empty lines.

Change-Id: Id945cf66915dfd192216660543594a7905426761
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2019-02-19 12:47:22 +00:00
Christian Kandeler
08e1fbbbfa qmake: add $$read_registry() function
Fixes: QTCREATORBUG-21973
Written-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
(cherry-picked from qtbase/f89ac0101ad4a6cb5339a3bfe132aad897eafc9d)
Change-Id: I6f67eec7c715686074dd3bdc121170c26daf56da
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-02-19 09:29:29 +00:00