Commit Graph

151 Commits

Author SHA1 Message Date
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
Christian Stenger
e8727fcae2 Squish: Clean up single (left) mouse clicks on items or objects
Do no more use pixels as offset if we can handle this without.
Clicking on items by using an (x, y) offset will likely fail if
running on a machine with a different DPI setting.

Change-Id: I0e5a4985104bd1d68aadf8c5534583fa1b048edb
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2019-07-25 12:06:05 +00:00
Robert Loehning
939d3fe035 Squish: Update message box "changed on disk"
Change-Id: I53149a67e3072a0466ccbb80c55bf9f76b33cb2a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-06-25 10:47:39 +00:00
Christian Stenger
6505799c44 Squish: Remove unused functions
Change-Id: If53390d65b9013c42f7dcf5834b4caee2bcb8766
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2019-05-29 04:48:26 +00:00
Christian Stenger
a112ca317b Squish: Fix verification of tool tips
Change-Id: I12487c784cf784ca7ddf705895c99f0ed912b0f4
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2019-02-14 12:58:43 +00:00
Christian Stenger
605fe1dfd9 Squish: Update menu item for 'Find Usage'
Change-Id: I6fdf9f9a1c697ad403473b795d4848aa4e519cb0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2019-02-14 10:39:56 +00:00
Christian Stenger
0a28cf70fe Squish: Fix generic highlighter test
This is now using KSyntaxHighlighter, adapt accordingly.

Change-Id: Ie5dac469d326c5165f5f8513bc3adc5f6be5e48b
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2019-02-11 14:19:58 +00:00
Christian Stenger
b382d83fab Squish: Adapt test to changed behavior
41d68f469a restored (partially) the old behavior which
changes the '.' operator to '->' if all completions need it.

Change-Id: I92c2183e7e7f1c0d839f2340c2abe7a9f7d73af2
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2018-12-11 17:44:10 +00:00
Robert Loehning
87332d5c8d Squish: Test initialized refs to smart pointers in tst_memberoperator
Change-Id: I7c48ca5c4d05f4ea36dd82bde3a19a386580452a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-11-08 15:28:38 +00:00
Christian Stenger
ce9b813c37 Squish: Adapt tst_memberoperator to CCM changes
When using the clang code model the operator '.' does no
more automatically change to '->' before applying a proposal.
Instead it points out whether a proposal requires to change
the operator when applying.
So, adapt the test and losen some condition to be able to
keep this test generic and maintainable.

Change-Id: I215fba9bfa98d5d056cd9493d7aa7192fb7a963f
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2018-11-08 13:19:38 +00:00
Christian Stenger
6cdcae528d Squish: Ensure text cursor has safe position
When re-opening a file that had been opened and closed inside
the current active session we open the file at the last used
editor position.
Provide a function to explicitly jump to the first line of an
editor.

Change-Id: I0602d8ef46e80a20385fd1b205812776d6666326
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2018-11-02 12:02:42 +00:00
Christian Stenger
28ab852e53 Squish: Wait for a clean shutdown when restarting QC
This fixes a race condition in tst_CSUP06 where the next run
of QC removed .user* but the first instance was not completely
finished with the shutdown process. The .user files of the project
got updated (or recreated) before the second instance tried to
open the same project again. Ensure the first instance is closed
to be sure that project's .user files got created or updated
before the second instance tries to remove and re-open them.
Follow the same approach for other tests to avoid the same issue
later on.

Change-Id: I37721f4dd647f9bbf7c6fed6e753a2906e30db81
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2018-09-07 12:48:28 +00:00
Christian Stenger
1016dc0603 Squish: Refactor starting Qt Creator from Squish
Change-Id: I7cbce7db2a22a7cb327965b9b7918eb46266b260
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2018-09-05 09:24:18 +00:00
Robert Loehning
ff10f8c3a5 Squish: Fix warnings
Warnings from static code checks, that is, not test.warning() at runtime.

Change-Id: I651d13491106583908059ecdb5f700f539b6d9c8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-06 14:21:30 +00:00
Robert Loehning
24db24734d Squish: Open example from Qt 5.6 in tst_qml_editor
Change-Id: Ibd5bd516d8409fa5389da3e330d6723ba772f135
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-03-15 11:19:35 +00:00
Robert Loehning
a4ff3423e9 Squish: Update Qt version names and constants
As a preparation for using Qt 5.10, these
need to handle two-digit minor versions.

