Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add include guard to frequency dock access #587

Merged
merged 1 commit into from
Jan 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 20 additions & 8 deletions src/resultspage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -298,12 +298,15 @@ QMenu* ResultsPage::exportMenu() const

QList<QAction*> ResultsPage::windowActions() const
{
auto ret = QList<QAction*> {m_summaryPageDock->toggleAction(), m_bottomUpDock->toggleAction(),
m_topDownDock->toggleAction(), m_flameGraphDock->toggleAction(),
m_callerCalleeDock->toggleAction(), m_disassemblyDock->toggleAction(),
m_timeLineDock->toggleAction()};
if (m_frequencyDock)
ret.append(m_frequencyDock->toggleAction());
auto ret = QList<QAction*>
{
m_summaryPageDock->toggleAction(), m_bottomUpDock->toggleAction(), m_topDownDock->toggleAction(),
m_flameGraphDock->toggleAction(), m_callerCalleeDock->toggleAction(), m_disassemblyDock->toggleAction(),
m_timeLineDock->toggleAction(),
#if QCustomPlot_FOUND
m_frequencyDock->toggleAction()
#endif
};
return ret;
}

Expand Down Expand Up @@ -334,8 +337,17 @@ void ResultsPage::initDockWidgets(const QVector<CoreDockWidget*>& restored)

Q_ASSERT(restored.contains(summaryPageDock));

const auto docks = {m_bottomUpDock, m_topDownDock, m_flameGraphDock, m_callerCalleeDock,
m_timeLineDock, m_disassemblyDock, m_frequencyDock};
const auto docks = {
m_bottomUpDock,
m_topDownDock,
m_flameGraphDock,
m_callerCalleeDock,
m_timeLineDock,
m_disassemblyDock,
#if QCustomPlot_FOUND
m_frequencyDock
#endif
};
for (auto dock : docks) {
auto dockWidget = toDockWidget(dock);

Expand Down