aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
Commit message (Collapse)AuthorAgeFilesLines
...
* | QmlProfiler: Remove binding typesUlf Hermann2015-10-281-3/+1
| | | | | | | | | | | | | | | | | | There is only one type of binding left and as all clients check atEnd() before trying to get the bindingType from the stream we can just remove all of this. Change-Id: I4d50ef4a691630b521292cb622ef539b3494a970 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | qDelete([multi]hash.values()) -> qDelete([multi]hash)Albert Astals Cid2015-10-231-1/+1
| | | | | | | | | | | | | | Saves one iterationg of the container and unneeded allocation of a list Change-Id: I6d8110294343892b25f23520f66e0bf5df2c12cd Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into origin/devUlf Hermann2015-10-2215-57/+1389
|\| | | | | | | | | | | | | | | | | | | | | | | | | 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
| * QQmlNativeDebugConnector: Do not translate warning.Friedemann Kleint2015-10-221-2/+2
| | | | | | | | | | | | | | qWarnings() usually are not translated. Change-Id: I0375e0e21054d33349d3f56ee9ac6f580e366736 Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
| * QmlDebug: Add a debug service for use with native debuggershjk2015-10-165-1/+903
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * QmlDebug: Add a debug connector for use with native debuggershjk2015-10-164-0/+399
| | | | | | | | | | | | | | | | | | | | 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>
| * Only set V4 debugger when service is enabledUlf Hermann2015-10-152-9/+31
| | | | | | | | | | | | | | Otherwise different debug services could steal each other's debugers. Change-Id: Ic0a50333d21c7d20a7124240ea598f8446400ae3 Reviewed-by: hjk <hjk@theqtcompany.com>
| * QmlDebug: Split QV4::Debugging::Debuggerhjk2015-10-146-65/+68
| | | | | | | | | | | | | | | | | | | | ... into a pure interface and a QV4::Debugging::V4Debugger implementation. This is in preparation of a second implementation of this interface to be used with 'native mixed' debugging. Change-Id: I3078dcfe4bdee392a2d13ef43a55ca993e7b88d8 Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
* | Use QStringRef in a bunch of places.wip/dbusSérgio Martins2015-10-181-1/+1
| | | | | | | | | | | | | | Done automatically with clazy static analyzer. Change-Id: Ia0cf8fa24331ab102a3c3c30c2aa92ef1ba772e2 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Put QPacketProtocol into its own static libraryUlf Hermann2015-10-1516-677/+405
| | | | | | | | | | | | | | | | | | | | | | | | We need it in 3 places in qtdeclarative and we could also use it in QtCreator. We don't want to bundle it with the debug client code as it is also necessary for the server. QPacket replaces QQmlDebugStream as it has the same purpose. This also fixes the inconsitent handling of data stream versions. Change-Id: I650fae353f267511c551b427d9169f4d718aa7f2 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-10-142-5/+9
|\| | | | | | | Change-Id: I11ea57222ba5aa683b7bfd7735fbc1d2cf86e875
| * QmlTooling: Rearrange qmltooling.prohjk2015-10-141-4/+8
| | | | | | | | | | | | | | Make the distinction between connectors and services a bit clearer. Change-Id: I5a8de587beaaed4b4b2138d9d50c5b92fea38df9 Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
| * Libraries: Fix single-character string literals.Friedemann Kleint2015-10-131-1/+1
| | | | | | | | | | | | | | Use character literals where applicable. Change-Id: I294fc4cb5cbbd23df9735ba2b398118f37cbe08a Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-09-253-35/+22
|\| | | | | | | | | | | | | Conflicts: src/qml/debugger/qqmldebug.cpp Change-Id: I93de5a81b18cdece475870cf7cfba1b9baef2304
| * QmlDebug: Make sure debug server knows connection before any messagesUlf Hermann2015-09-211-15/+9
| | | | | | | | | | | | | | | | | | In some cases the connection may relay a message to the server directly when calling one of the connect methods. This leads to a crash if the server, due to not knowing the connection yet, cannot reply. Change-Id: Iac2da08c621b70c2e5a1922efad0cd6ae4edc4e1 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
| * Further cleanupsLars Knoll2015-09-152-12/+10
| | | | | | | | | | | | | | Reduce usage of ScopedContext. Change-Id: I84a6a7478065de3398fd0b21596ca1308e78ceb3 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| * Rename currentExecutionContext to currentContextLars Knoll2015-09-151-1/+1
| | | | | | | | | | | | | | | | Now that the other method is gone, let's use the shorter currentContext Change-Id: I2a6fb3b77f83a1ffdf314ad29081e303d17030ed Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| * Store the stack of executioncontext's on the JS stackLars Knoll2015-09-152-13/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This saves one pointer per allocated execution context. Now every execution context that is pushed, allocates two Values on the js stack. One contains the context itself, the other one the offset to the parent context. Things are a bit tricky for with and catch scopes, as those are called from the generated code, and can't open a Scope anymore. In addition, all methods iterating over the js stack frames need to work with ExecutionContext pointers, not ScopedContext's. Change-Id: I6f3013749d4e73d2fac37973b976ba6029686b82 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | V4 Debugger: Eliminate sourcesCollected signals and slotsUlf Hermann2015-09-155-39/+23
| | | | | | | | | | | | | | There is no real reason to handle the "scripts" command like this. Change-Id: I640d878ea9d8cd449e73bf4b90fcf2ef3d68a963 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Rename members of QV4ProfilerAdapter for consistencyUlf Hermann2015-09-152-33/+36
| | | | | | | | | | Change-Id: I7a1ac0a7bd09f518249c8df47abde6adbb546b5a Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Actively translate feature flags between QML and V4 profilersUlf Hermann2015-09-152-1/+36
| | | | | | | | | | | | | | Relying on the enums to be equal is somewhat dangerous. Change-Id: I0d5ebd37a2310b8916e521f7261bbf88786e712f Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | V4 Debugger: Eliminate extra "version" memberUlf Hermann2015-09-152-3/+2
| | | | | | | | | | | | | | It's enough to have one of them. Change-Id: I7970ad78e1e478455fc4a403f50954b8d572baac Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | QQmlDebugServer: Drop duplicate service removalUlf Hermann2015-09-151-2/+0
| | | | | | | | | | Change-Id: I84dbca02dfa5ae7b0dd094b9999d08459f8e2084 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Remove unused debuggerMap and debuggerIndex from QV4DebugServiceUlf Hermann2015-09-152-18/+3
| | | | | | | | | | Change-Id: Ibd8cf48b90f98bf6ec1411e669c5824cd10293d2 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Improve usage message for -qmljsdebugger arguments.Ulf Hermann2015-09-151-6/+47
| | | | | | | | | | | | | | | | | | Document all the options available and avoid the extra "Cannot load plugin" message if invalid options were given by not trying to start the thread with an empty plugin name. Change-Id: I87cb4185b58a8672db2ac3ea9c6b8b2155cbbe5d Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* | Make keys of all debug services publicUlf Hermann2015-09-156-33/+26
|/ | | | | Change-Id: I4af1c351b92f35c11559f68fe9ab60063a665724 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Fix profiling of QML/JS compilationUlf Hermann2015-08-241-1/+1
| | | | | | | | | | | | | | | | | | | The compilation of .js resources was missed and the compile times were underestimated because the dependency resolution and error checking wasn't factored in. In particular we only profiled the done() step for QQmlTypeData. However, JavaScript compilation also occurs in the dataReceived() step of QQmlScriptBlob and QQmlTypeData will already parse the program into an AST at that step. Compile steps can be nested now, but considering the fact that significant time may be spent before and after compiling dependencies for a parent module, this seems to be the best way to model them. Furthermore, in order to not needlessly convert QUrl to QString at runtime, the compilation profiler saves the files now as QUrl. Change-Id: I215a87787f9117c069ecd77b2d913cc0b0ff3c89 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Remove unused member variable QQmlDebugServerThread::m_block.Friedemann Kleint2015-08-211-1/+0
| | | | | | | | | | | Fix CLANG build error: qqmldebugserver.cpp:115:10: error: private field 'm_block' is not used [-Werror,-Wunused-private-field] bool m_block; Change-Id: I3be87c1ec0347b46e90e40c8769aeb507cf22c26 Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
* Clean up data format for V4 debug connectionUlf Hermann2015-08-192-44/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | This changes the type announced for functions to the actual JavaScript type "function". The type for null is also wrong: it should be "object". However, older QtCreators cannot distinguish between null and {} if null gets the correct type, unless you explicitly compare x === null in an expression evaluator. For this reason the fake "null" type is kept for now. Also, the value field of undefined is now set as QJsonValue::Undefined which causes it to be omitted when sent over the wire. This is the logical thing to do. In addition we add type and value fields for all data members mentioned in a response, not only the ones specifically asked for. The value field is the actual value for any primitives (including strings), or the number of properties for composite types: objects, arrays, functions. In turn, the "ref" members are omitted for primitive types, so that we don't have to hold references to them in the debug service anymore. Even old QtCreators can deal with verbatim data members without "ref". Task-number: QTBUG-47746 Task-number: QTBUG-47747 Change-Id: I773e6418c39cd9814aadb5fb5ef7e109f9a4e618 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* V4 debugger: Fix expression evaluationUlf Hermann2015-08-194-24/+37
| | | | | | | | | | | | We need to collect the refs in the debugService's list in order for them to show up on addRefs() and we need to generate proper error responses if either the debugger is not stopped or the evaluation throws an exception. Task-number: QTBUG-47797 Task-number: QTBUG-47816 Change-Id: I98f17c1f3976859ee50b9bfac41091276ff60982 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* V4 Debugger: Avoid special refs when looking up normal onesUlf Hermann2015-08-191-1/+1
| | | | | | | | | | | | | | | | The "values" of "special" refs are always JavaScript "undefined"s. Thus, when trying to deduplicate an actual "undefined" we'd accidentally hit the special refs. Avoid this by checking if a found ref is special. In an ideal world we'd get rid of the special refs altogether and save QV4::FunctionObject in the values array, but that is not quite trivial as long as the QV4::ExecutionEngine::stackTrace() doesn't give us FunctionObjects. Task-number: QTBUG-47788 Change-Id: Idf358c285f40930220fad2207c6ab5c9101573b2 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Allow specification of loadable debug services via command lineUlf Hermann2015-08-131-0/+6
| | | | | | | | | 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>
* Parse debug server arguments in ctorUlf Hermann2015-08-131-153/+91
| | | | | | | | | | | We will need them to determine which services to load. Also, drop all the complicated indirection. With all relevant code in one place we don't need the actions anymore. Setting the server's blocking mode only makes sense before the thread starts. Afterwards the result is undefined, so we don't have to specially protect it. Change-Id: I58135cd598c31d3a02ccd3f67b238da01a176934 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* Move DataCollector into debugger pluginUlf Hermann2015-08-106-38/+686
| | | | | | | | The data collector and all the jobs it uses to interact with the engine are only used from the debugger plugin. We can as well move them there. Change-Id: Ia48251f08b48c7e1e607b8ae2a3d1de29f80f742 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* Move V4 debugger agent into the debugger pluginUlf Hermann2015-08-105-104/+353
| | | | | | | | | | The debugger is the only thing that actually needs it. Note that for this to work we need to make QV4::Debugging::Debugger a QObject and add some signals. The net effect is still a reduction in binary size of about 1kb. Change-Id: Ibecb8cfa140fc26fc13c8cbefb3d027ebdcd28a4 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* Change data collection for debugging to use QV4::Value.Ulf Hermann2015-08-102-270/+50
| | | | | | | | | | | | | | | | This patch changes the variable collection to store QV4::Value values into a JS array, which is retained by the collector. This prevents any GC issues, and gives a nice mapping from handle (used in the debugging protocol) to JS value. It also allows for easy "shallow" object serialization: any lookup can start with the QV4::Value, and add any values it encounters to the array. Testing is changed to use this collector directly, thereby testing the class that is actually used to generate protocol data. Task-number: QTBUG-47061 Change-Id: Iec75c4f74c08495e2a8af0fedf304f76f8385fd7 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* Move QQmlConfigurableDebugService into qmltooling/sharedUlf Hermann2015-08-045-2/+110
| | | | | | | It's only used by plugins now. Change-Id: Ia73a2a22ba6bccbd85bbca6eda2fb9f5a8d6dd3b Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Move debugger-specific services into a common pluginUlf Hermann2015-08-0413-0/+2876
| | | | | Change-Id: Icd4e6a6c57bc3ac65cb43d2329d236012b988678 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Move profiler and engine control services into a pluginUlf Hermann2015-08-0413-0/+1339
| | | | | Change-Id: I12627a07ceedea4aceafa6f0e630c0cab69d156d Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Clean up QQmlDebugConnector's addService() and removeService()Ulf Hermann2015-08-041-18/+18
| | | | | | | | | | | As we look up services by name we should also add and remove them by name. As the thread doesn't run during adding and removing of services we don't have to check the client plugins for the initial state. It's also a good idea to eventually disconnect any signals that we connect on addService(). Change-Id: I9acd17d2caafe15831f32b7b959dc2dea9cab08c Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Don't ask QQmlDebugService for name() when we already know itUlf Hermann2015-08-041-10/+12
| | | | | Change-Id: Ibae6602bd1725d98ddaa751bfc00391a20a1460e Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Hide QQmlInspectorServiceImpl in .cpp fileUlf Hermann2015-08-043-29/+29
| | | | | | | Nobody needs to access it anymore. Change-Id: Ib782037ac0a8721997f6d36995d03f42c060602b Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Remove extra layer of indirection from inspector serviceUlf Hermann2015-08-046-272/+16
| | | | | | | | We are not loading any secondary inspector plugins anymore, so the logic to select them is unnecessary now. Change-Id: Ic44c49e41c6bff4b19ce527df4657c6d73c0c82b Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Pass QQmlDebugService to AbstractViewInspectorUlf Hermann2015-08-049-14/+14
| | | | | | | | This way we don't have to look up the implementation in order to send messages. Change-Id: I70cb122785875cf8b4ba6f7f2afd62cca77c8abb Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Move inspector service and QtQuick2 inspector into a common pluginUlf Hermann2015-08-0419-32/+334
| | | | | | | | | 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>
* Remove pimpl from debug server connectionsUlf Hermann2015-08-047-180/+132
| | | | | | | | Now that they are self-contained plugins there is no reason for the indirection anymore. Change-Id: Ic2e2fe2075796c758057235e12981c8d40ce97c2 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Use QQmlDebugPluginManager for loading connection pluginsUlf Hermann2015-08-0410-77/+58
| | | | | | | | Also remove all the hacks that deal with static builds, QT_NO_LIBRARY and friends. QQmlDebugPluginManager handles those cases. Change-Id: I62f13b787292108fa25d09fabc775332394989be Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Deduplicate debug server connection code.Ulf Hermann2015-08-0410-152/+92
| | | | | | | | | | | | | The packet protocol can be part of the server, now that the server is not part of QtQml anymore. This enables us to remove some duplicated code from the connections. As an added benefit, with more control over the sending process, QQmlDebugServer can now efficiently send single packets, without creating a QList<QByteArray> first. Change-Id: I13cc831e254c02b737e64816d6d3ab051d760995 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Remove QT_NO_QML_DEBUGGER ifdefs from QQmlDebugServerUlf Hermann2015-08-041-15/+2
| | | | | | | Plugins in qmltooling won't get built if that is set. Change-Id: Ideced675064e74ccb78b9ac8c8fff2536150810c Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Move QQmlDebugServer into a pluginUlf Hermann2015-08-0413-9/+1033
| | | | | Change-Id: I8dc95f64c6df7303e8f580f191ee35da2284718b Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>