Browse Source

Start working on #164 to autorefresh debug tag

duke
Duke 2 months ago
parent
commit
0db6491fd4
  1. 13
      src/mainwindow.cpp

13
src/mainwindow.cpp

@ -2044,6 +2044,19 @@ void MainWindow::setupDebugLogTab() {
});
ui->debugLog->setPlainText( readDebugLines() );
// Set up timer
QTimer* debugTimer = new QTimer(main);
QObject::connect(debugTimer, &QTimer::timeout, [=]() {
uint32_t debugLines = ui->debugLines->text().trimmed().toInt();
if (debugLines == 0) { debugLines = 50; }
ui->debugLog->setPlainText( readDebugLines(debugLines) );
DEBUG("Refreshed debug data with debugLines=" << debugLines);
});
//TODO: allow customizing refresh speed
uint32_t debugRefreshSpeed = 30*1000;
debugTimer->start(debugRefreshSpeed);
DEBUG("started debug refresh at speed=" << debugRefreshSpeed); //Settings::debugRefreshSpeed;
}
void MainWindow::setupPeersTab() {

Loading…
Cancel
Save