Commit Graph

909 Commits

Author SHA1 Message Date
Eike Ziller
9d8a419d10 Remove qmake build files
Removes qmake as a build system for building Qt Creator itself.
Keep them for some tests that are not completely moved to CMake yet.

Change-Id: I846c6ef65626b6dfae6375fdc85d00677aa8c2fb
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-01-20 12:18:15 +00:00
Christian Stenger
3989245562 AutoTest: Allow handling of maximum warnings for QtTest
If the maximum number of warnings is reached the test will be
canceled automatically. Allow to handle this from the user side
in case it might be needed.

Fixes: QTCREATORBUG-26637
Change-Id: I239eca280cdc2ce46f6d64cd53b8f3ad0205f7f2
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-12-10 05:42:03 +00:00
Eike Ziller
d422b408e0 Merge remote-tracking branch 'origin/6.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri

Change-Id: I32991a77e52831dd2e24cf4a51ec252998c2d743
2021-12-09 12:04:32 +01:00
Petar Perisin
0b736c3f7a GTest: do not change arguments order of testRunner
transforming list of args to set can change order
of arguments as well as count, which can make
application unable to run

Change-Id: Ib8164e0b7661511f738bdc3b21e74fbaaa6a5252
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-12-08 09:06:00 +00:00
Alessandro Portale
df1876f0d0 Remove nested margins in project panel wigets
While maintaining the margins in the respective option pages.

Change-Id: Ia7c0e9f68ab196be0d68632117041eca9f4b15f5
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2021-12-02 08:08:14 +00:00
Christian Stenger
c65ec79481 AutoTest: Move benchmark icon to Utils
Make it available for others.

Change-Id: I423dec664a263f5586d98ac387b871b6cf8162d9
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-11-23 06:05:09 +00:00
Eike Ziller
ff5bfe6f0f Merge remote-tracking branch 'origin/6.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri

Change-Id: I366a1a0e378811dfc9b4e6f42ec96426dbb15356
2021-11-15 13:14:24 +01:00
hjk
66900b1deb Autotest: Simplify ITestConfiguration::executableFilePath()
Change-Id: I7a3cdcc896b073a5cc24d00487902f4baff8719c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-11-12 11:08:18 +00:00
Eike Ziller
164aae53d2 Merge remote-tracking branch 'origin/6.0'
Conflicts:
	src/libs/utils/theme/theme_mac.mm
	src/plugins/android/androiddeployqtstep.cpp
	src/plugins/debugger/lldb/lldbengine.cpp

Change-Id: I5f2c62e0bce6c91a53a554b3278dbe23ff7dde36
2021-11-11 13:04:42 +01:00
Jarek Kobus
e3acfcbe60 Remove unneeded includes of ApplicationLauncher
Touching applicationlauncher.h caused recompilation of 455 files.
This reduces it now to 250 files.

Change-Id: I4f347d67695db40ea139faf7d36cfe02f1c32258
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-11-10 08:27:32 +00:00
Jonas Singe
ce924f74b6 AutoTest: Set gtest_catch_exceptions=0 during debug runs
This allows the debugger to show the code location from which
an uncaught exception originates.

Change-Id: I6edbc381a4028e95d1844affac85a79ecdf55197
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-11-08 17:06:50 +00:00
Christian Stenger
7b6f1000c6 AutoTest: Improve handling of pch usage
Using a regular expression to search for possible macro usages
will not omit commented out lines.
So, check matches for being commented out to be able to filter
out false positives.

Change-Id: Ie8f982ef418a4538e87567354adb0eb54ea918de
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-09-24 04:34:02 +00:00
Christian Stenger
c141b0d8f9 AutoTest: Support some ctest settings
Add some useful settings for ctest based testing. Adapt output
parser accordingly to get at least relevant output and display
significant information inside the visual display.
Current implementation loses or mixes some information when
running jobs in parallel.
Complete output is still available inside the text display.

