Commit Graph

52923 Commits

Author SHA1 Message Date
Ivan Donchevskii
68a49c79da Clang: Unify compiler options builders
Make build command the same for all builders.
Minimize differences.

Change-Id: I1cfe5071b3afb4944ed178fff1e57d3aee45d8a9
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-09-22 15:00:48 +00:00
Ivan Donchevskii
736e568d94 Clang: fix clang version extracting
In case it has string ending.
Example: 5.0.0svn

Change-Id: Ie3e154f389a515290e4b09d0fe21e23b9e4c7558
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-09-22 15:00:35 +00:00
Ivan Donchevskii
80a472740d TextEditor: move convenience from texteditor to utils
Allows to use this header without texteditor dependency.

Change-Id: I706f42799c3ea42473a716fa9ef9f3cfbef6fdd4
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-09-22 12:59:35 +00:00
Ivan Donchevskii
a959fe59da C++: remove builtin RefactoringEngine dependency from CppEditor
Move CppRefactoringEngine to CppTools and builtin member
ownership to model manager.

Change-Id: I3e72308559fd2928229f9f25d4dd09beb3f56c34
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-09-22 12:59:20 +00:00
Ivan Donchevskii
55a5ffc1ec C++: remove builtin FollowSymbol dependency from CppEditor
Move FollowSymbolUnderCursor to CppTools and
builtin member ownership to internal model manager.

Change-Id: I97a4f744ec1709ccc0b34fb67b58680973ef566f
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-09-22 12:59:05 +00:00
Ivan Donchevskii
f130de2400 Clang: use HighlightingMarks for hover with Ctrl highlighting
Make this highlighting work without builtin code model
but based on the HighlightingMarks that we already have
from ClangCodeModel.
Redundant parameters are removed by this change.

Change-Id: I73b5dab46ba59d2f813236831818f0a9bc94c5bc
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-09-22 12:58:46 +00:00
Nikolai Kosjar
c73793414b Clang: Replace override with final in AsyncJob
Change-Id: Ie3e2acf4ee81154e9e6d7c785bd773879f9eda38
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-22 10:05:14 +00:00
Nikolai Kosjar
2f5e1e6cec Clang: Inline functions and structures in job classes
Change-Id: I0c6af378c35d768de535546ab07aac546780e954
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-22 08:56:45 +00:00
Nikolai Kosjar
774b9c010d Clang: Move acquisition of document data into DocumentJob
...to remove more boiler plate code in the job classes.

Change-Id: I21b07c1c74c9e2c1cd1cbf302ac801ed583642ed
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-22 08:56:40 +00:00
Nikolai Kosjar
d7678124b3 Clang: Extract base class DocumentJob
...to remove some duplication.

Change-Id: If3e792031dd232687a8f83883783fc55eefee0c7
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-22 08:56:31 +00:00
Jake Petroules
8d84e59168 Update QML type descriptions for qbs
Change-Id: I208e7e96b5a430ae55ca073abee7954c4f2382e1
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-09-22 08:38:24 +00:00
Nikolai Kosjar
93ef552d79 Clang: Rename some enums in JobRequest
...because both are conditions:

    ExpirationReason --> ExpirationCondition
    Condition --> RunCondition

Change-Id: Iae79b11c20618574fac8142710b11b5c16339127
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-22 07:26:05 +00:00
Nikolai Kosjar
ee6a911def Clang: Add a clarifying comment in JobRequest::operator==
Change-Id: I5961afbef0408c9993e5cf8300d905683e3e1e80
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-22 07:25:58 +00:00
Nikolai Kosjar
4c571f4056 Clang: Simplify creation of JobRequest
Do what can be done in the constructor instead of relying on the
clients.

Change-Id: I5f475b5309afb37e34d228e54ad3c12f1698d72b
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-22 07:25:53 +00:00
Nikolai Kosjar
3b415dbd04 Clang: Centralize job related switch code
...and where applicable, ensure that a warning is printed once a
jobrequest type is not handled.

Change-Id: Ida0b5a175947ebf75c1c4e5116a77f0270825336
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-22 07:25:46 +00:00
Nikolai Kosjar
be868863e5 Clang: Enhance Jobs::cancelJobRequest for FollowSymbol
...which did not exist in the 4.4 branch.

Change-Id: I70fa2ca2e4aa4a422b10883b69eb4d8e4ebce523
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-22 07:25:40 +00:00
Ulf Hermann
63a99936ab QmlProfiler: Unify local and tcp connection mechanism
Use the URL scheme to distinguish between them, check that in
QmlProfilerClientManager and test all possible combinations of URL
parts.

Change-Id: I6583e5bf18eda0344a299a279c12578c4ebc7ffe
Reviewed-by: hjk <hjk@qt.io>
2017-09-21 14:54:57 +00:00
hjk
63e2f9ccdb Debugger: Remove non-const access to RunParameters
The idea is that they shouldn't change after start() to
be re-usable for an additional run later.

