From 36b99d0420589e6fe2bca318a5918231b5d9a634 Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Thu, 17 Apr 2008 13:15:27 +0000 Subject: [PATCH] Add an assertion so we don't see that bug again. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24314 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiIdListModel.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/frontends/qt4/GuiIdListModel.cpp b/src/frontends/qt4/GuiIdListModel.cpp index 1b17e59a8f..17cab6b20a 100644 --- a/src/frontends/qt4/GuiIdListModel.cpp +++ b/src/frontends/qt4/GuiIdListModel.cpp @@ -16,6 +16,8 @@ #include "GuiIdListModel.h" +#include "support/assert.h" + using std::vector; namespace lyx { @@ -61,7 +63,10 @@ bool GuiIdListModel::setData (QModelIndex const & index, dataChanged(index, index); return true; } - return false; + // If we assert here, it's because we're trying to set an + // unrecognized role. + LASSERT(false, return false); + return false; // silence the warning } -- 2.39.2