--- a/contactengine/contactengine.pro Thu Aug 05 16:40:47 2010 -0700
+++ b/contactengine/contactengine.pro Mon Aug 09 14:37:31 2010 +0100
@@ -4,7 +4,7 @@
#
#-------------------------------------------------
-QT += core gui webkit
+QT += core gui webkit sql
TARGET = contactengine
TEMPLATE = app
@@ -13,10 +13,13 @@
SOURCES += main.cpp\
mainwindow.cpp \
- contactsengine.cpp
+ contactsengine.cpp \
+ dbtools.cpp
HEADERS += mainwindow.h \
- contactsengine.h
+ contactsengine.h \
+ database.h \
+ dbtools.h
FORMS += mainwindow.ui
--- a/contactengine/contactengine.pro.user Thu Aug 05 16:40:47 2010 -0700
+++ b/contactengine/contactengine.pro.user Mon Aug 09 14:37:31 2010 +0100
@@ -2,7 +2,7 @@
<qtcreator>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>
- <value type="int">0</value>
+ <value type="int">1</value>
</data>
<data>
<variable>ProjectExplorer.Project.EditorSettings</variable>
@@ -13,6 +13,98 @@
<data>
<variable>ProjectExplorer.Project.Target.0</variable>
<valuemap type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Desktop</value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Target.DesktopTarget</value>
+ <value key="ProjectExplorer.Target.ActiveBuildConfiguration" type="int">0</value>
+ <value key="ProjectExplorer.Target.ActiveRunConfiguration" type="int">0</value>
+ <valuemap key="ProjectExplorer.Target.BuildConfiguration.0" type="QVariantMap">
+ <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.0" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">qmake</value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QtProjectManager.QMakeBuildStep</value>
+ <valuelist key="QtProjectManager.QMakeBuildStep.QMakeArguments" type="QVariantList"/>
+ </valuemap>
+ <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.1" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Make</value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
+ <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value>
+ <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"/>
+ <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+ </valuemap>
+ <value key="ProjectExplorer.BuildConfiguration.BuildStepsCount" type="int">2</value>
+ <valuemap key="ProjectExplorer.BuildConfiguration.CleanStep.0" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Make</value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
+ <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">true</value>
+ <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList">
+ <value type="QString">clean</value>
+ </valuelist>
+ <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+ </valuemap>
+ <value key="ProjectExplorer.BuildConfiguration.CleanStepsCount" type="int">1</value>
+ <value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
+ <valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Debug</value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">2</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">C:/workspace/QtExamples/contactengine-build-desktop</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">33</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">2</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">true</value>
+ </valuemap>
+ <valuemap key="ProjectExplorer.Target.BuildConfiguration.1" type="QVariantMap">
+ <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.0" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">qmake</value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QtProjectManager.QMakeBuildStep</value>
+ <valuelist key="QtProjectManager.QMakeBuildStep.QMakeArguments" type="QVariantList"/>
+ </valuemap>
+ <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.1" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Make</value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
+ <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value>
+ <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"/>
+ <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+ </valuemap>
+ <value key="ProjectExplorer.BuildConfiguration.BuildStepsCount" type="int">2</value>
+ <valuemap key="ProjectExplorer.BuildConfiguration.CleanStep.0" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Make</value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
+ <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">true</value>
+ <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList">
+ <value type="QString">clean</value>
+ </valuelist>
+ <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+ </valuemap>
+ <value key="ProjectExplorer.BuildConfiguration.CleanStepsCount" type="int">1</value>
+ <value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
+ <valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Release</value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">0</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">C:/workspace/QtExamples/contactengine-build-desktop</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">33</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">2</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">true</value>
+ </valuemap>
+ <value key="ProjectExplorer.Target.BuildConfigurationCount" type="int">2</value>
+ <valuemap key="ProjectExplorer.Target.RunConfiguration.0" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">contactengine</value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4RunConfiguration</value>
+ <value key="Qt4ProjectManager.Qt4RunConfiguration.BaseEnvironmentBase" type="int">2</value>
+ <valuelist key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments" type="QVariantList"/>
+ <value key="Qt4ProjectManager.Qt4RunConfiguration.ProFile" type="QString">contactengine.pro</value>
+ <value key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix" type="bool">false</value>
+ <value key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal" type="bool">false</value>
+ <valuelist key="Qt4ProjectManager.Qt4RunConfiguration.UserEnvironmentChanges" type="QVariantList"/>
+ <value key="Qt4ProjectManager.Qt4RunConfiguration.UserSetName" type="bool">false</value>
+ <value key="Qt4ProjectManager.Qt4RunConfiguration.UserSetWorkingDirectory" type="bool">false</value>
+ <value key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory" type="QString"></value>
+ </valuemap>
+ <value key="ProjectExplorer.Target.RunConfigurationCount" type="int">1</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>ProjectExplorer.Project.Target.1</variable>
+ <valuemap type="QVariantMap">
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Qt Simulator</value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Target.QtSimulatorTarget</value>
<value key="ProjectExplorer.Target.ActiveBuildConfiguration" type="int">0</value>
@@ -47,7 +139,7 @@
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">2</value>
<value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">C:/workspace/QtExamples/contactengine-build-simulator</value>
- <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">28</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">3</value>
<value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">2</value>
<value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">true</value>
</valuemap>
@@ -81,7 +173,7 @@
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">0</value>
<value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">C:/workspace/QtExamples/contactengine-build-simulator</value>
- <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">28</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">3</value>
<value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">2</value>
<value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">true</value>
</valuemap>
@@ -103,290 +195,129 @@
</valuemap>
</data>
<data>
- <variable>ProjectExplorer.Project.Target.1</variable>
+ <variable>ProjectExplorer.Project.Target.2</variable>
<valuemap type="QVariantMap">
- <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Symbian Device</value>
- <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Target.S60DeviceTarget</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Remote compiler</value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Target.WccCompilerTarget</value>
<value key="ProjectExplorer.Target.ActiveBuildConfiguration" type="int">0</value>
<value key="ProjectExplorer.Target.ActiveRunConfiguration" type="int">0</value>
<valuemap key="ProjectExplorer.Target.BuildConfiguration.0" type="QVariantMap">
<valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.0" type="QVariantMap">
- <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">qmake</value>
- <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QtProjectManager.QMakeBuildStep</value>
- <valuelist key="QtProjectManager.QMakeBuildStep.QMakeArguments" type="QVariantList"/>
- </valuemap>
- <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.1" type="QVariantMap">
- <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Make</value>
- <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
- <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value>
- <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"/>
- <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.WccBuildStep</value>
+ <value key="Qt4ProjectManager.WccBuildStep.CertFile" type="QString"></value>
+ <value key="Qt4ProjectManager.WccBuildStep.CertKeyFile" type="QString"></value>
+ <value key="Qt4ProjectManager.WccBuildStep.CertKeyPass" type="QString"></value>
+ <value key="Qt4ProjectManager.WccBuildStep.PostOp" type="int">2</value>
</valuemap>
- <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.2" type="QVariantMap">
- <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Create SIS Package</value>
- <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.S60SignBuildStep</value>
- <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value>
- <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"/>
- <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
- <value key="Qt4ProjectManager.S60CreatePackageStep.Certificate" type="QString"></value>
- <value key="Qt4ProjectManager.S60CreatePackageStep.Keyfile" type="QString"></value>
- <value key="Qt4ProjectManager.S60CreatePackageStep.SignMode" type="int">0</value>
- </valuemap>
- <value key="ProjectExplorer.BuildConfiguration.BuildStepsCount" type="int">3</value>
- <valuemap key="ProjectExplorer.BuildConfiguration.CleanStep.0" type="QVariantMap">
- <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Make</value>
- <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
- <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">true</value>
- <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList">
- <value type="QString">clean</value>
- </valuelist>
- <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
- </valuemap>
- <value key="ProjectExplorer.BuildConfiguration.CleanStepsCount" type="int">1</value>
+ <value key="ProjectExplorer.BuildConfiguration.BuildStepsCount" type="int">1</value>
+ <value key="ProjectExplorer.BuildConfiguration.CleanStepsCount" type="int">0</value>
<value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
<valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
- <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">4.6.3 Debug</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Maemo 5</value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
- <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">2</value>
- <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">C:/workspace/QtExamples/contactengine</value>
- <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">34</value>
- <value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">6</value>
- <value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">false</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">0</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">C:/workspace/QtExamples/contactengine-build-wcc</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">12</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">12</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">true</value>
</valuemap>
<valuemap key="ProjectExplorer.Target.BuildConfiguration.1" type="QVariantMap">
<valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.0" type="QVariantMap">
- <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">qmake</value>
- <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QtProjectManager.QMakeBuildStep</value>
- <valuelist key="QtProjectManager.QMakeBuildStep.QMakeArguments" type="QVariantList"/>
- </valuemap>
- <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.1" type="QVariantMap">
- <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Make</value>
- <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
- <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value>
- <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"/>
- <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.WccBuildStep</value>
+ <value key="Qt4ProjectManager.WccBuildStep.CertFile" type="QString"></value>
+ <value key="Qt4ProjectManager.WccBuildStep.CertKeyFile" type="QString"></value>
+ <value key="Qt4ProjectManager.WccBuildStep.CertKeyPass" type="QString"></value>
+ <value key="Qt4ProjectManager.WccBuildStep.PostOp" type="int">2</value>
</valuemap>
- <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.2" type="QVariantMap">
- <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Create SIS Package</value>
- <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.S60SignBuildStep</value>
- <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value>
- <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"/>
- <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
- <value key="Qt4ProjectManager.S60CreatePackageStep.Certificate" type="QString"></value>
- <value key="Qt4ProjectManager.S60CreatePackageStep.Keyfile" type="QString"></value>
- <value key="Qt4ProjectManager.S60CreatePackageStep.SignMode" type="int">0</value>
- </valuemap>
- <value key="ProjectExplorer.BuildConfiguration.BuildStepsCount" type="int">3</value>
- <valuemap key="ProjectExplorer.BuildConfiguration.CleanStep.0" type="QVariantMap">
- <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Make</value>
- <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
- <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">true</value>
- <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList">
- <value type="QString">clean</value>
- </valuelist>
- <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
- </valuemap>
- <value key="ProjectExplorer.BuildConfiguration.CleanStepsCount" type="int">1</value>
+ <value key="ProjectExplorer.BuildConfiguration.BuildStepsCount" type="int">1</value>
+ <value key="ProjectExplorer.BuildConfiguration.CleanStepsCount" type="int">0</value>
<value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
<valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
- <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">4.6.3 Release</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">S60 3rd Edition Feature Pack 1</value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">0</value>
- <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">C:/workspace/QtExamples/contactengine</value>
- <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">34</value>
- <value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">6</value>
- <value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">false</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">C:/workspace/QtExamples/contactengine-build-wcc</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">13</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">12</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">true</value>
</valuemap>
<valuemap key="ProjectExplorer.Target.BuildConfiguration.2" type="QVariantMap">
<valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.0" type="QVariantMap">
- <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">qmake</value>
- <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QtProjectManager.QMakeBuildStep</value>
- <valuelist key="QtProjectManager.QMakeBuildStep.QMakeArguments" type="QVariantList"/>
- </valuemap>
- <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.1" type="QVariantMap">
- <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Make</value>
- <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
- <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value>
- <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"/>
- <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.WccBuildStep</value>
+ <value key="Qt4ProjectManager.WccBuildStep.CertFile" type="QString"></value>
+ <value key="Qt4ProjectManager.WccBuildStep.CertKeyFile" type="QString"></value>
+ <value key="Qt4ProjectManager.WccBuildStep.CertKeyPass" type="QString"></value>
+ <value key="Qt4ProjectManager.WccBuildStep.PostOp" type="int">2</value>
</valuemap>
- <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.2" type="QVariantMap">
- <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Create SIS Package</value>
- <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.S60SignBuildStep</value>
- <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value>
- <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"/>
- <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
- <value key="Qt4ProjectManager.S60CreatePackageStep.Certificate" type="QString"></value>
- <value key="Qt4ProjectManager.S60CreatePackageStep.Keyfile" type="QString"></value>
- <value key="Qt4ProjectManager.S60CreatePackageStep.SignMode" type="int">0</value>
- </valuemap>
- <value key="ProjectExplorer.BuildConfiguration.BuildStepsCount" type="int">3</value>
- <valuemap key="ProjectExplorer.BuildConfiguration.CleanStep.0" type="QVariantMap">
- <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Make</value>
- <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
- <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">true</value>
- <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList">
- <value type="QString">clean</value>
- </valuelist>
- <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
- </valuemap>
- <value key="ProjectExplorer.BuildConfiguration.CleanStepsCount" type="int">1</value>
+ <value key="ProjectExplorer.BuildConfiguration.BuildStepsCount" type="int">1</value>
+ <value key="ProjectExplorer.BuildConfiguration.CleanStepsCount" type="int">0</value>
<value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
<valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
- <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">S60_5th_Edition_SDK_v1.0 (Qt 4.6.3) Debug</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">S60 3rd Edition Feature Pack 2</value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
- <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">2</value>
- <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">C:/workspace/QtExamples/contactengine</value>
- <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">42</value>
- <value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">6</value>
- <value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">false</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">0</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">C:/workspace/QtExamples/contactengine-build-wcc</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">14</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">12</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">true</value>
</valuemap>
<valuemap key="ProjectExplorer.Target.BuildConfiguration.3" type="QVariantMap">
<valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.0" type="QVariantMap">
- <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">qmake</value>
- <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QtProjectManager.QMakeBuildStep</value>
- <valuelist key="QtProjectManager.QMakeBuildStep.QMakeArguments" type="QVariantList"/>
- </valuemap>
- <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.1" type="QVariantMap">
- <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Make</value>
- <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
- <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value>
- <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"/>
- <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.WccBuildStep</value>
+ <value key="Qt4ProjectManager.WccBuildStep.CertFile" type="QString"></value>
+ <value key="Qt4ProjectManager.WccBuildStep.CertKeyFile" type="QString"></value>
+ <value key="Qt4ProjectManager.WccBuildStep.CertKeyPass" type="QString"></value>
+ <value key="Qt4ProjectManager.WccBuildStep.PostOp" type="int">2</value>
</valuemap>
- <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.2" type="QVariantMap">
- <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Create SIS Package</value>
- <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.S60SignBuildStep</value>
- <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value>
- <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"/>
- <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
- <value key="Qt4ProjectManager.S60CreatePackageStep.Certificate" type="QString"></value>
- <value key="Qt4ProjectManager.S60CreatePackageStep.Keyfile" type="QString"></value>
- <value key="Qt4ProjectManager.S60CreatePackageStep.SignMode" type="int">0</value>
- </valuemap>
- <value key="ProjectExplorer.BuildConfiguration.BuildStepsCount" type="int">3</value>
- <valuemap key="ProjectExplorer.BuildConfiguration.CleanStep.0" type="QVariantMap">
- <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Make</value>
- <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
- <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">true</value>
- <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList">
- <value type="QString">clean</value>
- </valuelist>
- <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
- </valuemap>
- <value key="ProjectExplorer.BuildConfiguration.CleanStepsCount" type="int">1</value>
+ <value key="ProjectExplorer.BuildConfiguration.BuildStepsCount" type="int">1</value>
+ <value key="ProjectExplorer.BuildConfiguration.CleanStepsCount" type="int">0</value>
<value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
<valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
- <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">S60_5th_Edition_SDK_v1.0 (Qt 4.6.3) Release</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">S60 5th Edition</value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">0</value>
- <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">C:/workspace/QtExamples/contactengine</value>
- <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">42</value>
- <value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">6</value>
- <value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">false</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">C:/workspace/QtExamples/contactengine-build-wcc</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">15</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">12</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">true</value>
</valuemap>
<valuemap key="ProjectExplorer.Target.BuildConfiguration.4" type="QVariantMap">
<valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.0" type="QVariantMap">
- <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">qmake</value>
- <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QtProjectManager.QMakeBuildStep</value>
- <valuelist key="QtProjectManager.QMakeBuildStep.QMakeArguments" type="QVariantList"/>
- </valuemap>
- <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.1" type="QVariantMap">
- <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Make</value>
- <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
- <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value>
- <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"/>
- <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.WccBuildStep</value>
+ <value key="Qt4ProjectManager.WccBuildStep.CertFile" type="QString"></value>
+ <value key="Qt4ProjectManager.WccBuildStep.CertKeyFile" type="QString"></value>
+ <value key="Qt4ProjectManager.WccBuildStep.CertKeyPass" type="QString"></value>
+ <value key="Qt4ProjectManager.WccBuildStep.PostOp" type="int">2</value>
</valuemap>
- <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.2" type="QVariantMap">
- <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Create SIS Package</value>
- <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.S60SignBuildStep</value>
- <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value>
- <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"/>
- <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
- <value key="Qt4ProjectManager.S60CreatePackageStep.Certificate" type="QString"></value>
- <value key="Qt4ProjectManager.S60CreatePackageStep.Keyfile" type="QString"></value>
- <value key="Qt4ProjectManager.S60CreatePackageStep.SignMode" type="int">0</value>
- </valuemap>
- <value key="ProjectExplorer.BuildConfiguration.BuildStepsCount" type="int">3</value>
- <valuemap key="ProjectExplorer.BuildConfiguration.CleanStep.0" type="QVariantMap">
- <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Make</value>
- <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
- <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">true</value>
- <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList">
- <value type="QString">clean</value>
- </valuelist>
- <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
- </valuemap>
- <value key="ProjectExplorer.BuildConfiguration.CleanStepsCount" type="int">1</value>
+ <value key="ProjectExplorer.BuildConfiguration.BuildStepsCount" type="int">1</value>
+ <value key="ProjectExplorer.BuildConfiguration.CleanStepsCount" type="int">0</value>
<value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
<valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
- <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">S60_3rd_FP2_SDK_v1.1 (Qt 4.6.3) Debug</value>
- <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
- <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">2</value>
- <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">C:/workspace/QtExamples/contactengine</value>
- <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">44</value>
- <value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">6</value>
- <value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">false</value>
- </valuemap>
- <valuemap key="ProjectExplorer.Target.BuildConfiguration.5" type="QVariantMap">
- <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.0" type="QVariantMap">
- <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">qmake</value>
- <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QtProjectManager.QMakeBuildStep</value>
- <valuelist key="QtProjectManager.QMakeBuildStep.QMakeArguments" type="QVariantList"/>
- </valuemap>
- <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.1" type="QVariantMap">
- <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Make</value>
- <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
- <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value>
- <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"/>
- <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
- </valuemap>
- <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.2" type="QVariantMap">
- <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Create SIS Package</value>
- <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.S60SignBuildStep</value>
- <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value>
- <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"/>
- <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
- <value key="Qt4ProjectManager.S60CreatePackageStep.Certificate" type="QString"></value>
- <value key="Qt4ProjectManager.S60CreatePackageStep.Keyfile" type="QString"></value>
- <value key="Qt4ProjectManager.S60CreatePackageStep.SignMode" type="int">0</value>
- </valuemap>
- <value key="ProjectExplorer.BuildConfiguration.BuildStepsCount" type="int">3</value>
- <valuemap key="ProjectExplorer.BuildConfiguration.CleanStep.0" type="QVariantMap">
- <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Make</value>
- <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
- <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">true</value>
- <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList">
- <value type="QString">clean</value>
- </valuelist>
- <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
- </valuemap>
- <value key="ProjectExplorer.BuildConfiguration.CleanStepsCount" type="int">1</value>
- <value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
- <valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
- <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">S60_3rd_FP2_SDK_v1.1 (Qt 4.6.3) Release</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">S60 5th Edition (N97 SDK)</value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">0</value>
- <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">C:/workspace/QtExamples/contactengine</value>
- <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">44</value>
- <value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">6</value>
- <value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">false</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">C:/workspace/QtExamples/contactengine-build-wcc</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">16</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">12</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">true</value>
</valuemap>
- <value key="ProjectExplorer.Target.BuildConfigurationCount" type="int">6</value>
+ <value key="ProjectExplorer.Target.BuildConfigurationCount" type="int">5</value>
<valuemap key="ProjectExplorer.Target.RunConfiguration.0" type="QVariantMap">
- <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">contactengine on Symbian Device</value>
- <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.S60DeviceRunConfiguration</value>
- <valuelist key="Qt4ProjectManager.S60DeviceRunConfiguration.CommandLineArguments" type="QVariantList"/>
- <value key="Qt4ProjectManager.S60DeviceRunConfiguration.ProFile" type="QString">contactengine.pro</value>
- <value key="Qt4ProjectManager.S60DeviceRunConfiguration.SerialPortName" type="QString">COM5</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Remote compiler - empty run configuration</value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.WccRunConfiguration</value>
+ <value key="Qt4ProjectManager.WccRunConfiguration.ProFile" type="QString">contactengine.pro</value>
</valuemap>
<value key="ProjectExplorer.Target.RunConfigurationCount" type="int">1</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.TargetCount</variable>
- <value type="int">2</value>
+ <value type="int">3</value>
</data>
<data>
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/contactengine/dbtools.cpp Mon Aug 09 14:37:31 2010 +0100
@@ -0,0 +1,116 @@
+#include <QtCore/QCoreApplication>
+#include <QtSql>
+
+#include "database.h"
+#include "dbtools.h"
+
+bool DBTools::createTable(QString sqlStmt)
+{
+ QSqlQuery query;
+ return query.exec(sqlStmt);
+}
+
+int DBTools::getLastInsertRowId()
+{
+ int rc = -1;
+ QSqlQuery query;
+ query.exec("select last_insert_rowid()");
+ if (!query.exec()) {
+ QString errCode = "last rowid query Failed: " + query.lastError().text();
+ qWarning(errCode.toStdString().c_str());
+
+ } else {
+ query.next();
+ rc = query.value(0).toInt();
+ }
+ return rc;
+}
+
+void DBTools::insertContact( QString name, QString mobile, QString deskphone,
+ int xtn, QString email, QString skype,
+ QString twitter, QString title, int site,
+ int department, int floor)
+{
+ QSqlQuery query;
+
+ query.prepare("INSERT INTO contacts ( name, mobile, deskphone, xtn, "
+ "email, skype, twitter, title, site, department, floor) "
+ "VALUES (:name,:mobile,:deskphone,:xtn,:email,:skype, "
+ ":twitter, :title, :site, :department, :floor)");
+
+ query.bindValue(":name", name);
+ query.bindValue(":mobile", mobile);
+ query.bindValue(":deskphone", deskphone);
+ query.bindValue(":xtn", xtn);
+ query.bindValue(":twitter", twitter);
+ query.bindValue(":skype", skype);
+ query.bindValue(":email", email);
+ query.bindValue(":title", title);
+ query.bindValue(":site", site);
+ query.bindValue(":department", department);
+ query.bindValue(":floor", floor);
+
+ if (!query.exec())
+ {
+ qDebug() << query.lastError();
+ qFatal("Failed to add fish.");
+ }
+}
+
+
+bool DBTools::createDB()
+{
+ QSqlDatabase db;
+
+ // Find QSLite driver
+ db = QSqlDatabase::addDatabase("QSQLITE");
+
+ db.setDatabaseName("C:\\workspace\\QtExamples\\contactengine\\contactengine.db");
+
+ // Open databasee
+ if(!db.open())
+ {
+ qDebug() << "DB: failed to open" << endl;
+ exit (1);
+ }
+
+ qDebug() << "DB: database opened " << endl;
+
+ bool rc = createTable("create table contacts "
+ "(cid integer primary key, "
+ "name varchar(128),"
+ "mobile varchar(128),"
+ "deskphone varchar(128),"
+ "xtn int,"
+ "email varchar(128),"
+ "skype varchar(128),"
+ "twitter varchar(128),"
+ "title varchar(128),"
+ "site int,"
+ "department int,"
+ "floor int");
+
+ return rc;
+}
+
+void DBTools::testDB()
+{
+ createDB();
+ insertContact("Tom", "12345", "45678", 22, "tom@symbian.org", "thetom", "tomtom",
+ "Senior Tom", SITE_LONDON, DEPT_TDM, 0);
+}
+
+void DBTools::importCSV(QString fileName)
+{
+
+}
+
+DBTools::DBTools(QObject *parent)
+{
+ QObject();
+}
+
+DBTools::~DBTools()
+{
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/contactengine/dbtools.h Mon Aug 09 14:37:31 2010 +0100
@@ -0,0 +1,32 @@
+#ifndef DBTOOLS_H
+#define DBTOOLS_H
+
+#include <QObject>
+
+class DBTools : QObject
+{
+ Q_OBJECT
+public:
+ explicit DBTools(QObject *parent = 0);
+ ~DBTools();
+
+public:
+ void importCSV(QString fileName);
+ void testDB();
+
+signals:
+
+public slots:
+
+private:
+ bool createDB();
+ void insertContact( QString name, QString mobile, QString deskphone,
+ int xtn, QString email, QString skype,
+ QString twitter, QString title, int site,
+ int department, int floor);
+ int getLastInsertRowId();
+ bool createTable(QString sqlStmt);
+
+};
+
+#endif // DBTOOLS_H