]> git.lyx.org Git - features.git/commitdiff
Prevent assert due to some odd role in older qt versions.
authorJuergen Spitzmueller <spitz@lyx.org>
Tue, 14 May 2019 12:05:46 +0000 (14:05 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 18 Jun 2020 13:48:29 +0000 (15:48 +0200)
src/frontends/qt4/GuiIdListModel.cpp

index b1db347327eca8e6bab16e53712d8c3c8ba425fb..d38a087f7c37a4ec82357244f540c77613cef642 100644 (file)
@@ -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);