Commit Graph

6274 Commits

Author SHA1 Message Date
hjk
6830328ecf Utils: Drop SynchronousProcessResponse
Move the remnaining two members into QtcProcessPrivate, its
only user.

Change-Id: I8e0c23e1a56b36b750b5b4bd4e88d762260e42a1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-05-17 11:49:11 +00:00
Christian Kandeler
2182993b97 clangbackend: Add another exception to our "find real cursor" heuristic
Leave preprocessor directives alone.

Fixes: QTCREATORBUG-25692
Change-Id: I1c31f4120e9b86a58123f8877cebd354e800fb8b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-05-17 11:44:49 +00:00
Christian Kandeler
3113b0e6d6 clangbackend: Fix token length calculation
This was broken for tokens with characters that take up more than one
byte.

Fixes: QTCREATORBUG-25715
Change-Id: Ic9842b960af8d6f12487f582b100cb2edcf48cc1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-05-17 08:35:32 +00:00
Christian Stenger
78e1260d05 Tests: Fix compile
Amends f18ac508e8.

Change-Id: If958606a06f0e86f9f8ff0a47a640566c885e018
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-05-12 08:01:50 +00:00
hjk
4c09a6e6b2 Debuggger: Compile fix after moving ProcessArgs class into filepair
The .pro files list dependencies explicitly.

Change-Id: Ie84202f6c34057bf87cc8f27fbb45f78f105e9a5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-05-11 12:30:10 +00:00
hjk
f2f40efa03 Utils: Move process arguments class out of QtcProcess
The main QtcProcess interface is nowadays a CommandLine, with no
explicit references left to QtcProcess::Arguments and related static
helper functions, so it only clutters the QtcProcess class interface

So move these items out of QtcProcess, later potentially to a separate
file pair.

Change-Id: I45c300b656f5b30e2e2717232c855fdd97c2d1d7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-05-11 09:45:24 +00:00
hjk
d825805c39 Utils: Use std::function instead of signal SynchronousProcess callback
Simpler interface and use.

Change-Id: I8db448b7ccd12927b8f8fd347b0a92c3f76f7114
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-05-10 11:40:25 +00:00
hjk
c23cdd9262 Utils: Merge {synchronous,qtc}process.{h,cpp} file pairs
Mechanical to prepare merging the actual classes.
Adapting #includes.

Change-Id: I77a2c28129287778bc870c30cb890cd26bc2e62b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-05-10 09:47:51 +00:00
Eike Ziller
040d0cc1ef Android: Fix AVD display if there are no AVDs
Fix that a broken dummy item was shown in the AVD Manager tab in the
Android options, if no AVD is available.

Fixes: QTCREATORBUG-19338
Change-Id: I31550812c332ff78d107d79682e064aa9eae1070
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-05-10 09:47:12 +00:00
Eike Ziller
c213b93aff Android: Make avd output parsing testable
And add some tests

Change-Id: Ife0e0c60f55251a1ac23215055ece8fb01478d59
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-05-10 09:47:04 +00:00
Eike Ziller
bf5b1d714c Revert "Revert "Merge remote-tracking branch 'origin/4.15'""
This reverts commit f0a86d4510.

Reverting a merge doesn't "undo" it - the changes would be lost
forever even with subsequent merges.
So we need to revert the revert to get the changes.

Change-Id: I65928f876f4dc886561bed17c4b2aa42b388c1e3
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2021-05-07 09:07:40 +00:00
hjk
40e2bb2551 Tests: Port manual/process to QtcProcess
Change-Id: I50d489e47f61927745f63b37dae3e3567355414f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-05-07 08:23:15 +00:00
hjk
9995b82612 Utils: Remove SynchronousProcess::stopProcess
Handled by QtcProcess::stopProcess nowadays.

Change-Id: I5acf7db470f9b75989edc18e48c9a48e01b50868
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-05-07 08:19:23 +00:00
Marco Bubke
f0a86d4510 Revert "Merge remote-tracking branch 'origin/4.15'"
This reverts commit 888ca0dd20.

Reason for revert: wrong patchset

Change-Id: I1291789938601aaf606c59917ff938e3c24c78dd
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-05-06 15:30:02 +00:00
Tim Jenssen
888ca0dd20 Merge remote-tracking branch 'origin/4.15'
Conflicts:
	src/libs/sqlite/sqlitebasestatement.h
	src/plugins/qmldesigner/qmldesignerplugin.cpp

Change-Id: I0fa0a8a7feffed24c0d2bc26eca86590f1156755
2021-05-06 13:07:48 +02:00
Christian Stenger
eafba223a5 QmlJS: Add test for recursive declared items
Tweak the test to allow multiple messages per line.

