#1292 Fixed CppCheck Issues in AppFwk/cafCommands

This commit is contained in:
Magne Sjaastad 2017-03-06 15:56:08 +01:00
parent a5ed533c00
commit 9179ae2a14
11 changed files with 10 additions and 11 deletions

View File

@ -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);

View File

@ -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;

View File

@ -50,7 +50,7 @@
class UndoRedoWrapper : public QUndoCommand
{
public:
UndoRedoWrapper(caf::CmdExecuteCommand* executeCommand)
explicit UndoRedoWrapper(caf::CmdExecuteCommand* executeCommand)
{
m_executeCommand = executeCommand;

View File

@ -52,7 +52,7 @@ class PdmObjectHandle;
class CmdExecuteCommand
{
public:
CmdExecuteCommand(NotificationCenter* notificationCenter)
explicit CmdExecuteCommand(NotificationCenter* notificationCenter)
{
m_notificationCenter = notificationCenter;
}

View File

@ -76,7 +76,7 @@ public:
class CmdFieldChangeExec : public CmdExecuteCommand
{
public:
CmdFieldChangeExec(NotificationCenter* notificationCenter);
explicit CmdFieldChangeExec(NotificationCenter* notificationCenter);
virtual ~CmdFieldChangeExec();

View File

@ -78,7 +78,7 @@ public:
class CmdSelectionChangeExec : public CmdExecuteCommand
{
public:
CmdSelectionChangeExec(NotificationCenter* notificationCenter);
explicit CmdSelectionChangeExec(NotificationCenter* notificationCenter);
virtual ~CmdSelectionChangeExec();;
CmdSelectionChangeExecData* commandData();

View File

@ -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);

View File

@ -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);
};

View File

@ -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)
{

View File

@ -51,7 +51,7 @@ class CmdAddItemExecData;
class CmdAddItemExec : public CmdExecuteCommand
{
public:
CmdAddItemExec(NotificationCenter* notificationCenter);
explicit CmdAddItemExec(NotificationCenter* notificationCenter);
virtual ~CmdAddItemExec();;
CmdAddItemExecData* commandData();

View File

@ -51,7 +51,7 @@ class CmdDeleteItemExecData;
class CmdDeleteItemExec : public CmdExecuteCommand
{
public:
CmdDeleteItemExec(NotificationCenter* notificationCenter);
explicit CmdDeleteItemExec(NotificationCenter* notificationCenter);
virtual ~CmdDeleteItemExec() {};