aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/debugger/qqmldebug.cpp
Commit message (Collapse)AuthorAgeFilesLines
* QtQml: Document QQmlDebuggingEnabler and enableDebugging()Ulf Hermann2025-11-051-0/+34
| | | | | | | | | Without this, the existing documentation for the other methods of QQmlDebuggingEnabler doesn't show up. Pick-to: 6.10 6.8 Change-Id: I97335271035294b7f65d9ac78b9cf0143896a6c3 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QmlTooling: Add security headersUlf Hermann2025-10-311-0/+1
| | | | | | | | | | | | | | | The whole debugging framework (services and clients) should only be used in trusted environments. Therefore it's "significant" despite using network connections and parsing data. Mark the code the enables the debug framework in qqmldebug.{h|cpp} as crtical in turn. Fixes: QTBUG-136187 Pick-to: 6.10 6.8 Change-Id: Ie0a4ad555e088f564a233629e4d99e84b1327486 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
* QML debugging: Flush warningFabian Kosmale2025-01-101-1/+3
| | | | | | | | | | stderr is normally unbuffered, but that behavior can be changed. Ensure that our warning doesn't get lost by explictily flushing stderr. Pick-to: 6.8 6.9 Fixes: QTBUG-132350 Change-Id: I72463a62da50ec6bb551a110c719b061273f2595 Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
* QQmlRefCount: de-virtualize dtorMarc Mutz2023-06-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | Now that QQmlRefCounted ensures no-one uses ~QQmlRefCount() directly anymore, we can make it non-virtual, shrinking the sizeof(QQmlRefCount) from 8/16 to 4/4 bytes (32/64 bit platforms). This requires moving the release() function from QQmlRefCount down into QQmlRefCounted<T>, and static_cast'ing *this to T before calling delete. We need to be careful, of course, that no derived class relied on the implied virtualness of ~QQmlRefCount() making their dtors virtual, so require that all classes that use QQmlRefCounted are either final or have a virtual destructor. Update the toolsupport test and the TypeInformationVersion, as sizeof(QQmlRefCount) was one the items checked. Fixes: QTBUG-114817 Change-Id: I69afd36ec5b63313842c1438e0244503603ed96f Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QQmlDebuggingEnabler: guard deprecated constructor definitionIvan Solovev2022-07-251-0/+2
| | | | | | | | | | ... to prevent compilation errors when built with QT_DISABLE_DEPRECATED_BEFORE >= 0x060400 Task-number: QTBUG-104950 Pick-to: 6.4 Change-Id: Id3d2528ed195ca2ad1da51f40fe81cb05884201b 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>
* qqmldebug.h: Wrap the QML debugging enabler into an unnamed namespaceUlf Hermann2022-06-021-1/+6
| | | | | | | | | | This way compilers will hopefully not complain about the use of global constructors anymore. It's clear now that we want a separate QQmlDebuggingEnabler for each CU. Change-Id: Ief8e748a87612c04a8ca9a8535f10d905675b918 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Fix race condition on QQmlEnginePrivate::qml_debugging_enabledMarc Mutz2022-05-311-1/+1
| | | | | | | | | | | | | C++11 allows static dynamic initialization from different TUs to happen concurrently, which means the QQmlDebuggingEnabler ctor must be re-entrant and synchronized with other users of qml_debugging_enabled. Thankfully, this is just a flag, so the fix is to simply make it atomic<> and use relaxed loads and stores on it. Pick-to: 6.3 6.2 5.15 Change-Id: I0305ab55be86a0e286016a3d1d97ee9bc0e28070 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QQmlDebug: reliably print the debugger warningMarc Mutz2022-05-311-1/+10
| | | | | | | | | | | | | | | | | | | | | | When an executable contains some TUs that pass printWarning and some that don't, the warning could have been lost if static initialization first initialized one that had printWarning=false and only then moved to initializing one that had printWarning=true. Typically, a DLL might pass false here, in which case the user application, initialized later, wouldn't have a say in whether the warning was printed. Use an atomic_flag to independently track whether the warning was printed, so that we reliably print the warning when at least one TU in the final executable requested it. [ChangeLog][QtQml][QQmlDebug] The warning about enabled debuggers is now printed when at least one translation unit in the final executable requests it, independent of the order in which translation units are linked/initialized. Pick-to: 6.3 6.2 5.15 Change-Id: I10af0a46ecb82a8b1a1373eb9332d913c03b20f3 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* use initializer listsTim Jenssen2020-01-241-6/+4
| | | | | Change-Id: Ie33ce3e0fb4a2a373d6eb2f0d3788105409e0389 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Tooling: Use fprintf rather than qDebug() for debug warningUlf Hermann2019-01-281-4/+4
| | | | | | | | | | | | | This warning is generated from a statically called ctor. At that point the system facilities to run QMessageLogger may not be in place, yet. In addition, we actually don't want the message to go through the regular QMessageLogger redirection and possibly filtering. The message should always be shown. Change-Id: Ia89822b26e04591fe309581c3c84a4c7e54759a6 Fixes: QTBUG-73217 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Make qml-debug a proper featureUlf Hermann2017-11-081-0/+2
| | | | | Change-Id: Iea33ff0200f0bbf43953fedba030edf91d0f1417 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix crash when loading cache files generated ahead of timeSimon Hausmann2017-03-071-3/+7
| | | | | | | | | | The offset of the runtimeStrings array differed between a V4_BOOTSTRAP build and the regular library build. This is an intermediate fix until QTBUG-58666 is fixed properly. Change-Id: Id1310ffa82f1079c1acef7730db41186fa62610f Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QmlDebug: Add more information about available debug servicesUlf Hermann2016-11-231-1/+13
| | | | | | | | There is a native debug service that can be used with a native debuger and the QML profiler can make use of the debug messages service. Change-Id: Ie1b2b148e7555d980e03a18c97ec725748c473c7 Reviewed-by: hjk <hjk@qt.io>
* Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-10-101-0/+18
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/quick/quickwidgets/quickwidget/main.cpp src/qml/jsruntime/qv4jsonobject.cpp src/qml/jsruntime/qv4qobjectwrapper.cpp src/qml/jsruntime/qv4qobjectwrapper_p.h src/qml/qml/qqmlengine.cpp src/qml/qml/qqmlpropertycache.cpp src/qml/qml/qqmlpropertycache_p.h src/quick/items/qquickanimatedsprite.cpp src/quick/items/qquickitem.cpp src/quick/items/qquickitem.h src/quick/items/qquickitem_p.h src/quick/items/qquickview_p.h src/quick/scenegraph/qsgcontext.cpp src/quick/scenegraph/qsgdefaultrendercontext.cpp Change-Id: I172c6fbff97208f21ed4c8b6db3d1747a889f22b
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-09-301-0/+18
| |\ | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/quick/qquicktext/tst_qquicktext.cpp Change-Id: I241cd418bb7e7b95e0a0a2ee4c465d48be2a5582
| | * V4: Free up 2 address bits in 64bit modeErik Verbruggen2016-09-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This allows for the OS to use 49 address bits. It also maps JS Undefined to the C++ nullptr on 64bit. Task-number: QTBUG-54822 Change-Id: I7cc90620f499be1506a61aac77d72d067308838c Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * Add a facility to version type information for debugginghjk2016-09-221-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | This serves the same purpose as qtbase/corelib/global/qhooks.cpp, but is meant to be in sync with changes in Qt Declarative internals. Change-Id: I5a4a7d9ca5c340367581749e05d09380590c46fb Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | | QML: Remove QQML_NO_DEBUG_PROTOCOLUlf Hermann2016-07-271-16/+1
|/ / | | | | | | | | | | | | There is no sane way to set this. Change-Id: I5f7b70d1947d469dd01a1454180f01ad0d1c099d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Allow custom debug connectorsUlf Hermann2016-03-261-24/+28
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | 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>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-09-251-0/+2
|\| | | | | | | | | | | | | Conflicts: src/qml/debugger/qqmldebug.cpp Change-Id: I93de5a81b18cdece475870cf7cfba1b9baef2304
| * Add a \sinceLars Knoll2015-09-231-0/+2
| | | | | | | | | | Change-Id: Ib7fbbab5760e1f0c9727f8767ff79f64075fd358 Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
* | Add public methods to set debug services to be loadedUlf Hermann2015-09-151-0/+55
| | | | | | | | | | | | Task-number: QTBUG-47623 Change-Id: I94adba27e1220df6b6f0690df83ea32f956ef917 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | QmlDebug: Rename debug "server" to "connector"Ulf Hermann2015-09-151-13/+13
|/ | | | | | | | | | The fact that we're using QQmlDebugServer for TCP and local connections is an implementation detail that's largely irrelevant to the user. Also, mark the correct parameters as unused if the whole debug protocol is disabled. Change-Id: I8eae1783414016b0ae2cbbf99e9f4f9556a80345 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>