From dd85634f81d80c7b3117bda516f72ae9c068c215 Mon Sep 17 00:00:00 2001 From: Martin Kleusberg Date: Fri, 17 Nov 2017 13:25:04 +0100 Subject: [PATCH] Also emit loading finished signal when fetching an empty table set When fetching data from an empty table or from an SQL query which doesn't return any rows, we didn't emit the finishedFetch() signal which is used to indicate that the fetching is completed. This is fixed by this commit, so that the signal is always emitted no matter the number of rows returned. This fixes (probably besides other things) the current row numbers at the bottom of the Browse Data tab when changing from a non-empty table to an empty one. --- src/sqlitetablemodel.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sqlitetablemodel.cpp b/src/sqlitetablemodel.cpp index 47c17b9d..59ef9ee6 100644 --- a/src/sqlitetablemodel.cpp +++ b/src/sqlitetablemodel.cpp @@ -578,8 +578,9 @@ void SqliteTableModel::fetchData(unsigned int from, unsigned to) { beginInsertRows(QModelIndex(), num_rows_before_insert, m_data.size()-1); endInsertRows(); - emit finishedFetch(); } + + emit finishedFetch(); }); }