Commit Graph

41901 Commits

Author SHA1 Message Date
BogDan Vatra
cf4ee59cf0 Make it easy to set a kit matcher.
Using a function to set a kit matcher is much easier that crating a new
class. It also enables an easy way to reuse classes that are using it.
E.g.
DeviceProcessesDialog processDialog;
processDialog.kitChooser()->setKitMatcher([](const Kit* kit) {
   return kit->isValid() && other_checks_with(kit);
});

Change-Id: I4e2fc7c52038902412cec5331504230bb8160ceb
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-07-20 10:44:56 +00:00
Nikolai Kosjar
f51a403518 Clang: Send unregisterProjectParts only with non-empty list
Change-Id: Id11d420c481758ccd58921dddc92c6036c9204e1
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2015-07-20 10:33:13 +00:00
Nikolai Kosjar
2203565cad CppTools: Ensure that ProjectPart::id() != " "
Change-Id: Ic928380f711e58008ed66691137c238598a5c26a
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2015-07-20 10:33:05 +00:00
Nikolai Kosjar
b4464d8f4b Clang: Shorten debug output
...by writing unsaved file content and project part arguments to
temporary dirs.

Change-Id: Ic411700cb3da756788bbb315851ff38b0100fe71
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2015-07-20 09:58:34 +00:00
Nikolai Kosjar
a3056e8922 CppTools: Fix removedProjectParts()
It compared pointers, not ids.

Change-Id: Ic77c64e452f8abfe9a35b74591f0f3baeebcf7f0
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2015-07-20 09:49:26 +00:00
Nikolai Kosjar
420bc69739 CppTools: Use project part ids instead of file paths
File paths are not unique since e.g. each qbs group in a file is mapped
to a project part.

Change-Id: I7df3f224dd23046b869f2588b8a34eb26cfc0b1a
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2015-07-20 09:49:14 +00:00
Nikolai Kosjar
95c90dcd42 Clang: Tests: Use global temporary dir to remove test file later
Change-Id: Ic31428db15ebbc3a4fc5d5a24723d3a557b77b58
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2015-07-20 09:48:40 +00:00
Orgad Shaneh
0926d63d56 Sdktool: Only execute tests with -test argument
+ add an autotest that executes it

Change-Id: I7a9e1cd409bccd77776eefb0e832c92c51bc2bd5
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-07-20 08:45:43 +00:00
Christian Kandeler
b67a8e31dd qbs build: Remove outdated property.
Change-Id: I67e995793d1a818e6b0f2536c2410925f2edffa6
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
2015-07-18 06:42:59 +00:00
hjk
503e4a08cb Utils: Properly terminate loop in Environment::diff()
The iterator needs to be tested against the end() of
the same container.

Change-Id: Ia4d208650d922d529ea074d4cd0eac9f4ac76b87
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-07-17 13:23:57 +00:00
hjk
6c4c8b8a94 Debugger: Remove cache of fetched item names in Locals Views
This was originally present to prevent multiple evaluations of
the same items when using GDB/MI varobjs. This also prevented
a proper update of child item count. Until recently this did
not negatively affect the GUI due to excessive use of reset()
in the view. This has changed, so the missing update was visible now,
solved here by removing the cache, which is not needed anyways,
since we don't use varobjs anymore.

Task-number: QTCREATORBUG-14705
Change-Id: I3bbcd0525f02c10765f20be3a55708835747b307
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-07-17 13:19:30 +00:00
hjk
db6126b82d Utils: Remove unused TreeItem::m_populated
Left over from the original implementation used for the VariableChooser.

Change-Id: I164cb306815823c988b6d79966f007298f6d1e59
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2015-07-17 13:04:41 +00:00
hjk
38d2baa2dd Debugger: Ask JS debug server to evaluate(something) only when stopped
The server on the Qt side Q_ASSERTs otherwise, killing the application.

Change-Id: I273f12c4bc89bd3488fa6409fdbebc6a6ac2b606
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-07-17 12:41:57 +00:00
Christian Stenger
569932496b Refactor handling of statically deployed files
This is a partial fix for QTCREATORBUG-14490.

Change-Id: I014554e371c222a844c16196a1e3106fd5e45f9e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-07-17 12:34:59 +00:00
Nikolai Kosjar
73cee4d64a Clang: Tests: Mini refactorings
Change-Id: I4a058d4c68c126d74badfc699a239ef9b2790f3a
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
2015-07-17 11:33:49 +00:00
Nikolai Kosjar
e8041f2254 Clang: Update class name in assert
Change-Id: Ib7aa42fbe8cc66fa8629cf9079e81fd0449fe14d
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
2015-07-17 11:33:38 +00:00
Nikolai Kosjar
09ce021627 Clang: Fix command name for QDebug
Change-Id: If29a41aaefeda725965a85f0c7ff47124e2a23c7
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
2015-07-17 11:33:33 +00:00
Tobias Hunger
4dbc0bdbf7 Wizards: Do not offer UI files in Qt Quick projects based on qmlproject
Task-number: QTCREATORBUG-14712
Change-Id: Ic171cbeb4b5e4c52f872c7c4ccedcbfa61be4ab8
Reviewed-by: Robert Loehning <robert.loehning@theqtcompany.com>
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2015-07-17 11:02:19 +00:00
hjk
c1e418c290 Debugger: Don't do unnecessary work
... after the "Sort Members of Classes Alphabetically" option is
toggled. The option only influences the contents of the "Locals
and Expressions" view, so it is sufficient to update only that.