Change-Id: I2a47606ee801a28df12d75323b480f8ee583893b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-01-22 12:30:49 +00:00
Christian Stenger
e33d0cb1d0 Squish: Adapt Qml indentation test
The used Qml file template has changed.

Change-Id: I594c77f05ac51a49afe2498d61aea54abd5b8677
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2017-10-18 04:54:57 +00:00
Robert Loehning
9afe6fa1c4 Squish: Update texts of message boxes
Change-Id: I3ca17bb62201d6271c0e98d07a99f7344faba439
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-09-19 12:04:54 +00:00
Robert Loehning
b58dadfecc Squish: Enclose code model tests in sections
Change-Id: I4478acfc5ea7b3fa22d1cd17576e04fdda81dbb9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-09-19 09:44:08 +00:00
Robert Loehning
ba1036fd46 Squish: Fix searching for filename in windowTitle
Currently, only the end of a filename as actually
compared since the title also contains "filename.h"
when the title starts with "otherfilename.h"

Change-Id: I60dd4dc1fd7c53fee2ddbc44953bcfe4d75c7530
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-08-30 12:27:37 +00:00
Robert Loehning
7ba42ec95a Squish: Update workarounds for Clang Code Model
Change-Id: Ib7f5bb5670ff393f2b3bbecb1398bf382d6cca66
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2017-08-21 10:43:03 +00:00
Christian Stenger
1643b4e7a7 Squish: Remove workaround for fixed issue
Change-Id: I7cc40e83400bcf2614ae6eb34eecefa9bb75d172
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2017-08-07 11:02:19 +00:00
Robert Loehning
8016c56268 Squish: Stabilize tst_generic_highlighter
Starting a download while another is still running will open
a message box which causes an error when trying to click.

Change-Id: I4f26e07ba70181d009dfa71318783725adad3227
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-06-15 13:09:58 +00:00
Robert Loehning
5ceb390b60 Squish: Update window title
Change-Id: Idff71e0d250b31436a59e10c6ab00f7d459ab89d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-06-01 09:09:17 +00:00
Robert Loehning
d7f79349ed Squish: Verify project was found when adding file
Change-Id: I313d1ba1b621d45620bf613760cefdf0a2d2341c
Task-number: QTCREATORBUG-17994
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-05-10 14:01:16 +00:00
Robert Loehning
ade7393ec9 Squish: Fix kit selection
Fixes f78327a571

Change-Id: I7e9ea53c96a8382db27213a1d6e182fa865723ee
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2017-03-03 18:26:03 +00:00
Robert Loehning
8681608d8b Squish: Clean up tst_qml_editor
Should have been done in
4b4e5f6990

Change-Id: I0a747ea4bbf0ef02caaf31a14161dced9b4dd806
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-01-27 12:13:55 +00:00
Christian Stenger
be9c7d6929 Squish: Fix triggering items listed under "Recent Files"
UI has changed again, so adapt the test to reflect this.

Change-Id: I5d6bcf2b48b8b625f6086f5a1101041a73d7e329
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2016-11-14 06:53:31 +00:00
Christian Stenger
5f5d23c389 Squish: Fix triggering "Recent ..." menu items
These items nowadays have a leading number and colon.

Change-Id: Ib274a7bc601cd06cf7b226f43b011c2b105cc12b
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2016-08-17 12:22:33 +00:00
Robert Loehning
bde4362dad Squish: Replace Qt 5.2.1 kit with Qt 5.6.1
Change-Id: I5865024f55a68bc2860f5b8b0b7c9c37775cc122
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-07-27 10:07:14 +00:00
Robert Loehning
0dec19173c Squish: Only snooze if bug still requires it in tst_memberoperator
Change-Id: I746007c319823cc7fd166c35f8f94f69badd623b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-07-08 12:46:00 +00:00
Eike Ziller
33210099f1 Merge remote-tracking branch 'origin/4.0'
Change-Id: I9793f0f9019b16f3725c5a9708a5ccf81557cdc6
2016-06-03 09:50:43 +02:00
Christian Stenger
b04b5e5d75 Squish: Provide functions for getting paths inside Qt installation
Change-Id: I273304f0c6d451d28a256c99588479525eef95e4
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2016-06-01 14:50:25 +00:00
Eike Ziller
0c5bae640b Merge remote-tracking branch 'origin/4.0'
Change-Id: I80bc3371c6d7cf9f2d46cbcf8e79e4761213d8aa
2016-05-27 12:01:36 +02:00
Robert Loehning
b2f869c411 Squish: Test code model's reaction to decimal separator in float
Must not be interpreted as member access operator.

