Commit Graph

5903 Commits

Author SHA1 Message Date
Marco Bubke
55d1f6b46e Sqlite: Relax LastChangedRowId
Change-Id: Ibc4637ebafd4c0cdedfcea5c52da5025435bc4ab
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-05-26 18:11:02 +02:00
Marco Bubke
36fd58fbe9 Sqlite: Add carray extension from Sqlite and a pointer binding
Change-Id: I96c160514ac80458cbcbff0151c685958de71fdd
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-05-26 18:10:40 +02:00
Marco Bubke
2f6a226dd3 Sqlite: Forbid double quotes which are not part of the SQL standard
It's anyway easier to write single quotes.

Change-Id: Ie71c39d9cdd83e0b898efe70a1912d8257ac991e
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-05-26 18:09:47 +02:00
Marco Bubke
dc2192ef8a Sqlite: Dont compile Utf-16 support
We don't support it anyway.

Change-Id: I35fa859f3c9d7389e3d00d584832a814acb39c80
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-05-26 18:09:26 +02:00
Christian Kandeler
9c3d4dcc88 qbs build: Make the pkg-config dependency in unittest.qbs non-required
We don't want an error if pkg-config is not installed.

Change-Id: I142abe3d21649a9010b91707532eb733e2103583
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2020-05-26 13:10:22 +00:00
Christian Kandeler
c9672f4ffa qbs build: Fix unittest project file
There were some subtle errors that lead to test failures.

Change-Id: Ibea24a8a45a47a5c3239da77bd4ed7ddca61ec57
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2020-05-26 13:08:32 +00:00
Christian Kandeler
949bb0e67b ClangCodeModel: Show value in tool tips, if possible
When hovering over a constant expression, it's probably helpful
to show that value to the user.
Requires clang 11 to fully work. For now, it only shows the value for
variable initializations.

Fixes: QTCREATORBUG-23967
Change-Id: I6b844231bac50993c2fa2fa82c552ad9cef590df
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2020-05-26 08:50:58 +00:00
hjk
14666c801a Debugger: Drop 'set print object on' for GDB
This does not seem to affect the code paths we are using through
Python.

Task-number: QTCREATORBUG-23965
Change-Id: I2e20d6d3c1937d56293e81b74c453e83a92ddc4c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-05-25 10:01:03 +00:00
Nikolai Kosjar
0bf7bacb4f Clang: Disable a clangformat test for vanilla clang
...that requires a custom patch to work.

Change-Id: I954286f47112b660dc6ee681dac2250a9e8da0df
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-05-22 08:59:28 +00:00
Nikolai Kosjar
8df8502090 Clang: Disable a completion test for LLVM/Clang 10
For the case

  struct Foo;
  void f(Foo *foo) { foo->/*COMPLETE-HERE*/ }

no completions are expected as "Foo" is only forward declared.

This seems to be handled correctly in current LLVM/Clang master
(upcoming version 11), but wasn't with previous versions as pointless
non-member-completions were returned.

As our workaround is not applicable anymore with LLVM/Clang 10, disable
the corresponding test for that version as we cannot do anything about
it.

Change-Id: Ia02696175d0d532e16bc16a1010821b4aed20f8b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-05-22 08:42:09 +00:00
Christian Kamm
40dd6fc185 QmlJS: Add workaround for missing imports in Qt >=5.15.0
The QtQuick module plugins.qmltypes in Qt 5.15.0 do not contain
QML types like QtObject. Instead, they are found in the QtQml module.

Something similar applies to QtQml and QtQml.Models and
QtQml.WorkerScript.

As Qt 5.15 can't use the "import" command in the qmldir file, this code
instead detects the 5.15 QtQuick and QtQml modules and adds the
dependent imports manually, as a workaround.

Change-Id: I982e349298eb7200372390dfc384fb43a762b253
Task-number: QTCREATORBUG-23986
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-05-21 07:54:08 +00:00
Christian Kamm
f64146741d QmlJS: Use "import" commands from qmldir files
qmldir files can have lines like "import QtQml". These were already
parsed, but not stored in LibraryInfo. Store them.

When imports are resolved in Link and a library has such an import, also
load the module it refers to, with the same version and "as" scope.

Add a test to verify the behavior works.

Change-Id: I80b260bfaa36a9e5de0849fa5632b3361077ef01
Task-number: QTCREATORBUG-23986
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-05-21 07:53:44 +00:00
Eike Ziller
8292807e0d Merge remote-tracking branch 'origin/4.12'
Conflicts:
	src/plugins/android/androidextralibrarylistmodel.cpp

Change-Id: Ica69c24e83deff819e640dcb4c2682a554d8a2d2
2020-05-19 15:23:16 +02:00
Nikolai Kosjar
e2a68edbc1 Clang: Adapt test DiagnosticSlowTest.Text for LLVM/Clang 10
Change-Id: I99ac001d1231f14cd5cda9268d925fa442b16a35
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-05-19 12:28:17 +00:00
Christian Stenger
cad625c739 Squish: Remove pastecode.xyz from tests
Service is unavailable.

