Commit Graph

38 Commits

Author SHA1 Message Date
Christian Kandeler
ead181e385 ClangFormat: Move tests into plugin
That's where they belong

Change-Id: I78e33e76a2f42f05961f6fab31da5f3dd583a2e9
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-01-20 10:27:13 +00:00
Eike Ziller
1df8dd3c93 Revert "Revert "Use QtcProcess for clangbackend""
This reverts commit d65e47b5c6.
Reverts the quickfix for the performance regression of code completion.
Followed by a minimal fix.

Task-number: QTCREATORBUG-26829
Change-Id: I1afe71c24ee94caadd4fa849c29f6fc030fb1a8b
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2022-01-06 14:34:35 +00:00
Cristian Adam
d65e47b5c6 Revert "Use QtcProcess for clangbackend"
This reverts commit 8724a4efbb.

The above commit made code completion 3-4x slower on Windows, and
8x slower on macOS.

Fixes: QTCREATORBUG-26754
Change-Id: I02424a40e10de2baf3fd01f19f9094c8e82f684a
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-01-04 18:01:57 +00:00
Jarek Kobus
8724a4efbb Use QtcProcess for clangbackend
Change-Id: Ifdcdba765409a09861f81dd3dff405115a986801
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-09-03 14:06:56 +00:00
Christian Kandeler
284817fae6 Merge CppTools into CppEditor
There was no proper separation of responsibilities between these
plugins. In particular, CppTools had lots of editor-related
functionality, so it's not clear why it was separated out in the first
place.
In fact, for a lot of code, it seemed quite arbitrary where it was put
(just one example: switchHeaderSource() was in CppTools, wheras
switchDeclarationDefinition() was in CppEditor).
Merging the plugins will enable us to get rid of various convoluted
pseudo-abstractions that were only introduced to keep up the artificial
separation.

Change-Id: Iafc3bce625b4794f6d4aa03df6cddc7f2d26716a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-09-01 14:53:58 +00:00
Christian Kandeler
3edc5822da Unit test: Remove unused ProjectExplorer sources
Change-Id: If30f601955d287ab4db719f0499c9e92e6eefe02
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-07-26 10:11:19 +00:00
Christian Kandeler
1275a12582 CppTools: Move SendDocumentTracker tests into plugin
Change-Id: I1d0532b5d0e155f6d53c683d01c4a92e4bae3ce9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-07-22 08:55:46 +00:00
Christian Kandeler
da588b7cc4 CompilationDatabaseProjectManager: Move tests to plugin
Change-Id: Ife4ee68cdbd1560830f294610f8fab40653a4f5b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-07-22 07:45:19 +00:00
Christian Kandeler
1e912f7318 Unittest: Remove unused MockCppModelManager
Amends baa83725f6.

Change-Id: Iaee3b79d8aabcac5dee238692d66472881263764
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-07-22 07:30:44 +00:00
Christian Kandeler
a3d621fbde CppTools: Move ProjectFileCategorizer tests to plugin
Change-Id: I51d66d9ff9a14e2dd04cf25448ccc8c85bcbce97
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-22 07:29:46 +00:00
Christian Kandeler
0adb502457 Unit test: Remove some now-unused CppTools sources
Change-Id: I61a0d15ade5093c6e7eeb005efed5704764fe7a1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-20 12:38:28 +00:00
Christian Kandeler
18ab828b6b CppTools: Move HeaderPathsFilter tests to plugin
Change-Id: Iecbb0942bed51002e85b96f6cc2ab034622cd07f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-20 09:35:52 +00:00
Christian Kandeler
5ec52eef31 CppTools: Move ProjectInfoGenerator tests into the plugin
Change-Id: I40d4b0b9751e77a5bb605349c86b37ad3935ca59
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-16 12:09:48 +00:00
Orgad Shaneh
84839ee397 Merge remote-tracking branch 'origin/5.0'
Change-Id: Ia018600fb257c9523fc9d15faa5bd8300840e3de
2021-07-05 12:17:45 +03:00
Christian Kandeler
32f46e55ed CppTools: Move ProjectPartChooser tests into the plugin
Change-Id: Ic2ef95d4d6a5bd65cbc611b66a0b297c7468bbcb
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-05 07:38:10 +00:00
Christian Kandeler
01a6e40377 Unit test: Fix qbs build with internal gtest
Change-Id: Ied99b436ae234e7be3944e71d0f6d13fc5f7b2f3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-02 13:29:02 +00:00
Christian Kandeler
85797068bb CppTools: Move CompilerOptionsBuilder tests to plugin
... where they belong.

Change-Id: Ifc6aebc218f9f85ffeb6a4b7121f97379b53b69d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-02 13:12:54 +00:00
Eike Ziller
baa83725f6 Remove ClangRefactoring and ClangPchManager
This removes the plugins and tools, and removes all the tests that would
fail to build because of that.

Fixes: QTCREATORBUG-25659
Change-Id: I8adb5d503fc8eea313bcaada421f309dbbfa8c26
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2021-06-15 10:07:57 +00:00
Christian Kandeler
98012fb89d Unit test: Fix qbs build
Change-Id: I6046fe9b99e288dcd14a763bce9c337ab45c2eb5
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-03-30 11:15:09 +00:00
David Schulz
33359883f2 Fix qbs unittest build
Change-Id: Ifb7f564217921c9907dd7e300bc1c31ad7ae1536
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2021-03-30 10:25:00 +00:00
Marco Bubke
7785a3a651 Sqlite: Move result count to class declaration
It move the magic number of column results to the sql statement
and improves the mock a little bit.

