Commit Graph

5613 Commits

Author SHA1 Message Date
Robert Loehning
cf3772ca77 Squish: Update testing ProjectWelcomePage
Used by tst_session_handling and tst_WELP02.

Change-Id: I28bdececac39719372834c373f82ac9e99beb613
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-11-05 05:42:53 +00:00
Eike Ziller
53819123e7 Simplify RPATHs for qmake build
Use central rpath.pri for setting RPATHs and qttestrpath.pri for tests.
Simplify install names of plugins and libraries on macOS to be just
@rpath/libName, which follows convention better and makes setting up
RPATHs easier.

Preparation for moving tools one directory level down on macOS, to
be able to add a qt.conf for the tools generically.

Task-number: QTCREATORBUG-23120
Change-Id: I16625d48904abd3a7f4c2ad7bbba5916cdc400cd
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-11-04 10:31:55 +00:00
Robert Loehning
aad5fb339d Squish: Update QmlJSEditorWidget
Change-Id: I783849086d59d51d51dfbc560e3d6c8e298ccd71
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-10-30 11:39:36 +00:00
Robert Loehning
40fb68d18d Squish: Remove outdated comment
Change-Id: I4aeee19ada28ad536994d3b6ec164429b3fc90c4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-10-29 18:17:46 +00:00
Robert Loehning
4f2f86b5bf Squish: Skip testing Qt Quick 2 Extension Plugin wizard
We're not doing anything in it anyway.

Change-Id: I5d790d98c8952e6167bfe241af5490cf18622890
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-10-29 12:36:43 +00:00
Christian Stenger
bf698f5a2f Unittest: Fix warning
Change-Id: Ie78646d82786ad8836f289ba53382dad2d51d3f5
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2019-10-25 05:21:20 +00:00
Christian Stenger
99deb21b7a Squish: Adapt verification of kits
Kits are nowadays displayed if configured, but disabled
if they do not fit for the respective project.

Change-Id: If04a20afde2fc1ada643e45d5eea33e6ace7a4f1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2019-10-24 09:37:12 +00:00
Nikolai Kosjar
8f6eb41cad Clang: Ensure that platform codegen flags get also filtered
Leave the function addExtraCodeModelFlags() around as it's used by
ClangPchManager::ProjectUpdater::toolChainArguments().

This allows us to filter out excess target arguments in a follow-up
change.

Change-Id: I742d713dd1ca6c391ba77c52555dcf4e94cc2ff9
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2019-10-22 11:46:42 +00:00
Robert Loehning
35fe01c6e9 Squish: Update expected label text
Change-Id: If17465530ca06f5d4d1ae06db1f8175ecdd92fd1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-10-21 09:34:53 +00:00
Christian Stenger
cc67ad8736 Squish: Adapt handling for project creation
Some templates got an additional page for handling translations.

Change-Id: I420e4f1bd8be5a30056220abd73b3f9da44d5047
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2019-10-21 09:34:20 +00:00
Laurent Montel
f467badc2f Port setMargins to setContentsMargins
Change-Id: Ie6b3f3e4dddbbf4bcc7ea7561ec348ff2c666907
Reviewed-by: hjk <hjk@qt.io>
2019-10-16 05:02:57 +00:00
Christian Stenger
982344a799 Dumper: Remove old workaround
This part had been added for lldb provided by Xcode 8.
Even LLDB 3.10 is rather old, so probably no more necessary.

Change-Id: I823ee15869cc60cb8504fa6969758b5f7c3a74ab
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2019-10-15 04:42:06 +00:00
Nikolai Kosjar
6ee08c0289 Clang: Simplify include paths in tests
* The paths on Linux are always "canonicalized" by
  GccToolChain::gccHeaderPaths(). Therefore, canonicalize the paths in the
  tests, soo.
* Introduce some helper functions to shorten the code.
* Do not break the strings literal paths as this complicates comparing
  them.

Change-Id: I0fc8acde0e455a7974baae0d9fdffd3a4060ff74
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2019-10-11 13:08:46 +00:00
Nikolai Kosjar
6156c59c62 Clang: Put clang's resource dir after /usr/local/include
...also on Linux.

That's what clang invoked from the command line does.

