[vlmc-devel] [PATCH] backup when vlmc closes unexpectedly

Hugo Beauzée-Luyssen hugo at beauzee.fr
Fri Mar 11 10:58:32 CET 2016


On 03/09/2016 05:59 PM, sanket.markan wrote:
> Fixed a fixme in restore session function in mainwindow.cpp
>
>
> _______________________________________________
> Vlmc-devel mailing list
> Vlmc-devel at videolan.org
> https://mailman.videolan.org/listinfo/vlmc-devel
>

Hi,

This is using the wrong indentation & coding style.

You're relying on Project::hasProjectFile, which will only return true 
after a project has been loaded. That won't work for checking if we need 
to restore a project.

You implement a new "createbackup" function, which I suppose is meant to 
create a backup of the current project, but we already have the 
emergencyBackup() method for that. Though I'm not sure that it's what 
this method is for, since it seems to be saving the project name only.
If you are trying to save the last project name, why don't you just use 
VLMC's settings?
Creating a private variable that contains the name of the last loaded 
project should be enough.

Also, please be careful about your prototype, you're passing "const 
QString" while you probably meant "const QString&"

Regards,


More information about the Vlmc-devel mailing list