--- a/contactengine/.make.cache Tue Aug 10 14:05:55 2010 -0700
+++ b/contactengine/.make.cache Wed Aug 11 20:03:29 2010 +0100
@@ -1,7 +1,7 @@
# ==============================================================================
# This file is generated by make and should not be modified by the user
# Name : .make.cache
-# Part of : contact215
+# Part of : contactengine
# Description : This file is used to cache last build target for
# make sis target.
# Version :
--- a/contactengine/contactengine.pro Tue Aug 10 14:05:55 2010 -0700
+++ b/contactengine/contactengine.pro Wed Aug 11 20:03:29 2010 +0100
@@ -27,6 +27,11 @@
CONFIG += mobility
MOBILITY = contacts
+databasefiles.sources = contacts.csv
+databasefiles.path = .
+
+DEPLOYMENT += databasefiles
+
symbian {
TARGET.UID3 = 0xec200759
# TARGET.CAPABILITY +=
--- a/contactengine/contactengine.pro.user Tue Aug 10 14:05:55 2010 -0700
+++ b/contactengine/contactengine.pro.user Wed Aug 11 20:03:29 2010 +0100
@@ -2,7 +2,7 @@
<qtcreator>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>
- <value type="int">1</value>
+ <value type="int">3</value>
</data>
<data>
<variable>ProjectExplorer.Project.EditorSettings</variable>
@@ -316,8 +316,114 @@
</valuemap>
</data>
<data>
+ <variable>ProjectExplorer.Project.Target.3</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.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>
+ <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">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">2</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.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>
+ <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">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</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">2</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">6</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">false</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 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">COM3</value>
+ </valuemap>
+ <value key="ProjectExplorer.Target.RunConfigurationCount" type="int">1</value>
+ </valuemap>
+ </data>
+ <data>
<variable>ProjectExplorer.Project.TargetCount</variable>
- <value type="int">3</value>
+ <value type="int">4</value>
</data>
<data>
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
--- a/contactengine/dbtools.cpp Tue Aug 10 14:05:55 2010 -0700
+++ b/contactengine/dbtools.cpp Wed Aug 11 20:03:29 2010 +0100
@@ -117,12 +117,9 @@
{
file.readLine(buf, sizeof(buf));
QString string(buf);
- //qDebug() << string;
+
QStringList stringList = string.split(",");
- //qDebug() << "count: " << stringList.count() << endl;
- QStringListIterator iter(stringList);
-
QString strName;
QString strMobile;
QString strDeskphone;
--- a/contactengine/main.cpp Tue Aug 10 14:05:55 2010 -0700
+++ b/contactengine/main.cpp Wed Aug 11 20:03:29 2010 +0100
@@ -1,6 +1,9 @@
#include <QtGui/QApplication>
+#include <QDesktopServices>
+#include <QDir>
#include "mainwindow.h"
#include "dbtools.h"
+#include <QDebug>
int main(int argc, char *argv[])
{
@@ -8,7 +11,18 @@
MainWindow w;
DBTools dbt;
- dbt.importCSV("c:\\contacts.csv");
+ QString dbLocation;
+
+#ifdef Q_OS_SYMBIAN
+ dbLocation = QDesktopServices::storageLocation(QDesktopServices::DataLocation);
+ dbLocation.append(QDir::separator());
+ dbLocation.append("contacts.csv");
+
+#else
+ dbLocation = "C:\\workspace\\QtExamples\\contactengine\\contacts.csv";
+#endif
+ qDebug() << "dbLocation=" << dbLocation << endl;
+ dbt.importCSV(dbLocation);
#if defined(Q_WS_S60)
w.showMaximized();