aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Retrieve services from debug connector, not via static instance()Ulf Hermann2015-08-042-3/+2
| | | | | | | | | 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-042-3/+3
| | | | | | | | 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>
* Fix namespaces in inspector pluginUlf Hermann2015-08-0412-23/+42
| | | | | | | | | Defining things outside the Qt namespace and then accessing Qt internals is just asking for trouble. The redundant QtQuick2 namespace can be dropped, though. Change-Id: Ifa83733a3f98704b7b51697dbca9486d0f504f65 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Use signal/slot for passing messages through QQmlDebugServerUlf Hermann2015-07-311-4/+4
| | | | | | | | | | | | | | This results in much cleaner code than the previous implementation using QMetaObject::invokeMethod(). We have to use read locks now for adding and removing engines, as we should have done already before. If a condition is waiting on a write lock you cannot acquire a read lock from another thread. So, if we kept the write locks we wouldn't be able to receive messages while the engines are waiting. Change-Id: Icfe641601dec2f8d7181ae579146ed603d57a4c2 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Remove qqmlinspectorconstants.hUlf Hermann2015-07-294-71/+5
| | | | | | | | Only two of the constants were used and both only once in the same file. We can as well declare them there. Change-Id: Idda68707a209af2c84fc06e22516e64fceb5f4bc Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Clean up project files for debug connectionsUlf Hermann2015-07-294-31/+21
| | | | | | | | Don't specify files that don't exist and remove the pri/pro distinction. The .pri files aren't included from anywhere else. Change-Id: I7d77e3db495d8256adbface20657d7632e0e5a10 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Simplify object/id lookup in QQmlDebugServiceUlf Hermann2015-07-212-3/+0
| | | | | | | | | | By tracking object destruction we can avoid looping over all cached objects to find out which ones are still OK and we don't have to manually clear the cache anymore. Looking up objects by source location is specific to the engine debug service and should be done there. Change-Id: I7dab73a7bf9c17087784f1bd9c5aef513b31e2c1 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* With -no-qml-debug, don't compile debug plugins and testsUlf Hermann2015-07-181-1/+1
| | | | | | | | This eliminates many #ifdefs and prevents the compilartion of broken plugins. Change-Id: Ib2763ed9e6580307482b885d71c1ad1010959ef2 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Add option to use a local socket for QML debuggingUlf Hermann2015-06-267-1/+297
| | | | | | | | | | Using a TCP debug server comes with a number of drawbacks. It has a larger overhead than other connection types, the application has to be able to access the network and there has to be an open port we can find somehow. Change-Id: Ia7fb24006b89419988c6504797303d84c3aa1bbc Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Add 28 QList::reserve() callsSérgio Martins2015-06-082-0/+2
| | | | | Change-Id: Id4820ac458f48b10f2bf457144767efdef9e2c07 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Merge remote-tracking branch 'origin/5.4' into 5.5Liang Qi2015-04-162-15/+3
|\ | | | | | | | | | | | | | | Conflicts: tests/auto/qml/debugger/qv4profilerservice/qv4profilerservice.pro tests/auto/qml/debugger/qqmldebuggingenabler/qqmldebuggingenabler.pro Change-Id: I76d87e3df97ebdba902ca3d7488c1582eca2a83c
| * Use qt_subtract_from_timeout instead of duplicating qt_timeout_valueDaniel Teske2015-04-142-15/+3
| | | | | | | | | | | | | | | | The same function was duplicated 5 times in qtbase, so create one copy to rule them all and use it also in QtDeclarative. Change-Id: I4e39a7ee0541ce4fe9710cea344e537ee011bbe9 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | Fix invocations of static methods of QGuiApplication/QCoreApplication.Friedemann Kleint2015-03-051-3/+3
| | | | | | | | | | Change-Id: I7bcc209b0c6e77cf6d974af85a19487345a48975 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* | Update copyright headersJani Heikkinen2015-02-1217-119/+119
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I61120571787870c0ed17066afb31779b1e6e30e9 Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
* | QmlDebug: Provide public method for starting a debug serverUlf Hermann2014-12-052-7/+14
|/ | | | | | | | | With QQmlDebuggingEnabler::startTcpDebugServer you can create a debug server for debugging or profiling also without the qmljsdebugger command line argument. Change-Id: I642f73680585f9c7578762bcc0b247c736fe1338 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Stop waiting in QTcpServerConnection if waitForBytesWritten failsUlf Hermann2014-10-241-2/+7
| | | | | | | | | | | | There is no point in waiting any further for the remaining bytes to be written as it will never succeed. We might get luckier by creating a local event loop and repeatedly calling processEvents(), but as that is considerably worse style and because you shouldn't rely on the connection to send on exit anyway we don't do that. Task-number: QTBUG-42158, see also QTBUG-24451 Change-Id: I79ffd5f5a4a7c41ff8dc0c4f6f1ca7e091844c9d Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Update license headers and add new licensesJani Heikkinen2014-08-2517-323/+187
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I84a565e2e0caa3b76bf291a7d188a57a4b00e1b0 Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* Accessibility: Use factory function instead of pluginFrederik Gladhorn2014-03-2712-1296/+0
| | | | | | | | [ChangeLog][QtQuick] Accessibility for Qt Quick is now included in the qtquick library instead of being a separate plugin. Change-Id: I26a7ed14b8a387662cea8f89218485be50033e34 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* qmldebugger: handle static builds correctlyFawzi Mohamed2014-03-113-13/+17
| | | | | | | | | | | | The loading of the qml debugger was hardcoded to dynamically load its plugins. Now directly build and instantiate the QQmlDebugServerConnection in static builds. Done-with: Kai Koehne <kai.koehne@digia.com> Change-Id: I38bf0e310caaa6aaa743e3814b0108c6fe7001df Reviewed-by: Ulf Hermann <ulf.hermann@digia.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Accessibility: add states to QQuickAccessibleAttachedFrederik Gladhorn2014-01-271-41/+13
| | | | | | | This makes it possible to set the state of accessible objects in qml. Change-Id: Ide70b885dac8fed180d2b221540cf2b699ac78ff Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* fix whitespaceOswald Buddenhagen2014-01-221-1/+1
| | | | | | | remove trailing spaces and expand tabs Change-Id: Ieacb9d096b612c45d1a64700044c114d1f7522bc Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Merge remote-tracking branch 'origin/stable' into devSimon Hausmann2014-01-171-1/+4
|\ | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/imports/dialogs/DefaultFileDialog.qml src/imports/widgets/qquickqfiledialog.cpp Change-Id: I00de6dd05cb773f01254061d585a82c90b229acd
| * On Mac only editable ComboBox should receive tab focusFrederik Gladhorn2014-01-111-1/+4
| | | | | | | | | | | | | | | | | | [ChangeLog][QtQuickControls] Mac: ComboBox will only get tab focus when it is editable. Change-Id: Ife04de67b2e3dea77ba878b247ad0b676c879c02 Reviewed-by: Liang Qi <liang.qi@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-01-061-2/+18
|\| | | | | | | Change-Id: If9a205bea219b9aca95d78b1e556ca9bbff58dd0
| * Accessibility: mark more items as focusableFrederik Gladhorn2014-01-061-1/+17
| | | | | | | | | | Change-Id: I8b5189bdf46305ad11f2dd1e689423152e542dcf Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
| * Accessibility: quick items are not visible when their window is notFrederik Gladhorn2014-01-061-1/+1
| | | | | | | | | | Change-Id: I126b0ca7414b03f17834ca8e90dd84c9d1c44add Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>