mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 12:40:35 +01:00
remove user-defined copy constructor
We need to define our own copy constructor only if an object has pointers or any runtime allocation of the resource like file handle, a network connection..etc. note: Default constructor does only shallow copy.
This commit is contained in:
committed by
Laurent Trinques
parent
9085c6fcda
commit
803414f716
@@ -27,13 +27,6 @@ int NamesList::MetaTypeId = qRegisterMetaType<NamesList>("NamesList");
|
||||
NamesList::NamesList() {
|
||||
}
|
||||
|
||||
/**
|
||||
Constructeur de copie
|
||||
@param other La NamesList a copier
|
||||
*/
|
||||
NamesList::NamesList(const NamesList &other) : hash_names(other.hash_names) {
|
||||
}
|
||||
|
||||
/**
|
||||
Destructeur
|
||||
*/
|
||||
|
||||
@@ -31,7 +31,6 @@ class NamesList {
|
||||
// constructors, destructor
|
||||
public:
|
||||
NamesList();
|
||||
NamesList(const NamesList &);
|
||||
virtual ~NamesList();
|
||||
|
||||
// attributes
|
||||
|
||||
@@ -116,26 +116,6 @@ DiagramContent::DiagramContent(Diagram *diagram, bool selected) :
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief DiagramContent::DiagramContent
|
||||
* Copy constructor
|
||||
* @param other
|
||||
*/
|
||||
DiagramContent::DiagramContent(const DiagramContent &other) :
|
||||
m_elements(other.m_elements),
|
||||
m_text_fields(other.m_text_fields),
|
||||
m_images(other.m_images),
|
||||
m_shapes(other.m_shapes),
|
||||
m_conductors_to_update(other.m_conductors_to_update),
|
||||
m_conductors_to_move(other.m_conductors_to_move),
|
||||
m_other_conductors(other.m_other_conductors),
|
||||
m_potential_conductors(other.m_potential_conductors),
|
||||
m_element_texts(other.m_element_texts),
|
||||
m_texts_groups(other.m_texts_groups),
|
||||
m_selected_items(other.m_selected_items),
|
||||
m_tables(other.m_tables)
|
||||
{}
|
||||
|
||||
DiagramContent::~DiagramContent()
|
||||
{}
|
||||
|
||||
|
||||
@@ -47,7 +47,6 @@ class DiagramContent
|
||||
public:
|
||||
DiagramContent();
|
||||
DiagramContent(Diagram *diagram, bool selected = true);
|
||||
DiagramContent(const DiagramContent &);
|
||||
~DiagramContent();
|
||||
|
||||
/// Used to filter the different items carried by this container.
|
||||
|
||||
@@ -29,16 +29,6 @@ TitleBlockTemplateCellsSet::TitleBlockTemplateCellsSet(const TitleBlockTemplateV
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
Copy constructor
|
||||
@param copy TitleBlockTemplateCellsSet object to copy
|
||||
*/
|
||||
TitleBlockTemplateCellsSet::TitleBlockTemplateCellsSet(const TitleBlockTemplateCellsSet ©) :
|
||||
QList<TitleBlockTemplateVisualCell *>(copy),
|
||||
parent_view_(copy.parent_view_)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
Destructor
|
||||
*/
|
||||
|
||||
@@ -29,7 +29,6 @@ class TitleBlockTemplateCellsSet : public QList<TitleBlockTemplateVisualCell *>
|
||||
// Constructors, destructor
|
||||
public:
|
||||
TitleBlockTemplateCellsSet(const TitleBlockTemplateView *);
|
||||
TitleBlockTemplateCellsSet(const TitleBlockTemplateCellsSet &);
|
||||
virtual ~TitleBlockTemplateCellsSet();
|
||||
|
||||
// methods
|
||||
|
||||
Reference in New Issue
Block a user