aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/debugger/qml
Commit message (Collapse)AuthorAgeFilesLines
* Debugger: Do not send empty message on shutdownChristian Stenger2020-07-161-1/+0
| | | | | | | | This triggered a soft assert in DebuggerEngine::showMessage() and cleaning up the status bar is not necessary at all. Change-Id: I12d3d5cbc79f178af58ecb0a5c7a3130c880bdad Reviewed-by: hjk <hjk@qt.io>
* Core/Utils: Migrate further to Utils::Idhjk2020-07-061-4/+4
| | | | | | | | The coreplugin/id.h header is kept for downstream for now. Change-Id: I8c44590f7b988b3770ecdc177c40783e12353e66 (cherry picked from commit 430a33dcd9ac80ddb848e41f8f059102857c88aa) Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Debugger: Use QRegularExpression in QmlInspectorhjk2020-06-241-4/+6
| | | | | Change-Id: Ib359738c07a5531fe66656bce5ad42c39e4a9ab2 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Debugger: Some compilation with Qt 6hjk2020-06-241-1/+1
| | | | | Change-Id: Ifffe68a3c902bbad026919171ac906ae05ec86f2 Reviewed-by: David Schulz <david.schulz@qt.io>
* Debugger: Fix a compiler warning about uninitialized variable useArtur Shepilko2020-06-231-0/+3
| | | | | Change-Id: I9e2ce85b3754bf7c832a8ca32412a2c9900344ef Reviewed-by: hjk <hjk@qt.io>
* Use dialogParent() instead of mainWindow()Eike Ziller2020-06-021-2/+2
| | | | | | | | | | There are very few reasons to use mainWindow() directly. Especially for modal dialogs, using dialogParent() is important, since that guarantees the stacking order in case of other dialogs currently being open. Change-Id: I7ad2c23c5034b43195eb35cfe405932a7ea003e6 Reviewed-by: hjk <hjk@qt.io>
* Make TextEditor setup more flexibleEike Ziller2020-02-121-2/+2
| | | | | | | | | | | | | | | | | | | | So far it was only possible to combine TextEditorFactory, BaseTextEditor and TextEditorWidget directly. That TextEditorWidget is also directly a QPlainTextEdit made it impossible to "decorate" the text editor widget with something else without a lot of effort. Make it possible to create a text editor factory that returns an arbitrary widget, as long as it can be "cast" to a TextEditorWidget with either qobject_cast or Aggregation::query. That way the TextEditorWidget instance can be attached to the editor widget via Aggregation. Adapt other code that accesses TextEditorWidget from editors accordingly. Introduce a common method how to do that. Change-Id: I72b8721f3a8a8d8281c39af75253e9c80cbe1250 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: David Schulz <david.schulz@qt.io>
* Debugger: Fix go to location on interruptChristian Stenger2020-01-311-1/+1
| | | | | | | | | | Avoid checking an invalid QUrl - instead restore old code of always creating one an verifying this instead. Remove the now unused FilePath::isLocal(). Change-Id: I037c43e6fbdb7dc1f8901fc70b581f3c94ab503a Reviewed-by: hjk <hjk@qt.io>
* Use isEmpty() instead of count() or size()Alessandro Portale2020-01-202-4/+4
| | | | | Change-Id: I0a89d2808c6d041da0dc41ea5aea58e6e8759bb4 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Make various Q_LOGGING_CATEGORY's staticAlessandro Portale2020-01-151-1/+1
| | | | | Change-Id: I43d3a198b0863d85a7fb305c7cb768f68acbd139 Reviewed-by: hjk <hjk@qt.io>
* Debugger: make Location::fileName a Utils::FilePathDavid Schulz2020-01-061-2/+2
| | | | | Change-Id: I637d39246ff576db1023f08c432a7f7b6aadbbaa Reviewed-by: hjk <hjk@qt.io>
* Debugger: make BreakpointParameters::fileName a Utils::FilePathDavid Schulz2020-01-061-5/+8
| | | | | | Task-number: QTCREATORBUG-23339 Change-Id: Ifc497c14589cd6df10d8219533e100f1919213b3 Reviewed-by: hjk <hjk@qt.io>
* Debugger: Further robustify QmlInspectorAgentUlf Hermann2019-12-021-3/+3
| | | | | | | | | | | | | | | | | | | | | When (re-)querying the root contexts, make sure we clear the old queries first. One of the QML engines in the target may have created an object, causing the contexts to be re-queried while queries for other engines are still running. This would cause mismatches between the m_engines and m_rootContextQueryIds arrays. In turn, in onResult() we would access an invalid index in the m_engines array. Furthermore, make the assert that guards against such an invalid access a QTC_GUARD and log the pending queries before they are cleared. When the target replies to the now-invalid root context queries we will end up in the default branch of onResult, m_qmlEngine->expressionEvaluated(), and that one silently ignores unknown query IDs. Task-number: QTCREATORBUG-22654 Change-Id: I1fe4751ea3592eb26c494696bea3d84fa3e62617 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: hjk <hjk@qt.io>
* Merge remote-tracking branch 'origin/4.10'Eike Ziller2019-09-121-1/+1
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: cmake/QtCreatorIDEBranding.cmake qbs/modules/qtc/qtc.qbs qtcreator_ide_branding.pri src/plugins/projectexplorer/gcctoolchain.cpp src/plugins/qmldesigner/components/stateseditor/stateseditormodel.cpp Change-Id: Iffdf48e782a734107ea170ebb3812e997cea0e7b
| * Fix MSVC warningsOrgad Shaneh2019-09-111-1/+1
| | | | | | | | | | | | | | | | | | | | * Missing `this` captures * Implicit size_t -> int conversion * Unused argument * Suppress warnings in clang headers Change-Id: I7083ce6ab22ee22ecc1258539e77c790acc78df1 Reviewed-by: hjk <hjk@qt.io>
* | Debugger: Move toFileInProject to QmlEnginehjk2019-09-022-0/+16
| | | | | | | | | | | | | | The only user. Change-Id: I443cbfab20739fb43a45848355110f879b0f3041 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | Debugger: Remove unused QmlEngine::startupMessageFilterConnectionhjk2019-08-191-3/+0
| | | | | | | | | | Change-Id: Ifeda7c4956d6abdfc06f602d4e3011a6056e3186 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Debugger: Remove unused QmlEngine::sourceEditorshjk2019-08-191-11/+0
| | | | | | | | | | | | | | It look like it has been always empty for a while. Change-Id: I4d169294a93f22ffa6a49203e2cd34a9e0bf924c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Debugger: Work around a Qt deprecation warninghjk2019-08-021-1/+1
| | | | | | | | | | Change-Id: Ia396ec2a4b50b39692d659d107ef5bb7e5e5e5bd Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | Compile fix with recent Qt devhjk2019-07-291-4/+2
| | | | | | | | | | | | | | | | | | The reasoning in 1b4766e26c6b did not take into account that the scope of QT_NO_JAVA_STYLE_ITERATORS may change over time, as done with f70905448f6 in Qt base. Change-Id: Ib1966ff26c4d36d5f62e149d6b45baa4aecf825d Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | Avoid warning on empty expressionshjk2019-07-231-1/+1
| | | | | | | | | | | | | | | | For some reason, Q_UNUSED includes already a semicolon, adding one on the user side creates an additional empty statement. Change-Id: I9c5e8fac381345a60792cb75e2938fd53958d3b0 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | Merge remote-tracking branch 'origin/4.10'Tim Jenssen2019-07-122-2/+3
|\| | | | | | | Change-Id: Iaf27911e4e9fb762c1a24c84c458462bafe95728
| * Debugger: Robustify QmlInspectorAgent::onResulthjk2019-07-051-1/+2
| | | | | | | | | | | | Task-number: QTCREATORBUG-22654 Change-Id: I4bf0a17581ff3fcdc1a0b6dd9eb21fd2cf9b756c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| * Avoid more deprecation warningshjk2019-07-051-1/+1
| | | | | | | | | | Change-Id: Icc7bb7a4ccf7fc9f89f6f668c194ccd440e5231c Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | Debugger: Introduce a tree level above stack frameshjk2019-06-261-3/+2
| | | | | | | | | | | | | | | | | | | | | | This level is meant to take the role of current thread handler in the long run, allowing per-thread stackviews in each engine. For now, the additional level holds just a single, invisible dummy item playing the role of a "current thread". Change-Id: Ief6131500fc1aa8902f2313038a65840b80b495b Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | Debugger: Use Utils::TreeModel as base for StackHandlerhjk2019-06-241-1/+3
| | | | | | | | | | Change-Id: I3fcc1b3a149f15cf414a1560d91145b623e40c63 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | ProjectExplorer: Use Utils::FileName for Runnable::executablehjk2019-06-211-3/+2
|/ | | | | Change-Id: I584bc18aa19a4c9886af7b13e95052dfd4350b34 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Utils: Rename FileName to FilePathhjk2019-05-281-1/+1
| | | | | | | | More in line with QFileInfo terminonlogy which appears to be best-of-breed within Qt. Change-Id: I1d051ff1c8363ebd4ee56376451df45216c4c9ab Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Debugger: Remove unused fileshjk2019-05-132-821/+0
| | | | | Change-Id: I5b689bcdeaca9499daae3f8b28c8e67c045b9d88 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Debugger: Code cosmeticshjk2019-02-211-0/+1
| | | | | | | Move some constants to internalconstants.h or remove them entirely. Change-Id: Iecd4def3b48130fb390bddf420da672d44e3d6b8 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Help: Rename handleHelpRequest to showHelpUrlEike Ziller2019-01-251-1/+1
| | | | | | | Since that is what it does. Change-Id: I13ffe21cdb625a0df1313f2ff09bf84196f08768 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Fix warning: "Use midRef() instead of mid()"Alessandro Portale2019-01-171-2/+2
| | | | | | | [-Wclazy-qstring-ref] Change-Id: If8a0844b39377feb3772542559655854a92b93cd Reviewed-by: hjk <hjk@qt.io>
* Fix warning: "Unused non-trivial variable"Alessandro Portale2019-01-171-1/+0
| | | | | | | | [-Wclazy-unused-non-trivial-variable] Change-Id: Ia99c3de31fd92205f25624ab60e60370c1aa4538 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: hjk <hjk@qt.io>
* QML Debugger: Do fetch engine propertiesUlf Hermann2018-11-221-4/+5
| | | | | | | | | | | | The properties of the engines themselves are interesting. However, in order to properly display the engines, we need to always update the root context for an engine after we update its properties. This is a good idea anyway because there might be a reference to the engine somewhere else in the object tree, and accidentally updating the engine would clear its root context. Change-Id: If905f4c32ba37106b5620b5af0e157e19ef8b295 Reviewed-by: hjk <hjk@qt.io>
* QML Debugger: Fix object hierarchyUlf Hermann2018-11-222-22/+53
| | | | | | | | | | | | | | | | | Make sure to always find the correct parent and engine IDs for objects to be inserted, and that root objects are always added as children of their engines. As the root objects don't show up in the engine's children(), but we adjust the root objects' parent IDs to point to the engines, the root objects were sometimes shown as children of the engines, and sometimes as top level root objects. Furthermore, make sure not to fetch any parents of engines. Otherwise we get a much more complicated object hierarchy than what we actually want to see, and the invariant that each engine is at the root of the tree breaks. Change-Id: I6967f0b369149a8d6db3ab89f1479c942f6fcbf7 Reviewed-by: hjk <hjk@qt.io>
* qmljs: update parserMarco Benelli2018-11-222-4/+2
| | | | | | | | | Update the qtcreator qmljs parser to the one of Qt 5.12. It supports EcmaScript 7. Task-number: QTCREATORBUG-20341 Change-Id: I0d1cff71402ba17e22cde6b46c65614e162280de Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Debugger: Add multi-engine support for QML inspectorUlf Hermann2018-11-213-47/+78
| | | | | | | | | | The engines are listed as virtual root items for their contents. This way, when we need an engineID we can walk up the tree of watch items and the last valid one will be the engine. Fixes: QTCREATORBUG-21486 Change-Id: Ib110457dc65523c1e2b75aa073f6cd399bbc9532 Reviewed-by: hjk <hjk@qt.io>
* QML Inspector: Use lists of int as selectionsUlf Hermann2018-11-202-55/+40
| | | | | | | | | | The inspector service natively supports multi-selection. Instead of converting between multi and single selection all the time, just use the multi selections and only collapse to one row when interacting with the view. Change-Id: Ie969225f955c61b306cfbec4973ffc724ef1e224 Reviewed-by: hjk <hjk@qt.io>
* QML Inspector: SimplifyUlf Hermann2018-11-202-274/+72
| | | | | | | | Since we don't need to support the Qt Quick 1 clients anymore, we can drop some code. Change-Id: I7afcad8024392f058a35b3ed0d28d2172587552a Reviewed-by: hjk <hjk@qt.io>
* QmlDebug: Remove outdated clientsUlf Hermann2018-11-191-35/+1
| | | | | | | | The declarative* clients are only used with Qt Quick 1. We don't need them anymore. Change-Id: I102fe93b3acd4b23cc01aff5eb9f12540625fe5e Reviewed-by: hjk <hjk@qt.io>
* Merge remote-tracking branch 'origin/4.8'Eike Ziller2018-10-222-19/+4
|\ | | | | | | | | | | | | | | Conflicts: src/plugins/debugger/debuggeritem.cpp tests/unit/unittest/unittest.pro Change-Id: Id2e4e9c2bc87b2556d7c2845aea3fe2fa11b630b
| * Debugger: Rework step{In,Out,Over} handlinghjk2018-10-162-19/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Main menu action pass operation to current engine, everything else is handled there. Combine execute{Step,Next} and execute{Step,Next}I functions. Implementation were mostly similar, in some cases unneeded (the instruction-wise version e.g. for Python) Drop GDB-isms 'step', 'next' in favor of 'step in' and 'step over'. Change-Id: I232232bc7a67d9d297a74f1c81dc43be96787d34 Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | Merge remote-tracking branch 'origin/4.8'Eike Ziller2018-10-161-1/+1
|\| | | | | | | Change-Id: I0ff6f659b7ccd4ff5a79e422a1d54488508fe05f
| * Remove hard-coded disabling of debug logsOrgad Shaneh2018-10-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | Instead, set the default level of all logs to QtWarningMsg. The call to setFilterRules overrides the user preferences in qtlogging.ini. Change-Id: Id5f6cd550d14ff7f45ae04c5d3110e0bafb0f072 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: hjk <hjk@qt.io>
* | Debugger: Strip QLatin1* where possibleOrgad Shaneh2018-10-132-12/+12
|/ | | | | Change-Id: Idcab23875b5dc2ecf55e3303f417b995e2252720 Reviewed-by: hjk <hjk@qt.io>
* QML Debugger: Make sure to claim break points before CONNECTUlf Hermann2018-10-111-9/+12
| | | | | | | | | Otherwise we have a race condition. The breakpoints may be hit before they are set. Change-Id: Iccdd64758b150acdfadc18cba88abdf841feb6c7 Fixes: QTCREATORBUG-21253 Reviewed-by: hjk <hjk@qt.io>
* Debugger: Allow watching complex expression for QMLChristian Stenger2018-09-241-1/+2
| | | | | | | | | | | | Latest restructuring made the 'Add Expression Evaluator' action to a no-op when not debugging. Reflect this by disabling the action as long the user is not debugging and allow complex expressions to be evaluated for QML as well. Fixes: QTCREATORBUG-19050 Change-Id: I2d6421a121e2169981b992a617f4d2b7264a8091 Reviewed-by: hjk <hjk@qt.io>
* Debugger: Do not remember persistent layout settings per enginehjk2018-09-111-1/+1
| | | | | | Fixes: QTCREATORBUG-21006 Change-Id: Id3c2062eb5b42808d666f0fc3620a82666fe14a2 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Debugger: Streamline ThreadHandlerhjk2018-08-212-3/+3
| | | | | | | | | | | | - Use the TreeItem/data pattern recently introduced with Breakpoints to remove the need of keeping track of id/object mapping. Opens possibility to have thread groups as intermediate level. - Use the ThreadHandler directly as model for the thread combobox to remove the need of manual combo box updates. - Move setting current thread from individual engines to central code. Change-Id: I030e21a4aa5ab30b0efbc84528d9cecf29cbbe30 Reviewed-by: David Schulz <david.schulz@qt.io>
* Debugger: Make most views per-engine instead of singletonshjk2018-08-175-206/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a step towards properly supporting multiple debugger sessions side-by-side. The combined C++-and-QML engine has been removed, instead a combined setup creates now two individual engines, under a single DebuggerRunTool but mostly independent with no combined state machine. This requires a few more clicks in some cases, but makes it easier to direct e.g. interrupt requests to the interesting engine. Care has been taken to not change the UX of the single debugger session use case if possible. The fat debug button operates as-before in that case, i.e. switches to Interrupt if the single active runconfiguration runs in the debugger etc. Most views are made per-engine, running an engine creates a new Perspective, which is destroyed when the run control dies. The snapshot view remains global and becomes primary source of information on a "current engine" that receives all menu and otherwise global input. There is a new global "Breakpoint Preset" view containing all "static" breakpoint data. When an engine starts up it "claims" breakpoint it believes it can handle, but operates on a copy of the static data. The markers of the static version are suppressed as long as an engine controls a breakpoint (that inclusive all resolved locations), but are re-instatet once the engine quits. The old Breakpoint class that already contained this split per-instance was split into a new Breakpoint and a GlobalBreakpoint class, with a per-engine model for Breakpoints, and a singleton model containing GlobalBreakpoints. There is a new CppDebuggerEngine intermediate level serving as base for C++ (or, rather, "compiled") binary debugging, i.e. {Gdb,Lldb,Cdb}Engine, taking over bits of the current DebuggerEngine base that are not applicable to non-binary debuggers. Change-Id: I9994f4c188379b4aee0c4f379edd4759fbb0bd43 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: hjk <hjk@qt.io>