mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-08 07:03:25 -06:00
#1292 Fixed CppCheck Issues in AppFwk/cafCommands
This commit is contained in:
parent
a5ed533c00
commit
9179ae2a14
@ -58,7 +58,7 @@ class AnimationToolBar : public QToolBar
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
AnimationToolBar(QWidget *parent = 0);
|
||||
explicit AnimationToolBar(QWidget *parent = 0);
|
||||
AnimationToolBar(const QString &title, QWidget *parent = 0);
|
||||
|
||||
void connectAnimationControl(caf::FrameAnimationControl* animationControl);
|
||||
|
@ -53,7 +53,7 @@ class FrameAnimationControl : public QObject
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
FrameAnimationControl(QObject* parent = 0);
|
||||
explicit FrameAnimationControl(QObject* parent = 0);
|
||||
|
||||
void setNumFrames(int numFrames);
|
||||
int numFrames() const;
|
||||
|
@ -50,7 +50,7 @@
|
||||
class UndoRedoWrapper : public QUndoCommand
|
||||
{
|
||||
public:
|
||||
UndoRedoWrapper(caf::CmdExecuteCommand* executeCommand)
|
||||
explicit UndoRedoWrapper(caf::CmdExecuteCommand* executeCommand)
|
||||
{
|
||||
m_executeCommand = executeCommand;
|
||||
|
||||
|
@ -52,7 +52,7 @@ class PdmObjectHandle;
|
||||
class CmdExecuteCommand
|
||||
{
|
||||
public:
|
||||
CmdExecuteCommand(NotificationCenter* notificationCenter)
|
||||
explicit CmdExecuteCommand(NotificationCenter* notificationCenter)
|
||||
{
|
||||
m_notificationCenter = notificationCenter;
|
||||
}
|
||||
|
@ -76,7 +76,7 @@ public:
|
||||
class CmdFieldChangeExec : public CmdExecuteCommand
|
||||
{
|
||||
public:
|
||||
CmdFieldChangeExec(NotificationCenter* notificationCenter);
|
||||
explicit CmdFieldChangeExec(NotificationCenter* notificationCenter);
|
||||
virtual ~CmdFieldChangeExec();
|
||||
|
||||
|
||||
|
@ -78,7 +78,7 @@ public:
|
||||
class CmdSelectionChangeExec : public CmdExecuteCommand
|
||||
{
|
||||
public:
|
||||
CmdSelectionChangeExec(NotificationCenter* notificationCenter);
|
||||
explicit CmdSelectionChangeExec(NotificationCenter* notificationCenter);
|
||||
virtual ~CmdSelectionChangeExec();;
|
||||
|
||||
CmdSelectionChangeExecData* commandData();
|
||||
|
@ -47,7 +47,7 @@ namespace caf
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void CmdSelectionHelper::executeSelectionCommand(std::vector<PdmObjectHandle*> selection, SelectionManager::SelectionRole role)
|
||||
void CmdSelectionHelper::executeSelectionCommand(const std::vector<PdmObjectHandle*>& selection, SelectionManager::SelectionRole role)
|
||||
{
|
||||
CmdSelectionChangeExec* selectionChangeExec = createSelectionCommand(selection, role);
|
||||
|
||||
|
@ -49,7 +49,7 @@ class CmdSelectionChangeExec;
|
||||
class CmdSelectionHelper
|
||||
{
|
||||
public:
|
||||
static void executeSelectionCommand(std::vector<PdmObjectHandle*> selection, SelectionManager::SelectionRole role);
|
||||
static void executeSelectionCommand(const std::vector<PdmObjectHandle*>& selection, SelectionManager::SelectionRole role);
|
||||
static CmdSelectionChangeExec* createSelectionCommand(const std::vector<PdmObjectHandle*>& selection, SelectionManager::SelectionRole role);
|
||||
};
|
||||
|
||||
|
@ -88,7 +88,6 @@ void CmdAddItemExec::redo()
|
||||
if (!obj) return;
|
||||
|
||||
listField->insertAt(m_commandData->m_indexAfter, obj);
|
||||
caf::PdmUiObjectHandle* uiObject = uiObj(obj);
|
||||
|
||||
if (m_commandData->m_indexAfter == -1)
|
||||
{
|
||||
|
@ -51,7 +51,7 @@ class CmdAddItemExecData;
|
||||
class CmdAddItemExec : public CmdExecuteCommand
|
||||
{
|
||||
public:
|
||||
CmdAddItemExec(NotificationCenter* notificationCenter);
|
||||
explicit CmdAddItemExec(NotificationCenter* notificationCenter);
|
||||
virtual ~CmdAddItemExec();;
|
||||
|
||||
CmdAddItemExecData* commandData();
|
||||
|
@ -51,7 +51,7 @@ class CmdDeleteItemExecData;
|
||||
class CmdDeleteItemExec : public CmdExecuteCommand
|
||||
{
|
||||
public:
|
||||
CmdDeleteItemExec(NotificationCenter* notificationCenter);
|
||||
explicit CmdDeleteItemExec(NotificationCenter* notificationCenter);
|
||||
virtual ~CmdDeleteItemExec() {};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user