mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1292 Fixed CppCheck Issues in AppFwk : Removed assign/copy operators
This commit is contained in:
parent
d3faf4ef96
commit
b365834923
@ -55,6 +55,9 @@ class CmdExecCommandManager
|
|||||||
public:
|
public:
|
||||||
static CmdExecCommandManager* instance();
|
static CmdExecCommandManager* instance();
|
||||||
|
|
||||||
|
CmdExecCommandManager(const CmdExecCommandManager&) = delete;
|
||||||
|
CmdExecCommandManager& operator=(const CmdExecCommandManager&) = delete;
|
||||||
|
|
||||||
// When the undoFeature is enabled, execute commands are inserted in the undo stack
|
// When the undoFeature is enabled, execute commands are inserted in the undo stack
|
||||||
// The application can use the QUndoStack to display/modify execute commands wrapped in QUndoCommand objects
|
// The application can use the QUndoStack to display/modify execute commands wrapped in QUndoCommand objects
|
||||||
void enableUndoCommandSystem(bool enable);
|
void enableUndoCommandSystem(bool enable);
|
||||||
|
@ -182,9 +182,8 @@ public:
|
|||||||
PdmUiItem() : m_staticItemInfo(NULL) { }
|
PdmUiItem() : m_staticItemInfo(NULL) { }
|
||||||
virtual ~PdmUiItem();
|
virtual ~PdmUiItem();
|
||||||
|
|
||||||
// Copy and assignment to avoid hampering our internal pointer.
|
PdmUiItem(const PdmUiItem&) = delete;
|
||||||
PdmUiItem(const PdmUiItem& ) : m_staticItemInfo(NULL) { }
|
PdmUiItem& operator=(const PdmUiItem&) = delete;
|
||||||
PdmUiItem& operator=(const PdmUiItem& ) { return *this; }
|
|
||||||
|
|
||||||
const QString uiName(QString uiConfigName = "") const;
|
const QString uiName(QString uiConfigName = "") const;
|
||||||
void setUiName(const QString& uiName, QString uiConfigName = "") { m_configItemInfos[uiConfigName].m_uiName = uiName; }
|
void setUiName(const QString& uiName, QString uiConfigName = "") { m_configItemInfos[uiConfigName].m_uiName = uiName; }
|
||||||
|
@ -58,8 +58,10 @@ public:
|
|||||||
PdmUiOrdering(): m_forgetRemainingFields(false) { };
|
PdmUiOrdering(): m_forgetRemainingFields(false) { };
|
||||||
virtual ~PdmUiOrdering();
|
virtual ~PdmUiOrdering();
|
||||||
|
|
||||||
|
PdmUiOrdering(const PdmUiOrdering&) = delete;
|
||||||
|
PdmUiOrdering& operator=(const PdmUiOrdering&) = delete;
|
||||||
|
|
||||||
PdmUiGroup* addNewGroup(QString displayName);
|
PdmUiGroup* addNewGroup(QString displayName);
|
||||||
//void add(PdmUiItem* item) { m_ordering.push_back(item); }
|
|
||||||
|
|
||||||
/// HACK constness of this class and functions must be revisited
|
/// HACK constness of this class and functions must be revisited
|
||||||
//void add(const PdmUiItem* item) { m_ordering.push_back(const_cast<PdmUiItem*>(item)); }
|
//void add(const PdmUiItem* item) { m_ordering.push_back(const_cast<PdmUiItem*>(item)); }
|
||||||
@ -73,10 +75,6 @@ public:
|
|||||||
bool contains(const PdmUiItem* item) const;
|
bool contains(const PdmUiItem* item) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Private copy constructor and assignment to prevent this. (The vectors below will make trouble)
|
|
||||||
PdmUiOrdering(const PdmUiOrdering& other) { }
|
|
||||||
PdmUiOrdering& operator= (const PdmUiOrdering& other) { }
|
|
||||||
|
|
||||||
std::vector<PdmUiItem*> m_ordering; ///< The order of groups and fields
|
std::vector<PdmUiItem*> m_ordering; ///< The order of groups and fields
|
||||||
std::vector<PdmUiGroup*> m_createdGroups; ///< Owned PdmUiGroups, for mem management
|
std::vector<PdmUiGroup*> m_createdGroups; ///< Owned PdmUiGroups, for mem management
|
||||||
bool m_forgetRemainingFields;
|
bool m_forgetRemainingFields;
|
||||||
|
@ -69,6 +69,9 @@ public:
|
|||||||
|
|
||||||
~PdmUiTreeOrdering();
|
~PdmUiTreeOrdering();
|
||||||
|
|
||||||
|
PdmUiTreeOrdering(const PdmUiTreeOrdering&) = delete;
|
||||||
|
PdmUiTreeOrdering& operator=(const PdmUiTreeOrdering&) = delete;
|
||||||
|
|
||||||
void add(PdmFieldHandle * field, QString uiConfigName = "");
|
void add(PdmFieldHandle * field, QString uiConfigName = "");
|
||||||
void add(PdmObjectHandle* object);
|
void add(PdmObjectHandle* object);
|
||||||
PdmUiTreeOrdering* add(const QString & title, const QString& iconResourceName );
|
PdmUiTreeOrdering* add(const QString & title, const QString& iconResourceName );
|
||||||
|
Loading…
Reference in New Issue
Block a user