@@ -59,48 +59,30 @@ ModelTest::ModelTest ( QAbstractItemModel *_model, QObject *parent ) : QObject (
59 if (!model)
59 if (!model)
60 qFatal("%s: model must not be null", Q_FUNC_INFO);
60 qFatal("%s: model must not be null", Q_FUNC_INFO);
62− connect(model, SIGNAL(columnsAboutToBeInserted(QModelIndex,int,int)),
62+ connect(model, &QAbstractItemModel::columnsAboutToBeInserted, this, &ModelTest::runAllTests);
63− this, SLOT(runAllTests()) );
64− connect(model, SIGNAL(columnsAboutToBeRemoved(QModelIndex,int,int)),
63+ connect(model, &QAbstractItemModel::columnsAboutToBeRemoved, this, &ModelTest::runAllTests);
65− this, SLOT(runAllTests()) );
66− connect(model, SIGNAL(columnsInserted(QModelIndex,int,int)),
64+ connect(model, &QAbstractItemModel::columnsInserted, this, &ModelTest::runAllTests);
67− this, SLOT(runAllTests()) );
68− connect(model, SIGNAL(columnsRemoved(QModelIndex,int,int)),
65+ connect(model, &QAbstractItemModel::columnsRemoved, this, &ModelTest::runAllTests);
69− this, SLOT(runAllTests()) );
66+ connect(model, &QAbstractItemModel::dataChanged, this, &ModelTest::runAllTests);
70− connect(model, SIGNAL(dataChanged(QModelIndex,QModelIndex)),
71− this, SLOT(runAllTests()) );
72− connect(model, SIGNAL(headerDataChanged(Qt::Orientation,int,int)),
67+ connect(model, &QAbstractItemModel::headerDataChanged, this, &ModelTest::runAllTests);
73− this, SLOT(runAllTests()) );
74− connect(model, SIGNAL(layoutAboutToBeChanged()), this, SLOT(runAllTests()) );
68+ connect(model, &QAbstractItemModel::layoutAboutToBeChanged, this, &ModelTest::runAllTests);
75− connect(model, SIGNAL(layoutChanged()), this, SLOT(runAllTests()) );
69+ connect(model, &QAbstractItemModel::layoutChanged, this, &ModelTest::runAllTests);
76− connect(model, SIGNAL(modelReset()), this, SLOT(runAllTests()) );
70+ connect(model, &QAbstractItemModel::modelReset, this, &ModelTest::runAllTests);
77− connect(model, SIGNAL(rowsAboutToBeInserted(QModelIndex,int,int)),
71+ connect(model, &QAbstractItemModel::rowsAboutToBeInserted, this, &ModelTest::runAllTests);
78− this, SLOT(runAllTests()) );
79− connect(model, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)),
72+ connect(model, &QAbstractItemModel::rowsAboutToBeRemoved, this, &ModelTest::runAllTests);
80− this, SLOT(runAllTests()) );
81− connect(model, SIGNAL(rowsInserted(QModelIndex,int,int)),
73+ connect(model, &QAbstractItemModel::rowsInserted, this, &ModelTest::runAllTests);
82− this, SLOT(runAllTests()) );
83− connect(model, SIGNAL(rowsRemoved(QModelIndex,int,int)),
74+ connect(model, &QAbstractItemModel::rowsRemoved, this, &ModelTest::runAllTests);
84− this, SLOT(runAllTests()) );
86 // Special checks for changes
76 // Special checks for changes
87− connect(model, SIGNAL(layoutAboutToBeChanged()),
77+ connect(model, &QAbstractItemModel::layoutAboutToBeChanged, this, &ModelTest::layoutAboutToBeChanged);
88− this, SLOT(layoutAboutToBeChanged()) );
89− connect(model, SIGNAL(layoutChanged()),
78+ connect(model, &QAbstractItemModel::layoutChanged, this, &ModelTest::layoutChanged);
90− this, SLOT(layoutChanged()) );
79+
92− connect(model, SIGNAL(rowsAboutToBeInserted(QModelIndex,int,int)),
80+ connect(model, &QAbstractItemModel::rowsAboutToBeInserted, this, &ModelTest::rowsAboutToBeInserted);
93− this, SLOT(rowsAboutToBeInserted(QModelIndex,int,int)) );
94− connect(model, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)),
81+ connect(model, &QAbstractItemModel::rowsAboutToBeRemoved, this, &ModelTest::rowsAboutToBeRemoved);
95− this, SLOT(rowsAboutToBeRemoved(QModelIndex,int,int)) );
96− connect(model, SIGNAL(rowsInserted(QModelIndex,int,int)),
82+ connect(model, &QAbstractItemModel::rowsInserted, this, &ModelTest::rowsInserted);
97− this, SLOT(rowsInserted(QModelIndex,int,int)) );
98− connect(model, SIGNAL(rowsRemoved(QModelIndex,int,int)),
83+ connect(model, &QAbstractItemModel::rowsRemoved, this, &ModelTest::rowsRemoved);
99− this, SLOT(rowsRemoved(QModelIndex,int,int)) );
84+ connect(model, &QAbstractItemModel::dataChanged, this, &ModelTest::dataChanged);
100− connect(model, SIGNAL(dataChanged(QModelIndex,QModelIndex)),
85+ connect(model, &QAbstractItemModel::headerDataChanged, this, &ModelTest::headerDataChanged);
101− this, SLOT(dataChanged(QModelIndex,QModelIndex)) );
102− connect(model, SIGNAL(headerDataChanged(Qt::Orientation,int,int)),
103− this, SLOT(headerDataChanged(Qt::Orientation,int,int)) );
105 runAllTests();
87 runAllTests();