From b577a7daf1b2e878bece8a799ddfafaeb6a0f689 Mon Sep 17 00:00:00 2001 From: Geert Janssens Date: Thu, 8 Mar 2018 17:20:13 +0100 Subject: [PATCH] Csv import settings - undo rename of common methods Use C++-style to call method with same name in parent class --- .../import-export/csv-imp/gnc-imp-settings-csv-price.cpp | 6 +++--- gnucash/import-export/csv-imp/gnc-imp-settings-csv-tx.cpp | 6 +++--- gnucash/import-export/csv-imp/gnc-imp-settings-csv.cpp | 6 +++--- gnucash/import-export/csv-imp/gnc-imp-settings-csv.hpp | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/gnucash/import-export/csv-imp/gnc-imp-settings-csv-price.cpp b/gnucash/import-export/csv-imp/gnc-imp-settings-csv-price.cpp index 0f985edfc4..d3d5e03c57 100644 --- a/gnucash/import-export/csv-imp/gnc-imp-settings-csv-price.cpp +++ b/gnucash/import-export/csv-imp/gnc-imp-settings-csv-price.cpp @@ -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(); } diff --git a/gnucash/import-export/csv-imp/gnc-imp-settings-csv-tx.cpp b/gnucash/import-export/csv-imp/gnc-imp-settings-csv-tx.cpp index da085735cc..ccac10b0b3 100644 --- a/gnucash/import-export/csv-imp/gnc-imp-settings-csv-tx.cpp +++ b/gnucash/import-export/csv-imp/gnc-imp-settings-csv-tx.cpp @@ -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(); } diff --git a/gnucash/import-export/csv-imp/gnc-imp-settings-csv.cpp b/gnucash/import-export/csv-imp/gnc-imp-settings-csv.cpp index d0ab9e99f3..27b430aa6c 100644 --- a/gnucash/import-export/csv-imp/gnc-imp-settings-csv.cpp +++ b/gnucash/import-export/csv-imp/gnc-imp-settings-csv.cpp @@ -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; diff --git a/gnucash/import-export/csv-imp/gnc-imp-settings-csv.hpp b/gnucash/import-export/csv-imp/gnc-imp-settings-csv.hpp index c051cc1ee0..d226a70814 100644 --- a/gnucash/import-export/csv-imp/gnc-imp-settings-csv.hpp +++ b/gnucash/import-export/csv-imp/gnc-imp-settings-csv.hpp @@ -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.