summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/sql/models/qsqltablemodel.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/sql/models/qsqltablemodel.cpp b/src/sql/models/qsqltablemodel.cpp
index f30352e2fe..0cb7c3921b 100644
--- a/src/sql/models/qsqltablemodel.cpp
+++ b/src/sql/models/qsqltablemodel.cpp
@@ -439,13 +439,11 @@ QVariant QSqlTableModel::headerData(int section, Qt::Orientation orientation, in
{
Q_D(const QSqlTableModel);
if (orientation == Qt::Vertical && role == Qt::DisplayRole) {
- if (d->cache.contains(section)) {
- const QSqlTableModelPrivate::Op op = d->cache.value(section).op();
- if (op == QSqlTableModelPrivate::Insert)
- return QLatin1String("*");
- else if (op == QSqlTableModelPrivate::Delete)
- return QLatin1String("!");
- }
+ const QSqlTableModelPrivate::Op op = d->cache.value(section).op();
+ if (op == QSqlTableModelPrivate::Insert)
+ return QLatin1String("*");
+ else if (op == QSqlTableModelPrivate::Delete)
+ return QLatin1String("!");
}
return QSqlQueryModel::headerData(section, orientation, role);
}