Fixes: QTCREATORBUG-26029
Change-Id: Id040f83900a6cfd89f5c2aff987278a297aa14c4
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-09-21 04:31:34 +00:00
Eike Ziller
342a24d56a Merge remote-tracking branch 'origin/5.0'
Change-Id: I0ef7cd302ba7cba64fec401f3426dd682b8dc036
2021-09-15 11:18:11 +02:00
Christian Stenger
0f58258e04 AutoTest: Silence soft assert
We synchronize the test tools now earlier and may
not have finished setting up the configuration of
the current project.
This means the project might have no valid target
yet.
Amends 481070d808.

Change-Id: Ic0c1817318a343e68587930c492397a6094a4ce2
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-09-15 08:13:54 +00:00
Eike Ziller
3d4d7c7e14 Merge remote-tracking branch 'origin/5.0'
Conflicts:
	src/plugins/clangtools/clangtoolssettings.cpp
	src/plugins/clangtools/executableinfo.cpp
	src/plugins/clangtools/executableinfo.h

Change-Id: Id8caf63e3e594792467d3447870086bd2d8f73b9
2021-09-13 17:03:55 +02:00
Eike Ziller
8e51295959 Merge remote-tracking branch 'origin/5.0'
Conflicts:
	src/libs/utils/processreaper.cpp
	src/plugins/clangcodemodel/clangmodelmanagersupport.cpp
	src/plugins/cmakeprojectmanager/cmakeprocess.cpp

Change-Id: Ie248bcb02a80f3e02ab19d73033ce2ba31e7fd83
2021-09-07 11:05:40 +02:00
Christian Stenger
481070d808 AutoTest: Fix test tools handling for project settings
Fixes restoring project settings with enabled test tools but
having globally disabled these.
We need to take the real active state for test tools into
account not only the global one.
Kind of enhances b99d7623f3.

Change-Id: I29c8cc4fff7c82140da41d3c85823d5980c96d9f
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-09-07 08:06:03 +00:00
Christian Stenger
b99d7623f3 AutoTest: Fix synchronizing test tools
It is wrong to query the global active state when
adding test tools known to be active.

Change-Id: I89ab292e1a71b43757e6308fa4b4c584d62fe28b
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-09-03 07:13:23 +00:00
Christian Stenger
e76f83aa90 AutoTest: Silence deprecation warning
When using Qt5.11+ we run into some deprecation warning
for the logging handling on Windows.
Silence this by specifying the new environment variable
as well which is checked first.

Change-Id: I1ca2b826de4516c606b260d053b949b5761c8414
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-09-03 07:13:18 +00:00
Christian Stenger
368a6614f3 AutoTest: Fix getting more output from ctest on Windows
When running ctest with Qt based tests we missed output coming
from qtestlib.
Due to running a separate QProcess we need to force the output
on stderr to be printed not via the Windows debug console.

Change-Id: Ie3b957230836efd59f11b6a1e7ac310fa44fa073
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-09-03 07:13:12 +00:00
Christian Stenger
d59f0f1051 AutoTest: Do not unnecessarily update QmlJS code model
We forgot to update the timestamp indicators which lead to several
triggered updates e.g. when modifying and storing a qml file inside
a watched directory.

Change-Id: I30858ea9e8073d648a84c7f188dff18ddef5b1c1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-09-02 08:43:11 +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
Jarek Kobus
cd3f82f247 Pass QFutureInterface by reference
No need for a copy.

Change-Id: I0308da77199942ef49e36fb04e81713cb9d9a901
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-08-30 12:06:12 +00:00
Christian Kandeler
a952500e90 CppTools: Use only const pointers for ProjectInfo and ProjectPart
All members were already const, but this makes it clear at all points of
use that these data structures are immutable.

