Commit Graph

6972 Commits

Author SHA1 Message Date
hjk
b1392e7938 Docker: Add x11-apps to manual test installation
Running xeyes is a good check that X works.

Also, don't remove the package data base in the run setup, that makes
further configurations (too) inconvenient.

Change-Id: I5760b99f6e2ed3e4539580049f04d24b64cecfd8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-04-14 12:28:10 +00:00
Jarek Kobus
a4a651aa32 QtcProcess: Fix StartFailed result
Amends 4ca336762e

Change-Id: I3781bec37b17ea3f86eedc51657db0931a456c39
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-04-14 07:55:22 +00:00
Christian Stenger
3b5ef55a32 Squish: Ensure treeview items are accessible
Before using mouseClick() we must ensure the items are really
accessible. So, scroll the view to the respective item explicitly.

Change-Id: I9e460b9f8cd64590d8a59692ba2d726495de3d92
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2022-04-14 04:35:28 +00:00
Robert Löhning
ef52fa743b Squish: Fix tst_cmake_speedcrunch for Python3
Change-Id: Ide963d0ee27ff14fdd3d5f4f2bd4dd7b94254521
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-04-13 11:41:17 +00:00
Christian Stenger
113c867bda Squish: Ensure we get str output from commands
Change-Id: I4e7ff85d2e2afbf714e9d16ae07e56d93cc57655
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2022-04-13 10:09:23 +00:00
Christian Stenger
0c1b5065c8 Squish: Remove obsolete workaround
Squish forces file dialogs to be real QFileDialogs for a long
time while testing.
Beside being no more necessary the workaround also causes
problems nowadays.

Change-Id: I211b64e61a0e28ede2a38d4d90cea5da350fa749
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2022-04-13 04:29:19 +00:00
Robert Löhning
e4463ba6d4 Squish: Port tst_create_proj_wizard to Python3
While staying compatible with Python2.

