The usual Qt API for "takeXyz()" methods is to return the item that was
"taken".
Change-Id: Ie144051801487a301b3f13e2857735b65f58150b
Reviewed-by: hjk <hjk@theqtcompany.com>
The code path can be triggered legitimately by removing breakpoints
without direct file association like "Break on throw" in the
breakpoint view.
Change-Id: If32a990f76d86386e40123c8f7a90613e15ca670
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Also adding a color for each category.
Change-Id: I3627d13913951a95804b5a816f087a822c01bd86
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
... when double-clicking on an entry for which debug information
but no corresponding sources were found.
Change-Id: I48f57794e072752d444d7c3ccd8bfe517c9db1dd
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Triggered by double-clicking a normal source file+line breakpoint
while looking at some disassembly: We want to jump to the original
source file in that case.
Change-Id: Ia6eddcaf27e4160c7a989ab757315f5314f65d1e
Reviewed-by: Christian Stenger <christian.stenger@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>
If the removal is triggered from the view, the engine needs
to be informed. If it's triggered from the engine, the view
needs to be informed.
Change-Id: I3505130c5b4b0b3752401a94599af9a06662f002
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
So far we cheated by pretending removal always succeeds
immediately. Now just draw in grey in the view and remove
fully after the backend confirmed removal.
Change-Id: I0bd607774a3db0fe302b9654798be9dcc50abe8a
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Full separation does not seem possible as QTreeView assumes
all items to have equal column count.
Change-Id: Ia260924fe13ea62789923af8484f9838295355b6
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
... and use the items themselves as main entry point for
item related operations.
With non-uniform tree items it's easier to have item specific
functionality directly in the item implementation instead of
the model.
Change-Id: I4e9b7db98d16b91ddef81917417691129bb83621
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
The actual data is now in a TreeModel. As interface to
individual breakpoints there's a new Breakpoint class
essentially providing a checked handle.
On the user code side breakHandler()->foo(bpId) is
replaced by bp.foo().
Change-Id: I82f435bad6301fce85a1d82bf6bf39e9ddba511e
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Triggering synchronization too early leads to unnecessary pending
breakpoints and complicates debugger startup.
Change-Id: Ic1c0064f29eaa325a110baf9b22ec6bf66a00a2d
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
At least on Linux setting one data watch point resulted in two
view entries, since we parse two responses (direct command
response, and later GDB notification). Suppressing the second
was not working well enough.
Change-Id: Ica99c000d4912a9480a9e7020d2fdfdb866753b5
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
One indirection less on the user code side, and easier to export
if needed (partially addressing QTCREATORBUG-13187)
Change-Id: I13ab9f471a3a34da7a6331aefc83f6d02413bfab
Reviewed-by: David Schulz <david.schulz@digia.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>
Turns out we don't even need two-phase initialization,
by transparently postponing registration until we get
a non-empty file name, either at constuction, or at
file name change times.
Change-Id: I3e87e47c820066e6707e946fc474ab9c1993e61f
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
We have fileNameCaseSensitivity and withExecutableSuffix et al.
Change-Id: I79bd2cd57e258c3f15673a661a49bab597d7afa4
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
In several places, it says '#include "..."' for headers
from different libraries/plugins.
Change-Id: I96cd74fef9b30163adefe3e1720e0847bed9553a
Reviewed-by: hjk <hjk121@nokiamail.com>
#!/usr/bin/env ruby
Dir.glob('**/*.cpp') { |file|
# skip ast (excluding paste, astpath, and canv'ast'imer)
next if file =~ /ast[^eip]|keywords\.|qualifiers|preprocessor|names.cpp/i
s = File.read(file)
next if s.include?('qlalr')
orig = s.dup
s.gsub!(/\n *if [^\n]*{\n[^\n]*\n\s+}(\s+else if [^\n]* {\n[^\n]*\n\s+})*(\s+else {\n[^\n]*\n\s+})?\n/m) { |m|
res = $&
if res =~ /^\s*(\/\/|[A-Z_]{3,})/ # C++ comment or macro (Q_UNUSED, SDEBUG), do not touch braces
res
else
res.gsub!('} else', 'else')
res.gsub!(/\n +} *\n/m, "\n")
res.gsub(/ *{$/, '')
end
}
s.gsub!(/ *$/, '')
File.open(file, 'wb').write(s) if s != orig
}
Change-Id: I3b30ee60df0986f66c02132c65fc38a3fbb6bbdc
Reviewed-by: hjk <qthjk@ovi.com>
Change-Id: Ie49bdf576a6d3543aef6df133b27c8827775c935
Rationale:
a) It is conceptually cleaner to do the changes to the model
in between calls to beginResetModel() and endResetModel,
respectively.
b) The function is deprecated in Qt 5, for exactly that reason.
Reviewed-by: hjk <qthjk@ovi.com>
The class' member functions are intended to be used
instead of the Q_OS_* macros in all contexts where
the latter are not syntactically required.
This lowers the likelihood of changes made on one
platform breaking the build on another, e.g. due to
the code model missing symbols in #ifdef'ed out code
when refactoring.
Change-Id: I4a54788591b4c8f8d589b8368a6c683d4155c9fa
Reviewed-by: hjk <qthjk@ovi.com>