Commit Graph

104 Commits

Author SHA1 Message Date
Eike Ziller
b0043ed1ac OutputPane: Use setter for priority and fix default visibility
Do not show the buttons of output views with priority < 0 (instead of
only == -1). Reduce the number of buttons that are shown by default to
the essential ones.

Change-Id: I5b44f18537b3033ce9d616f044a8b54b76988783
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-09-18 10:14:51 +00:00
Eike Ziller
053c6253b8 OutputPane: Add an id() for the settings
It was using the displayName for the key in the settings (visibility and
shortcut), which is annoying when changing the language.

Change-Id: Iffa784347c59389599c90f468dcba15834599c39
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-09-18 10:14:42 +00:00
Eike Ziller
409a4c972a OutputPane: Use setter for display name
Change-Id: I2e89fbd052330c9e7124272c2f2fa81a0db94de9
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-09-18 10:14:35 +00:00
hjk
a475632c66 Utils: Make TreeViews use setUniformRowHeights by default
When applicable, the flag makes a significant difference in
performacnce. However is easily forgotten in cases where it
is applicable, and cases where it is accidentally used are
easily spotted visually. So arguably, opt-out is a better
default than opt-in.

Change-Id: I88aeb05b42533ba4e23c39573a3ddd016343cd55
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-09-05 07:24:21 +00:00
hjk
694d81ad63 Autotest: Adapt to changed settings access pattern again
Settings are created on first access now, even though this
doesn't matter much here as this happens unconditionally in
AutotestPluginPrivate ctor via m_frameworkManager.synchronizeSettings()

Change-Id: I340927cf107d7e4b2268e842d23f1a89898e8a92
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-07-10 08:13:37 +00:00
Christian Stenger
65b1088a17 AutoTest: Delay expansion request
Do not directly expand an item directly after it had
been added to the model as its internal mappings need
to get updated.

Fixes: QTCREATORBUG-29302
Change-Id: If70d209074d97e0598bcbce061e176148751705a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-06-27 08:16:35 +00:00
hjk
30af7a9503 AutoTests: Aspectify parts of main settings
Change-Id: I407b5102e1f2a6647f6fdca01a61dfa422c5d3ee
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-05-12 14:54:24 +00:00
Alessandro Portale
5975657e77 Utils: Centralize style-related property names as constants
This introduces string constants in Utils::StyleHelper. They are used by
code all over in Qt Creator to tell ManhattanStyle how to paint certain
widgets.

Change-Id: Iecca36103f80084cd5fe93fcb6b18b8fbb3a32bb
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-10 13:25:10 +00:00
Christian Stenger
369753acbc AutoTest: Redo results filtering
Instead of performing costly computations keep
track of the currently present types in the
respective branch of the subtree.
This also makes the filter invalidation on
newly added items obsolete.

Fixes: QTCREATORBUG-28831
Change-Id: I12cd31dc95b4c310a04ced2c98de3d509032482c
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-03-01 12:08:59 +00:00
Christian Stenger
0ffb85b4d8 AutoTest: Improve test output handling
Instead of just providing the hidden search, provide a more
obvious present filter functionality for the text output
similar to what is done in other output windows.
This still has the find functionality present as well.

Task-number: QTCREATORBUG-28706
Change-Id: I8f8b1494d86c90cbb9ea6bfad3f0e74caf3de2c9
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-02-14 06:41:22 +00:00
Christian Stenger
f48b8b7bcb AutoTest: Avoid potential crash
Invalidating the filter model may crash while updating
the source model as it emits a layoutChanged().
Just invalidating the filter works as the sorting of items
is not touched.
Workaround this by explicitly using invalidateFilter()
instead of invalidate().

Task-number: QTBUG-103952
Change-Id: I52abda3936e870bb448c420e98a122edecffda7e
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-02-03 11:25:40 +00:00
Orgad Shaneh
b05ec7dc3c AutoTest: Avoid pass by value
Reported by Coverity.

Change-Id: Ic0ec726ab4ec1ed96b7f4ca95a6e7dc462baeda2
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-01-30 10:32:40 +00:00
Jarek Kobus
bc3ebef7ce AutoTest: Use using namespace Utils more often
Change-Id: I9d20cd3496c4719d58a977f8fd53253c86d55463
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-01-27 09:51:55 +00:00
Jarek Kobus
d05c5b7d07 AutoTest: Use TestResult as value type
Don't construct it on heap and don't use shared pointer for it.

Change-Id: I51c9da405ed14d24b5f20242b4d049f9e2958f09
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-01-27 09:51:34 +00:00
Jarek Kobus
fdebf0343d TestRunner: Merge 2 public methods into one
Merge setSelectedTests() and prepareToRunTests() into runTests().

