aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/debugger/qml/qmlengine.cpp
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>
* Debugger: Some compilation with Qt 6hjk2020-06-241-1/+1
| | | | | Change-Id: Ifffe68a3c902bbad026919171ac906ae05ec86f2 Reviewed-by: David Schulz <david.schulz@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>
* 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-201-2/+2
| | | | | Change-Id: I0a89d2808c6d041da0dc41ea5aea58e6e8759bb4 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* 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: Move toFileInProject to QmlEnginehjk2019-09-021-0/+15
| | | | | | | 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-121-1/+1
|\ | | | | | | Change-Id: Iaf27911e4e9fb762c1a24c84c458462bafe95728
| * 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>
* 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: "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>
* Debugger: Add multi-engine support for QML inspectorUlf Hermann2018-11-211-1/+3
| | | | | | | | | | 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>
* Merge remote-tracking branch 'origin/4.8'Eike Ziller2018-10-221-15/+2
|\ | | | | | | | | | | | | | | Conflicts: src/plugins/debugger/debuggeritem.cpp tests/unit/unittest/unittest.pro Change-Id: Id2e4e9c2bc87b2556d7c2845aea3fe2fa11b630b
| * Debugger: Rework step{In,Out,Over} handlinghjk2018-10-161-15/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Debugger: Strip QLatin1* where possibleOrgad Shaneh2018-10-131-2/+2
|/ | | | | 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-211-2/+2
| | | | | | | | | | | | - 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-171-192/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Merge "Merge remote-tracking branch 'origin/4.7'"Ulf Hermann2018-07-251-10/+7
|\
| * Merge remote-tracking branch 'origin/4.7'Ulf Hermann2018-07-251-10/+7
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qbs/modules/qtc/qtc.qbs qtcreator.pri src/plugins/debugger/qml/qmlengine.cpp Change-Id: I31edd50b2301f4d9b64e1c7980c4ed371e00c2dc
| | * Debugger: Fix breakpoint disabling and enabling in for QMLUlf Hermann2018-07-191-10/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As QML currently does not expose a command to atomically enable or disable a breakpoint, we need to remove and re-insert it. The previous code scheduled the removal through a timer, and depending on if the timer hit before the insertion or after, the operation was successful or not. As the QML engine doesn't have to be in a specific state to insert and remove breakpoints, we can just directly send the messages instead and therefore be certain that they arrive in the right order. Task-number: QTCREATORBUG-20795 Change-Id: If69797b2c75e1107ad552f88e709e1580b4164db Reviewed-by: hjk <hjk@qt.io>
* | | Debugger: ModernizeAlessandro Portale2018-07-251-7/+7
|/ / | | | | | | | | | | | | | | | | | | | | | | | | modernize-use-auto modernize-use-nullptr modernize-use-override modernize-use-using modernize-use-default-member-init modernize-use-equals-default Change-Id: I91a6874f0d7b94e9079ab4ef07c23c60c80be9c0 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: hjk <hjk@qt.io>
* | V4 Debugger: Use changebreakpoint command if availableUlf Hermann2018-07-241-2/+24
| | | | | | | | | | | | | | | | | | Newer versions of QML will support proper changing of break points, we won't need to work around it anymore. Task-number: QTCREATORBUG-20795 Change-Id: Idb5aaeb8ea59c7d2fd7c924e336ea259d3573d3d Reviewed-by: hjk <hjk@qt.io>
* | Merge remote-tracking branch 'origin/4.7'Eike Ziller2018-07-101-7/+16
|\| | | | | | | | | | | | | | | | | Conflicts: qbs/modules/qtc/qtc.qbs qtcreator.pri src/plugins/android/androiddebugsupport.cpp Change-Id: I01c4880850ad25432a65bb32849365d2aeb0756f
| * Qml Debugger: Disallow editing of items with childrenUlf Hermann2018-07-091-6/+12
| | | | | | | | | | | | | | | | | | | | | | The debugger will treat any value you put in there as string, and then fail to update the item because it doesn't expect the type to change. Proper editing of JavaScript objects requires quite a bit more UI than this, so disallow it for now. Task-number: QTCREATORBUG-20736 Change-Id: I7bf6e7a3747cde3c6682b66aaa810291f753e85d Reviewed-by: hjk <hjk@qt.io>
| * QML Debugger: Make sure to re-fetch expanded properties on updateUlf Hermann2018-07-091-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | If an expanded object is updated we typically just get the ref for it. If we leave the tree item at "wantsChildren", the debugger will think that the update fails and "adjust" the "child expectation" to none. Fetching the children right away takes care of this. Task-number: QTCREATORBUG-20736 Change-Id: I1b3725e7106a563198962915cbcab8f68ef741a6 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | Merge remote-tracking branch 'origin/4.7'Eike Ziller2018-06-191-0/+1
|\| | | | | | | Change-Id: I3c5d7e9e8c589ad4425cd89d61e1f572f5cb7997
| * Debugger: Use FileInProjectFinder for the console viewUlf Hermann2018-06-141-0/+1
| | | | | | | | | | | | | | | | | | All the functionality to guess local files from remote paths is already there. Change-Id: I5bffeb0f126efef99edbaf152e1a5e9e1d244699 Task-number: QTCREATORBUG-12008 Reviewed-by: hjk <hjk@qt.io>
* | Debugger: Code cosmeticshjk2018-05-311-26/+26
|/ | | | | | | Sprinkling in const and ranged for. Change-Id: I5d11d57f64140021397c23734c7373544ebebb6f Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Finish merging Runnable and StandardRunnablehjk2018-05-231-2/+1
| | | | | | | | | | As all Runnables are known to be StandardRunnables, this here essentially replaces all .is<StandardRunnable> by 'true'. .as<StandardRunnable> by no-op, and fixes the fallout. Change-Id: I1632f8e164fa0a9dff063df47a9e191fdf7bbb2e Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Merge remote-tracking branch 'origin/4.6' into 4.7Eike Ziller2018-05-161-0/+4
|\ | | | | | | | | | | | | Conflicts: src/plugins/qnx/qnxplugin.cpp Change-Id: I8ede5fa9c8daf3001e41fcba7cbee68edb9db3a6
| * QML Debugger: Don't hang if there are no scopes to be retrievedUlf Hermann2018-05-151-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt 5.11.0 contains an optimization that does away with call contexts for simple inline bindings. Also, it doesn't report QML contexts as scopes in the "frame" and "backtrace" commands. Therefore, in those cases "this" is the only thing to be retrieved. Check if we are done when "this" has been retrieved and no scopes have been found. Change-Id: I9e0f545777bc38333938b65a934d42701ec4f807 Task-number: QTBUG-68218 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: hjk <hjk@qt.io>
* | Utils: Purge qtcfallthrough.hOrgad Shaneh2018-04-091-1/+0
| | | | | | | | | | | | | | No longer needed. Change-Id: I9b0bee014df89d4c567f1d2431b5ff9404f5f925 Reviewed-by: hjk <hjk@qt.io>
* | Debugger: Modernizehjk2018-02-011-3/+3
|/ | | | | | | Mostly nullptr instead of 0, but also a few bits of collateral damage. Change-Id: I921991272aca921dcdecf302dfff3716e79dfc24 Reviewed-by: David Schulz <david.schulz@qt.io>
* Debugger: Change semantics of DebuggerEngine::masterEngine()hjk2017-12-151-6/+3
| | | | | | | | | | | Make it return 'this' if 'this' is the master engine itself. Adapt users. Also do not let the QmlEngine try to beginConnection() when the combined engine was isDying() already. Change-Id: I308deae14a3c4966be381f321c0d9dfaf82c40d6 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Debugger: Combine the InferiorShutdown{Ok,Failed} stateshjk2017-12-141-1/+1
| | | | | | | ... into a InferiorShutdownFinished. Change-Id: Icb5394f38f52f7cf300dc83f4eb8f2f0777bbcba Reviewed-by: David Schulz <david.schulz@qt.io>
* Debugger: Combine the EngineShutdown{Ok,Failed} stateshjk2017-12-141-1/+1
| | | | | | | | | ... into a EngineShutdownFinished. They were never handled differently, and the only option is to proceed to DebuggerFinished anyway. So simplify the state machine a bit. Change-Id: Ied3be86fff6750abca578dc6788e4be1d895692b Reviewed-by: David Schulz <david.schulz@qt.io>
* Debugger: Merge EngineSetup and InferiorSetup start phaseshjk2017-12-061-10/+3
| | | | | | | | | It was needed in the past to trigger e.g. gdbserver setup in remote cases which is nowadays handled by separate RunWorkers. Change-Id: I30bce071dab0779cce2e7abef7b31550d8539461 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>