diff options
author | Stephen Kelly <ske@ableton.com> | 2016-02-15 12:51:25 +0100 |
---|---|---|
committer | Stephen Kelly <ske@ableton.com> | 2016-02-17 11:39:13 +0000 |
commit | bfeb2fdd7999e63fd21045eb7c0ac5dc5e62d726 (patch) | |
tree | dbe2657a77853b6b0412919d6bacab8c974bb92e /tests/auto/gui/itemmodels/qstandarditemmodel/tst_qstandarditemmodel.cpp | |
parent | a44d7862c8e92ad2bc2d0d56e542066e688d5c82 (diff) |
QStandardItemModel: Reset the flags on clear()
Pass modeltest after clear(). Otherwise it fails because more flags
than Qt::ItemIsDropEnabled get returned for the QModelIndex().
Change-Id: I8f11515cc7dc9383f528f785312ffb77b3c2699d
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'tests/auto/gui/itemmodels/qstandarditemmodel/tst_qstandarditemmodel.cpp')
-rw-r--r-- | tests/auto/gui/itemmodels/qstandarditemmodel/tst_qstandarditemmodel.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/gui/itemmodels/qstandarditemmodel/tst_qstandarditemmodel.cpp b/tests/auto/gui/itemmodels/qstandarditemmodel/tst_qstandarditemmodel.cpp index 7e9e5a6e96..dca718a6d8 100644 --- a/tests/auto/gui/itemmodels/qstandarditemmodel/tst_qstandarditemmodel.cpp +++ b/tests/auto/gui/itemmodels/qstandarditemmodel/tst_qstandarditemmodel.cpp @@ -32,6 +32,7 @@ #include <qstandarditemmodel.h> #include <QTreeView> #include <private/qtreeview_p.h> +#include "modeltest.h" class tst_QStandardItemModel : public QObject { @@ -734,6 +735,9 @@ void tst_QStandardItemModel::clear() QSignalSpy modelResetSpy(&model, SIGNAL(modelReset())); QSignalSpy layoutChangedSpy(&model, SIGNAL(layoutChanged())); QSignalSpy rowsRemovedSpy(&model, SIGNAL(rowsRemoved(QModelIndex,int,int))); + + ModelTest mt(&model); + model.clear(); QCOMPARE(modelResetSpy.count(), 1); |