Change-Id: I908c41483f05eeaec186f362391941a797d66e6a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-01-18 13:50:37 +00:00
Kai Köhne
56baf8c058 Remove GPL-3.0+ from license identifiers
Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0,
this applies only to a hypothetical newer version of GPL, that doesn't
exist yet. If such a version emerges, we can still decide to relicense...

While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only

Change was done by running

  find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \;

Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-06 11:15:13 +00:00
Jarek Kobus
9e571931d0 AutoTest: Pass context object to lambda connections
Remove some unneeded lambda () brackets.
Glue lambda brackets with parameters brackets.

Change-Id: I414f7dbbaf60b452cb71f77d53d972937f121a47
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-12-08 09:32:42 +00:00
Lucie Gérard
a7956df3ca Use SPDX license identifiers
Replace the current license disclaimer in files by
a SPDX-License-Identifier.

Task-number: QTBUG-67283
Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-08-26 12:27:18 +00:00
hjk
960e99ecb1 Autotest: Convert to Tr::tr
Change-Id: Ifd4b6ace78d02804ec3b3c1d60c5418081cad6c4
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-08-01 12:16:41 +00:00
hjk
d83eb0494a Use setClipboardAndSelection more broadly
Basically everywhere besides the EmacsKeys plugin.

Change-Id: Iaf2a0a5d791b5b3dd6df2c05c1b862516630d3f8
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-07-15 07:06:25 +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
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
085e5ebe32 AutoTest: Fix expansion of results
When using "Expand All" before running tests we may miss
the results due to filtering that has not been applied
correctly.

Fixes: QTCREATORBUG-25877
Change-Id: Ibe6af43ff28e31c7acfd78ba3ec1daf9db620b56
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-06-21 11:12:46 +00:00
Alessandro Portale
4398c3498d Autotest: Remove 1-pixel frame around the test result pane
Change-Id: I0826aa4ecc0c5ecc4c03fe895e3ad09456c5f423
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-05-28 07:14:07 +00:00
Christian Stenger
5525f2b112 AutoTest: Use Utils::FilePath for files and directories
Still some missing bits as some QString members had different meanings
depending on their context.

Change-Id: Ib48eab54498974a26bbd5123cbffeefee5f7e79c
Reviewed-by: hjk <hjk@qt.io>
2021-05-27 12:24:05 +00:00
David Schulz
a13aef759e Utils: filepathify fileutils
Change-Id: Ic9048369f64d793f5f567cdb0c715488fb5a4ff6
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-05-18 14:30:53 +00:00
Alessandro Portale
72d91dc94a Use qAsConst with non-const Qt containers in range-loops
... in various places

Change-Id: Ic6c0c1b9437a1ed402105c7a14a1f5f9454a68d4
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2021-02-17 14:43:29 +00:00
Jarek Kobus
cf010911f7 Don't allocate unneeded temporary containers
Fix clazy warnings: allocating an unneeded temporary container
[clazy-container-anti-pattern]

Change-Id: I4b4c2c634eea650bbdf3c12d982a17f899fc94ec
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2020-12-14 12:35:47 +00:00
Alessandro Portale
8df758c45e AutoTest: Use separate icon variations for toolbar and menu
For the "Run" and "Run failed" actions.

Change-Id: I7fc537cbe0727038740f2c26478c30dc96babb66
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-12-10 16:27:38 +00:00
Alessandro Portale
19e13ddd6b Utils: Add "Run File/Selected" icons and use them in ClangTools/AutoTest
In AutoTest, use the toolbar and menu variants accordingly.

Change-Id: I1405de1ace1efe6c3e51b17356a9e4dfb3b11dcd
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-12-10 16:27:28 +00:00
David Schulz
7853c6ba4d AutoTest: add ITestBase::type() for better readability
Change-Id: I67133f4940329483f2d8d25d1212f4e07f57d39d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-11-30 05:15:15 +00:00
Eike Ziller
5ca70bdcb3 Merge remote-tracking branch 'origin/4.14'
Change-Id: Iea84f23cf394de13e99a9ed777c8c113e4eff473
2020-11-19 15:38:13 +01:00
Jarek Kobus
900007e781 Reuse the requestExpansion() signal from the base class
In addition correct the signatures of signals in BaseTreeModel.

Change-Id: I8c49105c9fcc1a6115c5e5c0dc8d9e87ff98d707
Reviewed-by: hjk <hjk@qt.io>
2020-11-17 13:52:41 +00:00
Christian Stenger
73613d8549 AutoTest: Introduce ITestTool
Preparation for separating handling of code based and
build system based tests.

