[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kde-runtime] test: Make all C++ class constructors that can be used with only one required
From: Lamarque V. Souza <lamarque () kde ! org>
Date: 2012-05-02 18:39:24
Message-ID: 20120502183924.C0F3F580CE () git ! kde ! org
[Download RAW message or body]
Git commit 4e5f90233d7bd1ad09f3c008956b4d86ae18d9c9 by Lamarque V. Souza.
Committed on 23/03/2012 at 22:13.
Pushed by sreich into branch 'master'.
Make all C++ class constructors that can be used with only one required
argument 'explicit' to minimize wrong use of the class.
M +4 -4 test/dynamictreemodel.h
M +1 -1 test/modeltest.h
http://commits.kde.org/kde-runtime/4e5f90233d7bd1ad09f3c008956b4d86ae18d9c9
diff --git a/test/dynamictreemodel.h b/test/dynamictreemodel.h
index 9633755..809b76a 100644
--- a/test/dynamictreemodel.h
+++ b/test/dynamictreemodel.h
@@ -98,7 +98,7 @@ class ModelChangeCommand : public QObject
Q_OBJECT
public:
- ModelChangeCommand( DynamicTreeModel *model, QObject *parent = 0 );
+ explicit ModelChangeCommand( DynamicTreeModel *model, QObject *parent = 0 );
virtual ~ModelChangeCommand() {}
@@ -131,7 +131,7 @@ class ModelInsertCommand : public ModelChangeCommand
public:
- ModelInsertCommand(DynamicTreeModel *model, QObject *parent = 0 );
+ explicit ModelInsertCommand(DynamicTreeModel *model, QObject *parent = 0 );
virtual ~ModelInsertCommand() {}
virtual void doCommand();
@@ -168,7 +168,7 @@ class ModelResetCommand : public ModelMoveCommand
{
Q_OBJECT
public:
- ModelResetCommand(DynamicTreeModel* model, QObject* parent = 0);
+ explicit ModelResetCommand(DynamicTreeModel* model, QObject* parent = 0);
virtual ~ModelResetCommand();
@@ -184,7 +184,7 @@ class ModelResetCommandFixed : public ModelMoveCommand
{
Q_OBJECT
public:
- ModelResetCommandFixed(DynamicTreeModel* model, QObject* parent = 0);
+ explicit ModelResetCommandFixed(DynamicTreeModel* model, QObject* parent = 0);
virtual ~ModelResetCommandFixed();
diff --git a/test/modeltest.h b/test/modeltest.h
index 52b45d9..f042ed2 100644
--- a/test/modeltest.h
+++ b/test/modeltest.h
@@ -52,7 +52,7 @@ class ModelTest : public QObject
Q_OBJECT
public:
- ModelTest( QAbstractItemModel *model, QObject *parent = 0 );
+ explicit ModelTest( QAbstractItemModel *model, QObject *parent = 0 );
private Q_SLOTS:
void nonDestructiveBasicTest();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic