sizeHistogramModel, &HistogramModel::resetData);
connect(m_parser, &Parser::summaryAvailable,
m_ui->summary, &QLabel::setText);
+ connect(m_parser, &Parser::progressMessageAvailable,
+ m_ui->progressLabel, &QLabel::setText);
connect(m_parser, &Parser::topDownDataAvailable,
m_ui->flameGraphTab, &FlameGraph::setTopDownData);
connect(m_parser, &Parser::bottomUpDataAvailable,
</widget>
</item>
<item>
+ <widget class="QLabel" name="progressLabel">
+ <property name="text">
+ <string notr="true">Progress Message...</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ <property name="wordWrap">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
stream() << make_job([this, path]() {
const auto stdPath = path.toStdString();
auto data = make_shared<ParserData>();
+ emit progressMessageAvailable(i18n("parsing data..."));
data->read(stdPath);
data->updateStringCache();
emit summaryAvailable(generateSummary(*data));
+ emit progressMessageAvailable(i18n("merging allocations..."));
// merge allocations before modifying the data again
const auto mergedAllocations = mergeAllocations(*data);
+ emit progressMessageAvailable(i18n("building size histogram..."));
// also calculate the size histogram
const auto sizeHistogram = buildSizeHistogram(*data);
// now data can be modified again for the chart data evaluation
+ emit progressMessageAvailable(i18n("building charts..."));
auto parallel = new Collection;
*parallel << make_job([this, mergedAllocations, sizeHistogram]() {
emit bottomUpDataAvailable(mergedAllocations);
void parse(const QString& path);
signals:
+ void progressMessageAvailable(const QString& progress);
void summaryAvailable(const QString& summary);
void bottomUpDataAvailable(const TreeData& data);
void topDownDataAvailable(const TreeData& data);