aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/debugger/qqmldebugconnector.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Plugins: Port to QPluginParsedMetaData and CBORThiago Macieira2021-11-011-4/+4
| | | | | | | | | | QFactoryLoader now no longer converts its internal metadata to JSON, so we may as well not do it here either. All of this is internal API, so we can change. Change-Id: I3eb1bd30e0124f89a052fffd16a6f2d82ad568af Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Standardize QJsonArray iterationDavid Skoland2020-10-281-1/+1
| | | | | | | | | When using refs as loop variables, the clang compiler complains (with default settings). This prevents that. Note that QJsonValueRef is used "behind the scenes", which makes this iteration method correct. Change-Id: I5a5f58ca8ad3887bce2009231cbae5a57c107697 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QQmlDebugConnector: Don't complain about new pluginKey if it's unchangedUlf Hermann2018-06-221-1/+1
| | | | | | | | We cannot set the plugin key to a new value if we've already instantiated the plugin. Setting the same value again, is a noop, though. Change-Id: Ib2d2cb3dc20d8d3d7f1673957970f5235e3aeccc Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* use nullptr consistently (clang-tidy)Shawn Rutledge2018-02-261-5/+5
| | | | | | | | | | | | | From now on we prefer nullptr instead of 0 to clarify cases where we are assigning or testing a pointer rather than a numeric zero. Also, replaced cases where 0 was passed as Qt::KeyboardModifiers with Qt::NoModifier (clang-tidy replaced them with nullptr, which waas wrong, so it was just as well to make the tests more readable rather than to revert those lines). Change-Id: I4735d35e4d9f42db5216862ce091429eadc6e65d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Run includemocs in qtdeclarativeThiago Macieira2017-04-261-0/+2
| | | | | Change-Id: I84e363d735b443cb9beefffd14b8c023a37aa489 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-12-141-1/+4
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/qmltooling/qmldbg_debugger/qv4debugjob.cpp src/plugins/qmltooling/qmldbg_inspector/globalinspector.cpp src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp src/qml/qml/qqmlimport.cpp src/quick/items/context2d/qquickcontext2dtexture_p.h tools/qmleasing/splineeditor.h Change-Id: I8f6630fcac243824350986c8e9f4bd6483bf20b5
| * Make sure we cannot reload debug connectors on shutdownUlf Hermann2016-11-301-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | The various Q_GLOBAL_STATICs involved in the loading of debug plugins may be destroyed in any order. If the connector is unloaded before the services, it might get reloaded when one service calls instance(), trying to deregister itself. Prevent this by clearing all the parameters. Change-Id: Iee4a05e09401be916f0339d72eb8b5f2c9eac55d Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | QmlDebug: Allow specifying debug connectors on the command lineUlf Hermann2016-11-241-0/+10
| | | | | | | | | | | | | | | | | | | | With this change arbitrary debug connector plugins can be loaded by specifying them in the "-qmljsdebugger=..." argument. It was already possible to load them by using startDebugConnector(...), but that requires source code modification. Change-Id: I06ec7f54ec65add7cff2846ed4083ea878a04765 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Qml debugger: replace 'foreach' with 'range for'Anton Kudryavtsev2016-09-121-3/+5
|/ | | | | Change-Id: Id48d8a2986e6035042064c27e9453d0678315983 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-05-191-5/+0
|\ | | | | | | | | | | | | | | | | Conflicts: src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.cpp src/qml/jsruntime/qv4engine.cpp src/qml/jsruntime/qv4engine_p.h Change-Id: I89ffccd699bee675732758d039e22224b275d60d
| * QmlDebug: Drop explicit Q_IMPORT_PLUGIN statementsUlf Hermann2016-05-091-5/+0
| | | | | | | | | | | | | | | | | | | | qmake is clever enough to include the plugins without this. Furthermore, the explicit imports duplicate the plugins in static builds and they lead to cross linking from QtQml to QtQuick. Task-number: QTBUG-50306 Change-Id: I822e000481f583f513b863f54f65eb8ff772c0c3 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Allow custom debug connectorsUlf Hermann2016-03-261-8/+5
| | | | | | | | | | | | | | | | | | | | | | | | Expose a generic method for loading connector plugins in QQmlDebuggingEnabler and don't insist on the two known ones when actually loading them. This allows third-party connector plugins to be loaded, for example to pass QML trace events to a generic tracing library. Change-Id: I4f66dfabdbd0c3aff3676f7e2591e0a6c42f8f7f Reviewed-by: hjk <hjk@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Qml: replace QStringLiteral with QLatin1StringAnton Kudryavtsev2016-02-101-1/+1
| | | | | | | | | | | | | | ... in string comparisons. It's more efficient. Change-Id: I3be5a2be9ba5d55546472eac28f5f639a496bf3b Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | 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>
* | QmlDebug: Restructure QPacket and QPacketProtocolUlf Hermann2015-11-171-0/+3
|/ | | | | | | | | | | | | | | | | | | | | | We cannot use the same data stream version for the client and server versions of QPacket and QPacketProtocol should not deal with QPackets but with simple byte arrays because the underlying QDataStream is hard to copy. The new QQmlDebugPacket picks its data stream version from QQmlDebugConnector now, which adjusts it when connecting. As there can only ever be one QQmlDebugConnector, we can keep the version static. The clients need to query the connection for the correct version. We may connect to several different servers sequentially or we may have a server running while using a client, and we don't want to confuse the versions between those. With this in place, all remaining occurrences of QDataStream are replaced with QPacket or QQmlDebugPacket. Change-Id: I3f6ba73fcbfad5e8df917c5feb9308116738a614 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* QmlDebug: Add a debug connector for use with native debuggershjk2015-10-161-3/+12
| | | | | | | | | | This debug connector offers a few simple C functions a native debugger can hook into to communicate with QML debug services. It is the base of the 'native mixed' debugging mode in Qt Creator. Change-Id: I32ce1f21be8e3522dccf1210d4de3b131b819bc5 Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
* Remove quotes from debug connector error messagesUlf Hermann2015-09-151-3/+3
| | | | | | | | | The client expects them without quotes and other error messages don't have quotes (except for some in QQmlDebugServer which have to be replaced anyway). Change-Id: I75716f9223b268697801a91ea506817647e1e594 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Allow specification of loadable debug services via command lineUlf Hermann2015-08-131-1/+11
| | | | | | | | | We don't want to load the debugger when profiling and vice versa. This makes it easier to prevent unwanted services from getting loaded. Task-number: QTBUG-47623 Change-Id: I28893b6218110274a6d30b27805d89dbb443add3 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* Move debugger-specific services into a common pluginUlf Hermann2015-08-041-7/+1
| | | | | Change-Id: Icd4e6a6c57bc3ac65cb43d2329d236012b988678 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Move profiler and engine control services into a pluginUlf Hermann2015-08-041-4/+1
| | | | | Change-Id: I12627a07ceedea4aceafa6f0e630c0cab69d156d Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Move inspector service and QtQuick2 inspector into a common pluginUlf Hermann2015-08-041-2/+2
| | | | | | | | | The inspector service doesn't do anything useful without the QtQuick2 plugin and vice versa. This way we can also use the QQmlDebugPluginManager. Change-Id: I78f154dcc9103ec9ec3d2eda216bfb293231583e Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Add a factory for QQmlDebugService and use it to load pluginsUlf Hermann2015-08-041-0/+10
| | | | | | | | | Debug services can now be added as plugins in qmltooling/ . QQmlDebugConnector will load any service plugins matching the factory's iid before open()'ing the connector. Change-Id: I2e4cabd714018f62cf4d60b0ebd2827a85431964 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Move QQmlDebugServer into a pluginUlf Hermann2015-08-041-1/+13
| | | | | Change-Id: I8dc95f64c6df7303e8f580f191ee35da2284718b Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Simplify QQmlDebugServer::enableFromArgumentsUlf Hermann2015-08-041-0/+8
| | | | | | | | | | We can use the command line arguments already retrieved by QQmlDebugConnector and we can return early in error conditions. Also, make sure we don't pass QStringLiterals to QRegExp. Change-Id: I06ce6eec9ea3adeabb9f4d35de8024eab8729d35 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Extract minimal abstract interfaces from debug services.Ulf Hermann2015-08-041-4/+4
| | | | | | | | 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>
* Move debugger initialization out of QQmlDebugServer and QQmlEngineUlf Hermann2015-07-301-0/+120
QQmlDebugConnector has to check the parameters before deciding if (and what kind of) instance to create. It also has to add the services itself as we don't want to tie a specific implementation of QQmlDebugConnector to a specific set of services. Logic to load the services from plugins will be added in a separate change. Integrating the service initialization with the connector initialization enables us to load the services before the server thread startsi, which will simplify the thread synchronization. QQmlConfigurableDebugService has to recheck for blockingMode once it gets enabled as it cannot rely on being enabled right away anymore. It should have done that already before as it's possible to disable and re-enable services. Change-Id: I9d161d78836bae10d688a90b4c2a32efed320412 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>