X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt4%2FGuiIdListModel.cpp;h=07b38708faebe7d022cfb813146e7d18277c7ce6;hb=425d092204118ea6c24c28e85fdf03fcf2bb51a4;hp=1b17e59a8f2e51c2f5054071b810d61017e15e9d;hpb=0246d95423a4d9763fae9924a07de2b2c9dcefe1;p=lyx.git diff --git a/src/frontends/qt4/GuiIdListModel.cpp b/src/frontends/qt4/GuiIdListModel.cpp index 1b17e59a8f..07b38708fa 100644 --- a/src/frontends/qt4/GuiIdListModel.cpp +++ b/src/frontends/qt4/GuiIdListModel.cpp @@ -16,6 +16,8 @@ #include "GuiIdListModel.h" +#include "support/lassert.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 } @@ -133,20 +138,6 @@ int GuiIdListModel::findIDString(std::string const & idString) return -1; } - -#if 0 -// The following function is currently unused but is retained here in -// case it should at some point be useful. -QStringList GuiIdListModel::getIDStringList() const -{ - QStringList qsl; - vector::const_iterator it = userData_.begin(); - vector::const_iterator end = userData_.end(); - for (; it != end; ++it) - qsl.append(it->idString.toString()); - return qsl; -} -#endif } // namespace frontend } // namespace lyx