[glom] C++11: Layout items: Use override keyword.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom] C++11: Layout items: Use override keyword.
- Date: Wed, 28 Oct 2015 10:10:40 +0000 (UTC)
commit 054a849b33ee27d515948e258d345797d3c5cd5d
Author: Murray Cumming <murrayc murrayc com>
Date: Mon Oct 26 22:43:46 2015 +0100
C++11: Layout items: Use override keyword.
glom/libglom/data_structure/layout/layoutgroup.h | 6 +++---
.../data_structure/layout/layoutitem_button.h | 4 ++--
.../layout/layoutitem_calendarportal.h | 8 ++++----
.../data_structure/layout/layoutitem_field.h | 12 ++++++------
.../data_structure/layout/layoutitem_image.h | 6 +++---
.../data_structure/layout/layoutitem_line.h | 6 +++---
.../data_structure/layout/layoutitem_notebook.h | 4 ++--
.../data_structure/layout/layoutitem_placeholder.h | 6 +++---
.../data_structure/layout/layoutitem_portal.h | 8 ++++----
.../data_structure/layout/layoutitem_text.h | 6 +++---
.../layout/report_parts/layoutitem_fieldsummary.h | 8 ++++----
.../layout/report_parts/layoutitem_footer.h | 6 +++---
.../layout/report_parts/layoutitem_groupby.h | 8 ++++----
.../layout/report_parts/layoutitem_header.h | 6 +++---
.../layout/report_parts/layoutitem_summary.h | 6 +++---
.../layout/report_parts/layoutitem_verticalgroup.h | 6 +++---
16 files changed, 53 insertions(+), 53 deletions(-)
---
diff --git a/glom/libglom/data_structure/layout/layoutgroup.h
b/glom/libglom/data_structure/layout/layoutgroup.h
index 3deb5c2..8c34a0c 100644
--- a/glom/libglom/data_structure/layout/layoutgroup.h
+++ b/glom/libglom/data_structure/layout/layoutgroup.h
@@ -40,7 +40,7 @@ public:
LayoutGroup& operator=(LayoutGroup&& src) = delete;
virtual ~LayoutGroup();
- virtual LayoutItem* clone() const;
+ LayoutItem* clone() const override;
/** Discover whether the layout group contains the specified field (from the current table).
* @param parent_table_name The table to which this layout belongs.
@@ -120,8 +120,8 @@ public:
*/
type_list_const_items get_items_recursive_with_groups() const;
- virtual Glib::ustring get_part_type_name() const;
- virtual Glib::ustring get_report_part_id() const;
+ Glib::ustring get_part_type_name() const override;
+ Glib::ustring get_report_part_id() const override;
//Allow more efficient access: protected:
diff --git a/glom/libglom/data_structure/layout/layoutitem_button.h
b/glom/libglom/data_structure/layout/layoutitem_button.h
index 6c4693b..26809de 100644
--- a/glom/libglom/data_structure/layout/layoutitem_button.h
+++ b/glom/libglom/data_structure/layout/layoutitem_button.h
@@ -38,11 +38,11 @@ public:
LayoutItem_Button& operator=(LayoutItem_Button&& src) = delete;
virtual ~LayoutItem_Button();
- virtual LayoutItem* clone() const;
+ LayoutItem* clone() const override;
bool operator==(const LayoutItem_Button& src) const;
- virtual Glib::ustring get_part_type_name() const;
+ Glib::ustring get_part_type_name() const override;
/** Set the python code that will be executed when the button is pressed.
*/
diff --git a/glom/libglom/data_structure/layout/layoutitem_calendarportal.h
b/glom/libglom/data_structure/layout/layoutitem_calendarportal.h
index 4d1348b..8b7c4f0 100644
--- a/glom/libglom/data_structure/layout/layoutitem_calendarportal.h
+++ b/glom/libglom/data_structure/layout/layoutitem_calendarportal.h
@@ -37,17 +37,17 @@ public:
LayoutItem_CalendarPortal& operator=(LayoutItem_CalendarPortal&& src) = delete;
virtual ~LayoutItem_CalendarPortal();
- virtual LayoutItem* clone() const;
+ LayoutItem* clone() const override;
- virtual Glib::ustring get_part_type_name() const;
+ Glib::ustring get_part_type_name() const override;
std::shared_ptr<Field> get_date_field();
std::shared_ptr<const Field> get_date_field() const;
void set_date_field(const std::shared_ptr<Field>& field);
- virtual void change_field_item_name(const Glib::ustring& table_name, const Glib::ustring& field_name,
const Glib::ustring& field_name_new);
- virtual void change_related_field_item_name(const Glib::ustring& table_name, const Glib::ustring&
field_name, const Glib::ustring& field_name_new);
+ void change_field_item_name(const Glib::ustring& table_name, const Glib::ustring& field_name, const
Glib::ustring& field_name_new) override;
+ void change_related_field_item_name(const Glib::ustring& table_name, const Glib::ustring& field_name,
const Glib::ustring& field_name_new) override;
private:
diff --git a/glom/libglom/data_structure/layout/layoutitem_field.h
b/glom/libglom/data_structure/layout/layoutitem_field.h
index 82651d2..247223d 100644
--- a/glom/libglom/data_structure/layout/layoutitem_field.h
+++ b/glom/libglom/data_structure/layout/layoutitem_field.h
@@ -53,7 +53,7 @@ public:
LayoutItem_Field& operator=(LayoutItem_Field&& src) = delete;
virtual ~LayoutItem_Field();
- virtual LayoutItem* clone() const;
+ LayoutItem* clone() const override;
bool operator==(const LayoutItem_Field& src) const;
@@ -85,11 +85,11 @@ public:
/** Get a text representation for the field, such as Relationship::FieldName.
*/
- virtual Glib::ustring get_layout_display_name() const;
+ Glib::ustring get_layout_display_name() const override;
- virtual Glib::ustring get_part_type_name() const;
+ Glib::ustring get_part_type_name() const override;
- virtual Glib::ustring get_report_part_id() const;
+ Glib::ustring get_report_part_id() const override;
void set_full_field_details(const std::shared_ptr<const Field>& field);
std::shared_ptr<const Field> get_full_field_details() const;
@@ -123,7 +123,7 @@ public:
/** Get the field formatting used by this layout item, which
* may be either custom field formatting or the default field formatting.
*/
- virtual const Formatting& get_formatting_used() const;
+ const Formatting& get_formatting_used() const override;
/** Get the alignment for the formatting used (see get_formatting_used()),
* choosing an appropriate alignment if it is set to HorizontalAlignment::AUTO.
@@ -131,7 +131,7 @@ public:
*
* @param for_details_view This can change the effect of HorizontalAlignment::AUTO.
*/
- virtual Formatting::HorizontalAlignment get_formatting_used_horizontal_alignment(bool for_details_view =
false) const;
+ Formatting::HorizontalAlignment get_formatting_used_horizontal_alignment(bool for_details_view = false)
const override;
/** A convenience method to discover whether the formatting that is used
* has custom choices with the values restricted to those choices,
diff --git a/glom/libglom/data_structure/layout/layoutitem_image.h
b/glom/libglom/data_structure/layout/layoutitem_image.h
index b359d1a..45a1d91 100644
--- a/glom/libglom/data_structure/layout/layoutitem_image.h
+++ b/glom/libglom/data_structure/layout/layoutitem_image.h
@@ -44,12 +44,12 @@ public:
LayoutItem_Image& operator=(LayoutItem_Image&& src) = delete;
virtual ~LayoutItem_Image();
- virtual LayoutItem* clone() const;
+ LayoutItem* clone() const override;
bool operator==(const LayoutItem_Image& src) const;
- virtual Glib::ustring get_part_type_name() const;
- virtual Glib::ustring get_report_part_id() const;
+ Glib::ustring get_part_type_name() const override;
+ Glib::ustring get_report_part_id() const override;
/** Get the image that will be shown on each record.
*/
diff --git a/glom/libglom/data_structure/layout/layoutitem_line.h
b/glom/libglom/data_structure/layout/layoutitem_line.h
index de0e3fc..ab5fe53 100644
--- a/glom/libglom/data_structure/layout/layoutitem_line.h
+++ b/glom/libglom/data_structure/layout/layoutitem_line.h
@@ -39,12 +39,12 @@ public:
LayoutItem_Line& operator=(LayoutItem_Line&& src) = delete;
virtual ~LayoutItem_Line();
- virtual LayoutItem* clone() const;
+ LayoutItem* clone() const override;
bool operator==(const LayoutItem_Line& src) const;
- virtual Glib::ustring get_part_type_name() const;
- virtual Glib::ustring get_report_part_id() const;
+ Glib::ustring get_part_type_name() const override;
+ Glib::ustring get_report_part_id() const override;
/** Get the coordinates.
*/
diff --git a/glom/libglom/data_structure/layout/layoutitem_notebook.h
b/glom/libglom/data_structure/layout/layoutitem_notebook.h
index 8033466..9423415 100644
--- a/glom/libglom/data_structure/layout/layoutitem_notebook.h
+++ b/glom/libglom/data_structure/layout/layoutitem_notebook.h
@@ -42,9 +42,9 @@ public:
LayoutItem_Notebook& operator=(LayoutItem_Notebook&& src) = delete;
virtual ~LayoutItem_Notebook();
- virtual LayoutItem* clone() const;
+ LayoutItem* clone() const override;
- virtual Glib::ustring get_part_type_name() const;
+ Glib::ustring get_part_type_name() const override;
};
} //namespace Glom
diff --git a/glom/libglom/data_structure/layout/layoutitem_placeholder.h
b/glom/libglom/data_structure/layout/layoutitem_placeholder.h
index 2116f35..f6a5125 100644
--- a/glom/libglom/data_structure/layout/layoutitem_placeholder.h
+++ b/glom/libglom/data_structure/layout/layoutitem_placeholder.h
@@ -44,10 +44,10 @@ public:
/** Create a new copied instance.
* This allows us to deep-copy a list of LayoutItems.
*/
- virtual LayoutItem* clone() const;
+ LayoutItem* clone() const override;
- virtual Glib::ustring get_part_type_name() const;
- virtual Glib::ustring get_report_part_id() const;
+ Glib::ustring get_part_type_name() const override;
+ Glib::ustring get_report_part_id() const override;
bool operator==(const LayoutItem_Placeholder* src) const;
};
diff --git a/glom/libglom/data_structure/layout/layoutitem_portal.h
b/glom/libglom/data_structure/layout/layoutitem_portal.h
index f7b481a..df65c1f 100644
--- a/glom/libglom/data_structure/layout/layoutitem_portal.h
+++ b/glom/libglom/data_structure/layout/layoutitem_portal.h
@@ -52,17 +52,17 @@ public:
LayoutItem_Portal& operator=(LayoutItem_Portal&& src) = delete;
virtual ~LayoutItem_Portal();
- virtual LayoutItem* clone() const;
+ LayoutItem* clone() const override;
Glib::ustring get_title(const Glib::ustring& locale) const noexcept override;
Glib::ustring get_title_or_name(const Glib::ustring& locale) const noexcept override;
//We do not implement this, because we only ever want to use the method
//in the derived class.
- //virtual Glib::ustring get_part_type_name() const;
+ //Glib::ustring get_part_type_name() const override;
- virtual void change_field_item_name(const Glib::ustring& table_name, const Glib::ustring& field_name,
const Glib::ustring& field_name_new);
- virtual void change_related_field_item_name(const Glib::ustring& table_name, const Glib::ustring&
field_name, const Glib::ustring& field_name_new);
+ void change_field_item_name(const Glib::ustring& table_name, const Glib::ustring& field_name, const
Glib::ustring& field_name_new) override;
+ void change_related_field_item_name(const Glib::ustring& table_name, const Glib::ustring& field_name,
const Glib::ustring& field_name_new) override;
///A helper method to avoid extra ifs to avoid null dereferencing.
Glib::ustring get_from_table() const;
diff --git a/glom/libglom/data_structure/layout/layoutitem_text.h
b/glom/libglom/data_structure/layout/layoutitem_text.h
index 354dadf..5602a12 100644
--- a/glom/libglom/data_structure/layout/layoutitem_text.h
+++ b/glom/libglom/data_structure/layout/layoutitem_text.h
@@ -44,12 +44,12 @@ public:
LayoutItem_Text& operator=(LayoutItem_Text&& src) = delete;
virtual ~LayoutItem_Text();
- virtual LayoutItem* clone() const;
+ LayoutItem* clone() const override;
bool operator==(const LayoutItem_Text& src) const;
- virtual Glib::ustring get_part_type_name() const;
- virtual Glib::ustring get_report_part_id() const;
+ Glib::ustring get_part_type_name() const override;
+ Glib::ustring get_report_part_id() const override;
/** Get the text that will be shown on each record.
*/
diff --git a/glom/libglom/data_structure/layout/report_parts/layoutitem_fieldsummary.h
b/glom/libglom/data_structure/layout/report_parts/layoutitem_fieldsummary.h
index 4a263c8..2fe9233 100644
--- a/glom/libglom/data_structure/layout/report_parts/layoutitem_fieldsummary.h
+++ b/glom/libglom/data_structure/layout/report_parts/layoutitem_fieldsummary.h
@@ -37,12 +37,12 @@ public:
LayoutItem_FieldSummary& operator=(LayoutItem_FieldSummary&& src) = delete;
virtual ~LayoutItem_FieldSummary();
- virtual LayoutItem* clone() const;
+ LayoutItem* clone() const override;
bool operator==(const LayoutItem_FieldSummary& src) const;
- virtual Glib::ustring get_part_type_name() const;
- virtual Glib::ustring get_report_part_id() const;
+ Glib::ustring get_part_type_name() const override;
+ Glib::ustring get_report_part_id() const override;
enum class summaryType
{
@@ -66,7 +66,7 @@ public:
Glib::ustring get_title(const Glib::ustring& locale) const noexcept override;
Glib::ustring get_title_or_name(const Glib::ustring& locale) const noexcept override;
- virtual Glib::ustring get_layout_display_name() const;
+ Glib::ustring get_layout_display_name() const override;
Glib::ustring get_layout_display_name_field() const;
diff --git a/glom/libglom/data_structure/layout/report_parts/layoutitem_footer.h
b/glom/libglom/data_structure/layout/report_parts/layoutitem_footer.h
index 228542f..1c58952 100644
--- a/glom/libglom/data_structure/layout/report_parts/layoutitem_footer.h
+++ b/glom/libglom/data_structure/layout/report_parts/layoutitem_footer.h
@@ -41,10 +41,10 @@ public:
LayoutItem_Footer& operator=(LayoutItem_Footer&& src) = delete;
virtual ~LayoutItem_Footer();
- virtual LayoutItem* clone() const;
+ LayoutItem* clone() const override;
- virtual Glib::ustring get_part_type_name() const;
- virtual Glib::ustring get_report_part_id() const;
+ Glib::ustring get_part_type_name() const override;
+ Glib::ustring get_report_part_id() const override;
};
} //namespace Glom
diff --git a/glom/libglom/data_structure/layout/report_parts/layoutitem_groupby.h
b/glom/libglom/data_structure/layout/report_parts/layoutitem_groupby.h
index 3aa6156..4e216d2 100644
--- a/glom/libglom/data_structure/layout/report_parts/layoutitem_groupby.h
+++ b/glom/libglom/data_structure/layout/report_parts/layoutitem_groupby.h
@@ -45,7 +45,7 @@ public:
LayoutItem_GroupBy& operator=(LayoutItem_GroupBy&& src) = delete;
virtual ~LayoutItem_GroupBy();
- virtual LayoutItem* clone() const;
+ LayoutItem* clone() const override;
typedef Formatting::type_pair_sort_field type_pair_sort_field;
typedef Formatting::type_list_sort_fields type_list_sort_fields;
@@ -65,10 +65,10 @@ public:
/** Get a text representation for the a layout.
*/
- virtual Glib::ustring get_layout_display_name() const;
+ Glib::ustring get_layout_display_name() const override;
- virtual Glib::ustring get_part_type_name() const;
- virtual Glib::ustring get_report_part_id() const;
+ Glib::ustring get_part_type_name() const override;
+ Glib::ustring get_report_part_id() const override;
std::shared_ptr<LayoutGroup> get_secondary_fields();
std::shared_ptr<const LayoutGroup> get_secondary_fields() const;
diff --git a/glom/libglom/data_structure/layout/report_parts/layoutitem_header.h
b/glom/libglom/data_structure/layout/report_parts/layoutitem_header.h
index f55fc1a..af9fbd9 100644
--- a/glom/libglom/data_structure/layout/report_parts/layoutitem_header.h
+++ b/glom/libglom/data_structure/layout/report_parts/layoutitem_header.h
@@ -41,10 +41,10 @@ public:
LayoutItem_Header& operator=(LayoutItem_Header&& src) = delete;
virtual ~LayoutItem_Header();
- virtual LayoutItem* clone() const;
+ LayoutItem* clone() const override;
- virtual Glib::ustring get_part_type_name() const;
- virtual Glib::ustring get_report_part_id() const;
+ Glib::ustring get_part_type_name() const override;
+ Glib::ustring get_report_part_id() const override;
};
} //namespace Glom
diff --git a/glom/libglom/data_structure/layout/report_parts/layoutitem_summary.h
b/glom/libglom/data_structure/layout/report_parts/layoutitem_summary.h
index 8021c12..b19b1bc 100644
--- a/glom/libglom/data_structure/layout/report_parts/layoutitem_summary.h
+++ b/glom/libglom/data_structure/layout/report_parts/layoutitem_summary.h
@@ -39,10 +39,10 @@ public:
LayoutItem_Summary& operator=(LayoutItem_Summary&& src) = delete;
virtual ~LayoutItem_Summary();
- virtual LayoutItem* clone() const;
+ LayoutItem* clone() const override;
- virtual Glib::ustring get_part_type_name() const;
- virtual Glib::ustring get_report_part_id() const;
+ Glib::ustring get_part_type_name() const override;
+ Glib::ustring get_report_part_id() const override;
};
} //namespace Glom
diff --git a/glom/libglom/data_structure/layout/report_parts/layoutitem_verticalgroup.h
b/glom/libglom/data_structure/layout/report_parts/layoutitem_verticalgroup.h
index e91c9a1..81b160a 100644
--- a/glom/libglom/data_structure/layout/report_parts/layoutitem_verticalgroup.h
+++ b/glom/libglom/data_structure/layout/report_parts/layoutitem_verticalgroup.h
@@ -41,10 +41,10 @@ public:
LayoutItem_VerticalGroup& operator=(LayoutItem_VerticalGroup&& src) = delete;
virtual ~LayoutItem_VerticalGroup();
- virtual LayoutItem* clone() const;
+ LayoutItem* clone() const override;
- virtual Glib::ustring get_part_type_name() const;
- virtual Glib::ustring get_report_part_id() const;
+ Glib::ustring get_part_type_name() const override;
+ Glib::ustring get_report_part_id() const override;
};
} //namespace Glom
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]