0
0
mirror of https://github.com/yse/easy_profiler.git synced 2024-12-27 08:41:02 +08:00

refactoring

This commit is contained in:
Victor Zarubkin 2016-08-04 23:46:04 +03:00
parent aac410d9f8
commit 27ec6aee7e
3 changed files with 23 additions and 23 deletions

View File

@ -29,8 +29,7 @@
#include <QContextMenuEvent>
#include <QSignalBlocker>
#include <QSettings>
#include <qtextcodec.h>
#include <QTextCodec>
#include "blocks_tree_widget.h"
//////////////////////////////////////////////////////////////////////////
@ -238,7 +237,6 @@ ProfTreeWidget::ProfTreeWidget(QWidget* _parent) : Parent(_parent), m_beginTime(
header->setText(COL_NCALLS_TOTAL, "N Calls total");
setHeaderItem(header);
//hideColumn(COL_END);
connect(&::profiler_gui::EASY_GLOBALS.events, &::profiler_gui::ProfGlobalSignals::selectedThreadChanged, this, &This::onSelectedThreadChange);
QSettings settings(profiler_gui::ORGANAZATION_NAME, profiler_gui::APPLICATION_NAME);

View File

@ -28,9 +28,8 @@
#include <QMenu>
#include <QMenuBar>
#include <QCoreApplication>
#include <qevent.h>
#include <QCloseEvent>
#include <QSettings>
#include "main_window.h"
#include "blocks_tree_widget.h"
#include "blocks_graphics_view.h"
@ -193,13 +192,11 @@ void ProfMainWindow::onTestViewportClicked(bool)
void ProfMainWindow::closeEvent(QCloseEvent* close_event)
{
saveSettings();
close_event->setAccepted(true);
QMainWindow::closeEvent(close_event);
}
//////////////////////////////////////////////////////////////////////////
void ProfMainWindow::saveSettings()
{
QSettings settings(profiler_gui::ORGANAZATION_NAME, profiler_gui::APPLICATION_NAME);

View File

@ -44,6 +44,10 @@ public:
ProfMainWindow();
virtual ~ProfMainWindow();
// Public virtual methods
void closeEvent(QCloseEvent* close_event) override;
protected slots:
void onOpenFileClicked(bool);
@ -53,8 +57,9 @@ protected slots:
private:
// Private non-virtual methods
void loadFile(const std::string& filename);
void closeEvent(QCloseEvent *close_event);
void saveSettings();