diff --git a/src/resultspagediff.cpp b/src/resultspagediff.cpp index 0b27ccd6..f7760e2f 100644 --- a/src/resultspagediff.cpp +++ b/src/resultspagediff.cpp @@ -48,8 +48,6 @@ ResultsPageDiff::ResultsPageDiff(QWidget* parent) , m_resultsBottomUpPage( new ResultsBottomUpPage(m_filterAndZoomStack, nullptr, m_costContextMenu, m_exportMenu, this)) , m_resultsTopDownPage(new ResultsTopDownPage(m_filterAndZoomStack, nullptr, m_costContextMenu, this)) - , m_resultsFlameGraphPage(new ResultsFlameGraphPage(m_filterAndZoomStack, m_fileA, m_exportMenu, this)) - , m_resultsCallerCalleePage(new ResultsCallerCalleePage(m_filterAndZoomStack, m_fileA, m_costContextMenu, this)) , m_timelineVisible(true) { m_exportMenu->setIcon(QIcon::fromTheme(QStringLiteral("document-export"))); @@ -82,33 +80,12 @@ ResultsPageDiff::ResultsPageDiff(QWidget* parent) m_contents->addDockWidget(m_bottomUpDock, KDDockWidgets::Location_OnTop); m_topDownDock = dockify(m_resultsTopDownPage, QStringLiteral("dtopDown"), tr("Top &Down"), tr("Ctrl+D")); m_bottomUpDock->addDockWidgetAsTab(m_topDownDock); - m_flameGraphDock = - dockify(m_resultsFlameGraphPage, QStringLiteral("dflameGraph"), tr("Flame &Graph"), tr("Ctrl+G")); - m_bottomUpDock->addDockWidgetAsTab(m_flameGraphDock); - m_callerCalleeDock = - dockify(m_resultsCallerCalleePage, QStringLiteral("dcallerCallee"), tr("Ca&ller / Callee"), tr("Ctrl+L")); - m_bottomUpDock->addDockWidgetAsTab(m_callerCalleeDock); m_bottomUpDock->setAsCurrentTab(); connect(m_filterAndZoomStack, &FilterAndZoomStack::filterChanged, m_fileA, &PerfParser::filterResults); connect(m_fileA, &PerfParser::parserWarning, this, &ResultsPageDiff::showError); - connect(m_resultsCallerCalleePage, &ResultsCallerCalleePage::navigateToCode, this, - &ResultsPageDiff::navigateToCode); - connect(m_resultsCallerCalleePage, &ResultsCallerCalleePage::navigateToCodeFailed, this, - &ResultsPageDiff::showError); - - connect(m_resultsBottomUpPage, &ResultsBottomUpPage::jumpToCallerCallee, this, - &ResultsPageDiff::onJumpToCallerCallee); - connect(m_resultsBottomUpPage, &ResultsBottomUpPage::openEditor, this, &ResultsPageDiff::onOpenEditor); - connect(m_resultsTopDownPage, &ResultsTopDownPage::jumpToCallerCallee, this, - &ResultsPageDiff::onJumpToCallerCallee); - connect(m_resultsTopDownPage, &ResultsTopDownPage::openEditor, this, &ResultsPageDiff::onOpenEditor); - connect(m_resultsFlameGraphPage, &ResultsFlameGraphPage::jumpToCallerCallee, this, - &ResultsPageDiff::onJumpToCallerCallee); - connect(m_resultsFlameGraphPage, &ResultsFlameGraphPage::openEditor, this, &ResultsPageDiff::onOpenEditor); - connect(m_fileA, &PerfParser::parsingStarted, this, [this]() { // disable when we apply a filter m_contents->setEnabled(false); @@ -138,9 +115,9 @@ ResultsPageDiff::ResultsPageDiff(QWidget* parent) Data::BottomUpResults::diffBottomUpResults(m_fileA->bottomUpResults(), m_fileB->bottomUpResults()); m_resultsBottomUpPage->setBottomUpResults(bottomUpData); - auto topDownData = - Data::TopDownResults::diffTopDownResults(Data::TopDownResults::fromBottomUp(m_fileA->bottomUpResults()), - Data::TopDownResults::fromBottomUp(m_fileB->bottomUpResults())); + auto topDownData = Data::TopDownResults::diffTopDownResults( + Data::TopDownResults::fromBottomUp(m_fileA->bottomUpResults(), false), + Data::TopDownResults::fromBottomUp(m_fileB->bottomUpResults(), false)); m_resultsTopDownPage->setTopDownResults(topDownData); }); @@ -163,16 +140,6 @@ ResultsPageDiff::ResultsPageDiff(QWidget* parent) ResultsPageDiff::~ResultsPageDiff() = default; -void ResultsPageDiff::setSysroot(const QString& path) -{ - m_resultsCallerCalleePage->setSysroot(path); -} - -void ResultsPageDiff::setAppPath(const QString& path) -{ - m_resultsCallerCalleePage->setAppPath(path); -} - static void showDock(KDDockWidgets::DockWidget* dock) { dock->show(); @@ -180,23 +147,10 @@ static void showDock(KDDockWidgets::DockWidget* dock) dock->setAsCurrentTab(); } -void ResultsPageDiff::onJumpToCallerCallee(const Data::Symbol& symbol) -{ - m_resultsCallerCalleePage->jumpToCallerCallee(symbol); - showDock(m_callerCalleeDock); -} - -void ResultsPageDiff::onOpenEditor(const Data::Symbol& symbol) -{ - m_resultsCallerCalleePage->openEditor(symbol); -} - void ResultsPageDiff::clear() { m_resultsBottomUpPage->clear(); m_resultsTopDownPage->clear(); - m_resultsCallerCalleePage->clear(); - m_resultsFlameGraphPage->clear(); m_exportMenu->clear(); m_filterAndZoomStack->clear(); @@ -214,8 +168,7 @@ QMenu* ResultsPageDiff::exportMenu() const QList ResultsPageDiff::windowActions() const { - auto ret = QList {m_bottomUpDock->toggleAction(), m_topDownDock->toggleAction(), - m_flameGraphDock->toggleAction(), m_callerCalleeDock->toggleAction()}; + auto ret = QList {m_bottomUpDock->toggleAction(), m_topDownDock->toggleAction()}; return ret; } @@ -244,7 +197,7 @@ void ResultsPageDiff::initDockWidgets(const QVector& restored); public slots: - void setSysroot(const QString& path); - void setAppPath(const QString& path); - - void onJumpToCallerCallee(const Data::Symbol& symbol); - void onOpenEditor(const Data::Symbol& symbol); void showError(const QString& message); void createDiffReport(const QString& fileA, const QString& fileB); @@ -78,10 +71,6 @@ public slots: ResultsBottomUpPage* m_resultsBottomUpPage; KDDockWidgets::DockWidget* m_topDownDock; ResultsTopDownPage* m_resultsTopDownPage; - KDDockWidgets::DockWidget* m_flameGraphDock; - ResultsFlameGraphPage* m_resultsFlameGraphPage; - KDDockWidgets::DockWidget* m_callerCalleeDock; - ResultsCallerCalleePage* m_resultsCallerCalleePage; QWidget* m_filterBusyIndicator = nullptr; int m_runningParsersCounter = 0;