]> git.lyx.org Git - lyx.git/commitdiff
Add an assertion so we don't see that bug again.
authorRichard Heck <rgheck@comcast.net>
Thu, 17 Apr 2008 13:15:27 +0000 (13:15 +0000)
committerRichard Heck <rgheck@comcast.net>
Thu, 17 Apr 2008 13:15:27 +0000 (13:15 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24314 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiIdListModel.cpp

index 1b17e59a8f2e51c2f5054071b810d61017e15e9d..17cab6b20ae0d2ee7bd0820c8ca8b5772009cd4f 100644 (file)
@@ -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
 }