From: Juergen Spitzmueller Date: Tue, 14 May 2019 12:05:46 +0000 (+0200) Subject: Prevent assert due to some odd role in older qt versions. X-Git-Tag: lyx-2.4.0dev-acb2ca7b~2036 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=3da25187a91477a83bf2d1321334f345104d0788;p=features.git Prevent assert due to some odd role in older qt versions. --- diff --git a/src/frontends/qt4/GuiIdListModel.cpp b/src/frontends/qt4/GuiIdListModel.cpp index b1db347327..d38a087f7c 100644 --- a/src/frontends/qt4/GuiIdListModel.cpp +++ b/src/frontends/qt4/GuiIdListModel.cpp @@ -66,6 +66,10 @@ bool GuiIdListModel::setData(QModelIndex const & index, if (role == Qt::DecorationRole) // nothing to do return true; + if (role == Qt::UserRole - 1) + // This role is set by Qt <= 5.5 if setEditable() + // of the item is false + return true; // If we assert here, it's because we're trying to set an // unrecognized role. LATTEST(false);