Change-Id: I272fc975657b0d8b5b13a07d58bd0b626868d32e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-09-21 12:46:52 +00:00
hjk
526e217ce9 Debugger: Centralize abort handling
... and apply even more force on the second trying by forcing
ramp down of the runControl itself instead of hoping that it
would pick up hints.

Change-Id: I9d0f4130cb9a137b91c9fa81c3d255f236f98be0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-09-21 12:46:13 +00:00
Marco Bubke
ed2ae5fa81 Sqlite: Improve SqliteStatement
There are now only value and values methods. value returns an optional
and values are returning a vector. The result value count has now be
specified instead of the result value list.

Change-Id: I17a0741d5e838b4bf4b9486825c870ada1722584
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-21 12:35:36 +00:00
Marco Bubke
e88a081213 Utils: Import std::experimental::in_place to Utils namespace
It is needed to construct an optional in place.

Change-Id: I92e6bec6a33b469d806d3144ea9eb8c64d25580f
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-21 12:35:29 +00:00
Marco Bubke
2fc4e17e31 Utils: Add Utils::SmallStringView::empty
It is required by many template function because it is used in the STL.

Change-Id: I5a2b9266d0c9d79bdc37cbbc4e7b62fac7a82b8b
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-21 12:35:24 +00:00
Marco Bubke
816a9175be Sqlite: Extend database
lastInsertedRowId() function was added and more test are now under test.

Change-Id: I02bf11dbab29654dbff9f2cad8c13c0c4d15e3be
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-21 12:35:18 +00:00
Marco Bubke
fc231309e8 Utils: Fix reverse iterators in SmallString
Change-Id: I859c801fdb1ad68d5943b580f07a9e8260ae192a
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-21 12:35:10 +00:00
hjk
0a226c77b0 Debugger: Replace RunParameter::languagues by individual bools
There was almost 1:1 overlap with DebuggerRunTool::is{Cpp,Qml}Debugging,
use one version only.

Change-Id: I4a8f2b7005d3f2e440cdab3eaf6ac476af894308
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-09-21 10:33:39 +00:00
Ivan Donchevskii
32b1244b2a CppEditor: add startGlobalRenaming
Existing built-in functionality is moved there.
Clang part is to be implemented later

Change-Id: I7595898495213c087243cd534b4ba1617b4c27e9
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-09-21 09:20:09 +00:00
Nikita Baryshnikov
c3c9fbfc44 ResourceEditor: fix remove file
Change-Id: I02a1a5376b0ec0d8013f75dcdec6e4b8992f5f15
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-09-21 08:42:05 +00:00
Nikolai Kosjar
89fa23a916 Beautifier: ClangFormat: Format current syntactic entity for no selection
In case there was no selection, the action "Format Selected Text" could
format the whole file (option) as a fallback.

However, there is also the use case of formatting the syntactic entity
under the cursor. Introducing another separate action for this feels
wrong, so remove the fallback instead since there is already an action
handling this.

