The quotes are stripped when the string is presented for editing, so
they have to be added back when we're done editing.
This is what we already did if we were talking to the inspector rather
than the V4 debugger.
In order for this to work, JS numbers need to be identified as numbers,
rather than strings. So, we have to add "number" to the types recognized
as float.
Change-Id: I2054f4ad36ec1d14fb2dfee3705a80c8ec84d5ac
Task-number: QTCREATORBUG-19032
Reviewed-by: hjk <hjk@qt.io>
Apparently the inspector service does not send a type string for all
objects. As the id string and the object name can also be empty, those
objects are anonymous then. Try to identify them by their source
location and if that doesn't work, just call them "<anonymous>".
Change-Id: I3bd3bad8b78c81ace95bfd7813cdd8bb0f5e14f2
Task-number: QTCREATORBUG-17741
Reviewed-by: hjk <hjk@qt.io>
This has the effect of sorting the members immediately, rather than
the next time something else changes.
Change-Id: I3f3cb261f1fb69b6b36914b811a431b045bb49ae
Task-number: QTCREATORBUG-16645
Reviewed-by: hjk <hjk@qt.io>
Lately it was only set and read for debugging purposes. A mechanism
similar to the ChildrenNeeded state is still needed and available
through WatchItem::wantsChildren.
Change-Id: I78c85d65bc35810be420bd0418db9675473697cd
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
There is no + operator that takes a QByteArray and a QString (or vice
versa).
Change-Id: I8734923cbbb0360bc20f9775d57801803782716f
Reviewed-by: hjk <hjk@theqtcompany.com>
With QT_RESTRICTED_CAST_FROM_ASCII making GdbMi etc operate on
QString is feasible again. Take this as opportunity to move
debugger encoding handling closer to a 'conversion on input and
output if needed, storage in QString only' scheme.
Change-Id: I2f10c9fa8a6c62c44f4e6682efe3769e9fba30f7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Don't instantiate repeating boilerplate item data in some
cases (such as large arrays).
This makes it necessary to access parent WatchItems in
a lot more cases than before and needs another separation of
WatchItem/WatchModel code to keep the dumper autotests
in a functional state.
For a plain std::vector<int> with 1 mio items this reduces
extraction time from more than 2 minutes to about 3 seconds.
Change-Id: I175c5f6ee90434a6e85342d8bb71bd10a04dd271
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
The invalid ID is -1 and we shouldn't send 0 to the engine debug
service by default as that will select some random object as context
for expression evaluation.
Change-Id: Ide245468f787cc449ff50ac846c7ff31620c01b4
Task-number: QTCREATORBUG-14931
Reviewed-by: hjk <hjk@theqtcompany.com>
This way the items highlighted in Qt Creator are also marked in the
application when the inspector is active.
Change-Id: I89c3270cf5c108c1549ea01704bfd0e4b7a44ca5
Reviewed-by: hjk <hjk@theqtcompany.com>
This is to adopt the naming to the code in src/qmldebug in
qtdeclarative. Once we can require a version of Qt that has qmldebug
for building QtCreator we can then remove our own version of this code.
Change-Id: I573f0703871b5812789c5c7a6287567d5c2875e6
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
There's a 1:1 relation, and the abstraction is not needed anymore.
Also remove some unused code.
Change-Id: I09a2522deb5d522f46ec7518d19978a038032fbb
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
... in WatchHandler and DebuggerEngine interface.
Adjust using code.
Change-Id: I6371f3e96ba46a783e23a5767cdde24a10d3fce7
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
Rename the list overload. Make the single item overload use
the direct path to insertItem, hook the column resize requests
to the showing/hiding of the watchers pane.
Change-Id: I0a1940c8e1919341a815e6bccbcf55d989d663da
Reviewed-by: hjk <hjk@theqtcompany.com>
Mostly done using the following ruby script:
Dir.glob('**/*.cpp').each { |file|
next if file =~ %r{src/shared/qbs|/qmljs/}
s = File.read(file)
s.scan(/^using namespace (.*);$/) {
ns = $1
t = s.gsub(/^(.*)\b#{ns}::((?!Const)[A-Z])/) { |m|
before = $1
char = $2
if before =~ /"|\/\/|\\|using|SIGNAL|SLOT|Q_/
m
else
before + char
end
}
if t != s
puts file
File.open(file, 'w').write(t)
end
}
}
Change-Id: I1aa1a2b6ccbafeb1a8f3053fffa39b3f96992591
Reviewed-by: hjk <hjk@theqtcompany.com>
Move some function out of the DebuggerCore "namespace", to avoid one
indirection and removes clutter in the calling code.
Change-Id: I1c870d5c7eeade32fa63dedf581490fbb090cd6a
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
"state" is the more widely used term and we should follow that
convention. We also need to distinguish between the state of the
underlying network socket and the client itself. The change makes this
explicit.
As preparation for the upcoming centralized debug support the "State"
enum of the debug client is also moved into the QmlDebugClient class.
Change-Id: Ib9d7e03d23528f16ed696ed3518e813d11ea1c32
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
A lot of our build system files specify unneeded include
paths. These roughly fall into the following categories:
a) Paths that are already set in more general files
such as qtcreator.pri.
b) Paths that serve no purpose at all, possibly
left over from earlier versions of the project.
c) Paths that act as workarounds for wrong include
statements of the form '#include "xyz.h"', where
xyz.h is not in the same directory as the including
file.
This patch removes such path specifications and fixes the offending
include statements from case c).
Tested on Linux, Windows and OSX with qmake and qbs.
Change-Id: I039a8449f8a65df0d616b4c08081145c18ae4b15
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Forward-declare QGraphicsOpacityEffect in DetailsButton,
QProcessEnvironment in Environment, QFileInfo in fileutils,
QUrl in IWelcomePage, FancyLineEdit in PathChooser and
remove unneeded headers.
Change-Id: I7d5f273530dd2059bbdaf0899f0a3bc7e49e8482
Reviewed-by: hjk <hjk121@nokiamail.com>