Fix the following warning:
src/frontends/qt/GuiDocument.h:377:7: error: 'eventFilter' overrides a member function but is not marked 'override' [-Werror,-Winconsistent-missing-override]
bool eventFilter(QObject * sender, QEvent * event);
^
/usr/include/x86_64-linux-gnu/qt5/QtCore/qobject.h:139:18: note: overridden virtual function is here
virtual bool eventFilter(QObject *watched, QEvent *event);
^
Amends 62413580de.
If `havetable == true`, a lot of the code didn't make any sense: in particular, it was outputting a level of <m:mrow> too many.
Also, add some comments and rewrite the comment about mlabeledtr.
Contributed by lynx: https://www.lyx.org/trac/ticket/12629
This was:
../../master/src/mathed/InsetMathBox.cpp:116:20: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::__cxx11::basic_string<wchar_t> >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
116 | for (int i = 0; i < parts.size(); i += 2) {
| ~~^~~~~~~~~~~~~~
../../master/src/mathed/InsetMathBox.cpp:120:20: warning: comparison of integer expressions of different signedness: ‘std::vector<std::__cxx11::basic_string<wchar_t> >::size_type’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare]
Error noticed by Coverity:
*** CID 382777: Memory - illegal accesses (RETURN_LOCAL)
/home/lasgoutt/src/lyx/coverity/lyx/src/insets/InsetIndex.cpp: 1866 in _ZNK3lyx15InsetPrintIndex5xhtmlB5cxx11ERNS_9XMLStreamERKNS_12OutputParamsE()
1860
1861 // Collect the index entries in a form we can use them.
1862 vector<IndexEntry> entries;
1863 const docstring & indexType = params().getParamOr("type", from_ascii("idx"));
1864 for (const TocItem& item : *toc) {
1865 const auto* inset = static_cast<const InsetIndex*>(&(item.dit().inset()));
>>> CID 382777: Memory - illegal accesses (RETURN_LOCAL)
>>> Using "indexType", which points to an out-of-scope temporary variable of type "lyx::docstring const".
1866 if (item.isOutput() && inset->params().index == indexType)
1867 entries.emplace_back(IndexEntry{inset, &op});
1868 }
1869
1870 // If all the index entries are in notes or not displayed, get out sooner.
1871 if (entries.empty())