From c7ba19cb4d988fdea6ecf3c7833fda8c47ad259c Mon Sep 17 00:00:00 2001 From: Victor Zarubkin Date: Mon, 10 Apr 2017 22:04:09 +0300 Subject: [PATCH] (GUI) Fixed warnings --- profiler_gui/blocks_graphics_view.cpp | 2 -- profiler_gui/easy_frame_rate_viewer.cpp | 2 +- profiler_gui/easy_graphics_scrollbar.cpp | 4 ++-- profiler_gui/tree_widget_loader.cpp | 3 +-- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/profiler_gui/blocks_graphics_view.cpp b/profiler_gui/blocks_graphics_view.cpp index 3f2bb28..9f058dd 100644 --- a/profiler_gui/blocks_graphics_view.cpp +++ b/profiler_gui/blocks_graphics_view.cpp @@ -1205,8 +1205,6 @@ void EasyGraphicsView::mouseMoveEvent(QMouseEvent* _event) if (m_chronometerItemAux->isVisible()) { - auto x = m_chronometerItemAux->toItem(mouseScenePos.x()); - auto prevValue = m_chronometerItemAux->hoverLeft(); m_chronometerItemAux->setHoverLeft(m_chronometerItemAux->hoverLeft(mouseScenePos.x())); needUpdate = needUpdate || (prevValue != m_chronometerItemAux->hoverLeft()); diff --git a/profiler_gui/easy_frame_rate_viewer.cpp b/profiler_gui/easy_frame_rate_viewer.cpp index 310e26a..6efe7c5 100644 --- a/profiler_gui/easy_frame_rate_viewer.cpp +++ b/profiler_gui/easy_frame_rate_viewer.cpp @@ -240,7 +240,7 @@ void EasyFPSGraphicsItem::clear() void EasyFPSGraphicsItem::addPoint(uint32_t _maxFrameTime, uint32_t _avgFrameTime) { m_frames.emplace_back(_maxFrameTime, _avgFrameTime); - if (m_frames.size() > EASY_GLOBALS.max_fps_history) + if (static_cast(m_frames.size()) > EASY_GLOBALS.max_fps_history) m_frames.pop_front(); } diff --git a/profiler_gui/easy_graphics_scrollbar.cpp b/profiler_gui/easy_graphics_scrollbar.cpp index 1fa15c1..81b1aac 100644 --- a/profiler_gui/easy_graphics_scrollbar.cpp +++ b/profiler_gui/easy_graphics_scrollbar.cpp @@ -348,7 +348,7 @@ void EasyHistogramItem::paintByPtr(QPainter* _painter) QRectF rect; QBrush brush(Qt::SolidPattern); - QRgb previousColor = 0; + //QRgb previousColor = 0; _painter->save(); _painter->setTransform(QTransform::fromScale(1.0 / currentScale, 1), true); @@ -538,7 +538,7 @@ void EasyHistogramItem::paintById(QPainter* _painter) QRectF rect; QBrush brush(Qt::SolidPattern); - QRgb previousColor = 0; + //QRgb previousColor = 0; _painter->save(); _painter->setTransform(QTransform::fromScale(1.0 / currentScale, 1), true); diff --git a/profiler_gui/tree_widget_loader.cpp b/profiler_gui/tree_widget_loader.cpp index fd03877..c32e7ae 100644 --- a/profiler_gui/tree_widget_loader.cpp +++ b/profiler_gui/tree_widget_loader.cpp @@ -790,11 +790,10 @@ size_t EasyTreeWidgetLoader::setTreeInternalPlain(const ::profiler::BlocksTreeRo { ++total_items; - size_t children_items_number = 0; ::profiler::timestamp_t children_duration = 0; if (!child.children.empty()) { - children_items_number = setTreeInternalPlain(_threadRoot, _firstCswitch, _beginTime, child.children, _frame, _frame, _left, _right, _strict, children_duration, _colorizeRows, _addZeroBlocks, _units); + setTreeInternalPlain(_threadRoot, _firstCswitch, _beginTime, child.children, _frame, _frame, _left, _right, _strict, children_duration, _colorizeRows, _addZeroBlocks, _units); if (interrupted()) break; }