Change-Id: I101067444cf27ec5dea0c72de7fd484a7e8710f0
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-03-26 12:24:37 +00:00
David Schulz
7fc015aca9 UnitTest: Fix debug qbs build against release llvm
Change-Id: Iadc073f3904123f62b642843bd94935476055555
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-01-08 13:36:10 +00:00
Christian Kandeler
f72c2b84f7 Unittest: Fix qbs build
The image test uses unexported classes from QmlDesigner. Let's just
remove it.

Change-Id: I42cae90d7333bf1ad7f75839c93eef773cb5fab8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-10-19 15:34:18 +00:00
Marco Bubke
d1b0c12d6b QmlDesigner: Add image cache
The image cache is saving images and icon of this images in a sqlite
database. If there are no images they are generated in the backgound.
The icons are fetched by item library.

Task-number: QDS-2782
Task-number: QDS-2783
Task-number: QDS-2858
Change-Id: I5a32cccfef7f8fd8eb78902605a09f5da18ce88e
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-10-16 10:01:21 +00:00
Christian Kandeler
92cce87433 Unit test: Fix qbs build
The CLANG_UNIT_TEST macro was set unconditionally.

Change-Id: I1a8f16e2e295bda46fc60aab342a74f9675100cc
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-10-07 14:48:34 +00:00
Christian Kandeler
c229c667cf Unit test: Support qbs build with googletest submodule
This is necessary to be able to build on Windows.
Also add an include to fix building with clang 12.

Change-Id: I9278a2c942a5e50c89c3aac19492f3a1ef3177b1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-09-21 10:31:30 +00:00
Eike Ziller
5ad724c61b Merge remote-tracking branch 'origin/4.13' into master
Conflicts:
	src/plugins/qmakeprojectmanager/qmakeproject.cpp

Change-Id: Ieb1c3e946f11d3c4fa1ee6b5afdf83cc532d8aed
2020-09-17 10:28:19 +02:00
Christian Kandeler
d14be7493f ClangBackEnd: Support highlighting of alias templates
Fixes: QTCREATORBUG-24552
Change-Id: I80d2b16114234cf896173cd4104e6a5f12009f69
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-09-14 11:42:09 +00:00
Eike Ziller
3944162039 Merge remote-tracking branch 'origin/4.13' into master
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri
	src/plugins/cmakeprojectmanager/cmakebuildstep.cpp
	src/plugins/cmakeprojectmanager/cmakebuildstep.h
	tests/auto/debugger/tst_namedemangler.cpp
	tests/auto/qml/codemodel/check/tst_check.cpp

Change-Id: Iefd5f71c03c0078513b76a92af764a4fb22ee4c2
2020-08-10 15:56:54 +02:00
Christian Kandeler
c24320123b qbs build: Fix spurious re-resolving
The pluginjson module records the VCS state by default, which means qbs
re-resolved the project after every git action. Prevent that.

Change-Id: I24cf1d658ba847b327be018749806856a6e7da1b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-07-31 08:13:40 +00:00
Christian Kandeler
cf20d44b4a qbs build: Make unittest work with sanitizers
Change-Id: Ie6153a4505f42a1c9754d6af951c72df0065ec1c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-07-28 13:33:51 +00:00
Eike Ziller
d400dce35d Require GCC 7 and enable C++17
Fix MSVC2019
- result type of conditional expression is ambiguous:
  types 'const char [1]' and 'QByteArray' can be converted
  to multiple common types

Fix MinGW 8.1
- undefined reference to SemanticHighlightNotification::methodName

Fix Utils::transform with std::vector for GCC & MSVC

Unfortunately we cannot get rid of the special variant and optional
implementations, because Apple Clang requires deployment target >= 10.14
for the functions that can throw std::bad_optional_access.

Fixes: QTCREATORBUG-20520
Change-Id: I5c36a70f21f8b0215d2f4fc5c0653a022778d928
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-07-10 11:52:24 +00:00
Christian Kandeler
4c2938a366 Fix qbs build
Change-Id: Ic19d1f42d98a0bec31f2f5788063f6b2e7d61cef
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-07-03 14:49:01 +00:00
Christian Kandeler
0861ba2fc9 sqlite: Fix qbs build
Exporting the full sqlite interface can lead to run-time conflicts with
the system sqlite that Qt's SQL support pulls in.
So re-build the sources for the unit test, as in the qmake build.

Change-Id: I8394b9c0aa4e21704bc84600f40b8f5d706ad66d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-06-16 12:43:00 +00:00
Christian Kandeler
ff348e0dcc Unittest: Fix qbs build
Change-Id: I2f573b820745ecbbf5fc00931b4f96b3d43f634a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-06-12 09:15:19 +00:00
Christian Kandeler
9c3d4dcc88 qbs build: Make the pkg-config dependency in unittest.qbs non-required
We don't want an error if pkg-config is not installed.

Change-Id: I142abe3d21649a9010b91707532eb733e2103583
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2020-05-26 13:10:22 +00:00
Christian Kandeler
c9672f4ffa qbs build: Fix unittest project file
There were some subtle errors that lead to test failures.

Change-Id: Ibea24a8a45a47a5c3239da77bd4ed7ddca61ec57
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2020-05-26 13:08:32 +00:00
Christian Kandeler
b92c22a102 qbs build: Add project files for clang unit tests
Change-Id: I2cd02d94fb886bb49c66fa2508a63dc3480a7c23
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2020-05-19 09:26:45 +00:00