mirror of
https://github.com/vale981/openAV-Luppp
synced 2025-03-04 16:51:37 -05:00
-Improved preference loading error checking
This commit is contained in:
parent
ddd44f3950
commit
5cd23266a0
3 changed files with 4 additions and 2 deletions
|
@ -38,7 +38,7 @@ ENDIF(BUILD_TESTS)
|
|||
|
||||
IF(RELEASE_BUILD)
|
||||
SET(CMAKE_CXX_FLAGS "-g -Wall -Werror -Wno-unused-variable -ffast-math")
|
||||
SET(CMAKE_C_FLAGS "-g -Wall -Werror -W -Wno-unused-variable -ffast-math")
|
||||
SET(CMAKE_C_FLAGS "-g -Wall -Werror -W -Wno-unused-variable -ffast-math")
|
||||
ENDIF(RELEASE_BUILD)
|
||||
|
||||
|
||||
|
|
|
@ -66,6 +66,7 @@ int DiskReader::loadPreferences()
|
|||
cJSON* preferencesJson = cJSON_Parse( sampleString );
|
||||
if (!preferencesJson)
|
||||
{
|
||||
LUPPP_WARN("Preferences JSON not valid");
|
||||
return LUPPP_RETURN_ERROR;
|
||||
}
|
||||
|
||||
|
@ -108,6 +109,7 @@ int DiskReader::loadPreferences()
|
|||
else
|
||||
{
|
||||
// empty file / file no exists:
|
||||
LUPPP_WARN("Preferences, file doesn't exist: ~/.config/openAV/luppp/luppp.prefs");
|
||||
return LUPPP_RETURN_ERROR;
|
||||
}
|
||||
|
||||
|
|
|
@ -434,7 +434,7 @@ Gui::Gui(std::string argZero) :
|
|||
int prefs = diskReader->loadPreferences();
|
||||
if ( prefs != LUPPP_RETURN_OK )
|
||||
{
|
||||
LUPPP_ERROR("Error loading preferences");
|
||||
LUPPP_WARN("No preferences loaded, using defaults.");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue