itemview/itemmodels: make some constructors explicit

This is a semi-automatic search, so I'm
reasonably sure that all the exported ones
have been caught.

Change-Id: I38d7978f1fcf7513e802ed0042aa7a57a95b0060
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
bb10
Marc Mutz 2012-03-06 22:06:30 +01:00 committed by Qt by Nokia
parent 676304e706
commit e1b2755083
9 changed files with 9 additions and 9 deletions

View File

@ -59,7 +59,7 @@ class Q_CORE_EXPORT QAbstractProxyModel : public QAbstractItemModel
Q_OBJECT
public:
QAbstractProxyModel(QObject *parent = 0);
explicit QAbstractProxyModel(QObject *parent = 0);
~QAbstractProxyModel();
virtual void setSourceModel(QAbstractItemModel *sourceModel);

View File

@ -73,7 +73,7 @@ class Q_CORE_EXPORT QSortFilterProxyModel : public QAbstractProxyModel
Q_PROPERTY(int filterRole READ filterRole WRITE setFilterRole)
public:
QSortFilterProxyModel(QObject *parent = 0);
explicit QSortFilterProxyModel(QObject *parent = 0);
~QSortFilterProxyModel();
void setSourceModel(QAbstractItemModel *sourceModel);

View File

@ -57,7 +57,7 @@ class Q_CORE_EXPORT QStringListModel : public QAbstractListModel
Q_OBJECT
public:
explicit QStringListModel(QObject *parent = 0);
QStringListModel(const QStringList &strings, QObject *parent = 0);
explicit QStringListModel(const QStringList &strings, QObject *parent = 0);
int rowCount(const QModelIndex &parent = QModelIndex()) const;

View File

@ -73,7 +73,7 @@ QT_BEGIN_NAMESPACE
class QColumnViewPreviewColumn : public QAbstractItemView {
public:
QColumnViewPreviewColumn(QWidget *parent) : QAbstractItemView(parent), previewWidget(0) {
explicit QColumnViewPreviewColumn(QWidget *parent) : QAbstractItemView(parent), previewWidget(0) {
}
void setPreviewWidget(QWidget *widget) {

View File

@ -66,7 +66,7 @@ class Q_WIDGETS_EXPORT QDataWidgetMapper: public QObject
Q_PROPERTY(SubmitPolicy submitPolicy READ submitPolicy WRITE setSubmitPolicy)
public:
QDataWidgetMapper(QObject *parent = 0);
explicit QDataWidgetMapper(QObject *parent = 0);
~QDataWidgetMapper();
void setModel(QAbstractItemModel *model);

View File

@ -69,7 +69,7 @@ template <class T>
class QItemEditorCreator : public QItemEditorCreatorBase
{
public:
inline QItemEditorCreator(const QByteArray &valuePropertyName);
inline explicit QItemEditorCreator(const QByteArray &valuePropertyName);
inline QWidget *createWidget(QWidget *parent) const { return new T(parent); }
inline QByteArray valuePropertyName() const { return propertyName; }

View File

@ -66,7 +66,7 @@ class Q_WIDGETS_EXPORT QStandardItem
{
public:
QStandardItem();
QStandardItem(const QString &text);
explicit QStandardItem(const QString &text);
QStandardItem(const QIcon &icon, const QString &text);
explicit QStandardItem(int rows, int columns = 1);
virtual ~QStandardItem();

View File

@ -84,7 +84,7 @@ class Q_WIDGETS_EXPORT QTableWidgetItem
friend class QTableModel;
public:
enum ItemType { Type = 0, UserType = 1000 };
QTableWidgetItem(int type = Type);
explicit QTableWidgetItem(int type = Type);
explicit QTableWidgetItem(const QString &text, int type = Type);
explicit QTableWidgetItem(const QIcon &icon, const QString &text, int type = Type);
QTableWidgetItem(const QTableWidgetItem &other);

View File

@ -69,7 +69,7 @@ class Q_WIDGETS_EXPORT QTreeWidgetItem
public:
enum ItemType { Type = 0, UserType = 1000 };
explicit QTreeWidgetItem(int type = Type);
QTreeWidgetItem(const QStringList &strings, int type = Type);
explicit QTreeWidgetItem(const QStringList &strings, int type = Type);
explicit QTreeWidgetItem(QTreeWidget *view, int type = Type);
QTreeWidgetItem(QTreeWidget *view, const QStringList &strings, int type = Type);
QTreeWidgetItem(QTreeWidget *view, QTreeWidgetItem *after, int type = Type);