1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-02-09 04:30:09 +00:00

Changed the return values of some virtual methods in FileBasedDocument - Strings and File objects are now non-const, and the load/save functions return a Result object rather than a string.

This commit is contained in:
jules 2012-05-23 21:25:28 +01:00
parent 5151e2e06d
commit 53b1e351cf
10 changed files with 73 additions and 72 deletions

View file

@ -82,12 +82,12 @@ namespace
: "The Introjucer - Re-saving file: ")
<< projectFile.getFullPathName() << std::endl;
String error (justSaveResources ? proj.saveResourcesOnly (projectFile)
Result error (justSaveResources ? proj.saveResourcesOnly (projectFile)
: proj.saveProject (projectFile, true));
if (error.isNotEmpty())
if (error.failed())
{
std::cout << "Error when saving: " << error << std::endl;
std::cout << "Error when saving: " << error.getErrorMessage() << std::endl;
return 1;
}
@ -222,8 +222,9 @@ namespace
const File projectFile (getFile (args[1]));
Project proj (projectFile);
const Result result (proj.loadDocument (projectFile));
if (proj.loadDocument (projectFile).isNotEmpty())
if (result.failed())
{
std::cout << "Failed to load project: " << projectFile.getFullPathName() << std::endl;
return 1;