| 717 | } |
| 718 | |
| 719 | void |
| 720 | Project::triggerAutoSave() |
| 721 | { |
| 722 | ///Should only be called in the main-thread, that is upon user interaction. |
| 723 | assert( QThread::currentThread() == qApp->thread() ); |
| 724 | |
| 725 | if ( getApp()->isBackground() || !appPTR->isLoaded() || isProjectClosing() ) { |
| 726 | return; |
| 727 | } |
| 728 | |
| 729 | if ( !hasProjectBeenSavedByUser() && !appPTR->getCurrentSettings()->isAutoSaveEnabledForUnsavedProjects() ) { |
| 730 | return; |
| 731 | } |
| 732 | |
| 733 | { |
| 734 | QMutexLocker l(&_imp->isLoadingProjectMutex); |
| 735 | if (_imp->isLoadingProject) { |
| 736 | return; |
| 737 | } |
| 738 | } |
| 739 | |
| 740 | _imp->autoSaveTimer->start( appPTR->getCurrentSettings()->getAutoSaveDelayMS() ); |
| 741 | } |
| 742 | |
| 743 | void |
| 744 | Project::onAutoSaveTimerTriggered() |
no test coverage detected