aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/debugger/qqmldebugserver.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Mark cleanup function as unused if compiled with QT_QML_NO_DEBUGGERUlf Hermann2014-11-051-0/+1
| | | | | | | | | | The static cleanup function in qqmldebugserver.cpp is only used if the debug server is actually created. If not we can mark it as unused to avoid compile warnings. Enclosing it in #ifdef would be uglier. Task-number: QTBUG-42394 Change-Id: Ieb7fa38ecb346e80ce815ced85eb3a168bad9d99 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Update license headers and add new licensesJani Heikkinen2014-08-251-19/+11
| | | | | | | | | - 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>
* Remove V8 profiler serviceUlf Hermann2014-05-091-1/+0
| | | | | | | | | It's broken and useless and it sends confusing data to the profiler client. Task-number: QTCREATORBUG-12188 Change-Id: I944cf19a78ee4378d5773e7aa80876f199a0f03b Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Give the QML and the debug server thread an objectname.Thomas McGuire2014-04-011-0/+1
| | | | | | | | | Now it is easier to identify the threads in e.g. the debugger in QtCreator. Change-Id: I032822e869df09cf43dc1d6e01d14610005ce217 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Ulf Hermann <ulf.hermann@digia.com>
* qmldebugger: handle static builds correctlyFawzi Mohamed2014-03-111-0/+10
| | | | | | | | | | | | 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>
* Unify initial waiting of debug servicesUlf Hermann2014-02-101-4/+53
| | | | | | | | | | | | The debug services generally behave in one of two ways when initializing: Either they block the initializing thread until some configuration is passed over the network or they just go on. By introducing a generalized configurable debug service the various ways of waiting on initialization are cleaned up. The API defined for it also allows for engine-specific initialization. Change-Id: Id5685ef17d2a7eb1222629f7caa5ec53076d47b2 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Protect list of client plugins from concurrent accessUlf Hermann2014-02-071-41/+35
| | | | | | | | | | Previously the list of client plugins in the QQmlDebugServer could be accessed concurrently from receiveMessage() and addService() either when in non-blocking mode, or if the client uses service discovery or sends additional hello messages after the first one. Change-Id: I946243957184210d40ebca728143714c341b1226 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Unify the interface for QQmlDebugServicesUlf Hermann2014-02-051-0/+34
| | | | | | | | Let the debug server handle adding and removing of engines through defined interfaces to prepare for multi-engine profiling and debugging. Change-Id: I7b277e54bdcce1d3e95e723f041a7db6b08b29fc Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Make the QML debug server thread safeUlf Hermann2014-01-301-115/+135
| | | | | | | | | | | | Previously, if instance() was accessed concurrently we could run into various problems as the initialization wasn't synchronized. By putting most of the initialization into the constructor, wrapping it into a Q_GLOBAL_STATIC and discerning between accesses that need to wait for the initial "hello" packet and ones that don't the situation is improved. Change-Id: I182e8e6abf054b851ef7ea5f897d4a197a9da4bf Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Allow debug plugin registrations from other threads than main GUIUlf Hermann2014-01-291-4/+4
| | | | | | | | | | There's no real reason to disallow that. The only thing we want to check there is that the registration doesn't take place in the debugger thread. Disallowing registrations from anywhere but the main GUI thread creates unnecessary problems with threaded QML profiling and debugging. Change-Id: Ic72d19237e2ddba02cc88f7f5a0743f6640fed4d Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Debugging with V4Erik Verbruggen2013-11-101-2/+0
| | | | | | | | | Currently missing, but coming in subsequent patches: - evaluating expressions - evaluating breakpoint conditions Change-Id: Ib43f2a3aaa252741ea7ce857a274480feb8741aa Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix deadlocks in debugger infrastructure on MacKai Koehne2013-10-161-0/+1
| | | | | | | | | Set QReadWriteLocker to recursive. This is needed e.g. to allow _q_changeServiceState to get a read lock when called from inside receiveMessage. Change-Id: I287a7c7f44e94005c0458825f8f6d1877ee914dd Reviewed-by: Aurindam Jana <aurindam.jana@digia.com>
* Debugger: Make sure client list is protected by mutexKai Koehne2013-05-241-0/+3
| | | | | | | So far we didn't protect this access. Change-Id: Id738453db5e655371fa2fbf88f81cab6c0af466f Reviewed-by: Aurindam Jana <aurindam.jana@digia.com>
* Debugger: fix race condition in block modeKai Koehne2013-04-231-9/+6
| | | | | | | | | | | Make sure that the GUI thread & debugger thread actually sync on startup. So far the GUI thread would block forever in waitCondition.wait() if the debugger thread spawns & receives the HELLO before. Also remove unused code and rename variables to make their use more obvious. Change-Id: I8285e8860667496d491807e696535353d9f14dea Reviewed-by: Aurindam Jana <aurindam.jana@digia.com>
* QmlDebugServer: Ensure plugin is setAurindam Jana2013-04-161-1/+1
| | | | | Change-Id: Ibc0e5ed626edc076e96c4848994ba0cafba0f5c6 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Debugger: Accepts port range as argumentsAurindam Jana2013-04-021-11/+26
| | | | | | | | | | Allow a port range to pass on command line, and try to listen on any of the ports in the range. (Re)using the ',' separator allows for backwards compatibility, that is, also Qt 4 will accept a -qmljsdebugger=port:1000,1010 argument, but will only try to listen on port 1000. Change-Id: Ic03fe20e4aee9ecdea86651f46f1df5cb19bd75c Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-101-1/+1
| | | | | | Change-Id: I6c3bd7bebe3d62d1cfd0fa6334544c9db8398c76 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-231-24/+24
| | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: Ie7f5d49ed8235d7a7845ab68f99ad1c220e64d5c Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QtQuick: Fix string related warnings, single character strings.Friedemann Kleint2012-05-141-1/+1
| | | | | | | | | - Fix warnings about truncation from size_t to int (MSVC 2010, 64bit). - Remove single character strings. Change-Id: Iaf4406e4e04d55d2d8b762f3433269868842a6f9 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* QmlDebugging: Exchange supported QDataStream versionsAurindam Jana2012-04-261-7/+15
| | | | | | | | | Since the client and service needs to pack/unpack datastreams, they need to encode/decode using the lowest common QDataStream version. Change-Id: I3b4886fece59b24950ba618da07a0fefd41a5637 Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
* Debugger: Fix race conditions in block modeKai Koehne2012-04-251-22/+11
| | | | | | | | | | | | Using waitForMessage() in the constructor after registerService() is _not_ safe: You might get the first message already after the registerService() and before the waitForMessage() call. Instead, use QMutex/QWaitCondition to block the initialization. Also make the use of the block mode explicit, since the service might already be enabled also for non-blocking modes ... Change-Id: I387bfe0627c80e2029acff71f86d12cd9ab58de1 Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
* Debugger: Fix race condition in block mode, QQmlDebugServerKai Koehne2012-04-251-5/+4
| | | | | | | | Make sure that the first message hasn't already arrived before we call d->messageArrivedCondition.wait(). Change-Id: I0d3df9adbd41f71df5c1c7d6df90c0037f494514 Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
* Debugger: Fix RAII usage of ReadWriteLockerKai Koehne2012-04-241-10/+10
| | | | | | | | Variables without a name are free to be deleted even before the scope ends. Change-Id: I07fb6f98cd5b36876db5de2e1b4e8ce355f74415 Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
* Debugger: Add asserts for right usage of threadsKai Koehne2012-04-241-0/+14
| | | | | Change-Id: I7c377863eb42e693aa4022af33a83098547e0d58 Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
* Debugger: Make sure stateChanged is called from debugger threadKai Koehne2012-04-241-18/+59
| | | | | | | | | | Make sure stateAboutToBeChanged(), stateChanged() is always called from the debugger thread. This matches how messageReceived() is called. On exit, run an event loop until all stateAboutToBeChanged calls have returned. Change-Id: I9cd6199cc80552ad97e4b7d504ea91aa116a6a34 Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
* QQmlDebugServer: Use Q_D(const )Aurindam Jana2012-04-101-2/+2
| | | | | Change-Id: I118a7b9de886c712027c55c38be99f615aea6902 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Debugger: Use "QML" also in macro namesKai Koehne2012-03-301-1/+1
| | | | | | | | QT_DECLARATIVE_DEBUG will be removed as soon as qtbase is updated. Change-Id: I9dbfe95b8bcb3bf1502319a040a758389b6977a2 Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
* irrelevant qDebug removedSimjees Abraham2012-03-301-1/+0
| | | | | | | | Irrelevant debug statement which gets printed at start of debug session is removed. The same is removed in Auto-tests as well. Change-Id: If8f44950952f08b55ff884c1fe42670108e2369d Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
* Debugger: Add optional 'host' argument to -qmljsdebuggerSimjees Abraham2012-03-191-13/+22
| | | | | Change-Id: I5bb2e48e2ad2019b8a92f6f8842b88027fcd2d28 Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
* Debugger: Print informational messages via qDebugKai Koehne2012-03-141-1/+1
| | | | | | | This allows users to use QT_FATAL_WARNINGS. Change-Id: I114825764c841030418c956d23575159157dfd69 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Debugger: Use QStringLiteral where appropriateKai Koehne2012-03-131-12/+12
| | | | | Change-Id: I5c33113783834ef0c7292f5f19f12d8c68f42141 Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
* QML Debugger: Change prefix of warningsKai Koehne2012-03-071-14/+14
| | | | | | | | | Since we've been changing from QtDeclarativeDebugServer to QQmlDebugServer anyway, we might as well change it to the more readable "QML Debugger:" prefix. Change-Id: I852577233d7cdb1f57adc43ec1b85a14d212574d Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
* QmlDebugging: Revert the names of servicesAurindam Jana2012-03-071-6/+6
| | | | | | | | | Revert the names of the services changed in b855240b782395f94315f43ea3e7e182299fac48 to maintain BC. Change-Id: I79826d92fd09c41e0020541b0c7bb77b5b2ecb1f Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
* Rename QDeclarative symbols to QQuick and QQmlMatthew Vogt2012-02-241-0/+540
Symbols beginning with QDeclarative are already exported by the quick1 module. Users can apply the bin/rename-qtdeclarative-symbols.sh script to modify client code using the previous names of the renamed symbols. Task-number: QTBUG-23737 Change-Id: Ifaa482663767634931e8711a8e9bf6e404859e66 Reviewed-by: Martin Jones <martin.jones@nokia.com>