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 /src/gui/itemmodels/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 'src/gui/itemmodels/qstandarditemmodel.cpp')
-rw-r--r-- | src/gui/itemmodels/qstandarditemmodel.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/itemmodels/qstandarditemmodel.cpp b/src/gui/itemmodels/qstandarditemmodel.cpp index e843351cf7..479a4283b0 100644 --- a/src/gui/itemmodels/qstandarditemmodel.cpp +++ b/src/gui/itemmodels/qstandarditemmodel.cpp @@ -2168,6 +2168,7 @@ void QStandardItemModel::clear() Q_D(QStandardItemModel); beginResetModel(); d->root.reset(new QStandardItem); + d->root->setFlags(Qt::ItemIsDropEnabled); d->root->d_func()->setModel(this); qDeleteAll(d->columnHeaderItems); d->columnHeaderItems.clear(); |