Task-number: QTCREATORBUG-24002
Change-Id: I012681ec1ec1deb30387e1762fe72a877e56fa10
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2020-05-19 09:53:27 +00:00
Christian Kandeler
b92c22a102 qbs build: Add project files for clang unit tests
Change-Id: I2cd02d94fb886bb49c66fa2508a63dc3480a7c23
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2020-05-19 09:26:45 +00:00
Nikolai Kosjar
009e9d783d Clang: Fix leak in TranslationUnitUpdaterSlowTest
Change-Id: I75b349c5af80de01a2fb499b7335692eedcae6eb
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-05-19 08:17:39 +00:00
Eike Ziller
3c59d02286 CMake build: Favor qtc_exted_... with CONDITION over custom if
Change-Id: I2c575b69fb6c2535f789313234400f6f6a63a08b
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-05-18 11:18:38 +00:00
Eike Ziller
3c535503cb CMake build: Avoid using extend_qtc_target directly
Also add a extend_qtc_test which checks if the test is known.

Change-Id: Idd3b3a02ac61fce2622cb8681233cfbd96a77bc4
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-05-18 11:18:26 +00:00
Eike Ziller
52b7ec058b Merge remote-tracking branch 'origin/4.12'
Conflicts:
	src/plugins/mcusupport/mcusupportsdk.cpp

Change-Id: I1583fa81adc0218ad4657baa347c08e9e29f88e6
2020-05-15 14:49:11 +02:00
Nikolai Kosjar
09353d927b ClangTools: Fix ReadExportedDiagnostics.* tests
These fail

 [  FAILED  ] ReadExportedDiagnostics.Tidy
 [  FAILED  ] ReadExportedDiagnostics.Tidy_Clang
 [  FAILED  ] ReadExportedDiagnostics.Tidy_ClangAnalyzer
 [  FAILED  ] ReadExportedDiagnostics.Clazy

as 07ec6de8d9 introduced Diagnostic::name
but did not adapt tests and printing.

Change-Id: Icadace9c23ad1ad03eee7ad394bbc0211aea31f3
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2020-05-15 05:10:11 +00:00
Marco Bubke
33a833d187 Sqlite: Add null value
So we can distingish between a null value and zero or an empty string.

Change-Id: I9122fdafdf85cf04dcf8bca7bf294be9b28ee251
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-05-14 18:02:18 +00:00
Marco Bubke
4b7aeae749 Sqlite: Add check constraint
Change-Id: Ib4b909da40c7fe07dcb6a07c4650a720313391c2
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-05-14 10:30:44 +00:00
Marco Bubke
77c81aa8b0 ClangPchManager: Fix tests
Change-Id: Ide9adf326dda4b995636d629a6b2eed829f42b34
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-05-14 09:52:55 +00:00
Marco Bubke
c4bbc74e37 Sqlite: Improve constraint support
Now you can add more than one constraint. And we added some
new constraints too.

Change-Id: I849d2d2ef6e44c897a65ff2bdfe8d172a345c991
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-05-14 09:15:00 +00:00
Marco Bubke
a86fd58e40 Sqlite: Improve LastChangedRowId
Sometimes we want not only the row id from one table but two or three.

Change-Id: I6d5444a71ecbfe6c1af8073be80b04932ea9268d
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-05-14 09:14:35 +00:00
Nikolai Kosjar
2fb43e6e04 Clang: Fix typo in tests
Change-Id: I37ce70c06f98d6bc5f359f9fe34fd73a1cc51795
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-05-14 05:19:36 +00:00
Nikolai Kosjar
3ddf93ba64 Clang: Remove dead code code path from tests
Change-Id: I75445ad849b701b648e53d120d4796f29092ba15
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-05-13 12:57:16 +00:00
Robert Loehning
a90ec2809c Squish: Don't expect pastes to pastebin.com to appear in list
Change-Id: I02a73244e3aecad906f2c08b37d60ebe1880f534
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-05-12 20:29:02 +00:00
Christian Kandeler
eb96f9900a Fix clang 10 warnings about unnecessary copies in range loops
Change-Id: I3b57869b5a04528518bc432b76768b01e3f53e81
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-05-12 13:45:43 +00:00
Marco Bubke
a4b00a7742 Sqlite: Add update hook and use it to get the last changed id
Sqlite has a function to get the last inserted rowid but very often you
want to get the updated rowid too.

Change-Id: Ie276a5039682813ad16597433996a2959f54d9ba
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-05-12 13:05:57 +00:00
Tim Jenssen
03a1282bdd Merge remote-tracking branch 'origin/qds-1.50' into qds-1.59
Change-Id: Ic0edcce1268b9cc47c91364eeb84e3b3f7dfe134
2020-05-12 10:04:10 +02:00
Christian Kandeler
8e1169f4bf qbs build: Take differences between clang and "apple clang" into account
In particular, clang with version number 10 is not really clang 10 on
macOS.

