If we've changed the model index we don't reuse the item index for
selecting the next item. Also, there are two reasons why
firstIndexNoParents() can return -1. They have to be handled
differently.
Change-Id: Ib33e3bd0e96a39a71658a0e4509926012a91bf27
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
It's rather unintuitive if it only centers horizontally.
Change-Id: I9245da0b26fccc14a100804715d09aaa82059413
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This is faster and more accurate than propagating by source location.
Change-Id: I6aed3b1591380b49dd7c56a66bdc35912570e347
Task-number: QTCREATORBUG-12932
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
It wasn't helpful that this method could either count all events or
only the events from a specific model.
Change-Id: I09dcb37edd3403a23f6ee9008fc71b6761aa9e26
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Like this we can easily refer to them from QML and it makes it simpler
to see if we mean the overall height or the height of a single category.
Change-Id: Ia2b79d99b5c46c3d9563cfc2ed0715bc352ce9b4
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
SortedTimelineModel's find methods were off by one if the given time
was exactly the start or end time of the first or last element.
Change-Id: I34e7813af5a32f1a9f9b8af9c17f970e68b5e58f
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
We don't want anyone to insert stuff into the ranges without reflecting
it in the actual data.
Change-Id: Iaa8cc9a962216ba466da2c468826f6fbf6bef11c
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
We'll need to refer to them for additional global metadata.
Change-Id: I717d3199b5ce8846c273b93bb8cd31fe3941035b
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
The convention is now that selections are the rows in the expanded
timeline, "types" are the types in the QmlProfilerDataModel, and
events are the single boxes in the timeline. Thus, the event view
shows only types and for consistency the V8 view does so, too.
Having eventId as synonym for "type index" and "event index" as
actual index into the list of events is confusing.
Change-Id: I6b7c4c3f1ab0a8b71c511de52ab296a2e91cf5f0
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
qmlprofilertraceclient.cpp:280: warning: C4334: '<<' : result of 32-bit
shift implicitly converted to 64 bits (was 64-bit shift intended?)
qmlprofilertool.cpp:539: warning: C4554: '<<' : check operator
precedence for possible error; use parentheses to clarify precedence
Change-Id: Ifaa048d42bccf203e6587a474c197c22b0f69fec
Reviewed-by: Ulf Hermann <ulf.hermann@digia.com>
It looks better, both in the code and in the result.
Change-Id: I5d24b24de429fb6a6d15c2df97f977924bb9fb00
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
They really shouldn't be called from outside. We'll introduce an
"empty" property whose notify signal will depend on data handling to be
done in a controlled way.
Change-Id: I272eaa3638ba571d9f9ffd964b0d33449d0adda1
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Like this we can still save some time and memory if the profiled
application doesn't support filtering.
Change-Id: I534ad4a11f62d28bd2fcfbffdc44f3902758dcbe
Task-number: QTBUG-41118
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This allows us to reduce the amount of data we need to handle
if the user isn't interested in certain categories.
Task-number: QTBUG-41118
Change-Id: Ieaac12fb1dec29d6035642f433bc1a1d49e545c2
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
At the end of QmlProfilerFileReader::load() we have a perfectly valid
set of types and events which we can just pass on to the model as-is.
Change-Id: I6981663f409c4647f4d5ae8a73b5d14cc701017b
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
With EngineControl multiple QQuickViews can be profiled in one
profiler if they're all running in the same thread. As the QML
engines are never run in parallel then this results in useful
data.
Change-Id: I83a34fb81fd466c5cac838b096c1b1f322ded882
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
If we take longer than a frame for painting a pass we don't really gain
anything.
Change-Id: I6be5cc59116d3eb5d3ef6a863f4cf410333c7e91
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
The QML canvas is notoriously bad at keeping its context around. This
workaround gives us a valid context in many of these cases.
Change-Id: I6c23aa2b44c10a48cdb89c66a2861ab8d31bcfc8
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This clarifies that the item height is not absolute but relative to the
row height, and it reduces the ambiguity of the various "height" methods.
Change-Id: I391441147c88b47a14e539fc3853702bb517d27b
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
By listening only to the relevant expandedChanged and rowHeightChanged
signals we avoid accessing invalid data on clearing. When clearing the
models each one is collapsed. The collapsing in turn triggers
rebuilding of the labels. Unrelated labels could access already
cleared data like this.
Change-Id: I3fad45f5c6279019fbc27ec54e758f498a9d55f2
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Replace all* remaining deprecated Qt 4 functions with
their Qt 5 counterparts. This means we no longer need to
define the QT_DISABLE_DEPRECATED_BEFORE macro.
This patch is relatively small because most source-compatible
changes of this kind have been done before.
* The one exception is the QmlDesigner, which uses QWeakPointer
in a deprecated way all over the place.
Change-Id: Id4b839c6685f3b5bdf2b89137f95231758ec53c7
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
We should check if the parent list is empty before accessing it, not
after.
Change-Id: Ia61887414b526b4414aa8a45d0c8779e020529e4
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Remove usage of the Q_EXPORT_PLUGIN macros, which do not exist in Qt 5.
Change-Id: I678c3cf10b9c5d5c1b9f252b0ecd1c97dc810a47
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Like this the DockWidget gets notified when the mouse has entered it
and can show the title bar if necessary.
Change-Id: I164b125f6a4a2099f1f95cf6f0a7699605d12051
Task-number: QTCREATORBUG-12899
Reviewed-by: hjk <hjk121@nokiamail.com>
The dynamic layout creates more problems than it solves. A fixed layout
with proper elision and fixed window width certainly looks better.
Also, the view has to add the colons after the labels now.
Change-Id: I649351a742bd129ea9738359bac27e55e29d6a93
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
We actually don't have to save the actual data in the
SortedTimelineModel if we keep the data synchronized to the ranges. This
is easy to do by just keeping track of the indices when new ranges are
inserted. Like that we can eliminate the virtual function calls from
AbstractTimelineModelPrivate and simplify the type hierarchy.
Change-Id: Ia7aa02df57380932b689ddfe9a50ff2031198a7d
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Previously, SortedTimelineModel could be confused by ranges starting at
the exact same time if they were inserted in the wrong order. With this
change the nesting calculation keeps track of that.
Change-Id: Id296a54eed7e1ab421e94a296ec4e30adce185f2
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
There is no use in creating multiple nested maps and lists and
selecting special translation contexts for that.
Change-Id: Ib83ab651adca8258a0e5b9ac99a657623a24145b
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Also, all methods about events in models don't really need the "event"
prefix as that is what the models are about.
Change-Id: I7b995aa9c9dce7e01d4c862d094b1e73e6b6fb40
Reviewed-by: Kai Koehne <kai.koehne@digia.com>