Opened 15 years ago

Last modified 14 years ago

#1999 new patch

Use QtSql for database access instead of native sqlite calls

Reported by: timlinux Owned by: timlinux
Priority: minor: annoyance Milestone: Version 1.7.0
Component: Projection Support Version: Trunk
Keywords: sqlite Cc:
Must Fix for Release: No Platform: All
Platform Version: Awaiting user input: no

Description

Rationale:

Using the native sqlite approach (e.g. in QgsCoordinateReferenceSystem) requires including redundant source code withing our code base since Qt already provides an sqlite access layer. In addition in comparison to QtSql, the sqlite native code is verbose and inconsistent with the general Qt4 based approach we take in our coding. Lastly, it should be noted that at some stage in the future we may wish to use other database backends to store application data. For example, enterprise users may wish to store these data in a centralised PostgreSQL database. Using the QtSql module would make moving to such an environment trivial.

I am attaching a first stab at moving sqlite code to QtSql. Note this code is not production ready and coverage through the code base is not yet complete. As such this patch has not yet been applied to trunk until it is ready for prime time.

Attachments (1)

qgis_qtsqlite_patch_v1.diff (21.6 KB ) - added by timlinux 15 years ago.

Download all attachments as: .zip

Change History (4)

by timlinux, 15 years ago

Attachment: qgis_qtsqlite_patch_v1.diff added

comment:1 by lutra, 15 years ago

Priority: critical: causes crash or data corruptionmajor: does not work as expected

comment:2 by jef, 15 years ago

Priority: major: does not work as expectedminor: annoyance

comment:3 by pcav, 14 years ago

Milestone: Version 1.5.0Version 1.6.0
Note: See TracTickets for help on using tickets.