Change-Id: I9eade679eddbfb108c7ed478cce6c13fadcca317
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2015-07-17 10:42:33 +00:00
hjk
2d30693450 Debugger: Fix LLDB extra dumper passing
Change-Id: I1601a894b8adb3365894b21e06d4929e381b7a01
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2015-07-17 09:38:33 +00:00
Marco Bubke
2443f18b85 Clang: Reparse the translation unit for unsaved file changes
Change-Id: I49711ce040a995f193d36961e010decc27c34c4c
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-07-17 09:08:08 +00:00
hjk
efada54950 Debugger: Fix enable state of breakpoint command text field
There was no actual error in practice, as the handling was lumped
together with the tracepoint checkmark, which (accidentally) did the
right thing in all cases.

Change-Id: Icf12aaf0c48855b747d25a0252c8215e259c4227
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2015-07-17 08:51:42 +00:00
hjk
af394ecc8b Debugger: Hide "Tracepoint only" item from breakpoint options
Did only work for Symbian, for now the user can use something like

   echo Trace hit!
   continue

in the "Commands:" field instead.

Change-Id: Ib7ad273bc6de4bbd46845c9e1c75c99e5bddd2bc
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2015-07-16 13:54:52 +00:00
hjk
d4206752ca Debugger: Only pass environmental differences to inferior
This amends 0f46ad4a55.
Passing the whole environment is unneeded, and can cause
problems with multi-line variables.

Change-Id: I49a32c550ba52737bb8f797e227bb883be8b1df1
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2015-07-16 13:09:58 +00:00
hjk
7a675e2d64 Utils: Make Environment::diff() result not contain common entries
The resulting diff contained all the items that were equal as well.
Since the function was unused so far, no real harm was done,
but the function would be useful to have in the debugger.

Change-Id: Ia0b0cea79cfc3ee5442aaf7bb392121590c0f338
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-07-16 13:09:51 +00:00
hjk
799461ee7a Debugger: Fix evaluation of "this" item in JS debugger
Change-Id: I88a502f044fca4c842c21563988d0a95e128c664
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-07-16 13:00:56 +00:00
Marco Bubke
f6d67bebcf Clang: Decrease the priority of operators
Change-Id: Ib04d2a14989fd221ab6d8f36c92d3520261b99ee
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-07-16 12:55:22 +00:00
Marco Bubke
5df8085529 Clang: Remove the hint and snippet field from the CodeCompletion
It is not used and is producing overhead.

Change-Id: I1398b18a40c0f5c0b90fe4c058996d7eb109f9f2
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-07-16 12:54:58 +00:00
Marco Bubke
336501943e Clang: Add tooltip for clang snippets
Change-Id: Ifccfd72c52910c6e1086d6c782552c60fbb89f5f
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-07-16 12:54:48 +00:00
Nikolai Kosjar
8d23d80139 Clang: Clear the project part completely on remove
Change-Id: I6fdb1766a3b407fbaaf86b0216a0dd710673aec1
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2015-07-16 12:31:15 +00:00
hjk
f77f6e2144 Debugger: Make QmlEngine heed "Sort Struct Members Alphabetically"
Change-Id: Ib24e62c60eea4b0af355c3e93e48a78dc0b51efc
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-07-16 12:19:12 +00:00
Robert Loehning
184b161224 Squish: Adjust expectations when using clang codemodel
Change-Id: I204ff6eb3820f67d50f8f4b77012d538741cec47
Reviewed-by: Robert Loehning <robert.loehning@theqtcompany.com>
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-07-16 12:18:37 +00:00
hjk
3f084fa026 Debugger: Split update/expand paths also in mixed engine
Change-Id: Ic341e4a3e974cfde3fbf4afd8cef41080b922067
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-07-16 11:55:31 +00:00
hjk
c81407f28d Debugger: Lift restriction one-shot breakpoints deletion
This was/is a workaround to not lose the extra information carefully
crafted one-shot-breakpoints might carry (e.g. conditions). However,
it gets into the way when simple one-shot breakpoints are used
automatically ("Jump to line", or native-mixed debugging),
so actually deleting the bp in the ui if it's gone on the debugger
side seems the lesser evil nowadays.