Task-number: QTCREATORBUG-23332
Change-Id: I490af5f3157fd4a8cd07d976cdfd9e4503ade97b
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-11-16 08:10:31 +00:00
Christian Stenger
239a59c596 AutoTest: Introduce ITestConfiguration
Preparation for an additional simpler test configuration
which needs to have the same common base.

Change-Id: I1800ed5d7301f1aea99eba6ef588a204697bd569
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-11-16 08:10:04 +00:00
Christian Stenger
ac14a1e038 AutoTest: Clean up header mess
Better decoupling and reduced binary size.

Change-Id: I4f6239979d9d7dae4ad92f19ec8420be38372c07
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-11-09 08:24:01 +00:00
Orgad Shaneh
4b6a6acc4e Core: De-pure IOutputPane::visibilityChanged()
Most implementations are empty.

Change-Id: I811cacfc2918c8b2803798c4f5d3dabc7d60ccd1
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: hjk <hjk@qt.io>
2020-10-09 05:23:17 +00:00
Christian Stenger
f849bd1105 AutoTest: Support run failed
If the last run had failures and the test frameworks
support matching a test result to a test tree item
give the user an easy way to re-run all failed tests.

Change-Id: I4f3150ca8a6514c09cf7ca819f84e38c6419a310
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-09-16 06:54:02 +00:00
Alessandro Portale
bb89b80097 AutoTest: performance-for-range-copy
Change-Id: I60e79aec1fe2813867d8ff46cec7d39b848d0020
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-06-12 07:01:10 +00:00
Christian Stenger
f188622704 AutoTest: Re-use established code
Instead of "parsing", modifying and highlighting the text
after it has been added use existing code to get formatted
code beforehand.

Change-Id: I33be2950f9b9a6910ad80b10b132089f4e5f0b1c
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-01-08 14:10:26 +00:00
Eike Ziller
4e6142c932 Merge remote-tracking branch 'origin/4.11'
Conflicts:
	src/plugins/autotest/testresultspane.cpp
	src/plugins/cmakeprojectmanager/cmaketool.cpp

Change-Id: Iade695ac9cab8bf3e3a1abd6e2c71f4a19132ac0
2019-11-21 22:18:35 +02:00
Christian Stenger
26e2572852 AutoTest: Fix font for results pane
Use a correct font on macOS as well.
Beside this there had been strange observation made
when zooming the command line output.

Change-Id: I8b8cdd0d76e415da4bc792b0d646154cfc8fde9d
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-11-19 05:45:48 +00:00
Christian Stenger
333b8f9812 AutoTest: Allow colored commandline output
Some test frameworks allow to print their output colorful
to further indicate meanings of messages or test results.
Provide a highlighter for the textual output of the results
and enable this functionality for GTest and Boost UTF.
Keep at least a small backdoor for overwriting this by
the user.

Fixes: QTCREATORBUG-22297
Change-Id: Iddd2b734416de807635d90c6519553081f7372f2
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-11-13 13:09:00 +00:00
Christian Stenger
e58f376068 AutoTest: Tweak output handling
..to be able to distinguish between the output
channels. Some test frameworks use the stderr
stream for printing relevant output.
This is a preparation for coloring the output
correctly later on.

Change-Id: I3bfea9e552bde3621df99611a124b4f2d3b7d1da
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-11-13 13:07:35 +00:00
Christian Stenger
2c7e769e31 AutoTest: Clear up and generalize
Instead of transforming forth and back the output
try to handle the output once correctly and pass it
line-wise around.
This also ensures that we always get a single line
when appending the output which will be necessary
later on.

Change-Id: I3e9c6db5f81172997dfe566eee9a86bfe2f17a1f
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-11-13 13:07:25 +00:00
Sona Kurazyan
8e31932c29 Remove usages of deprecated APIs of QLayout
Replaced:
  QLayout::setMargin() -> QLayout::setContentsMargins()
  QLayout::margin() -> QLayout::getContentsMargins()

Task-number: QTBUG-76491
Change-Id: If28ef6910b3afe5d04e4746b74f9362a3e3b3c8e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-09-02 13:01:07 +00:00
Christian Stenger
265498cadc AutoTest: De-noise code a bit
Change-Id: I4585ebfb53623221c713ab0e8e254ba59a4e5920
Reviewed-by: hjk <hjk@qt.io>
2019-09-02 09:04:28 +00:00
hjk
473a741c9f Utils: Rename FileName to FilePath
More in line with QFileInfo terminonlogy which appears to be
best-of-breed within Qt.

Change-Id: I1d051ff1c8363ebd4ee56376451df45216c4c9ab
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-28 12:23:26 +00:00