From 6cae6901dee6eb5de4f4681846836e75260e7318 Mon Sep 17 00:00:00 2001 From: Victor Zarubkin Date: Sat, 24 Sep 2016 00:00:31 +0300 Subject: [PATCH] (profiler_gui) Removed unnecessary signals (rebuild may be needed) --- profiler_gui/blocks_graphics_view.cpp | 2 -- profiler_gui/globals_qobjects.h | 2 -- profiler_gui/main_window.cpp | 6 +++--- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/profiler_gui/blocks_graphics_view.cpp b/profiler_gui/blocks_graphics_view.cpp index 5c453af..a5e6e1f 100644 --- a/profiler_gui/blocks_graphics_view.cpp +++ b/profiler_gui/blocks_graphics_view.cpp @@ -1153,8 +1153,6 @@ void EasyGraphicsView::initMode() connect(globalSignals, &::profiler_gui::EasyGlobalSignals::selectedThreadChanged, this, &This::onSelectedThreadChange); connect(globalSignals, &::profiler_gui::EasyGlobalSignals::selectedBlockChanged, this, &This::onSelectedBlockChange); connect(globalSignals, &::profiler_gui::EasyGlobalSignals::itemsExpandStateChanged, this, &This::onItemsEspandStateChange); - connect(globalSignals, &::profiler_gui::EasyGlobalSignals::drawBordersChanged, this, &This::repaintScene); - connect(globalSignals, &::profiler_gui::EasyGlobalSignals::chronoPositionChanged, this, &This::repaintScene); } ////////////////////////////////////////////////////////////////////////// diff --git a/profiler_gui/globals_qobjects.h b/profiler_gui/globals_qobjects.h index 91941d1..20cc2b8 100644 --- a/profiler_gui/globals_qobjects.h +++ b/profiler_gui/globals_qobjects.h @@ -50,8 +50,6 @@ namespace profiler_gui { void selectedThreadChanged(::profiler::thread_id_t _id); void selectedBlockChanged(uint32_t _block_index); void itemsExpandStateChanged(); - void drawBordersChanged(); - void chronoPositionChanged(); void blockStatusChanged(::profiler::block_id_t _id, ::profiler::EasyBlockStatus _status); }; // END of class EasyGlobalSignals. diff --git a/profiler_gui/main_window.cpp b/profiler_gui/main_window.cpp index d35b34c..84cc107 100644 --- a/profiler_gui/main_window.cpp +++ b/profiler_gui/main_window.cpp @@ -226,7 +226,7 @@ EasyMainWindow::EasyMainWindow() : Parent() action->setChecked(EASY_GLOBALS.bind_scene_and_tree_expand_status); connect(action, &QAction::triggered, this, &This::onBindExpandStatusChange); - action = menu->addAction("Paint event indicators"); + action = menu->addAction("Draw event indicators"); action->setCheckable(true); action->setChecked(EASY_GLOBALS.enable_event_indicators); connect(action, &QAction::triggered, this, &This::onEventIndicatorsChange); @@ -581,7 +581,7 @@ void EasyMainWindow::onChronoTextPosChanged(bool) { auto _sender = qobject_cast(sender()); EASY_GLOBALS.chrono_text_position = static_cast<::profiler_gui::ChronometerTextPosition>(_sender->data().toInt()); - emit EASY_GLOBALS.events.chronoPositionChanged(); + static_cast(m_graphicsView->widget())->view()->scene()->update(); } void EasyMainWindow::onEventIndicatorsChange(bool _checked) @@ -617,7 +617,7 @@ void EasyMainWindow::onEnableDisableStatistics(bool _checked) void EasyMainWindow::onDrawBordersChanged(bool _checked) { EASY_GLOBALS.draw_graphics_items_borders = _checked; - emit EASY_GLOBALS.events.drawBordersChanged(); + static_cast(m_graphicsView->widget())->view()->scene()->update(); } void EasyMainWindow::onCollapseItemsAfterCloseChanged(bool _checked)