Skip to content
Commit c1ca48e3 authored by Eric Jiang's avatar Eric Jiang Committed by Jean-Baptiste Mardelle
Browse files

Re-organize KdenliveDoc constructor

This patch re-organizes big chunks of the code in kdenlivedoc.cpp along
with the calling code in projectmanager.cpp to make it clearer and more
testable.

* Split out the KdenliveDoc ctor into two ctors, one for opening a file
  (private) and one for creating a new file (public).
* Add KdenliveDoc::Open factory method, which returns several flags plus
  a pointer to the doc only if it was successful. Callers should use
  Open so that the actual constructor won't have so much code that can
  fail.
* Lift all GUI interactions into the caller (projectmanager.cpp) so that
  creating a KdenliveDoc can be unit tested.
parent c3e74e3f
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment