Commit Graph

44349 Commits

Author SHA1 Message Date
Thomas Hartmann
64a1401919 QmlDesigner: Fix notifications
In case we did a mapping to PropertyChanges
we notified the change on the ProperyChange
instead of the target item.

Change-Id: I876a998589cddd16e4968fd1dd0eebaab42863dc
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-25 12:09:58 +00:00
Friedemann Kleint
ede5e0c586 Environment::value(): Use findKey() helper
Also change path() to use value() so that "Path" as used on Windows
will be found as well.

Task-number: QTCREATORBUG-18958
Change-Id: Ie930f6a6e71c76459cf9d089c225f5b1adf52433
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-09-25 11:47:05 +00:00
Tobias Hunger
83210400b1 Benchmarks: Provide infrastructure for benchmarks
... and use it for the profiling report.

Instantiate a Utils::Benchmarker(...) to report a data point (which
will be created at destruction time, reporting the live-time of the
object).

Alternatively you can use Utils::Benchmarker::report(...) to record
your data point.

Independent of how you create a datapoint, it will be reported through
the qtc.benchmark logging category and can get pushed to a database
from a script parsing creator's output.

Note: The plugin-loading uses the existing -profiling infrastructure,
so you need to start Creator with -profile to see data points.

Change-Id: I18e6b84137d0f49ee5e12e7c3d75323005ce5a29
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-09-25 11:33:29 +00:00
Nikolai Kosjar
3c219903de Clang: Fix clang version extracting also for git
\w did not match the '-' in "5.0.1git-81029f14223".

Change-Id: I5f8d8110b93ac3efed2ec903504f86833cc32aa7
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-09-25 11:31:14 +00:00
Nikolai Kosjar
92693b9ac9 Clang: Remove unused messages
Change-Id: Ibe2678de726a867308fac16c6a14b0eff10cbacb
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-25 11:27:12 +00:00
Friedemann Kleint
0c1bb6d913 VcsBaseClientSettings: Skip empty parts when splitting paths
Change-Id: I56106079a31ec0ebc64a038ca41df618b0c09fcf
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-09-25 09:51:03 +00:00
Nikolai Kosjar
810ba37075 Clang: Fix build with older clang
Change-Id: Iafe2f706f90ecce236bc2b3b602b55491df19f94
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-09-25 09:15:37 +00:00
Eike Ziller
b19ea09e25 Merge remote-tracking branch 'origin/master' into 4.5
Change-Id: I20eb743180b51dbedabced277a8f12ebe9620807
2017-09-25 11:03:45 +02:00
Eike Ziller
cfdea6b9c2 Merge remote-tracking branch 'origin/4.4'
Change-Id: I7bf72444b19db20fcc7dc2c9d1f02ec2b30b658f
2017-09-25 11:00:25 +02:00
Orgad Shaneh
75f13f200b Utils: Fix comment in optional.h
Change-Id: I082c939469d0161d5ed5f9da810bd6b553750ce0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-09-25 08:45:17 +00:00
Nikolai Kosjar
40ba7ac16f CppEditor: Avoid blocking context menu invocation
Show the menu always immediately.

If the needed use selections are not up to date for the refactoring
actions, then trigger an async run and if that one finishes, then update
the refactoring menu. In the meanwhile, show a place holder menu item
showing on-going progress (Utils::ProgressIndicator).

Change-Id: Iae7ab37738d79c20aeb1ccda2b1781091e90fdc3
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-25 07:20:58 +00:00
hjk
b21742b464 Valgrind: Merge memcheck{engine,tool}.* files
This is purely mechanical in preparation of moving some
per-run items from the MemCheckTool singleton to
MemCheckToolRunner.

Change-Id: I0fcaf6e90b2d63ca8f3c3eb7130ed73ed494f35b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-09-25 06:55:32 +00:00
Orgad Shaneh
fb39de6a78 Android: Remove outdated condition
Before e57ed31c33 the path was retrieved from
the root project node. In that commit this was changed and it is now read
from the Id.

Remove the argument and always read the path from id.

Also de-duplicate pathFromId.

Change-Id: I6aeef1106bc101ecb130f2c2ccb7226bfc7d0903
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2017-09-25 05:48:24 +00:00
Tobias Hunger
357c27e651 Project: Make subscribeSignal handle signals with Parameters
Change-Id: Ic685da344f7bdf201daf9156ce48c87ced04e023
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-24 16:39:56 +00:00
Tobias Hunger
98862af779 QMake: Improve following of links in .pro/.pri files
* Activate on all characters of $$PWD, and not just on the PWD part
* Handle $${PWD} (also on all characters)

Task-number: QTCREATORBUG-18719
Change-Id: I52db23a671cc78ca4fcaa8a6905bba48b1ecd91b
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-24 16:39:43 +00:00
Claus Steuer
100cd10d6e CMake: Set CMakeRunConfiguration executable and working directory
Since 131c7a1 the executable and base working directory property of
CMakeRunConfiguration objects is no longer set when the project data
is updated. At least the executable is required in the AutoTest plugin.

Change-Id: I31c4cb37983d3983664d178c0f8c08d491f719ad
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-09-24 12:23:45 +00:00
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
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
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