Change-Id: I59c48d11fab3b944bb42ca7bb4cd9093a735df60
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2019-10-11 13:08:28 +00:00
Nikolai Kosjar
5165c037eb Clang: Avoid consuming gcc internal include paths
Given the (default) include paths of GCC, e.g.

 /usr/include/c++/7
 /usr/include/x86_64-linux-gnu/c++/7
 /usr/include/c++/7/backward
 /usr/lib/gcc/x86_64-linux-gnu/7/include
 /usr/local/include
 /usr/lib/gcc/x86_64-linux-gnu/7/include-fixed
 /usr/include/x86_64-linux-gnu
 /usr/include

discard gcc-internal paths like /usr/lib/gcc/x86_64-linux-gnu/7/include
as they are not relevant for clang and even confuse it with regard to
 #include_next.

Paths below the gcc install dir are considered as gcc-internal. The
install dir is queried with

  $ gcc -print-search-dirs

Some GCC distributions, like MinGW, ship the standard library headers in
the install dir. Ensure to not discard these.

Fixes: QTCREATORBUG-22898
Change-Id: Ia85258fb01b72ad073e71390e003fe8268e3b01f
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-10-11 12:49:06 +00:00
Orgad Shaneh
facebc6184 CMake: Fix build with Clang 9
Change-Id: Idf82175de1670259abd27df54b2c776e943a11e8
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-10-10 15:59:34 +00:00
Ulf Hermann
3d21c7fdc3 Retain ".pragma library" when reformatting JavaScript files
For ".pragma library" there is a special flag in QmlJS::Directives.
We just need to actually set the flag and query it when re-emitting the
code.

Change-Id: Ia3455fda18aba3219b02ecf092bb28987a6ccef5
Fixes: QTCREATORBUG-22326
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2019-10-10 14:05:18 +00:00
Nikolai Kosjar
ea0b7e4563 QmlJS: Fix build of tst_check.cpp
tst_check.cpp:151:36: error: reference to 'Type' is ambiguous
In file included from src/libs/qmljs/qmljscheck.h:30:0,
 src/libs/qmljs/qmljsstaticanalysismessage.h:42:6:
	note: candidates are: enum QmlJS::StaticAnalysis::Type
 src/libs/qmljs/parser/qmljsast_p.h:347:46:
	note:                 class QmlJS::AST::Type

Change-Id: I2f2af3e19fc0cbb7cef359c28d5f5d1505778882
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-10-07 08:03:46 +00:00
Eike Ziller
4f0ffcecbe Merge remote-tracking branch 'origin/4.10' into 4.11
Conflicts:
	src/plugins/projectexplorer/projectnodes.h

Change-Id: Ibd255105a01c53a1f81a1ec7b30495dfef1877a9
2019-10-04 12:19:32 +02:00
Christian Stenger
ea829fa6d5 Squish: Workaround bad focus issue when using Squish
When interacting with the file dialog QC seems to lose its
focus and never gets it completely back.
This in turn makes lots of short cuts useless and (context)
menu entries disappear or being disabled.
Avoid this by explicitly closing the popup of the line edit
if there is one.

Change-Id: I79f86b3133d2d0780d73d75e15416d59f35dfa1e
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2019-10-02 19:32:00 +00:00
Eike Ziller
ac014e3875 Merge remote-tracking branch 'origin/4.10' into 4.11
Conflicts:
	src/plugins/projectexplorer/projectnodes.h

Change-Id: I10a749cca38c2d0929cf4d2b74ab089e14b6157b
2019-10-02 07:32:57 +02:00
Christian Stenger
93e725c17c Squish: Update UI tour handling
The UI tour is no more offered as modal messagebox
but a small banner frame on the bottom.
Close this the same way we closed the messagebox to
avoid interfering tests.

Change-Id: I40ab675330aa8c40efe5bbd386d2d6bd051ccb4d
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2019-10-01 19:51:45 +00:00
Christian Stenger
17f5e19399 Squish: Stabilize tests that rely on a parsed project
As more and more progress bars might be present for different
purposes and we are not able to easily distinguish them
we need to use a more reliable way to wait for the end of
parsing a project.
Add a respective function and use the new approach where
this appears to be appropriate or necessary.