Change-Id: Iea615c090bde462c445d15223caccc561b0c713d
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2021-08-27 10:53:54 +00:00
hjk
584217a52f Use more FileUtils based file dialogs
Change-Id: I1e7ec0493c26afe58e17afb8923a2b1023f6dcd4
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-08-19 08:33:22 +00:00
Eike Ziller
94d352ab28 Merge remote-tracking branch 'origin/5.0'
Conflicts:
	src/plugins/autotest/testresultdelegate.cpp

Change-Id: If172206f231fc2a9f4a672cd2e6eaeaea4988c96
2021-08-18 16:14:24 +02:00
Christian Stenger
0d23a3b886 AutoTest: Handle resizing appropriate
When the user resizes QC and has a test result selected which
contains multiple lines these lines will be re-evaluated
and may now end up in having more or less lines than before.
We need to inform the UI that this caused a change of the
needed size otherwise we end up in omitting lines or adding
empty lines.

Task-number: QTCREATORBUG-26122
Change-Id: I91b0271975f8f0fff128ef7cf6c74947c0162ea9
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-18 11:54:07 +00:00
Christian Stenger
017416e327 AutoTest: Take indentation of sub items into account
Otherwise we might end up losing final lines depending on
the output and the need of wrapping the text.

Fixes: QTCREATORBUG-26122
Change-Id: I724bacfa8be37a056f56a67fce4b724d367fda4a
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-18 11:53:14 +00:00
Eike Ziller
6d44c28f0a Merge remote-tracking branch 'origin/5.0'
Conflicts:
	src/libs/utils/qtcprocess.cpp

Change-Id: I1f7419d927e8534dfdcd10db998f97a6efd4d3e4
2021-08-18 09:48:39 +02:00
hjk
bd4a501f15 Replace some uses of HostOsInfo::withExecutableSuffix with FilePath
Change-Id: Id72e9fd04dd4995ff2775ee919f747018cbcc339
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-17 11:48:48 +00:00
hjk
f4c57a7857 Autotest: Remove unused TestConfiguration::setExecutableFile
... and a few unncessary namespace qualifications.

Change-Id: If1dde79a0b6b68ba8706faf038c3512f0b3e666f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-17 11:00:41 +00:00
Christian Stenger
b489afd91b AutoTest: Fix gathering failed Qt based tests
Omit special and test data functions while collecting
as these cannot be addressed at all.

Change-Id: I3d79192cd07b4e7e2e76f04dfad36ef033593e71
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-08-17 10:17:30 +00:00
hjk
52e5023bcc ProjectExplorer: Use Utils::CommandLine in ProjectExplorer::Runnable
Change-Id: Id965f1f9047dcbc3ea5c9ddaa550d12668cf8ae6
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-13 15:04:30 +00:00
Christian Kandeler
33108795d6 CppTools: Turn some classes into pure value types
ProjectInfo, ProjectPart and ProjectUpdateInfo used to carry pointers
to Project and/or Toolchain, even though they were used in contexts
where these pointers were either unsafe to access or not guaranteed to
be valid anymore, which made their use difficult and error-prone.
We turn these classes into pure value types by copying in all relevant
information before the first async operation takes place.

Fixes: QTCREATORBUG-25678
Change-Id: I1914b0dbda6c7dfba6c95e5e92f2d69977755590
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2021-08-13 12:35:49 +00:00
Eike Ziller
c7168d1063 Merge remote-tracking branch 'origin/5.0'
Conflicts:
	src/plugins/coreplugin/locator/executefilter.cpp

Change-Id: Iff5b82a9e491b782e4720138904f389d318b005c
2021-08-11 10:10:51 +02:00
Petar Perisin
fe4c046243 AutoTest: Add ability to limit test description
Test description is made of entire test output,
and if it is very big it can heavily limit
test output pane usability.
This commit adds option to limit description size.

Change-Id: I5aae5e460f1939cd94a84ab1ca79f413d66d8bf2
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-10 11:17:27 +00:00
hjk
4a42bcd4e8 Utils/ProjectExplorer: Use FilePath for Runnable::workingDirectory
... and in some using code.