Task-number: QTCREATORBUG-24615
Change-Id: I662ab4801794dc3e49f68667f634337a847bc503
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-05-06 09:31:20 +00:00
Marco Bubke
1618937637 Sqlite: Use config.h instead of setting everything in the build files
Change-Id: Ia70a5e78475a8b8078276df03330060c8785bf90
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-05-05 15:14:49 +00:00
Marco Bubke
f8647ec428 Sqlite: Enable SQLITE_DEBUG for debug
Change-Id: I086dc07ae7672d1077f8469eccac5ce34d56c04d
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-05-05 15:14:44 +00:00
Marco Bubke
81a36ac0ef Sqlite: Optimize the initialization
https: //www.sqlite.org/compile.html#omit_autoinit

Change-Id: Iaa91203be21f01a19235a9401cb4fa412eca8276
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-05-05 15:14:37 +00:00
Marco Bubke
8edbdd78ad Sqlite: Default column type to None
None has no type affinity. So it will not try to convert types to other
types like Numeric will do.

Change-Id: I5362a6d071459594619485b8b8a37b3f5ed12db6
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-05-05 15:14:18 +00:00
Eike Ziller
b3a893e9b8 Merge remote-tracking branch 'origin/4.15'
Change-Id: I75ffc79eeb8d73296a2271a636fae48e35427947
2021-05-05 11:46:19 +02:00
Christian Stenger
c362df32ee Unittest: Fix writing CppTools.json in cmake build
Do not write additional garbage into the json file as this
will end up in a parse error.

Change-Id: I02783b5e94b016d35962ee5729d53bc218d42b42
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-04-30 08:18:08 +00:00
Christian Stenger
402231c5d9 Tests: Fix build
Amends 509f40825a.

Change-Id: I4eaca8f1ad43ab8f3e5e92d313de334f42ed4905
Reviewed-by: hjk <hjk@qt.io>
2021-04-30 08:17:59 +00:00
Alessandro Portale
dba1468b35 ProjectExplorer: Fix tst_toolchaincache dependencies (CMake)
idevice.h(33): fatal error C1083: Cannot open include file:
'QAbstractSocket': No such file or directory

Change-Id: I4398c546af31e92c111d06f651270ef5c64a30bd
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-04-29 07:58:50 +00:00
Marco Bubke
c4c3d4cc33 QmlDesigner: Remove findInSorted function
Using std::lower_bound is more generic and we have less code which
could lead to less bugs.

Change-Id: Iacf6ea550182b51a8d5dd6b18a92de68914f4df1
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-04-27 10:26:03 +00:00
Marco Bubke
3862f67b8d QmlDesigner: Improve storage handling in StorageCache
Using an explicit class for the storage not even makes the code easier
to understand but enables the possibility of code optimizations too.

Change-Id: I9239919d3385ba1bf141c23bdc3013b6c1e624ed
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-04-27 10:25:58 +00:00
Christian Stenger
318b3f10ce Unittest: Fix build
Amends 8e352af0ec.

Change-Id: I8130996fa68d9a5fa4217a8db001745a0382f91b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-04-27 09:09:49 +00:00
Marco Bubke
c236a25339 QmlDesigner: Add storage cache
Task-number: QDS-4237
Change-Id: I7d587f615b5e26cc6014ea3a63dedd203fdd35eb
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-04-26 14:52:24 +00:00
Eike Ziller
2fe1e881ac Merge remote-tracking branch 'origin/4.15'
Change-Id: I44dad4bbe9ed955d35c713485720a3f36a21874d
2021-04-26 11:59:13 +02:00
Marco Bubke
f69314b6ae Sqlite: Add range getter
Sometimes it is handy to return a range so you can break in a for range
loop. So you can now write:

for (auto [key, value] :
    statement.range<std::tuple<long long, std::string>>()) {
    values.push_back(value);
    if (value == Tuple{"foo", 23.3, 2})
         break;
}

for (auto [key, value] :
    statement.rangeWithTransaction<std::tuple<long long, std::string>>()) {
    values.push_back(value);
    if (value == Tuple{"foo", 23.3, 2})
         break;
}

It will only step over the statement to the break. So you don't fetch
not used values anymore. The second version will add a transaction
around the range.

But be careful. The range is view to the statement. Holding it longer or
reusing it can lead to strange behavior because the state of the
statement is changing.

Change-Id: I90191f7da5a015c7d8077d5bc428655a2b53246c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-04-26 09:42:40 +00:00
Marco Bubke
44b4c461ff Sqlite: Fix sqlite
Missed to remove the not anymore used ResultTypeCount.

Change-Id: Ia150e945bd650cc1e3d19fcb9426621d93fa16c3
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-04-26 09:06:50 +00:00
Robert Löhning
8d813b8864 Squish: Remember where breakpoints are
So we don't have to update the test each time
Creator changes the project templates.

Change-Id: I76f96f719895f2f8cadccaf9c91cc85d1735ce13
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-04-23 09:45:06 +00:00
Robert Löhning
aaa5b93b2e Squish: Simplify API of doSimpleDebugging()
No need to pass a value which never differed from len(...)

