Skip to content

Commit 8e54107

Browse files
lievenheymilianw
authored andcommitted
fix: clear flamegraph background in 5.15.12
In QT 5.15.12 the background of the flamegraph is not cleared correctly which creates phantom entries. This problem does not exists in 5.15.10 and after 5.15.13. fix: #624
1 parent 492b89e commit 8e54107

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/flamegraph.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -1188,6 +1188,12 @@ void FlameGraph::selectItem(FrameGraphicsItem* item)
11881188
// then layout all items below the selected on
11891189
layoutItems(item);
11901190

1191+
#if QT_VERSION <= QT_VERSION_CHECK(5, 15, 12) && QT_VERSION > QT_VERSION_CHECK(5, 15, 10)
1192+
// the scene background doesn't get cleared correctly when using qt 5.15.12
1193+
// this doesn't happen in 5.15.10 and 5.15.13
1194+
m_scene->setBackgroundBrush(QBrush());
1195+
#endif
1196+
11911197
// Triggers a refresh of the scene's bounding rect without going via the
11921198
// event loop. This makes the centerOn call below work as expected in all cases.
11931199
m_scene->sceneRect();

0 commit comments

Comments
 (0)