diff --git a/profiler_gui/main_window.cpp b/profiler_gui/main_window.cpp index 765fa00..8de62b5 100644 --- a/profiler_gui/main_window.cpp +++ b/profiler_gui/main_window.cpp @@ -105,9 +105,10 @@ EasyMainWindow::EasyMainWindow() : Parent(), m_treeWidget(nullptr), m_graphicsVi QToolBar *fileToolBar = addToolBar(tr("File")); QAction *connectAct = new QAction(tr("&Connect"), this); - { QIcon icon(":/WiFi"); if (!icon.isNull()) connectAct->setIcon(icon); } + SET_ICON(connectAct, ":/WiFi"); QAction *newAct = new QAction(tr("&Capture"), this); + SET_ICON(newAct, ":/Start"); fileToolBar->addAction(connectAct); fileToolBar->addAction(newAct); diff --git a/src/profile_manager.cpp b/src/profile_manager.cpp index da72864..f146d88 100644 --- a/src/profile_manager.cpp +++ b/src/profile_manager.cpp @@ -383,7 +383,7 @@ uint32_t ProfileManager::dumpBlocksToStream(profiler::OStream& _outputStream) ::profiler::setEnabled(false); //TODO remove it - std::this_thread::sleep_for(std::chrono::milliseconds(100)); + std::this_thread::sleep_for(std::chrono::milliseconds(1000)); // This is to make sure that no new descriptors or new threads will be // added until we finish sending data. guard_lock_t lock1(m_storedSpin); diff --git a/src/profile_manager.h b/src/profile_manager.h index c845d86..09a65a3 100644 --- a/src/profile_manager.h +++ b/src/profile_manager.h @@ -218,12 +218,12 @@ public: do { const int8_t* data = current->data; uint16_t i = 0; - do { + while (i + 1 < N && *(uint16_t*)data != 0) { const uint16_t size = sizeof(uint16_t) + *(uint16_t*)data; _outputStream.write((const char*)data, size); data = data + size; i += size; - } while (i + 1 < N && *(uint16_t*)data != 0); + } current = current->prev; } while (current != nullptr);