sqlitetablemodel: fix assert on windows

This commit is contained in:
Peinthor Rene
2015-12-26 08:46:17 +01:00
parent e8b72e8a5e
commit 4003dc6fec
+6 -3
View File
@@ -607,9 +607,12 @@ void SqliteTableModel::updateFilter(int column, const QString& value)
void SqliteTableModel::clearCache()
{
beginRemoveRows(QModelIndex(), 0, m_data.size()-1);
m_data.clear();
endRemoveRows();
if(!m_data.empty())
{
beginRemoveRows(QModelIndex(), 0, m_data.size() - 1);
m_data.clear();
endRemoveRows();
}
}
bool SqliteTableModel::isBinary(const QModelIndex& index) const