0
0
mirror of https://github.com/fralx/LimeReport.git synced 2024-12-23 16:22:58 +03:00

Fix: lrcompletermodel.h out of range

This commit is contained in:
Dmitry Zagorodnev 2023-02-20 14:24:25 +03:00
parent 77d9d44df6
commit 56e145ecd8

View File

@ -12,7 +12,9 @@ public:
CompleterItem(QString text, QIcon icon):m_parent(0), m_text(text), m_icon(icon), m_model(0){}
~CompleterItem();
int rowCount() const {return m_children.count();}
CompleterItem* child(int row) const {return m_children.at(row).data();}
CompleterItem *child(int row) const {
return m_children.count() < row ? m_children.at(row).data() : nullptr;
}
CompleterItem* parent() const {return m_parent;}
int row() const{
if (m_parent){