Change-Id: I20e2b9b0efd4785f8f0b1ddbc8496be111628669
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2019-10-01 06:11:42 +00:00
Eike Ziller
0491c1c06c Merge remote-tracking branch 'origin/4.10'
Change-Id: I4a22cdf4d7d5aab2083d5f9f7baaa38e510f83fd
2019-09-23 12:31:58 +02:00
hjk
89a36c7232 Debugger: Show FORTRAN strings
Fixes: QTCREATORBUG-22976
Change-Id: Ib435b2692301fe2e2d3378623e99bbcf16e27e46
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-09-23 08:50:17 +00:00
Cristian Adam
4a20a596c8 CMake Build: Use shared precompile headers
This will make the build directory size smaller, as only two
pch files will be generated. Not one for every target.

Change-Id: I3eec91e7536eab1c62bff8843f075f0ef7b5fff6
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-09-19 11:38:34 +00:00
Eike Ziller
097892cc10 Merge remote-tracking branch 'origin/4.10'
Change-Id: I887fbf79ebfdf2af2719cb0d8aa56ab3dcb08fab
2019-09-17 16:20:52 +02:00
David Schulz
f0ad5813b9 LanguageClient: more FileName to FilePath renaming
Change-Id: I803211d462b442b6881a02e870d2cd816675e0d9
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-09-17 08:15:40 +00:00
Christian Stenger
6808c891fb Tests: Fix expectation for parent of COM port
Keep expected path in line with result when using QFileInfo.

Change-Id: I8d323212d1627b81de01582c368a4e9ffbba734c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-09-12 08:50:22 +00:00
Eike Ziller
8df0653bf8 Merge remote-tracking branch 'origin/4.10'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri
	src/plugins/projectexplorer/gcctoolchain.cpp
	src/plugins/qmldesigner/components/stateseditor/stateseditormodel.cpp

Change-Id: Iffdf48e782a734107ea170ebb3812e997cea0e7b
2019-09-12 09:08:04 +02:00
Eike Ziller
ed9177f74c CppTools: Move ProjectUpdateInfo to ProjectExplorer
Used for updating project parts, so move it near RawProjectPart.

Change-Id: I77aeffbdbfb3d2ec0de600f61dcf7fbb7a355a98
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2019-09-12 06:37:41 +00:00
Eike Ziller
9cc45fe1fb CppTools: Move RawProjectPart to ProjectExplorer
Doesn't have any dependencies into CppTools anymore, therefore moving it
reduces the dependencies of the project managers to CppTools as well.

Change-Id: Ibe728abe59eb88a8877943dca1f48a85163e27ac
Reviewed-by: hjk <hjk@qt.io>
2019-09-11 06:22:12 +00:00
Cristian Adam
486aaabd21 CMake Build: Use same Qt compiler defines for tests
Source code needed adjustments though.

Change-Id: I78b4610a6bb895a385c7c30a6c92c97a276b89dd
Reviewed-by: hjk <hjk@qt.io>
2019-09-10 15:05:59 +00:00
Eike Ziller
8452264a18 CppTools: Move QtVersion and BuildTargetType
QtVersion to utils/cpplanguage_details.h which already contains similar
flags.

BuildTargetType to ProjectExplorer, next to BuildTargetInfo (but not in the
same header to not pull that in everywhere).

Removes dependency on ProjectPart from RawProjectPart.

Change-Id: I5791065e4266f20c2657ee4b1b594df04b238a1c
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2019-09-10 07:31:21 +00:00
David Schulz
d72632acd6 Debugger: add dumper for std::initializer_list
Change-Id: I223182cecf1f04dbc9908dc993a8800c1633c48b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-09-09 11:35:24 +00:00
Cristian Adam
ad0dcb9668 CMake build: Build fix for tst_debugger_simplifytypes
simplifytype.cpp is included also in tst_debugger_dumpers, which
has a GUI pch.

Because CMake has global internal file structures, simplifytype.cpp
will get the PCH flags from tst_debugger_dumpers, which will be
reused in tst_debugger_simplifytypes.

This patch makes sure the PCH from tst_debugger_dumpers has all
the dependencies in tst_debugger_simplifytypes

