aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlsqldatabase/tst_qqmlsqldatabase.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2016-06-03 16:14:21 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2016-06-03 14:37:26 +0000
commit6d63e3ba09954ce7b56b4b24432bd036e636b164 (patch)
tree0111e8864a53b6636d9bf07b5f8c4d9eb9931cbc /tests/auto/qml/qqmlsqldatabase/tst_qqmlsqldatabase.cpp
parentb6c64c2ef3b1fd314ea85be003fd88d43e36ee54 (diff)
Fix bug in SQL database integration with null values
Since commit 91d6a63ab317817990c3b2306860adbd8916cca4 a null JS value is mapped to a QVariant(VoidStar) to properly create null JS values when converting back again. However that broke the binding of values in the SQL database, where it ended up mapping null to an empty string. [ChangeLog][QtQml] Fix mapping of null JS values to null SQL values instead of empty strings. Task-number: QTBUG-53412 Change-Id: Icf1fea4674e9dd8bb5313e3770ed2d3f99849987 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
Diffstat (limited to 'tests/auto/qml/qqmlsqldatabase/tst_qqmlsqldatabase.cpp')
-rw-r--r--tests/auto/qml/qqmlsqldatabase/tst_qqmlsqldatabase.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/auto/qml/qqmlsqldatabase/tst_qqmlsqldatabase.cpp b/tests/auto/qml/qqmlsqldatabase/tst_qqmlsqldatabase.cpp
index b5b77ad10b..debafa3fe4 100644
--- a/tests/auto/qml/qqmlsqldatabase/tst_qqmlsqldatabase.cpp
+++ b/tests/auto/qml/qqmlsqldatabase/tst_qqmlsqldatabase.cpp
@@ -127,7 +127,7 @@ void tst_qqmlsqldatabase::checkDatabasePath()
QVERIFY(engine->offlineStoragePath().contains("OfflineStorage"));
}
-static const int total_databases_created_by_tests = 12;
+static const int total_databases_created_by_tests = 13;
void tst_qqmlsqldatabase::testQml_data()
{
QTest::addColumn<QString>("jsfile"); // The input file
@@ -149,6 +149,7 @@ void tst_qqmlsqldatabase::testQml_data()
QTest::newRow("error-outsidetransaction") << "error-outsidetransaction.js"; // reuse above
QTest::newRow("reopen1") << "reopen1.js";
QTest::newRow("reopen2") << "reopen2.js"; // re-uses above DB
+ QTest::newRow("null-values") << "nullvalues.js";
// If you add a test, you should usually use a new database in the
// test - in which case increment total_databases_created_by_tests above.