diff options
author | Stephen Kelly <stephen.kelly@kdab.com> | 2012-12-28 15:34:54 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-01-01 18:11:28 +0100 |
commit | 3f374afaae93a7804ee367098719c8a178d906f8 (patch) | |
tree | d7b0e0a3ca1ad797d0a24de9f8c470e7a3fc0ccd /src/corelib/itemmodels | |
parent | 7ee9551b62b050f7e9aefdc19e19bac5ba263507 (diff) |
Get the default flags from the direct-base, not the indirect.
QStringListModel inherits QAbstractListModel.
Change-Id: I942321b2e5949f54041e11089f4131a646618b9e
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Diffstat (limited to 'src/corelib/itemmodels')
-rw-r--r-- | src/corelib/itemmodels/qstringlistmodel.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/itemmodels/qstringlistmodel.cpp b/src/corelib/itemmodels/qstringlistmodel.cpp index 641dfb28f9..f3da06775a 100644 --- a/src/corelib/itemmodels/qstringlistmodel.cpp +++ b/src/corelib/itemmodels/qstringlistmodel.cpp @@ -170,9 +170,9 @@ QVariant QStringListModel::data(const QModelIndex &index, int role) const Qt::ItemFlags QStringListModel::flags(const QModelIndex &index) const { if (!index.isValid()) - return QAbstractItemModel::flags(index) | Qt::ItemIsDropEnabled; + return QAbstractListModel::flags(index) | Qt::ItemIsDropEnabled; - return QAbstractItemModel::flags(index) | Qt::ItemIsEditable | Qt::ItemIsDragEnabled | Qt::ItemIsDropEnabled; + return QAbstractListModel::flags(index) | Qt::ItemIsEditable | Qt::ItemIsDragEnabled | Qt::ItemIsDropEnabled; } /*! |