Change-Id: Iea481abed0ebfa9acf05456bc2ff1f01c7bc0d1b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-04-21 17:27:31 +00:00
Christian Stenger
0210dfd494 Squish: Fix line number of expected breakpoint
Template code has changed so the line has moved.

Change-Id: I4b42eaeff56e1c76273635d8ae2e190b4631d92d
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2021-04-21 13:12:08 +00:00
Christian Stenger
ebad39d100 Squish: Fix expectations
The Qt version is nowadays newer than the version that may
trigger this warning.
And the warning will most likely no more open General Messages
by default.

Change-Id: Iabb6b7e1775044917239e1fde67d44fd1c8ff326
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2021-04-21 13:12:00 +00:00
Eike Ziller
3d1ad9db60 Merge remote-tracking branch 'origin/4.15'
Change-Id: I1d13f3543ab4bb17f0cbfe26bbea3f154f856ca6
2021-04-20 10:42:55 +02:00
Marco Bubke
5203c478a5 QmlDesigner: Add some useful iterator algorithms to NodeListProperty
Now there is iter_swap, rotate and reverse in the node list property. With
that methods we can implement slide too.

Task-number: QDS-4159
Change-Id: Ie7f80f64fd26e517ca696158a878262928dc82c4
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-04-19 12:25:29 +00:00
Marco Bubke
2bf45ec998 Sqlite: Fix handling of blob and blob views
Change-Id: I90c31307ff3299975f820e191085ba93ed8afe0f
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-04-19 12:25:22 +00:00
Marco Bubke
040854c6f1 QmlDesigner: Add node list iterators
Task-number: QDS-4159
Change-Id: Ie6635d87beb66f766b9995f68972b80baa100ed6
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-04-19 12:25:15 +00:00
Marco Bubke
2e8e47622c QmlDesigner: Split nodeOrderChanged notifier
For swap we cannot provide all the arguments and they are only used in the
rewriter. So we use now a simplified notifier for all views except the
rewriter view. After the introduction of the new rewriter we can remove
the old notifier.

Task-number: QDS-4159
Change-Id: Idc91a618ea40da0bda9856888d115a84016597d5
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-04-19 12:25:02 +00:00
Andre Hartmann
2df71c5798 Lexer: Support the integer suffixes LU and LLU also
Before we only supported UL and ULL.

And add tests for all variants of allowed integer suffixes.

Fixes: QTCREATORBUG-25604
Change-Id: Id92f371d2effa7456d2d50891a6c29810c5c4c75
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-04-19 09:16:55 +00:00
Christian Kandeler
f307c55eac ClangBackEnd: Fix mis-detection of operator<
Inside the body of a function template, clang reports a different cursor
type for operators in some cases. Make sure we don't mistake such
operator< or operator> as opening or closing a template, respectively.

Fixes: QTCREATORBUG-25596
Change-Id: Ifc357e199ea13e44ac501613639e667c333d48e3
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-04-19 07:51:24 +00:00
Jochen Becher
05324cf21f Extend Utils::FilePath for relative paths
The new methods allows converting a path to a file or directory into a
path relative to another path to a file or directory.

Change-Id: I8c743d5bced9fec81b05ce94ac2b7bec307d9028
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-04-19 04:55:54 +00:00
Christian Kandeler
c80c724b52 ClangCodeModel: Fix template highlighting bug
We need to take into account that the ">>" in constructs such as
std::vector<std::pair<int, int>> is only one token on the clang side.

Change-Id: I90f002ca56f236032f6d39c338593a2ff7590061
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-04-16 07:02:19 +00:00
Eike Ziller
872660fcc5 Merge remote-tracking branch 'origin/4.15'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri

Change-Id: Ibc60debb3c409ae27e99df6071cf6115b272d6d8
2021-04-15 15:48:30 +02:00
Marco Bubke
76bd140c7c UnitTests: Fix flaky test
ImageCacheGenerator.CleanIsCallingAbortCallback was not waiting for the
expected call.

Task-number: QTCREATORBUG-25580
Change-Id: I43265389a36e568dea7c7ece5524ef597232d049
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-04-15 12:05:20 +00:00
Christian Stenger
915b9d0e31 DumperTests: Ensure a set up environment
For whatever reasons the qmake call already needs an
environment containing cl on Windows if QC and the auto
tests have been built with cmake.

Change-Id: I7b55fb792d3bc282cc1561e8e3b55885a25bcf0e
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-04-14 13:49:43 +00:00
Christian Kandeler
b88b73d9c1 ClangFormat: Sprinkle some more magic pixie dust
Apparently, we can prevent clang-format from removing line breaks by
adding an empty comment at the end of the line.

Change-Id: Ia78ecb9e7351d059c544cbda11d33af5734e2218
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-04-12 09:28:55 +00:00
Eike Ziller
c0cfafdd3d Merge remote-tracking branch 'origin/4.15'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri
	src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp

Change-Id: I403b236c40d73a61ae22304e289e9d4374366395
2021-04-06 15:17:40 +02: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