From d6fc82906b5724d8c5f4b782ad850e4462e56af2 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Wed, 2 Mar 2011 17:58:49 +0100 Subject: Prevent crashes on history models updating... BUG:263326 --- src/history/historymodels.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/history') diff --git a/src/history/historymodels.cpp b/src/history/historymodels.cpp index bfd202f3..2cab8efb 100644 --- a/src/history/historymodels.cpp +++ b/src/history/historymodels.cpp @@ -354,10 +354,18 @@ void HistoryFilterModel::load() const void HistoryFilterModel::sourceRowsInserted(const QModelIndex &parent, int start, int end) { - Q_ASSERT(start == end && start == 0); + //Q_ASSERT(start == end && start == 0); Q_UNUSED(end); + + if(start != 0) + { + kDebug() << "STARTING from a NON zero position..."; + return; + } + if (!m_loaded) return; + QModelIndex idx = sourceModel()->index(start, 0, parent); QString url = idx.data(HistoryModel::UrlStringRole).toString(); if (m_historyHash.contains(url)) -- cgit v1.2.1