Skip to content

Commit

Permalink
Update version, cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
milos.tosic committed Nov 27, 2024
1 parent b1487e3 commit e06a65b
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 22 deletions.
9 changes: 4 additions & 5 deletions src/MTuner/src/histogram.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,7 @@ void Histogram::paint(QPainter* _painter, const QStyleOptionGraphicsItem* _optio
QFont font("Consolas",8,QFont::Normal);
_painter->setFont(font);

int numBins = rtm::MemoryStats::NUM_HISTOGRAM_BINS;
int delta = (right-left) / (numBins);
int delta = (right-left) / (rtm::MemoryStats::NUM_HISTOGRAM_BINS);

QRectF boundRect = boundingRect();
int deltaW = (boundRect.width() - (right-left))/2;
Expand All @@ -183,7 +182,7 @@ void Histogram::paint(QPainter* _painter, const QStyleOptionGraphicsItem* _optio

uint32_t selectedBin = ctx->m_capture->getSelectHistogramBin();

for (int i=0; i<numBins; ++i)
for (int i=0; i<rtm::MemoryStats::NUM_HISTOGRAM_BINS; ++i)
{
_painter->save();
if (i == static_cast<int>(selectedBin))
Expand Down Expand Up @@ -256,7 +255,7 @@ void Histogram::paint(QPainter* _painter, const QStyleOptionGraphicsItem* _optio
maxVal = maxValPeak;

int position = left + delta;
for (int i=0; i<numBins; ++i)
for (int i=0; i<rtm::MemoryStats::NUM_HISTOGRAM_BINS; ++i)
{
uint64_t binVal = getValue(*stats, m_type,i,false);
uint64_t binHeight = maxVal ? ((bottom - top) * binVal) / maxVal : 0;
Expand Down Expand Up @@ -300,7 +299,7 @@ void Histogram::paint(QPainter* _painter, const QStyleOptionGraphicsItem* _optio
}

int position = left + delta;
for (int i=0; i<numBins; ++i)
for (int i=0; i<rtm::MemoryStats::NUM_HISTOGRAM_BINS; ++i)
{
if (m_showPeaks)
{
Expand Down
9 changes: 4 additions & 5 deletions src/MTuner/src/histogramview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@ HistogramView::HistogramView(QWidget* _parent) :
m_scene = new QGraphicsScene(this);
m_scene->setItemIndexMethod(QGraphicsScene::NoIndex);

m_context = nullptr;
m_histogram = nullptr;

m_mode = 0;
m_showPeaks = false;
m_context = nullptr;
m_histogram = nullptr;
m_mode = 0;
m_showPeaks = false;
m_histogramType = 0;

setScene(m_scene);
Expand Down
14 changes: 7 additions & 7 deletions src/MTuner/src/histogramview.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ class HistogramView : public QGraphicsView
Q_OBJECT

private:
QGraphicsScene* m_scene;
CaptureContext* m_context;
Histogram* m_histogram;
QLabel* m_toolTipLabel;
int m_mode;
bool m_showPeaks;
int m_histogramType;
QGraphicsScene* m_scene;
CaptureContext* m_context;
Histogram* m_histogram;
QLabel* m_toolTipLabel;
int m_mode;
bool m_showPeaks;
int m_histogramType;

public:
static const int s_marginLeft = 45;
Expand Down
8 changes: 4 additions & 4 deletions src/MTuner/src/moduleswidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ class ModulesWidget : public QWidget
Q_OBJECT

private:
QLineEdit* m_filter;
QTreeWidget* m_list;
QTreeWidgetItem*m_currentItem;
CaptureContext* m_context;
QLineEdit* m_filter;
QTreeWidget* m_list;
QTreeWidgetItem* m_currentItem;
CaptureContext* m_context;
rdebug::ModuleInfo* m_currentInfo;

public:
Expand Down
2 changes: 1 addition & 1 deletion src/MTuner/src/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
#ifndef RTM_MTUNER_VERSION_H
#define RTM_MTUNER_VERSION_H

static const char* MTunerVersion = "4.8.7";
static const char* MTunerVersion = "4.8.8";

#endif // RTM_MTUNER_VERSION_H

0 comments on commit e06a65b

Please sign in to comment.