refactored import function for greater robustness
The import function was written early on in the rewrite as a multithreaded background task that was considered somewhat flawed. While it worked for the most part, there were possibilities of race conditions that could have potentially been fatal, particularly since media could theoretically be deleted while the import/probe tasks were running in the background. With the save/load functions coming in, it became even more complicated as projects may include metadata about the footage that can't be implemented easily when the footage is imported/probed in the background. Making importing a modal task fixes all of these issues, it's still done in a background thread to not hang the GUI thread, but the GUI thread can be briefly "paused" in a user friendly way so that all these functions can be safer.
This commit is contained in:
@@ -354,7 +354,7 @@ bool ProjectViewModel::dropMimeData(const QMimeData *data, Qt::DropAction action
|
||||
QUrl url = stream.readLine();
|
||||
|
||||
if (!url.isEmpty()) {
|
||||
urls.append(url.path());
|
||||
urls.append(url.toLocalFile());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user