aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/debugger/qqmldebugserviceinterfaces_p.h
Commit message (Collapse)AuthorAgeFilesLines
* Remove the use of Q_QML_PRIVATE_EXPORTAlexey Edelev2024-01-111-8/+8
| | | | | | Task-number: QTBUG-117983 Change-Id: I5790f01d614cd70c7fcc9bd817ec6ace3f3e3730 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Create Translation Bindings without CompiledData::BindingSami Shalayel2022-08-151-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To add translation bindings to qmltc, the methods used to create translation bindings need to be adapted to work without QV4::CompiledData::Binding as it is not available from qmltc. Instead, information already available from the QQmlJSScope should be used, along with a newly introduced helper class QQmlTranslation. Details: Add a QQmlTranslation class that represents a call to qsTr, qsTrId etc that knows how to translate itself (without needing any ExecutableCompilationUnit or Binding). It encapsulates the information needed to create a translation binding. ExecutableCompilationUnit::bindingValueAsString refactored so its functionality can be used without Binding. Instead, it uses only the translationId, see ExecutableCompilationUnit::translateFromId and ExecutableCompilationUnit::translateFrom. Refactored QQmlTranslationBinding to work with QQmlTranslation instead of CompiledData::Binding. Same for QQmlCppBinding::createTranslationBindingForBindable, QQmlTranslationPropertyBinding::create and QQmlCppBinding::createTranslationBindingForNonBindable. Changed TranslationBindingInformation to work without CompiledData::Binding, and also removed static unused QString ProxyTranslator::originStringFromInformation( const TranslationBindingInformation &translationBindingInformation) as I could not find out what this origin string is. Same for the translation debugging in qmldb_preview. Added QmltcCodeGenerator::generate_createTranslationBindingOnProperty. Added #if to avoid compilation error for standalone DOM compilation due to the new QQmlTranslation class. Task-number: QTBUG-105345 Change-Id: Iccd94d5cba4eaf63901233451fec48051c855c2a Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Use SPDX license identifiersLucie Gérard2022-06-111-38/+2
| | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Pick-to: 6.4 Task-number: QTBUG-67283 Change-Id: I63563bbeb6f60f89d2c99660400dca7fab78a294 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QQmlDebugService interfaces: make ctors explicitMarc Mutz2022-05-101-7/+7
| | | | | | | | | | We do not intend mere float values to be implicitly convertible to these types. Even though the ctor is protected, better mark them explicit. Change-Id: I7a15716cadb975e98781bd0dedea765b194981c9 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QQmlDebugService interfaces: de-inline dtorsMarc Mutz2022-05-101-0/+16
| | | | | | | | | | Destructors of polymorphic classes should be defined out-of-line, to pin the vtable and type_info to a single TU. Failure to do so may result in duplicated vtables and false-negtive dynamic_casts. Task-number: QTBUG-45582 Change-Id: Id7a1f17b5a50482c44fc7533e37014fa5fc60f0f Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Qmldebugtranslator: report elide issues correctly inside layoutsTim Jenssen2021-10-121-2/+0
| | | | | | | Task-number: QTBUG-96991 Pick-to: 6.2 Change-Id: I911044893fb6eac54c6fb8f2b236f422bd04a7ae Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* QQmlDebugServiceInterfaces: Fix build when qml_debug is disabledFabian Kosmale2021-07-191-0/+2
| | | | | | | | | | | | | | | | Without the forward declaration, we don't know what TranslationBindingInformation is in foundTranslationBinding(const TranslationBindingInformation &). Moreover, we not only need to check for the translation feature, but also for the qml_debug feature before trying to use the QQmlDebugTranslationService. Pick-to: 6.2 Fixes: QTBUG-95162 Change-Id: I7bb100526a22d73637540729c51fa4cf1b148770 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Implement debugtranslationserviceTim Jenssen2021-04-261-5/+13
| | | | | | | | | | - moves the language feature from the preview service to an own debugtranslationservice - with the help of a proxytranslator the service gets all translate requests Change-Id: Ic26677bb1706abbea2db23e6aafe7a3f00648962 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Make the qtquick and qtqml plugins optionalUlf Hermann2020-07-021-2/+3
| | | | | | | | | We can do the initialization and de-initialization as constructor and destructor functions. Then we don't need to load the plugins. Task-number: QTBUG-84639 Change-Id: I2aeeee7e8d028555e3af91e93518c2c2afd70dbb Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Encapsulate QQmlContextDataUlf Hermann2020-03-231-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This class is not a private detail of QQmlContext. And it is incredibly hard to see who owns what in there. Let's add some civilization ... We enforce refcounting for QQmlContextData across the code base, with two exceptions: 1. QQmlContextPrivate may or may not own its QQmlContextData. 2. We may request a QQmlContextData owned by its parent QQmlContextData. For these two cases we keep flags in QQmlContextData and when the respective field (m_parent or m_publicContext) is reset, we release() once. Furthermore, QQmlContextData and QQmlGuardedContextData are moved to their own files, in order to de-spaghettify qqmlcontext_p.h and qqmlcontext.cpp. When the QQmlEngine is deleted, any QQmlComponents drop their object creators now, in order to release any context data held by those. Before, the context data would be deleted, but the object creators would retain the dangling pointer. [ChangeLog][QML][Important Behavior Changes] QQmlContext::baseUrl() does what the documentation says now: It prefers explicitly set baseUrls over compilation unit URLs. Only if no baseUrl is set, the CU's URL is returned. It used to prefer the CU's URL. Change-Id: Ieeb5dcb07b45d891526191321386d5443b8f5738 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix broken -no-qml-debugAndré Klitzing2020-02-191-0/+1
| | | | | | | | | | 4975a33ba9aa357ba2bca93e292b1fbcfb34c24e introduced QQmlDebugTranslationService. If -no-qml-debug is provided the dummy class misses "public:". qml/qqmlbinding.cpp:401:54: error: 'virtual void QQmlDebugTranslationService::foundTranslationBinding(QQmlTranslationBinding*, QObject*, QQmlContextData*)' is private within this context Change-Id: I0f4ebd4d935a17aa7a679d2d87d98d03b0e1fcbb Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* QmlDebug: add new debugtranslationserviceTim Jenssen2020-02-051-0/+21
| | | | | | | | | | | | Users were asking for having the possibility to see where the translated text will not fit in the reserved/available space. This is more a preparation patch to get the right connectors to change the visualization of findings or maybe log this to a file. Task-number: QDS-1463 Change-Id: Ic0a7a930141d6eeb79964e51c0a165c69888cf5d Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Make qml-debug a proper featureUlf Hermann2017-11-081-2/+4
| | | | | Change-Id: Iea33ff0200f0bbf43953fedba030edf91d0f1417 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Qml Tooling: replace some 0 with nullptrUlf Hermann2017-10-241-7/+7
| | | | | Change-Id: I612d893af69c7e20e019599aa8341f734f5c7749 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-02-241-7/+11
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qv4ssa.cpp src/quick/accessible/qaccessiblequickview_p.h src/quick/items/qquickmousearea.cpp src/quick/util/qquickanimatorjob.cpp tools/qmlplugindump/main.cpp Change-Id: I84474cf39895b9b757403971d2e9196e8c9d1809
| * Fix -no-qmldebug debug build with MSVCKai Koehne2017-02-011-7/+11
| | | | | | | | | | | | | | | | | | [Platform Specific Changes][Windows] Fixed compilation on MSVC with -no-qml-debug configure argument. Task-number: QTBUG-58412 Change-Id: I915ed3d345b3f1e4e5863456522784ab6c9b15cf Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | QmlTooling: Move native debug service into own pluginUlf Hermann2016-11-181-2/+2
|/ | | | | | | | QV4DebugService and QQmlNativeDebugService cannot coexist at the same time. Thus, there is no point in putting them into one plugin. Change-Id: Ic042f7472fce23d504c62ccf96756b0f1bd68534 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Replace debugger and profiler with stubs on -no-qml-debugUlf Hermann2016-07-281-2/+41
| | | | | Change-Id: I0f029d92366b3b508bf024c67b877a14bae27cd6 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Tooling: Convert connects to Qt5 styleUlf Hermann2016-07-281-7/+7
| | | | | Change-Id: I6746b777f73d047f5cf610bfca9b320ac1e13676 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Updated license headersJani Heikkinen2016-01-191-14/+20
| | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: Ic36f1a0a1436fe6ac6eeca8c2375a79857e9cb12 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Rewrite inspector serviceUlf Hermann2016-01-121-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | The inspector service had bitrotted to a point where there was little code to be rescued. Apparently it was never really finished and quite some code didn't make any sense. This change removes some features that were unused or didn't work correctly: 1. Panning and Zooming with mouse wheel and touch interaction. This might be useful in some contexts, but the implementation was so broken that it wasn't worth trying to fix it. The whole idea of doing this on the layer of QQuickItems is not so great because there is no distinction between spontaneous changes triggered by the application and debugging interaction triggered from outside. It might be better to implement such functionality on a lower level, e.g. in the renderer. 2. Reloading the scene with debug changes. Use one of the other debug services to change properties. Clearing the component cache is a rather drastic measure and not necessary here. In turn, we get support for inspecting multiple windows, and all subclasses of QQuickWindow are supported now. Also, show-on-top works now. Task-number: QTBUG-33376 Change-Id: I65497f49c6b46128a600b0e3a31483eeef40313c Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Extend QDebugMessageServiceUlf Hermann2015-11-171-0/+2
| | | | | | | | Add category and timestamp, and allow synchronizing the timestamps with QQmlProfilerService. Change-Id: I8dc67e43e1087e231167fc4cfdfb5f659e00c5b2 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Use QJSEngine instead of QQmlEngine in debug servicesUlf Hermann2015-11-171-3/+3
| | | | | | | | | This allows us to use the debug infrastructure in a JavaScript-only environment. Also add override declarations to make such changes easier in the future. Change-Id: I171271f0ad3868b3de71a8a2316a24602f94200a Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.6' into origin/devUlf Hermann2015-10-221-0/+13
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp src/plugins/qmltooling/qmldbg_debugger/qv4debuggeragent.cpp src/plugins/qmltooling/qmldbg_debugger/qv4debuggeragent.h src/plugins/qmltooling/qmldbg_debugger/qv4debugservice.cpp src/plugins/qmltooling/qmldbg_debugger/qv4debugservice.h src/qml/debugger/qqmldebugserviceinterfaces.cpp src/qml/jsruntime/qv4debugging_p.h Change-Id: I82a4ce1bcd4579181df886558f55ad2b328d1682
| * QmlDebug: Add a debug service for use with native debuggershjk2015-10-161-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This service provides information about the state of the most recently used QmlEngine in a way that can be integrated with "native" debuggers (GDB, LLDB, potentially CDB). Unlike the existing QV4 debugger service, the data extraction is triggered by direct calls from the native debuggers, i.e. has the examined QmlEngine stopped at the time of inspection. Since roundtrips through the native debuggers are expensive, an additional goal is to minimize roundtrips. Change-Id: Ic420129bbc15162197e35b52d92e882c027c9f6d Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
* | Make keys of all debug services publicUlf Hermann2015-09-151-6/+33
|/ | | | | Change-Id: I4af1c351b92f35c11559f68fe9ab60063a665724 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Retrieve services from debug connector, not via static instance()Ulf Hermann2015-08-041-0/+8
| | | | | | | | | This will allow us to remove the instance() methods and create the services from factories in plugins. Also, it allows us to remove the isDebugging member from QQmlEnginePrivate. Change-Id: Id9d9820a910902ecfdb1e8175e215093ce3d0965 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Extract minimal abstract interfaces from debug services.Ulf Hermann2015-08-041-0/+125
We will access the services' functionality through those interfaces once they live in their own plugins. Change-Id: I0a0d7e73c07cb874b3b507cc4a9d304588c87bca Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>