Change-Id: I231ea56628908f7d305d13f07eabe8803fe8a791
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-06 12:51:24 +00:00
Christian Stenger
fec3ef202f AutoTest: Prevent potential nullptr access
Change-Id: I78eb4a5113d23273e9383c86fdefcffea05e0123
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-08-06 12:24:44 +00:00
Tor Arne Vestbø
53b21b7644 Replace uses of deprecated QWARN macro with qWarning
Change-Id: I71ee2cedaf40197ac52f61e74060656fc4b305d4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-08-03 10:03:34 +00:00
Petar Perisin
d005e71da0 Autotest: Add more "without deployment" actions
When debugging tests, if there was no change in code, user should be
able to just rerun tests of his choice. However, currently there are not
so many options to just rerun tests without the build.
This patch adds more options to run tests without deployment, which can
speed up development in some environments

Change-Id: I9f998fee90f2e61a1623bd0840a9d5ddf8eb58d7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-02 10:21:58 +00:00
Christian Stenger
4103dfd6c2 AutoTest: Ensure we construct a file path
The original check that prevented constructing a directory
will be removed.

Change-Id: Ifb7960bfc245b120513ef65a1764ca60c5108093
Reviewed-by: hjk <hjk@qt.io>
2021-07-15 06:58:28 +00:00
Christian Stenger
f922d22ad4 AutoTest: Fix constructing of source file path
Changes in Utils::FilePath need some adjustments to fix the
expected behavior.

Fixes: QTCREATORBUG-25979
Change-Id: Ife35a68458db9ae7c08637687a3fc9acd7d058e9
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-07-14 09:39:51 +00:00
Christian Stenger
355a91f3e1 AutoTest: Fix displaying description for XML output
CDATA is send in chunks and we lose possible newlines as
we handle the output line by line.
Add it explicitly while processing.

Change-Id: I36bad7f23e2b9b3a5ce9ec92d2d1cb6211dd43a6
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-07-09 06:12:04 +00:00
Christian Stenger
7c56923704 AutoTest: Fix location information of data tags
Broke while moving over to use Utils::FilePath and correcting
the varying usages of name.

Change-Id: I6099f5f0dbc022d831fef78652932d69bd2e4326
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-07-09 06:11:57 +00:00
Tim Jenssen
40d03d1896 Avoid size_t to (u)int warnings with auto, where it is possible
Change-Id: I1ec7454ebce59d99bc828bfd5086907eb0905632
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-07-07 17:39:46 +00:00
Eike Ziller
0df677f7ac AutoTest: Guard simultaneous access to header cache
It is accessed from multiple threads at once. Guard with mutex to avoid
crashes.

Amends 64ce2a6f43

Change-Id: I5048e5fcdb27b2492656b302775378829b6da013
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-07 08:45:59 +00:00
Jarek Kobus
c66d678a9d Replace two bool flags with one enum
Since it's not allowed to have both m_fullUpdatePostponed
and m_partialUpdatePostponed set to true, replace these
two flags with one UpdateType enum.

Change-Id: Ia4193dafd234f817d34204709d14f345c0a3b962
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-02 07:51:07 +00:00
Christian Stenger
4430c33458 AutoTest: Fix environment for ctest execution
The build environment may or may not contain the respective
paths to get the tests running, but the run environment
usually must have them correctly.

Change-Id: I392f6b61551b5927646daf3055134628f6d4f536
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-07-02 07:48:41 +00:00
Christian Stenger
2971aac8c2 AutoTest: Handle test crashes inside ctest appropriate
If a ctest run fails to start the test application it will
provide some hints we ignored for the visual output, which
ended up in no result for this test.

Change-Id: Id90c4855163c742484f55f7b422a6f307e7fd861
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-07-02 07:39:27 +00:00