Selaa lähdekoodia

UI: Do not save at intervals

Saving at intervals is a poor way to handle saving issues in general.
Best to just save when something has been modified instead.
jp9000 10 vuotta sitten
vanhempi
sitoutus
4b93b42ded
2 muutettua tiedostoa jossa 0 lisäystä ja 9 poistoa
  1. 0 7
      obs/window-basic-main.cpp
  2. 0 2
      obs/window-basic-main.hpp

+ 0 - 7
obs/window-basic-main.cpp

@@ -750,10 +750,6 @@ void OBSBasic::OBSInit()
 	TimedCheckForUpdates();
 	loaded = true;
 
-	saveTimer = new QTimer(this);
-	connect(saveTimer, SIGNAL(timeout()), this, SLOT(SaveProject()));
-	saveTimer->start(20000);
-
 	bool previewEnabled = config_get_bool(App()->GlobalConfig(),
 			"BasicWindow", "PreviewEnabled");
 	if (!previewEnabled)
@@ -1999,9 +1995,6 @@ void OBSBasic::closeEvent(QCloseEvent *event)
 	// the destructor gets called
 	obs_remove_draw_callback(OBSBasic::RenderMain, this);
 
-	/* Delete the save timer so it doesn't trigger after this point while
-	 * the program data is being freed */
-	delete saveTimer;
 	SaveProject();
 
 	/* Clear all scene data (dialogs, widgets, widget sub-items, scenes,

+ 0 - 2
obs/window-basic-main.hpp

@@ -75,8 +75,6 @@ private:
 
 	bool loaded = false;
 
-	QPointer<QTimer> saveTimer;
-
 	QPointer<QThread> updateCheckThread;
 	QPointer<QThread> logUploadThread;