diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9b541949c..763254bef 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,7 +16,7 @@ repos: args: [--allow-multiple-documents] - id: check-json - repo: https://github.com/pre-commit/mirrors-clang-format - rev: v17.0.6 + rev: v18.1.8 hooks: - id: clang-format files: (\.cpp|\.h|\.c) diff --git a/src/flamegraph.cpp b/src/flamegraph.cpp index c3e5f4b3f..fa3a473fd 100644 --- a/src/flamegraph.cpp +++ b/src/flamegraph.cpp @@ -673,6 +673,8 @@ FlameGraph::FlameGraph(QWidget* parent, Qt::WindowFlags flags) connect(Settings::instance(), &Settings::collapseDepthChanged, this, updateHelper); + m_scene->setBackgroundBrush(QBrush()); + m_scene->setItemIndexMethod(QGraphicsScene::NoIndex); m_view->setScene(m_scene); m_view->viewport()->installEventFilter(this); @@ -1189,12 +1191,6 @@ void FlameGraph::selectItem(FrameGraphicsItem* item) // then layout all items below the selected on layoutItems(item); -#if QT_VERSION <= QT_VERSION_CHECK(5, 15, 12) && QT_VERSION > QT_VERSION_CHECK(5, 15, 10) - // the scene background doesn't get cleared correctly when using qt 5.15.12 - // this doesn't happen in 5.15.10 and 5.15.13 - m_scene->setBackgroundBrush(QBrush()); -#endif - // Triggers a refresh of the scene's bounding rect without going via the // event loop. This makes the centerOn call below work as expected in all cases. m_scene->sceneRect(); diff --git a/src/models/CMakeLists.txt b/src/models/CMakeLists.txt index efafc415a..b17547780 100644 --- a/src/models/CMakeLists.txt +++ b/src/models/CMakeLists.txt @@ -2,9 +2,9 @@ add_library( models STATIC ../settings.cpp ../util.cpp + byfilemodel.cpp callercalleemodel.cpp callercalleeproxy.cpp - byfilemodel.cpp codedelegate.cpp costdelegate.cpp data.cpp diff --git a/tests/modeltests/tst_search.cpp b/tests/modeltests/tst_search.cpp index 06d19f926..85b60bb42 100644 --- a/tests/modeltests/tst_search.cpp +++ b/tests/modeltests/tst_search.cpp @@ -23,12 +23,10 @@ private slots: { const std::array testArray = {}; - QCOMPARE(search( - testArray.cbegin(), testArray.cend(), 0, Direction::Forward, [](int) { return false; }, [] {}), - -1); - QCOMPARE(search( - testArray.cbegin(), testArray.cend(), 0, Direction::Backward, [](int) { return false; }, [] {}), - -1); + QCOMPARE( + search(testArray.cbegin(), testArray.cend(), 0, Direction::Forward, [](int) { return false; }, [] {}), -1); + QCOMPARE( + search(testArray.cbegin(), testArray.cend(), 0, Direction::Backward, [](int) { return false; }, [] {}), -1); } void testSearch() {