Session are captured by hooking in the sqlite changes. They are saved in
blobs and containing inserts, update and deletes. Because the are
semantically coupled to translactions we add a
Change-Id: Ie095558ebc50601fcaae32958ebeeb98b72d73b9
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
To make errors appear faster when developing on Windows
MSVC 2017 and later have this flag to disallow MSVC-specific C++
language extensions. Use it to make code more correct and more portable.
Set this option with add_compile_options() in root CMakeLists.txt to
apply it to all targets.
Add one #include to unittest/gtest-clang-printing.cpp as workaround for
forward template declaration bug in MSVC http://tiny.cc/fa4tpz
Change-Id: Ie0b19701ad773c79ffd2fed24fffbb1dcb29538c
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
We have done it for every getter. Now we do it only once as we ask for
the values. It simplifies the code and the test and could even improve
performance.
Change-Id: Ia7d4a33a77ec7c0a5fda548424fbf8b192f07511
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Binding by names is slower and we never used it.
Change-Id: Ia6b9b78401f8c2711be34b667ac6f08b44418773
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
We don't want an error if pkg-config is not installed.
Change-Id: I142abe3d21649a9010b91707532eb733e2103583
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
There were some subtle errors that lead to test failures.
Change-Id: Ibea24a8a45a47a5c3239da77bd4ed7ddca61ec57
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
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>
...that requires a custom patch to work.
Change-Id: I954286f47112b660dc6ee681dac2250a9e8da0df
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
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>
Also add a extend_qtc_test which checks if the test is known.
Change-Id: Idd3b3a02ac61fce2622cb8681233cfbd96a77bc4
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
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>
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>
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>
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>
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>
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>
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>
This reverts commit b114f77d8a as
"--driver-mode=cl" apparently still disables exceptions.
Task-number: QTCREATORBUG-23000
Change-Id: I9c49d971fafda5e1aca8445f8921e50f323d368f
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Amends 5165c037eb.
Gentoo has the standard library headers installed in e.g.
<installdir>/include/g++-v8 and we excluded those. MinGW with the
standard library headers in <installdir>/include/c++ was whitelisted.
Instead of whitelistening more dirs that could contain standard library
headers, regard
<installdir>/include
<installdir>/include-fixed
as gcc internal include paths to remove. These seem to be stable across
distributions.
Task-number: QTCREATORBUG-23330
Change-Id: I44965d2030b4ea5a9dd269400faf19c3df89f5a6
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Leave the function addExtraCodeModelFlags() around as it's used by
ClangPchManager::ProjectUpdater::toolChainArguments().
This allows us to filter out excess target arguments in a follow-up
change.
Change-Id: I742d713dd1ca6c391ba77c52555dcf4e94cc2ff9
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* The paths on Linux are always "canonicalized" by
GccToolChain::gccHeaderPaths(). Therefore, canonicalize the paths in the
tests, soo.
* Introduce some helper functions to shorten the code.
* Do not break the strings literal paths as this complicates comparing
them.
Change-Id: I0fc8acde0e455a7974baae0d9fdffd3a4060ff74
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
...also on Linux.
That's what clang invoked from the command line does.
Change-Id: I59c48d11fab3b944bb42ca7bb4cd9093a735df60
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Given the (default) include paths of GCC, e.g.
/usr/include/c++/7
/usr/include/x86_64-linux-gnu/c++/7
/usr/include/c++/7/backward
/usr/lib/gcc/x86_64-linux-gnu/7/include
/usr/local/include
/usr/lib/gcc/x86_64-linux-gnu/7/include-fixed
/usr/include/x86_64-linux-gnu
/usr/include
discard gcc-internal paths like /usr/lib/gcc/x86_64-linux-gnu/7/include
as they are not relevant for clang and even confuse it with regard to
#include_next.
Paths below the gcc install dir are considered as gcc-internal. The
install dir is queried with
$ gcc -print-search-dirs
Some GCC distributions, like MinGW, ship the standard library headers in
the install dir. Ensure to not discard these.
Fixes: QTCREATORBUG-22898
Change-Id: Ia85258fb01b72ad073e71390e003fe8268e3b01f
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This will make the build directory size smaller, as only two
pch files will be generated. Not one for every target.
Change-Id: I3eec91e7536eab1c62bff8843f075f0ef7b5fff6
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Used for updating project parts, so move it near RawProjectPart.
Change-Id: I77aeffbdbfb3d2ec0de600f61dcf7fbb7a355a98
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Doesn't have any dependencies into CppTools anymore, therefore moving it
reduces the dependencies of the project managers to CppTools as well.
Change-Id: Ibe728abe59eb88a8877943dca1f48a85163e27ac
Reviewed-by: hjk <hjk@qt.io>