Binding loop markers aren't ordered in any particular way so we cannot
stop drawing them when we find an invisible one.
Change-Id: I16dcc96c15febc5cfe0203e23c1ca657714a2c25
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Done using the following ruby script:
Dir.glob('**/*.h').each { |file|
if File.file?(file)
s = File.read(file)
t = s.gsub(/^namespace .+ \{\n\s*class .*;\n\s*\}.*$/) { |m| m.gsub(/\n\s*/, ' ').gsub(/\s*\/\/.*$/, '') }
if t != s
puts file
File.open(file, 'w').write(t)
end
end
}
Change-Id: Iffcb966e90eb8e1a625eccd5dd0b94f000ae368e
Reviewed-by: hjk <hjk121@nokiamail.com>
* better support qbs and similar non QtQuick qml languages
* begin to clean and migrate things from ModelManager to
ModelManagerInterface
Change-Id: Ifa39dc1e4c568e9e21307f4913dcb5989e80420f
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
Anchors are supposed to reduce graphical glitches such as the gradient
borders getting detached from the edges of the timeline while resizing.
I'm not sure if it's actually better like this, but the code certainly
looks nicer.
Change-Id: I9eb6a6a50780ce642ad7cb551d2895a80b00690e
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This is a temporary fix to work around the fact that the profiler's
loading indicator won't show on top of the timeline view. It's not
particularly beautiful but at least the UI doesn't just "hang" anymore.
A final solution has to be provided in qtdeclarative by allowing widgets
to be placed on top of QML scenes. In principle it's also possible to
change the loading indicators to be actual windows and by doing that have
them stay on top, but the result would be very messy.
Change-Id: Ic774b0792786d7d278da5ba0beda4531f0dba77d
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Hiding a category in the timeline view is highly confusing. Previously
the "Painting" category would only be visible if either the model is
empty or at least one painting event was available. Like this it's
always there. In the obscure case of a mixed Qt4/Qt5 application you can
get two "Painting" categories now.
Change-Id: I54db106ed868b7e5d46d0e0ac22b46c0df8be862
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Previously the animation paint events could overlap if the framerate
estimates were off by more than 1 event. Furthermore the duration could
be negative or 0, with a potential crash in the latter case. Also it's
a bad idea to change the server-provided framerate to suit our estimated
durations.
Change-Id: I14da0855d7248a6ef32509572caa439ebb2d430e
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Loading data on ProcessingData would lead to incomplete information
about source code locations. Rebuilding the whole model on any kind
of changed() signal is wasteful.
Task-number: QTCREATORBUG-11100
Change-Id: I9f8d718bff6149ca2dc2d0482c11d66d940af15d
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Previously, the QmlProfilerSimpleModel would report a count of 1/1 when
empty while all others report 0/1. This leads to the UI waiting
forever for the "missing" data.
Task-number: QTCREATORBUG-11095
Change-Id: I165278caa5a2bece362bf869608d501d7f553c91
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
By returning early from the method painting the binding loop markers
painter states could be left on the stack, triggering error messages
later.
Change-Id: I0b9c336e44a28feec96c506d0e3d0da291054bbd
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
It's a good idea to start a new path for each of them. They're quite
unrelated after all ...
Task-number: QTCREATORBUG-11099
Change-Id: Id47e482b948a0827018c71ddc8d13e2e69829bc4
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Having a mouse area larger than the item to be dragged certainly
creates funny effects, but isn't really useful...
Change-Id: I98efb7a6145a09edfdbc090b34bb306383b302cd
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Without this all the data is processed another time in all timeline
models when the second signal is emitted. This is quite wasteful.
Task-number: QTCREATORBUG-10950
Change-Id: Iac1315689e0900abb48efc1cf6390ec559a1897c
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
React to a second changed() signal from the simple model that is
emitted after the binding text has been retrieved from the local files.
This will rebuild the whole model effectively twice ... ideally we'd
just update the text, but it shouldn't be a performance problem, either.
Change-Id: I71a47f0faddd3938711e2e190f1e9c961be343e4
Reviewed-by: Ulf Hermann <ulf.hermann@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
By using the QML Grid element the windows' widths can be made dynamic,
preventing text overflow while still retaining the two-column-layout.
Change-Id: I8b70027126aef5f9e2c4176245caf1b472df4040
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This allows us to steer the timeline models in a more fine grained
way and avoid duplicate processing of the same data. We don't need
to rebuild everything on stateChanged of the model manager then.
Task-number: QTCREATORBUG-10950
Change-Id: I2aa9a96a33c602f062fc3b644ac06280ba7cd45a
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Those functions aren't called from anywhere. Wheel zooming has been
removed a long time ago and centering is handled in a different way.
Change-Id: Ib55fdfdd3cf794563eaa50ff9b5f1a1dfe94a17a
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
In order to unify the uses of range data and the calculation of first
and last ranges in visible areas we need a template class to provide the
respective algorithms.
Change-Id: I1c2e9c9fa9ae048262026236c4ff39017ab7913f
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
The canvas integrated in QtQuick does the same thing. We can remove a
lot of code like this.
Change-Id: I6425ae4e1b542107defd9d76fa5755712a0f8613
Reviewed-by: Ulf Hermann <ulf.hermann@digia.com>
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
As the contentWidth depends on both the width of the flickable and the
currently selected time range it should be updated if either of them
change. Otherwise we can miss changes and show stale data.
Change-Id: Iab9e17eef3490531175a2374fb3da0e0071f3bd1
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
As it's hard to pass arguments for signals from non-QML-mapped objects
to QML objects handle the signal in C++ instead and just directly set
the properties.
Task-number: QTCREATORBUG-10943
Change-Id: I039f6938db3d7e64ca1a4bcff2f0f6aa79c65219
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
When selecting ranges in the timeline the selector would sometimes hang
or behave weirdly when moving back. This was due to incorrect logic in
the selection bounds calculation and because the vertical flicking would
steal mouse events.
Change-Id: I14074463422d1d9a0aa8ecd1f88847e7330c9b6b
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Ulf Hermann <ulf.hermann@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Previously there would sometimes be a long line of equal time labels
if you selected a small range from the middle of a long trace. This
patch increases the accuracy of the labels based on selected range,
not on start time.
Task-number: QTCREATORBUG-10865
Change-Id: I482da242c5e9f0117611f100888e80e23ad91b4c
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
As the timeline cannot show out of bounds areas anymore we can remove
the code which draws the background for them.
Change-Id: Ifedfc10b67bd4ce2e2a4bb2cbdcc03b877472a92
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Due to QTBUG-34962 we can't rely on the width properties of Flickables
so we use some other elements to size the background bars.
Task-number: QTCREATORBUG-10882
Change-Id: Iee427022111b6092486adaebfd33f8e2e6a91190
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Smaller ranges shouldn't be useful for anything but create rounding
errors all over the place.
Task-number: QTCREATORBUG-10880
Change-Id: I5cf5e2c08b5cae676717ba8ada1cddee4523c399
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
You shouldn't be able to select out of range areas with the selector in
the timeline if you can't scroll to see them anyway.
Change-Id: Ia1909f463db2c64dc2605eac7f4be53a76222338
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
By overflicking you could reduce the selected range and implicitly zoom
in. That seemed wrong. The rubber effect doesn't serve a real purpose
on desktop applications anyway.
Task-number: QTCREATORBUG-10864
Change-Id: Id4d6107e23c184621c5fcce21bf042e6ed4bd8e6
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Don't handle redraw events in QML anymore and instead trigger a redraw
on geometryChange as well as componentComplete from C++. This reduces
redundant code and glitches from forgotten QML event handlers.
Change-Id: I0eadfb54cf8e392152c4d91b83c874b37b1aca96
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
For some reason, when the timeline width is 0, the background width can
get negative, if using bindings; it works fine when using anchors.
Change-Id: I5eb76f83b9c41c1a71a135082770079cedc7f16c
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
In certain conditions the area covered by the canvas can have a negative
size. This patch handles that case gracefully.
Change-Id: I952edfa5bd0f8b42ce69356106f2e0f326dceeb7
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
As the timeline can scroll by itself now we don't need an external
scrolling helper anymore.
Change-Id: I831eaf2302ced7649b4746e5c7d10121d83a4794
Reviewed-by: Aurindam Jana <aurindam.jana@digia.com>
With V4 the Javascript profiler is unusable. In order not to suggest to
the user that it is actually usable, we disable it if it doesn't show
any data. However, when profiling applications that don't use V4, yet,
the JS profiler actually works and has to be enabled.
Change-Id: Iecb97c0940addd157c5ebe229edb614448cc0554
Reviewed-by: Kai Koehne <kai.koehne@digia.com>