From daf6aa160ba96630cf9883b75922028fe377794d Mon Sep 17 00:00:00 2001
From: Ulf Hermann <ulf.hermann@digia.com>
Date: Mon, 23 Jun 2014 17:08:15 +0200
Subject: [PATCH] QmlProfiler: access the background marks from where they're
 created

It's considered bad style to access properties of parent objects
defined in a different component as that reduces code reusability.

Change-Id: I0dbe4a3663026d12b2666de75c93841528fe295c
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
---
 src/plugins/qmlprofiler/qml/CategoryLabel.qml | 1 -
 src/plugins/qmlprofiler/qml/MainView.qml      | 3 +++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/plugins/qmlprofiler/qml/CategoryLabel.qml b/src/plugins/qmlprofiler/qml/CategoryLabel.qml
index 961387fc926..95232dd6921 100644
--- a/src/plugins/qmlprofiler/qml/CategoryLabel.qml
+++ b/src/plugins/qmlprofiler/qml/CategoryLabel.qml
@@ -56,7 +56,6 @@ Item {
 
     function getDescriptions() {
         bindingTrigger = -bindingTrigger;
-        backgroundMarks.requestPaint();
         if (!visible)
             return;
 
diff --git a/src/plugins/qmlprofiler/qml/MainView.qml b/src/plugins/qmlprofiler/qml/MainView.qml
index aea2a60fcc2..2ab99e15c2d 100644
--- a/src/plugins/qmlprofiler/qml/MainView.qml
+++ b/src/plugins/qmlprofiler/qml/MainView.qml
@@ -80,6 +80,7 @@ Rectangle {
             // Clear if model is empty.
             if (qmlProfilerModelProxy.getState() === 0)
                 root.clear();
+            backgroundMarks.requestPaint()
         }
         onDataAvailable: {
             view.clearData();
@@ -88,6 +89,8 @@ Rectangle {
                                  qmlProfilerModelProxy.traceDuration()/10);
             view.requestPaint();
         }
+        onExpandedChanged: backgroundMarks.requestPaint()
+        onRowHeightChanged: backgroundMarks.requestPaint()
     }
 
 
-- 
GitLab