From fe055f9c8627ce9ff47da2255c97e1d6988903c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Botond=20Istv=C3=A1n=20Horv=C3=A1th?= Date: Thu, 15 Aug 2024 13:07:19 +0200 Subject: [PATCH] Changed `cache.empty()` to `cache.clear()` The call to the const `empty()` didn't do anything, because its results were unused. I think the original intention was to make it empty aka to clear it. (Or if we need not modify it we need to remove the whole `if` statement and the `empty()` call in it) --- src/sql/models/qsqltablemodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sql/models/qsqltablemodel.cpp b/src/sql/models/qsqltablemodel.cpp index 0d171942877..719f526d78b 100644 --- a/src/sql/models/qsqltablemodel.cpp +++ b/src/sql/models/qsqltablemodel.cpp @@ -1109,7 +1109,7 @@ bool QSqlTableModel::insertRows(int row, int count, const QModelIndex &parent) beginInsertRows(parent, row, row + count - 1); if (d->strategy != OnManualSubmit) - d->cache.empty(); + d->cache.clear(); if (!d->cache.isEmpty()) { QMap::Iterator it = d->cache.end();