Change-Id: Ia73f6074433e706bb4c2d375ad5b84dd59bc93a3
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Lorenz Haas <lorenz.haas@histomatics.de>
2017-09-21 07:15:12 +00:00
Nikolai Kosjar
edab564cf0 Beautifier: ClangFormat: Add action "Disable Formatting for Selected Text"
Change-Id: I0786dfdc0679bbdf1cf1157067bd7f572ac7d108
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Lorenz Haas <lorenz.haas@histomatics.de>
2017-09-21 07:14:27 +00:00
hjk
189dbc585e Debugger: Fix misplaced {
Harm was limited, as these were the fallback values for terminal
and working directory that are overridden in all cases with
real RunConfiguations.

Change-Id: I7d3cef1ac814a0ffcf60a8977e0ae13136ea50b5
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-09-20 14:10:49 +00:00
Tobias Hunger
39bf2257c5 ProjectMacro: Prettify output of toByteArray
Remove a stray space in the output if the value of a #define is empty.

Change-Id: I542c092416e00276dc72e31b43215349ecf1ca64
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-09-20 12:40:36 +00:00
Tobias Hunger
32ce2119d6 QmlDesigner: Modernize (nullptr and member initialization)
Change-Id: I4d791427959c32a8fe8f831ecb7bd76ffbee2a97
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-20 12:40:23 +00:00
Tobias Hunger
d366944519 QmlPuppet: Modernize (nullptr and member initialization)
Change-Id: Ifac20a48df8702f9d31042eb8765cbaadb60b25b
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-20 12:40:18 +00:00
Tobias Hunger
2ec0b5a00e CppTools: Fix warning about inconsistent use of override
Use final consistently instead of override.

Change-Id: I38df29fff98273d486bfd97c316492f27737a7c4
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-09-20 12:40:09 +00:00
Tobias Hunger
8fb3105e25 CMake: Add option to auto-create build directories
Add an option to CMakeTools to force auto-creation of build directories.
This does lead to cmake cluttering up the file system with directories, but
does not force users to go through the oftentimes long configuration process
twice (once in a temporary directory and once in the real location).

Task-number: QTCREATORBUG-16794
Change-Id: I68d92fc58638ad0a0a7622b7ef1621e055c9f2a7
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-20 12:39:18 +00:00
Thomas Hartmann
ab1d1daee3 QmlDesigner: Remove exception
An invalid model node has as valid internal node
that can be used.

Change-Id: I4b4f11546645455cbcc058e057402e869b0ae5a1
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-20 12:18:51 +00:00
Thomas Hartmann
6745536f1e QmlDesigner: Fix @NodeInstance
With @NodeInstance we can override the value of any property.

Change-Id: Ib64d8b6823b82f0a809092b2468c008d73a5525c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-20 12:18:43 +00:00
Alessandro Portale
50bd20de21 Welcome: Remove unused image
mode_edit_mask.png must have been added there by mistake

Change-Id: I94c0380f267f473c1ae1347f567ea959f0752496
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2017-09-20 11:51:58 +00:00
Marco Bubke
3118bdcbd8 ProjectExplorer: Convert empty macro to "KEY="
-DKEY is the same as #define KEY 1
-DKEY= is the same as #define KEY

Change-Id: I958a89d7b024999f1a623d4d309513ce342f6f8a
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-09-20 11:51:26 +00:00
hjk
434e895b73 Debugger: Remove parts of the engine parameter fixup phase
The idea is that the fixup should not be needed at all anymore,
instead, static data coming e.g. from the RunConfiguration should
be setup in the constructor, and everything else should be ready
at entry into start().

This also proceeds on path to the planned-but-never-implemented
idea that the RunConfiguration should (at most) be accessed at
RunControl creation time, not later.

Change-Id: I04d622785f5de628a7bb479bc0c39aff7d6cce01
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-09-20 11:49:15 +00:00
Tobias Hunger
899c518c6d Android: Fix ma-make detection
Broken by 71b56d2b9c

Change-Id: I8d92cb1f0ecfcb401f063ba49c357acac8cc832c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-09-20 11:49:01 +00:00
Marco Bubke
2df9a99cac Clang: Add RefactoringDatabaseInitializer
We moved the creation of the tables and indices to an extra class which can
be called from other places. So you can be sure that a database is
initialized.

Change-Id: Ief5b30ced7b9011ca94367aa2578098423dcecd9
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-20 10:45:07 +00:00
Marco Bubke
623135592c Sqlite: Add locking for sqlite transactions
If you use the database in a multi-threaded environment, you must always
your statements in transactions.

For read-only statements, you use DeferredTransaction and write statements
you use ImmediateTransaction. If you mix read and write statements you have
to use ImmediateTransaction. Don't use DeferredTransaction because it leads
to undefined behavior.

Change-Id: Ida298a20f33423c8da09e768a7b658dd8e918f46
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-09-20 10:44:37 +00:00
Marco Bubke
ee5efe06e6 Sqlite: Don't copy values for binding
In Sqlite as you bind value you can bind or simply use a reference to the
bound values. Because we hold the values anyway we do not copy them.

Change-Id: I11c6fa5036ea958c8e48e3a117ad4a002d749c22
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-09-20 10:44:23 +00:00
Marco Bubke
c870199823 Sqlite: Don't use the lower level interface of the statements
We now have the very powerful write and read methods, so using the low
level interface leads only to stupid errors and prevents optimizations.

Change-Id: If2340833977935cb2d319735dee96b0bac33142b
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-09-20 10:44:15 +00:00
Marco Bubke
a83d038208 Sqlite: Improve exception handling
Introducing different exceptions for different error cases.

Change-Id: I4371d1e64d9dca2a9f68dcbaa4a891c55879c1f5
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-09-20 10:43:59 +00:00
Filipe Azevedo
846d89811a Fix unstoppable debugger
For some reason sometimes a user stop request with lldb can trigger
a spontaneous stop, avoiding the debugger to stop correctly.
This change fix the issue by emitting the correct states from
lldbbridge.py.

Change-Id: Ib8a2f4875824f4fff426b2d5e0fc4a79ce48c68e
Reviewed-by: hjk <hjk@qt.io>
2017-09-20 09:49:53 +00:00
Nikolai Kosjar
76006a1353 C++: Fix crash with invalid raw string literal
While parsing a document Bind::asStringLiteral() Token::spell() was
called for a raw string literal token with a Token::literal nullptr.

This is due scanRawStringLiteral() not properly aborting for
invalid/incomplete code and that the code paths handling
multi-line-raw-strings were not limited to the highlighting case.

Address both cases.

Task-number: QTCREATORBUG-18941
Change-Id: I489d288ccbd7b59be396dada846613ff555436cf
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-09-20 07:38:04 +00:00
Christian Stenger
49e0cef765 ProjectExplorer: Fix build with namespaced Qt
Broke with b6e12f4a.

Change-Id: I81af93bfe19801805fd558e3445cd9788f2574b3
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-09-20 07:24:39 +00:00
Christian Stenger
bf5bc72b5a CMakePM: Fix compile with Qt5.6
Broke with be376ae7.

Change-Id: I9c99a7be78c7ec0359cefee84e2e1877d20f25bf
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2017-09-20 05:22:24 +00:00