Showing the changes to interface/src/Application.cpp (1 of 2 files). Show all
Unified · Split
| @@ -451,7 +451,15 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : · 450 unmodified lines | |||
| 451 | } | 451 | } |
| 452 | 452 | ||
| 453 | loadSettings(); | 453 | loadSettings(); |
| 454 | 454 | int SAVE_SETTINGS_INTERVAL = 10 * MSECS_PER_SECOND; // Let's save every seconds for now | |
| 455 | connect(&_settingsTimer, &QTimer::timeout, this, &Application::saveSettings); | ||
| 456 | connect(&_settingsThread, SIGNAL(started), &_settingsTimer, SLOT(start)); | ||
| 457 | connect(&_settingsThread, &QThread::finished, &_settingsTimer, &QTimer::deleteLater); | ||
| 458 | _settingsTimer.moveToThread(&_settingsThread); | ||
| 459 | _settingsTimer.setSingleShot(false); | ||
| 460 | _settingsTimer.setInterval(SAVE_SETTINGS_INTERVAL); | ||
| 461 | _settingsThread.start(); | ||
| 462 | |||
| 455 | _trayIcon->show(); | 463 | _trayIcon->show(); |
| 456 | 464 | ||
| 457 | // set the local loopback interface for local sounds from audio scripts | 465 | // set the local loopback interface for local sounds from audio scripts |