Change-Id: I1de16a4a066b00bc11b4142e144d7b9246f7c14c
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-04-12 20:59:28 +00:00
hjk
76d5e7770d QmlDesigner: Avoid compilerwarning in test
[1262/1277] Building CXX object tests/aut...s/tst_qml_testcore.dir/tst_testcore.cpp.o
tests/auto/qml/qmldesigner/coretests/tst_testcore.cpp: In member function ‘void tst_TestCore::writeAnnotations()’:
tests/auto/qml/qmldesigner/coretests/tst_testcore.cpp:8707:21: warning: loop variable ‘child’ creates a copy from type ‘const QmlDesigner::ModelNode’ [-Wrange-loop-construct]
 8707 |     for (const auto child : rootModelNode.allSubModelNodes()) {
      |                     ^~~~~
tests/auto/qml/qmldesigner/coretests/tst_testcore.cpp:8707:21: note: use reference type to prevent copying
 8707 |     for (const auto child : rootModelNode.allSubModelNodes()) {
      |                     ^~~~~
      |                     &

Change-Id: I496baf5424a7e07976aecdf3ad2402832bbc52d9
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-04-12 16:06:56 +00:00
Jarek Kobus
00acccfd3d QtcProcess: Fix terminate() for process launcher
ProcessLauncherImpl::terminate() was behaving the same as
ProcessLauncherImpl::kill() in case of process launcher
implementation - in both cases the launcher
immediately returned confirmation about receiving the
close request and was putting the corresponding
process into its reaper. However, the issue with this approach
is that we can't receive anymore any potential ready
read signal from the process being terminated after
a call to terminate().

The fix is to diverge the behavior of terminate()
and kill() of ProcessLauncherImpl. The behavior of kill()
remains the same, while terminate() just instructs the
process launcher to start termination without putting
the process into the reaper, yet.

Add a test that checks for any possible zombies.

We run the RecursiveBlockingProcess recursively. The most
nested process blocks. After a short wait we terminate
the outermost process. With this test we are trying to see
if terminating the middle process terminates also its
children and doesn't leave zombies.

Before we execute the test (and also by the end of this test)
we call Singleton::deleteAll() in order to ensure that reaping
of previously running processes has finished. We ensure the
number of running processtestapps is zero. Later, we ensure that
the leaf process was already started and the number of running
processtestapps equals the depth of recursion.

Fix apparent bug in getLocalProcessesUsingProc().

Change-Id: I7e2bc46ad5ca22f26620da86fbaf0fa00a7db3c3
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-04-12 13:59:41 +00:00
Christian Stenger
0bd4d38002 Tests: Remove ignored message
This soft assert is no more triggered a second time and
results in a fail now.

Change-Id: Ica850a19993797d412e0b5ff954b5e9760e21f53
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-04-12 08:05:17 +00:00
Jarek Kobus
2794b5e543 tst_QtcProcess: Get rid of lineCallbackIntern() test
This test introduced some additional private API to QtcProcess.
This makes refactorings of QtcProcess harder, as we need to
handle this artificial code working.

We have a real lineCallback() test instead which doesn't
employ this private API.

Change-Id: Idbc314210cecc2044e1ccc298e5d3e0a9747e811
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-04-11 15:26:10 +00:00
Jarek Kobus
a6fc7727a1 Get rid of SftpSession
Should be substituted by FilePath actions using remote paths.

Change-Id: Ib1e3913cc94d417045cbe6b922284a2f8ab6d71f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2022-04-08 15:12:22 +00:00
Jarek Kobus
5715d433f4 Get rid of SftpFileSystemModel
It's being replaced with DeviceFileSystemModel.

Change-Id: I062f2a873ecede9755527e8ee7b8b4d578289c4b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2022-04-08 11:50:15 +00:00
Marcus Tillmanns
bcfe2bc25a utils: Add additional tooltip to ElidingLabel
In case you want to set a real Tooltip for an eliding label

Added tests in tst_manual_widgets_infolabel

Change-Id: I72bcbf672415ce439c14e260e364fcd2f85fc733
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-04-07 07:28:22 +00:00
Jarek Kobus
97132cf7f0 tst_QtcProcess: Add a test that invokes a process recursively
After the required depth of recursion is met, the most
nested process waits for one seconds and crashes.

Change-Id: I8d9b359459fc7aa1983734685e5c5f19eb49ee94
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-04-05 11:40:20 +00:00
Jarek Kobus
8f427c1c95 tst_QtcProcess: Move subprocesses into a separate executable
Don't invoke subcreator test in order to run a custom process.
Run a separate executable instead. The advantages are:
1. Faster test running (no need for QTest specific code path
   when running subprocess).
2. Don't use std::exit() from subprocesses as it doesn't
   clean up properly. Use qApp->exit() instead.
3. This should support returning NormalExit and proper
   exit code of subprocess in case the code wasn't 0.

Change-Id: I1395bd8a7873c95a594c3e054087f00c55a15376
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-04-05 11:40:00 +00:00
Marcus Tillmanns
c246caf7a9 sdktool: Change tests to use QTest
* Moved all sdktool code into a static library, allowing us to link against the actual functionality in unittests
* Convert all tests to proper unittests

Change-Id: I5c93be0faecbd8b68e0923655483c870a2f408b5
Reviewed-by: hjk <hjk@qt.io>
2022-04-04 14:27:46 +00:00
Jarek Kobus
ab11c4373b QtcProcess: Introduce done() signal
Introduce QtcProcess::done() signal. It's similar to
QtcProcess::finished() signal, but also emitted when
process failed to start (so after QProcess::FailedToStart
error occurred).

SshRemoteProcess::finished() signal was already behaving
like this. So, we remove special handling of
FailedToStart error in this class and connect all clients
of SshRemoteProcess to done() signal, instead of finished().

Task-number: QTCREATORBUG-27232
Change-Id: If4240e2172f3f706e812bca669a1d5b24bdc3285
Reviewed-by: hjk <hjk@qt.io>
2022-04-04 13:28:12 +00:00
Christian Strømme
e45766cdc8 Make the ExternalTools classes accessible outside core
Change-Id: I225c22bc48b123fec4420761879382ea0a424029
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-04-04 08:02:11 +00:00
Jarek Kobus
679a7ba7ef tst_QtcProcess: Rename ProcessChannelForwarding into ChannelForwarding
Amends 91c11c769f

Change-Id: Ib38edca1f720a313c42ee6224cbd9109fb50fa84
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-04-04 07:20:02 +00:00
Alessandro Portale
91c11c769f Utils: Add mergedChannels test to tst_QtcProcess
Change-Id: Ia6c25004ca37c97c0cfa61bc2eb944493f796217
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-03-31 22:32:11 +00:00
Eike Ziller
c84380cdc8 Merge remote-tracking branch 'origin/7.0'
Change-Id: Ib2267ddbb702564a6e1c8f6b1db802bc9c45759d
2022-03-31 15:32:42 +02:00
GPery
f99094a0b8 CppEditor: Fix indentation for structured binding
Structured bindings were parsed as lambdas instead

Fixes: QTCREATORBUG-27183
Change-Id: I3c88dc1012e55edfe417504c17f6138e3356651c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-03-29 14:21:11 +00:00
Eike Ziller
780f5da7c4 Merge remote-tracking branch 'origin/7.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri
	src/plugins/studiowelcome/recentpresets.h
	src/plugins/studiowelcome/userpresets.h

Change-Id: Ie573b945eb28347a36ee1b3582fbd6ab0c0f866c
2022-03-28 15:10:11 +02:00
Samuel Ghinet
3935c671dd QDS New Project Dialog fix: recents should include all project properties
Previously, only the wizard category, name, and size were saved for
recent presets. Solved the problem by using the same kind of store (and
struct type) for Recent presets as for User/Custom presets - this way
we can save all properties.

Other changes introduced:
* After user creates custom preset C, then creates a project from it
(resulting in the creation of a Recent preset R), if the user then
deletes custom preset C, then the recent preset R will remain -
previously, all recents of the custom preset were deleted
* Now we can have multiple recent presets with the same name and size -
so, no distinguishing feature inside the Presets view. User will have
to look at Details and Styles panes to view differences.
* Replaced .ini format with *.json file format.

Change-Id: I500e9ac9378d4b9a393c3b0833ef6a34f785585c
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-03-24 10:31:16 +00:00
Jarek Kobus
127ca236a7 Ensure we never encounter the message about destroying QProcess
Until we remove the process launcher / process reaper.

Change-Id: I9c68c40c3c856c0a515277b69fc3084ba2addbee
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-03-24 09:42:07 +00:00
Christian Stenger
c1b585933b Squish: Fix remove kits test
cmake is automatically running when re-opening a project
and creates a temporary kit which was different when using qmake.
Switch back to qmake and enhance later to support cmake as well.

Change-Id: Id3e1dc23c828a6e2af5454863e1349d9866dfa38
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2022-03-24 05:55:16 +00:00
Christian Stenger
fcddfe5a8c Squish: Fix project wizard test
Change-Id: Iabf4463ac535cab025db3ee808e61f5fe7054095
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2022-03-24 05:55:08 +00:00
Christian Stenger
e7f314e02a Squish: Fix local git test
The test was written for a qmake based project. Explicitly use
one as default build system has changed.

Change-Id: Iccf5761915708dd66ba73aeda25ca6b61a8c0b99
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2022-03-23 13:44:28 +00:00
Eike Ziller
ae6c974fb2 Merge remote-tracking branch 'origin/7.0'
Conflicts:
	src/plugins/android/androiddevice.h
	src/plugins/android/androidplugin.cpp
	src/plugins/android/androidplugin.h

Change-Id: I1a68354415283fe4a7450706520a576d2a1775e0
2022-03-23 14:16:07 +01:00
Robert Löhning
5b0b48177b Squish: Port tst_WELP03 to Python3
Change-Id: I997fb8cc44fab986b5f4e0aa6e6f1f92fccfd54a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-03-23 13:14:18 +00:00
Jarek Kobus
ae49fb213b Ensure that after a call to waitForFinished() process is not running
Amends 5de5f1cf0a

Change-Id: I64db8c6736c6a7cc6805813f852faf1048ebb629
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-03-23 12:12:39 +00:00
Christian Stenger
34b94d8cd2 Squish: Update Welcome page test
Change-Id: I447addcba50e932886a8ed5e730a1eab663a2224
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2022-03-23 05:37:42 +00:00
Jarek Kobus
5de5f1cf0a QtcProcess: Add a test for crashing app
Ensure that when waitForFinished() didn't timeout
but the process has terminated, it returns true,
like QProcess does, in contrary to what QProcess'
documentation says.

Change-Id: I6af5034f4df7fc2e14a83bab74334a8abefe7a0f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-03-22 11:30:24 +00:00
Christian Stenger
f69de8b5bc Tests: Fix compile
Amends 47bcb63854.

Change-Id: I34a867b3b0b868933937e37e8268b98078aa3023
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-03-21 07:59:19 +00:00
Robert Löhning
a2735ec024 Squish: Don't configure projects on Qt4 anymore
Change-Id: Ib09fc44323e09fa4d6a5d2428c35b5b6afe08f24
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-03-18 18:27:32 +00:00
Jarek Kobus
dabe2e1493 ProcessLauncher: Don't emit error twice on process crash
Behave the same as QProcess in this circumstances.

Change-Id: If8175ccb7102d6a561584ee73c2e5c5844f2770d
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-03-18 15:19:35 +00:00
Eike Ziller
b6f679d777 Merge remote-tracking branch 'origin/7.0'
Conflicts:
	src/plugins/webassembly/webassemblytoolchain.cpp

Change-Id: Ia75c783e3ecab1f97de2b5c73a0979c49da82009
2022-03-18 16:07:51 +01:00
Christian Stenger
4e47ed66c9 Squish: Fix qml indentation test
Adapt to default build system change.

Change-Id: I70b5869871d4fbb612d4b6a28beb5e73c2d8d88e
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2022-03-18 14:39:56 +00:00
Christian Stenger
de1a328390 Squish: Fix debugging console app test
Change-Id: I752dab65948952081752a805018cfc3b01193855
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2022-03-18 14:39:49 +00:00
Robert Löhning
48c3a02229 Squish: Update suite_QMLS
Change-Id: I2cf804362b965be77ff0cd6686c998664e6eee02
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-03-18 12:57:08 +00:00
Robert Löhning
59c32bcfbe Squish: Don't use Qt4 in tst_HELP04 anymore
Change-Id: Idebff8b0bfd75daf573ab870dedd984eac9d09d0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-03-18 12:56:31 +00:00
Christian Stenger
cc885348c7 Squish: Adapt to ui change
Change-Id: I0c896d5fa6d8fd814afec3206a2faae434da9dc7
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2022-03-18 11:31:54 +00:00
Robert Löhning
689d3d528e Squish: Update tst_CSUP01 and -02
Change-Id: I6e15545be1a92e43b5708dc5fdef456b8d2ab32d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-03-18 10:02:00 +00:00
Jarek Kobus
47bcb63854 Add new types of blocking processes
Change-Id: I7668d0ac94a4e949f7ea67d8a1c0c144af5bd541
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-03-18 09:35:44 +00:00
Eike Ziller
e914f42458 Merge remote-tracking branch 'origin/7.0'
Change-Id: I9c4ef46084fd392663c7c21c4ecdbc578ea28577
2022-03-18 08:42:02 +01:00
Robert Löhning
ab772c50be Squish: Update tst_cmake_speedcrunch
Change-Id: I46ab6f245a21546e6ebf20680f06b0cdd26eab8f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-03-17 21:35:44 +00:00
Eike Ziller
9fd2a059f6 Merge remote-tracking branch 'origin/7.0'
Conflicts:
	src/plugins/android/androiddevice.cpp
	src/plugins/docker/dockerdevice.cpp

Change-Id: Id16ba0d9993c9f608242622aceae0a2a6691e05e
2022-03-17 08:48:28 +01:00
Christian Stenger
a42b63ac05 Squish: Build speedcrunch with Qt5
Change-Id: I1fe79d6775b157fda26248917c9489edca88fd53
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2022-03-17 05:27:13 +00:00
Christian Stenger
66c5b1e11e RemoteLinux: Avoid unexpected password dialog in tests
Make the test depend on environment variables and give some
hint how to run the test correctly.
Beside this make the test work on Windows and share the setup
with ssh unit test.

Change-Id: I6bbf1ec863449512646ca2c51d13fec537beedbc
Reviewed-by: hjk <hjk@qt.io>
2022-03-16 16:44:27 +00:00