summaryrefslogtreecommitdiffstats
path: root/tests/auto/sql/models/qsqlquerymodel/tst_qsqlquerymodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/sql/models/qsqlquerymodel/tst_qsqlquerymodel.cpp')
-rw-r--r--tests/auto/sql/models/qsqlquerymodel/tst_qsqlquerymodel.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/auto/sql/models/qsqlquerymodel/tst_qsqlquerymodel.cpp b/tests/auto/sql/models/qsqlquerymodel/tst_qsqlquerymodel.cpp
index ae2f8dde5f..52baa0070b 100644
--- a/tests/auto/sql/models/qsqlquerymodel/tst_qsqlquerymodel.cpp
+++ b/tests/auto/sql/models/qsqlquerymodel/tst_qsqlquerymodel.cpp
@@ -593,7 +593,7 @@ public:
connect(this, SIGNAL(modelReset()), this, SLOT(modelResetSlot()));
}
- void testme()
+ void testNested()
{
// Only the outermost beginResetModel/endResetModel should
// emit signals.
@@ -618,6 +618,14 @@ public:
QCOMPARE(gotReset, true);
}
+ void testClear() // QTBUG-49404: Basic test whether clear() emits signals.
+ {
+ gotAboutToBeReset = gotReset = false;
+ clear();
+ QVERIFY(gotAboutToBeReset);
+ QVERIFY(gotReset);
+ }
+
private slots:
void modelAboutToBeResetSlot() { gotAboutToBeReset = true; }
void modelResetSlot() { gotReset = true; }
@@ -634,7 +642,8 @@ void tst_QSqlQueryModel::nestedResets()
CHECK_DATABASE(db);
NestedResetsTest t;
- t.testme();
+ t.testClear();
+ t.testNested();
}
// For task 180617