Task-number: QTCREATORBUG-16188
Change-Id: Iec252fbc63899cef5b004a5770e3ebee5af7188e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-05-26 11:48:03 +00:00
Robert Loehning
0e299cbd0b Squish: Expect failures in tst_memberoperator on Windows
Change-Id: I582109d104816545c804340c7e0d4dbe343d55f3
Task-number: QTCREATORBUG-16336
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-05-25 15:30:57 +00:00
hjk
39a38d5679 Wholesale conversion to #pragma once
Kudos to cgmb and https://github.com/cgmb/guardonce

Change-Id: Ifa8970734b8d43fd08c9260c645bdb0228633791
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-03-30 15:20:19 +00:00
Robert Loehning
8e6765df23 Squish: Update tests using clang code model
Code models can't be swapped at runtime anymore.

Change-Id: I76a9894d0413d7d5a368ec6d506180a3837a6e2c
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-02-26 13:06:24 +00:00
Eike Ziller
74cdce071f Merge remote-tracking branch 'origin/3.6'
Conflicts:
	src/shared/qbs
	tests/manual/proparser/main.cpp

Change-Id: I13654bf10c14eb6b1d6805fe86b67ac73b2e4d75
2016-02-24 10:08:37 +01:00
Robert Loehning
692261564f Squish: Include binary editor in tests
Change-Id: I0b4fc4e0cb18dcbd569ebdba201bfb9e2596ba5b
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-02-15 10:44:47 +00:00
Eike Ziller
d18d7eaef6 Merge remote-tracking branch 'origin/3.6'
Change-Id: I4e1ec4054d7364057c63e63e293a246e64afdddb
2016-01-25 13:21:18 +01:00
Robert Loehning
76773763e6 Squish: Update tst_qml_editor to use Qt 5
Change-Id: I1f2c8b9212ab2b1eec07a4587495aaf02d201523
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-01-21 16:48:00 +00:00
Robert Loehning
03e5392ac9 Squish: Don't expect parsers to understand invalid C++
Change-Id: Icfe466540b7193c6f55014a68f1399debb0a17c3
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-01-20 10:19:06 +00:00
Tobias Hunger
954569387c Update License according to agreement with Free Qt Foundation
* Update license information in tests directory

Change-Id: I311441dd37d053ca3175e44b284258e232ee93e0
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-19 16:01:06 +00:00
Robert Loehning
a4231de01c Squish: Update tst_qml_editor
Change-Id: I403b64fc60e3d4f1ad0635ce86190ea89ab49de5
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-12-07 10:21:24 +00:00
Robert Loehning
66e7b77d88 Squish: Update selection of code model
Change-Id: Iee76086dfd886dd8d61db3cfe4600a5eedd36cb7
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-12-01 14:38:36 +00:00
Robert Loehning
85992f823e Squish: Update tst_qml_editor for fixed editor
In 3.5, the QML editor showed two empty lines at the end of
the file. Now it's only one line so only one must be unmarked.

Change-Id: I831002e5ab9d14570d2a788010806c0b3de5614c
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-10-22 12:09:33 +00:00
Robert Loehning
9c9dbe3c53 Squish: Update Creator's sources to v3.5.0
Change-Id: Idc41db621470886920173f7d5caf366204408731
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-09-03 11:41:20 +00:00
Robert Loehning
a80f4d179b Squish: Verify shown filenames when adding C++ files
Change-Id: I1e6c944a70c4f44d4f1b3e5cb7b6b6c8421ba453
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-09-01 09:44:41 +00:00
Robert Loehning
6fe810f514 Squish: Compare sets directly instead of differences
Generates better output with less code.

Change-Id: I3a5fa02c5aca97561e20dc4ddf4153596a3a60ae
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-08-11 10:01:41 +00:00