Change-Id: I8be489fa9cffd63c1ea8f13d181686ab1a575ec6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-05-12 07:31:39 +00:00
Eike Ziller
20ef5c6de3 Merge remote-tracking branch 'origin/4.12'
Change-Id: Ibbf9f16677a58bdcdd3ce63701ffa34db6f44916
2020-05-11 11:36:22 +02:00
Christian Kandeler
27ea67728f qbs build: Suppress more warnings
Amends d08e5c33ff.

Change-Id: Ic842dda51b21427e1989190b44508d54aa1e7120
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-05-07 15:25:31 +00:00
Marco Bubke
f02934458e Sqlite: Add foreign key support
It is still only support references in columns but so far it is enough.

Change-Id: Iebb4866cf738d651270e54357b5e4a2837f05417
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-05-07 12:14:58 +00:00
Tim Jenssen
d5b83fc637 Merge remote-tracking branch 'origin/qds-1.50' into qds-1.59
Change-Id: Ic3ae0fd8c779c0bac8a0f01e87043251b3ce7fd4
2020-05-06 19:51:29 +02:00
Eike Ziller
bf490b62e0 Merge remote-tracking branch 'origin/4.12'
Change-Id: I11936ad9e4515c3c6c9df1d949cc8116aeccd4c4
2020-05-06 09:43:20 +02:00
Robert Loehning
20dc69c45d Squish: Try stabilizing CLI output
Change-Id: I0ff6aaaa62b9596487a279cdf5e597a3b7c83679
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-05-05 15:12:26 +00:00
Eike Ziller
be73f41ad4 Merge remote-tracking branch 'origin/4.12'
Change-Id: Ib95ec2c50c4bbaefd4ed0ec5af191ccc846c824f
2020-05-04 10:52:34 +02:00
Christian Kandeler
f553e3d16a qbs build: Fix sdktool autotest on Windows
Make sure to fix the path separators for the macro that gets passed on
the command line.

Change-Id: I444883e6fc5a2b49d73a1fa52aa1ea26b207185c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-05-04 08:39:15 +00:00
Tim Jenssen
53d161c98e Merge remote-tracking branch 'origin/qds-1.59'
Change-Id: I8a5d7d98b4d75379fe3953fe00bdb939d1722676
2020-04-28 16:18:24 +02:00
Marco Bubke
0e1870368c Sqlite: Add Sqlite::Value
It adds a layer if you don't know if the type is integer, float or string.
It does not handle bytearrays here because so far there is no need. There
are two classes, Sqlite::Value and Sqlite::ValueView. Value owns the
string, ValueView holds only a view the string. So there is no allocation.
It is designed to hold Utf-8 string like Sqlite but it can be easily
converted in and from QString or QVariant but mind about that this is not
free. ValueView has no constructors on perpose because it would be
ambiguous if there would be constructors for the other primitives of
the Sqlite layer like "int64", "double" and "string view".

Change-Id: Ia39364eb2fc1998e5c59fdb4316add22c748507d
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-04-27 18:17:11 +00:00
Eike Ziller
d79febdde9 Merge remote-tracking branch 'origin/4.12'
Conflicts:
	src/plugins/cmakeprojectmanager/cmakekitinformation.cpp

Change-Id: I90ef0063ed24e23bcb3d73fff086f50324faa1e2
2020-04-24 13:58:05 +02:00
Robert Loehning
43454c3fcd Squish: Update expected tree for qbs
Change-Id: I3ba303f0206db193d3e00ce52ac20f516823881c
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-04-23 09:14:08 +00:00
Eike Ziller
8984272769 Merge remote-tracking branch 'origin/4.12'
Change-Id: I296a61fe43aea134de9e7a6ee8042af3f45f5e99
2020-04-23 11:09:15 +02:00
hjk
252a0431d1 Debugger: Fix dumper for std::unique_ptr with custom deleter
Task-number: QTCREATORBUG-23885
Change-Id: Ifba6ef7233886d1c9341e7912d6924cd9afbc4eb
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-04-23 06:08:12 +00:00
hjk
0603eb925f Debugger: Work around deprecated QProcess::start(command)
Change-Id: I30d9656fb9a73399fb79b7a6e956ee0e6f0ab6a1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-04-22 07:52:43 +00:00
Robert Loehning
fd17810e82 Squish: Don't use negative y-position for QMouseEvent
Change-Id: Ib453b41e5906ddf24228b92f8c904b39eea4526f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-04-21 10:04:35 +00:00
Robert Loehning
7c95e17436 Make WidgetTips Squish-testable
Change-Id: I337fdca3541c5b2fb8f09ab2d7721b8950c0bea9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-04-21 10:01:01 +00:00