Change-Id: If00dc4e8f27881236c05b17109b57d7c53d424ab
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-07-16 11:52:32 +00:00
Marco Bubke
0bc18df655 Clang: Do not work on unspecified values in ProjectParts::remove
Change-Id: Icc322bc64988cbc1b5ec4e6d6474b1b6b956c667
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-07-16 11:51:13 +00:00
Nikita Baryshnikov
7bc397b1ff GitPlugin: reorder namespaces endin
that is all:)

Change-Id: Idf32e241f6c94f5717518b4e0f66f41ea8aed034
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-07-16 09:42:01 +00:00
hjk
6c9c79d058 Debugger: Make LocationMark draggable
Issue a DebuggerEngine::executeJumpToLine() in response.

Change-Id: I7be5738241ce91f61002d6f6b49c796824569024
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-07-16 09:17:22 +00:00
hjk
63c5fc034b Debugger: Split updateWatchData() paths
There are two cases that do not coincide in asynchronous
engines such as the QmlEngine: Inserting a new watch item,
and expanding the children of an existing item.

Change-Id: Ic98a5f1e89aca37146039a241de737c407606e83
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-07-16 08:05:36 +00:00
hjk
66964ac91c Debugger: Rework QmlEngine watcher expansion
Use callbacks in QmlEnginePrivate::evaluate(). This separates the
four code paths through the machinery into three separate handlers
and one direct access to the console.

This also fixes a bug where items were put into 'debuggerCommands'
but attempted to be removed from 'updateLocalsAndWatchers'.

Introduce a QmlEngine::updateLocals similar to what the other
engines do. Let the frame() and assignValue() paths use it.
Keep track of pending changes and call notifyUpdateFinished
if and only if the pending lookup queues is empty.

Finally, remove some dead code.

Change-Id: I173a52911d0de994b849fc6ab4f52ef7f64a8ba5
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-07-16 07:21:34 +00:00
hjk
1adbcc03f8 Debugger: Start using callbacks in QmlEngine commands
Version, Backtrace, Frame, Scope and Lookup for now.

Change-Id: I615c8f8c00484e9bb1742485f24bdfc537f83021
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-07-16 06:10:46 +00:00
Christian Kandeler
91d248c28f Update qbs submodule.
To HEAD of 1.4 branch.

Change-Id: Id8b7ecc1dbcbe381c5766666e4cc91c75ad502f4
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-07-15 14:25:25 +00:00
Marco Bubke
e9c2148806 Clang: Reserve result vector in CodeCompletionChunkConverter
Change-Id: If05c053afd0e422bb407e85bd2d403690084d637
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-07-15 13:54:08 +00:00
Marco Bubke
9795a50fdd Clang: Reserve result vector in the CodeCompletionsExtractor
To prevent re-allocations.

Change-Id: I25f8d56bc8e55938e1888364414bc316da7fdf6c
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-07-15 13:53:59 +00:00
Marco Bubke
fbd549f213 Clang: Prevent double spaces for clang snippets
Change-Id: I62f9b9c217570dd6dafc45719e898cc2ac4d2937
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-07-15 13:53:52 +00:00
Marco Bubke
f9899c2da8 Clang: Little speedup for code completion
...by ensuring that the precompiled preamble is created.

Change-Id: I80784b6a79c40a7e452530e8288783f33f881efc
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-07-15 12:20:59 +00:00
Tobias Hunger
dbe4e32201 QML wizards: Do not offer .ui.qml files for Qt 5.3
Qt 5.3 is the only version we are going to support that does
not offer ui.qml file support. So just check for the QtQuick
version shipped in Qt 5.3 to decide whether or not to display
the checkbox.

Task-number: QTCREATORBUG-14712
Change-Id: Ibb2204f2bcff819b749e1ed744c14a2e96769351
Reviewed-by: hjk <hjk@theqtcompany.com>
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2015-07-15 10:14:43 +00:00
Marco Bubke
89bc1fc4c4 Clang: Rename filePaths in ids
UnregisterProjectPartsForCodeCompletionCommand is using them as ids
and not as file paths.

Change-Id: I13a82c1995c60bdb60c72f4fd794aa354fcbb4ef
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-07-15 08:57:42 +00:00
BogDan Vatra
0f46ad4a55 Debugger: Set debuggee environment vars.
Env vars should be set to debuggee not to debugger.

Change-Id: I1ff877e295cb61f3a47c3aec5ffb43dea64df1cc
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-07-15 08:26:58 +00:00
hjk
2901b008ec Debugger: Fix loading core files from the command line
Make  qtcreator -debug [exe,]core=/path/to/core  work again.

Change-Id: I16d1e388d74409d4deed2840dd768eab8c26cf40
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-07-15 07:20:15 +00:00
Marco Bubke
945c0fbc71 Clang: Add code completion for keyword snippets from clang
Change-Id: I91f7af74d811769424928bce1c586a30b5794d6f
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-07-14 16:24:30 +00:00