summaryrefslogtreecommitdiffstats
path: root/doc/src
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2011-09-28 11:55:00 (GMT)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2011-09-28 11:55:00 (GMT)
commitd81ddfd44455c79d0a44ab1caf29939b287dd895 (patch)
tree9b4383c5c23b405170ff9b2b5edb6762165828bb /doc/src
parent89ae1ec634f82f89e97f3e19b5d5fb0da9b3092f (diff)
parentc75aabbb022e3c2db246e2fd90a36662cf28ec24 (diff)
downloadQt-d81ddfd44455c79d0a44ab1caf29939b287dd895.zip
Qt-d81ddfd44455c79d0a44ab1caf29939b287dd895.tar.gz
Qt-d81ddfd44455c79d0a44ab1caf29939b287dd895.tar.bz2
Merge remote-tracking branch 'mainline/4.8'
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/snippets/code/src_corelib_io_qsettings.cpp21
-rw-r--r--doc/src/sql-programming/sql-driver.qdoc101
2 files changed, 122 insertions, 0 deletions
diff --git a/doc/src/snippets/code/src_corelib_io_qsettings.cpp b/doc/src/snippets/code/src_corelib_io_qsettings.cpp
index 5abb0e3..269aa44 100644
--- a/doc/src/snippets/code/src_corelib_io_qsettings.cpp
+++ b/doc/src/snippets/code/src_corelib_io_qsettings.cpp
@@ -314,3 +314,24 @@ int main(int argc, char *argv[])
...
}
//! [29]
+
+//! [30]
+QSettings settings(QApplication::applicationDirPath() + "/MySoft.conf");
+//! [30]
+
+//! [31]
+#include <QSettings>
+#include <QDesktopServices>
+int main(int argc, char *argv[])
+{
+#ifdef Q_OS_SYMBIAN
+ // Use QDesktopServices:storageLocation as QApplication is not yet created
+ QSettings::setPath(
+ QSettings::NativeFormat, QSettings::UserScope,
+ QDesktopServices::storageLocation(QDesktopServices::DataLocation) + "/settings");
+#endif
+ QApplication app(argc, argv);
+
+ ...
+}
+//! [31]
diff --git a/doc/src/sql-programming/sql-driver.qdoc b/doc/src/sql-programming/sql-driver.qdoc
index 40c7c6a..ed60e7f 100644
--- a/doc/src/sql-programming/sql-driver.qdoc
+++ b/doc/src/sql-programming/sql-driver.qdoc
@@ -60,6 +60,7 @@
\row \o \link #QPSQL QPSQL\endlink \o PostgreSQL (versions 7.3 and above)
\row \o \link #QSQLITE2 QSQLITE2\endlink \o SQLite version 2
\row \o \link #QSQLITE QSQLITE\endlink \o SQLite version 3
+ \row \o \link #QSYMSQL QSYMSQL\endlink \o SQLite version 3 for Symbian SQL Database
\row \o \link #QTDS QTDS\endlink \o Sybase Adaptive Server \note obsolete from Qt 4.7
\endtable
@@ -665,6 +666,106 @@
ship your own database plugin with your own SQLite library as illustrated above.
Some versions of SQLite can be forced to write a specific file format by setting
the \c{SQLITE_DEFAULT_FILE_FORMAT} define when building SQLite.
+
+ \target QSYMSQL
+ \section2 QSYMSQL for SQLite (Version 3 and Above) with Symbian SQL Database
+
+ \section3 General Information about QSYMSQL
+
+ QSYMSQL driver enables clients to access the native Symbian database engine (“Symbian SQL”)
+ through the QtSQL API.
+
+ The main difference to QSQLITE is that, with Symbian SQL database client can specify a
+ set of access control policies when creating a new database. It uses Symbian SQL security policy
+ definitions within open() call (security policy is defined with in the connection options parameters).
+
+ Symbian RSqlSecurityPolicy class is a container for the security policies for a shared SQL database.
+
+ The container can contain:
+ security policies that apply to the database.
+ security policies that apply to individual database objects, i.e. database tables.
+
+ For the database, you use RSqlSecurityPolicy::SetDbPolicy() to apply a separate security policy to:
+ the database schema.
+ read activity on the database.
+ write activity on the database.
+
+ For database tables, you use RSqlSecurityPolicy::SetPolicy() to apply a separate security policy to:
+ write activity on each named database table.
+ read activity on each named database table.
+
+ More information about Symbian SQL and RSqlSecurityPolicy class reference about policy definitions,
+ can be found from Forum Nokia Library: http://library.developer.nokia.com/.
+
+
+Example of setting Security Policy:
+
+ Connection options hold definition for security policies and all parameters that does not contain "POLICY_" will be
+ passed to RSqlDatabase. Policy will be filled according to parsed values.
+
+ Value in database wide parameters starts by definition which can be vendorId or secureId. These come directly from TSecurityPolicy class in Symbian.
+
+ POLICY_DB_DEFAULT
+ Default security policy which will be used for the database and all database objects. POLICY_DB_DEFAULT must be
+ defined before any other policy definitions can be used.
+ POLICY_DB_READ
+ Read database security policy. An application with read database security policy can read from database.
+ POLICY_DB_WRITE:
+ Write database security policy. An application with write database security policy can write to database.
+ POLICY_DB_SCHEMA:
+ Schema database security policy. An application with schema database security policy can modify
+ the database schema, write to database, read from database.
+
+ Format:
+ POLICY_DB_DEFAULT=cap1,cap2,cap3,cap4,cap5,cap6,cap7 (Up to 7 capabilities)
+ POLICY_DB_READ=cap1,cap2,cap3,cap4,cap5,cap6,cap7 (Up to 7 capabilities)
+ POLICY_DB_WRITE=vendorid,cap1,cap2,cap3 (Vendor ID and up to 3 capabilities)
+ POLICY_DB_SCHEMA=secureid,cap1,cap2,cap3 (Secure ID and up to 3 capabilities)
+
+ Table policies does not support schema policy as database level does.
+
+ Table specific parameters would be as:
+ POLICY_TABLE_WRITE=tablename,cap1,cap2,cap3,cap4,cap5,cap6,cap7
+ POLICY_TABLE_READ=tablename,cap1,cap2,cap3,cap4,cap5,cap6,cap7
+
+ Vendor Id and Secure id format:
+ vid[0x12345678] (Hex)
+ sid[0x12345678] (Hex)
+
+ Examples:
+ Setting default policy:
+ QSqlDatabase database = QSqlDatabase::addDatabase("QSYMSQL", "MyConnection");
+ database.setConnectOptions("POLICY_DB_DEFAULT=ReadDeviceData");
+ database.setDatabaseName("[12345678]myDatabase");
+ bool ok = database.open();
+
+ Setting POLICY_DB_WRITE:
+ QSqlDatabase database = QSqlDatabase::addDatabase("QSYMSQL", "MyConnection");
+ database.setConnectOptions("POLICY_DB_DEFAULT=None; POLICY_DB_WRITE=sid[0x12345678], WriteDeviceData");
+ database.setDatabaseName("[12345678]myDatabase");
+ bool ok = database.open();
+
+ FOREIGN KEY:
+ Enabling foreign key support from underlying SQLite
+ add: "foreign_keys = ON" to your connection options string. This will be passes to SQLite.
+
+ Foreign key Example:
+ QSqlDatabase database = QSqlDatabase::addDatabase("QSYMSQL", "MyConnection");
+ database.setDatabaseName("[12345678]myDatabase");
+ database.setConnectOptions("foreign_keys = ON");
+ bool ok = database.open();
+
+ \section3 How to Build the QSYMSQL Plugin
+
+ Building QSYMSQL requires Symbian SDK.
+
+ The build sequence is similar to the QSQLITE plugin with installing the plugin in the standard location.
+
+ Build sequence:
+
+ >cd sf\mw\qt\src\plugins\sqldrivers\symsql\
+ >qmake
+ >sbs -c winscw_udeb|armv5_urel
\target QIBASE
\section2 QIBASE for Borland InterBase