// c falls into an uncovered area, but we can guess which
if (c > unicode_blocks[lastBlock].end
- && c < unicode_blocks[lastBlock + 1].start)
+ && (lastBlock == no_blocks-1 || c < unicode_blocks[lastBlock + 1].start))
return QString();
// guessing was wrong so far. do a real search.
{
public:
Model(GuiSymbols * parent)
- : QAbstractListModel(parent), encoding_(0)
+ : QAbstractListModel(parent), encoding_(nullptr)
{}
QModelIndex index(int row, int column, QModelIndex const &) const override
}
-void GuiSymbols::on_categoryCO_activated(QString const & text)
+void GuiSymbols::on_categoryCO_activated(int)
{
if (!categoryFilterCB->isChecked())
updateSymbolList(false);
else
- scrollToItem(text);
+ scrollToItem(categoryCO->currentText());
}
++numItem;
if (show_all || (c >= range_start && c <= range_end))
s.append(c);
- if (update_combo) {
- QString block = getBlock(c);
- if (used_blocks.find(block) == used_blocks.end())
- used_blocks[block] = numItem;
- }
+ if (update_combo)
+ used_blocks.insert({getBlock(c), numItem});
}
model_->setSymbols(s, enc);
}
-Dialog * createGuiSymbols(GuiView & lv)
-{
- return new GuiSymbols(lv);
-}
-
-
} // namespace frontend
} // namespace lyx