aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Bubke <marco.bubke@qt.io>2021-11-30 14:42:17 +0100
committerMarco Bubke <marco.bubke@qt.io>2021-12-08 15:01:17 +0000
commit6009f65b9b557fd4c820ef102773b1e9c83f36be (patch)
treeb56a0514a5f94c599c9f08507ec49a1ab2462b32
parent3e52e8b64395b736a434b6bbb0e1531eb9f936f8 (diff)
QmlDesigner: Fix broken algorithm for table without rowid
It seem not to work for tables without rowids. We have to research if it a Sqlite bug or more propable a misuse of our side. Change-Id: Ie1e2fdba5f71595f24cad79125c37db0ec9715c3 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
-rw-r--r--src/plugins/qmldesigner/designercore/projectstorage/projectstorage.h1
-rw-r--r--tests/unit/unittest/projectstorage-test.cpp6
2 files changed, 3 insertions, 4 deletions
diff --git a/src/plugins/qmldesigner/designercore/projectstorage/projectstorage.h b/src/plugins/qmldesigner/designercore/projectstorage/projectstorage.h
index c437fa7809..2c56dfdc29 100644
--- a/src/plugins/qmldesigner/designercore/projectstorage/projectstorage.h
+++ b/src/plugins/qmldesigner/designercore/projectstorage/projectstorage.h
@@ -2066,7 +2066,6 @@ private:
{
Sqlite::Table table;
table.setUseIfNotExists(true);
- table.setUseWithoutRowId(true);
table.setName("projectDatas");
auto &projectSourceIdColumn = table.addColumn("projectSourceId");
auto &sourceIdColumn = table.addColumn("sourceId");
diff --git a/tests/unit/unittest/projectstorage-test.cpp b/tests/unit/unittest/projectstorage-test.cpp
index 69d7e90b97..2bc88619aa 100644
--- a/tests/unit/unittest/projectstorage-test.cpp
+++ b/tests/unit/unittest/projectstorage-test.cpp
@@ -3736,15 +3736,15 @@ TEST_F(ProjectStorage, UpdateProjectDataModuleId)
qmlModuleId,
Storage::FileType::QmlDocument};
Storage::ProjectData projectData2{qmlProjectSourceId,
- sourceId2,
+ sourceId3,
qmlModuleId,
Storage::FileType::QmlDocument};
Storage::ProjectData projectData2b{qmlProjectSourceId,
- sourceId2,
+ sourceId3,
qtQuickModuleId,
Storage::FileType::QmlDocument};
Storage::ProjectData projectData3{qtQuickProjectSourceId,
- sourceId3,
+ sourceId2,
qtQuickModuleId,
Storage::FileType::QmlTypes};
storage.synchronize(SynchronizationPackage{{qmlProjectSourceId, qtQuickProjectSourceId},