MCPcopy Create free account
hub / github.com/LMMS/lmms / autoSave

Method autoSave

src/gui/MainWindow.cpp:1561–1582  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1559
1560
1561void MainWindow::autoSave()
1562{
1563 if( !Engine::getSong()->isExporting() &&
1564 !Engine::getSong()->isLoadingProject() &&
1565 !RemotePluginBase::isMainThreadWaiting() &&
1566 !QApplication::mouseButtons() &&
1567 ( ConfigManager::inst()->value( "ui",
1568 "enablerunningautosave" ).toInt() ||
1569 ! Engine::getSong()->isPlaying() ) )
1570 {
1571 Engine::getSong()->saveProjectFile(ConfigManager::inst()->recoveryFile());
1572 autoSaveTimerReset(); // Reset timer
1573 }
1574 else
1575 {
1576 // try again in 10 seconds
1577 if( getAutoSaveTimerInterval() != m_autoSaveShortTime )
1578 {
1579 autoSaveTimerReset( m_autoSaveShortTime );
1580 }
1581 }
1582}

Callers

nothing calls this directly

Calls 6

getSongFunction · 0.85
isMainThreadWaitingFunction · 0.85
saveProjectFileMethod · 0.80
instFunction · 0.50
valueMethod · 0.45
isPlayingMethod · 0.45

Tested by

no test coverage detected