Change-Id: I715cb551f2f75a619b21999ea521976470068c3f
Reviewed-by: hjk <hjk@qt.io>
2019-09-06 09:25:59 +00:00
Nikolai Kosjar
e6d16b6747 ClangTools: Support loading exported diagnostics
Add a new toolbar button to load diagnostics exported with

   $ clang-tidy -export-fixes=/path/to/file
   $ clazy-standalone -export-fixes=/path/to/file (master version)

Change-Id: I8316fe0706a18222e68220ef4fbfdc7ae8d09804
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-09-03 09:39:48 +00:00
Nikolai Kosjar
0ba729e527 Import YAML-Parser yaml-cpp
Version: tags/yaml-cpp-0.6.2
  License: MIT

yaml-cpp requires c++11 and since yaml-cpp 0.6 there is no dependency on
boost anymore.

A YAML parser is needed for the ClangTools plugin to parse exported
diagnostics from clang-tidy/clazy:

  $ clang-tidy -export-fixes=/tmp/tidy.yaml source.cpp

The imported source is stripped of unneeded files as documented with

  src/libs/3rdparty/yaml-cpp/patches/0001-yaml-cpp-Strip-unneeded-sources.patch
  (generated with "git format-patch -D")

Change-Id: Ib0a521b5aff4b1cd058eb480bfb99fde4b320dc7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-08-30 08:42:22 +00:00
Marco Bubke
99e841d140 UnitTests: Add return value to mock function
Otherwise we try to get access a negative index. The real implementation
will never return a negative value, so the shouldn't the mock function.

Change-Id: I369e168bd18530b39fa5e2a622a716b30b8b344c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-08-27 11:54:06 +00:00
Marco Bubke
9f805b7e8a ClangRefactoring: Improve follow symbol and usage
Change-Id: Idb42010443e4560489ef067e54d05b4e567598e9
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-08-27 11:53:45 +00:00
Marco Bubke
c174eb378a Clang: Reduce database accesses
If we prefetch data from the database to the caches we reduce the database
transaction calls which are quite expensive.

Change-Id: I617a0d886807402e0a94291a913a77f989970b55
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-08-27 11:53:32 +00:00
Marco Bubke
e0ca44e7bc CLang: Improve locking in StringCache
If there is no mutex we can skip some calls.

Change-Id: I3f2cc2d8da142bab28ace496a59711346aa1b5a0
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-08-27 11:52:56 +00:00
Marco Bubke
199746143a Clang: Bulk add project file paths to database
This project part container generation because there is not anymore one
single access to the database for every file path.

Change-Id: I5f82022262fe89a976729d48ee4f098b74a1e1d1
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-08-27 11:52:09 +00:00
Marco Bubke
947cb9ed4e Clang: Improve file path cache
Change-Id: I940dc63c0fc95fbb826ed7d19a1ac1e4db5a542c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-08-27 11:51:56 +00:00
Marco Bubke
f9fb4508d4 Clang: Optimize file path cache
We now fetch all directories and sources from the database at file
path cache creation.

Change-Id: I92510b49a234128f4c82b840611db82ead3f1a54
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-08-27 11:51:28 +00:00
Marco Bubke
4280a68d9f ClangPchManager: Watch unchanged PCHs
Change-Id: I7f4c0f12e4fbf3714e5bfe7655cfa13cac85f71f
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-08-27 11:50:52 +00:00
Marco Bubke
56d611e0a3 ClangPchManager: Update PCHs if time stamps of dependencies changed
If there is a newer file than the last indexing or if a file is added or
removed from the project or system PCH we have to reindex the project and
maybe the system PCH.

Change-Id: Ibce2a244190a79b5c422c469c065ddc11e44b2cb
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-08-27 11:50:39 +00:00
Marco Bubke
f1be7793c4 ClangPchManager: Expose more internals from BuildDependenciesProvider
We will need it later.

Change-Id: Ic2c85780bf965be8e4c8603fed365d806576fdc6
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-08-27 11:50:26 +00:00
Marco Bubke
d086bbdc9a ClangPchManager: Fix transactions in precompiled header storage
Change-Id: Ia0333ef7110c97a42d73c70c33157849323fb34d
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-08-27 11:50:15 +00:00
Marco Bubke
578b70e998 Clang: Add fetchTimeStamps to PrecompiledHeaderStorage
Change-Id: I75552a971fbc39a81e14e3b9ec0c5125d3858025
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-08-27 11:50:02 +00:00