0
0
mirror of https://github.com/yse/easy_profiler.git synced 2024-12-28 17:28:14 +08:00

Linux build

This commit is contained in:
Sergey Yagovtsev 2016-09-20 01:24:53 +03:00
parent 1a22a1b463
commit 151c359f7f

View File

@ -121,11 +121,11 @@ EasyMainWindow::EasyMainWindow() : Parent()
auto toolbar = addToolBar("MainToolBar"); auto toolbar = addToolBar("MainToolBar");
toolbar->setObjectName("ProfilerGUI_MainToolBar"); toolbar->setObjectName("ProfilerGUI_MainToolBar");
m_captureAction = toolbar->addAction(QIcon(":/Start"), "Capture", this, &This::onCaptureClicked); m_captureAction = toolbar->addAction(QIcon(":/Start"), tr("Capture"), this, SLOT(onCaptureClicked(bool)));
m_captureAction->setEnabled(false); m_captureAction->setEnabled(false);
toolbar->addSeparator(); toolbar->addSeparator();
m_connectAction = toolbar->addAction(QIcon(":/Connection"), "Connect", this, &This::onConnectClicked); m_connectAction = toolbar->addAction(QIcon(":/Connection"), tr("Connect"), this, SLOT(onConnectClicked(bool)));
toolbar->addWidget(new QLabel(" IP:")); toolbar->addWidget(new QLabel(" IP:"));
m_ipEdit = new QLineEdit(); m_ipEdit = new QLineEdit();
@ -191,17 +191,17 @@ EasyMainWindow::EasyMainWindow() : Parent()
auto menu = menuBar()->addMenu("&File"); auto menu = menuBar()->addMenu("&File");
menu->addAction(QIcon(":/Open"), "&Open", this, &This::onOpenFileClicked); menu->addAction(QIcon(":/Open"), "&Open", this, SLOT(onOpenFileClicked(bool)));
menu->addAction(QIcon(":/Reload"), "&Reload", this, &This::onReloadFileClicked); menu->addAction(QIcon(":/Reload"), "&Reload", this, SLOT(onReloadFileClicked(bool)));
menu->addSeparator(); menu->addSeparator();
menu->addAction(QIcon(":/Exit"), "&Exit", this, &This::onExitClicked); menu->addAction(QIcon(":/Exit"), "&Exit", this, SLOT(onExitClicked(bool)));
menu = menuBar()->addMenu("&View"); menu = menuBar()->addMenu("&View");
menu->addAction(QIcon(":/Expand"), "Expand all", this, &This::onExpandAllClicked); menu->addAction(QIcon(":/Expand"), "Expand all", this, SLOT(onExpandAllClicked(bool)));
menu->addAction(QIcon(":/Collapse"), "Collapse all", this, &This::onCollapseAllClicked); menu->addAction(QIcon(":/Collapse"), "Collapse all", this,SLOT(onCollapseAllClicked(bool)));
menu->addSeparator(); menu->addSeparator();
@ -257,7 +257,7 @@ EasyMainWindow::EasyMainWindow() : Parent()
menu = menuBar()->addMenu("&Edit"); menu = menuBar()->addMenu("&Edit");
m_editBlocksAction = menu->addAction("Edit blocks", this, &This::onEditBlocksClicked); m_editBlocksAction = menu->addAction(tr("Edit blocks"), this, SLOT(onEditBlocksClicked(bool)));
m_editBlocksAction->setEnabled(false); m_editBlocksAction->setEnabled(false);
@ -337,7 +337,7 @@ void EasyMainWindow::listen()
//std::this_thread::sleep_for(std::chrono::seconds(2)); //std::this_thread::sleep_for(std::chrono::seconds(2));
static const int buffer_size = 8 * 1024 * 1024; static const int buffer_size = 8 * 1024 * 1024;
char buffer[buffer_size] = {}; char*buffer = new char[buffer_size];
int seek = 0; int seek = 0;
int bytes = 0; int bytes = 0;
@ -481,6 +481,8 @@ void EasyMainWindow::listen()
} }
} }
} }
delete [] buffer;
} }
EasyMainWindow::~EasyMainWindow() EasyMainWindow::~EasyMainWindow()