Skip to content

KDirModel/KFilePlacesModel: fix assert in modeltest

David Faure requested to merge work/dfaure/toplevel_flags into master

QAbstractItemModelTesterPrivate::nonDestructiveBasicTest() says:

  Qt::ItemFlags flags = model->flags(QModelIndex());
  MODELTESTER_VERIFY(flags == Qt::ItemIsDropEnabled || flags == 0);

i.e. it expects that for the root index, flags are 0 or Qt::ItemIsDropEnabled but never anything else (the invisible root can't be selected or disabled etc.)

Edited by David Faure

Merge request reports

Loading