mirror of
https://github.com/yse/easy_profiler.git
synced 2024-12-27 08:41:02 +08:00
refactoring
This commit is contained in:
parent
aac410d9f8
commit
27ec6aee7e
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user