Csv import settings - undo rename of common methods

Use C++-style to call method with same name in parent class
This commit is contained in:
Geert Janssens 2018-03-08 17:20:13 +01:00
parent 751a3fec43
commit b577a7daf1
4 changed files with 12 additions and 12 deletions

View File

@ -150,7 +150,7 @@ CsvPriceImpSettings::load (void)
auto group = get_prefix() + m_settings_type + " - " + m_name;
// Start Loading the settings
m_load_error = load_common(); // load the common settings
m_load_error = CsvImportSettings::load(); // load the common settings
gchar *key_char = g_key_file_get_string (keyfile, group.c_str(), CSV_TO_CURR, &key_error);
if (key_char && *key_char != '\0')
@ -216,7 +216,7 @@ CsvPriceImpSettings::save (void)
g_key_file_remove_group (keyfile, group.c_str(), nullptr);
// Start Saving the settings
bool error = save_common(); // save the common settings
bool error = CsvImportSettings::save(); // save the common settings
if (error)
return error;
@ -254,5 +254,5 @@ CsvPriceImpSettings::remove (void)
if (preset_is_reserved_name (m_name))
return;
remove_common();
CsvImportSettings::remove();
}

View File

@ -163,7 +163,7 @@ CsvTransImpSettings::load (void)
auto group = get_prefix() + m_settings_type + " - " + m_name;
// Start Loading the settings
m_load_error = load_common(); // load the common settings
m_load_error = CsvImportSettings::load(); // load the common settings
m_multi_split = g_key_file_get_boolean (keyfile, group.c_str(), CSV_MULTI_SPLIT, &key_error);
m_load_error |= handle_load_error (&key_error, group);
@ -231,7 +231,7 @@ CsvTransImpSettings::save (void)
g_key_file_remove_group (keyfile, group.c_str(), nullptr);
// Start Saving the settings
bool error = save_common(); // save the common settings
bool error = CsvImportSettings::save(); // save the common settings
if (error)
return error;
@ -258,5 +258,5 @@ CsvTransImpSettings::remove (void)
if (preset_is_reserved_name (m_name))
return;
remove_common();
CsvImportSettings::remove();
}

View File

@ -117,7 +117,7 @@ std::string get_prefix (void)
* load the settings from a state key file
**************************************************/
bool
CsvImportSettings::load_common (void)
CsvImportSettings::load (void)
{
GError *key_error = nullptr;
m_load_error = false;
@ -186,7 +186,7 @@ CsvImportSettings::load_common (void)
* save settings to a key file
**************************************************/
bool
CsvImportSettings::save_common (void)
CsvImportSettings::save (void)
{
auto keyfile = gnc_state_get_current ();
auto group = csv_group_prefix + m_settings_type + " - " + m_name;
@ -240,7 +240,7 @@ CsvImportSettings::save_common (void)
}
void
CsvImportSettings::remove_common (void)
CsvImportSettings::remove (void)
{
auto keyfile = gnc_state_get_current ();
auto group = csv_group_prefix + m_settings_type + " - " + m_name;

View File

@ -60,17 +60,17 @@ struct CsvImportSettings
*
* @return true if there was a problem in saving.
*/
bool save_common (void);
bool save (void);
/** Load the widget properties from a key File.
*
* @return true if there was a problem.
*/
bool load_common (void);
bool load (void);
/** Remove the preset from the state file.
*/
void remove_common (void);
void remove (void);
std::string m_settings_type; // Settings Type, TRANS, PRICE etc.