# HG changeset patch # User Sebastian Brannstrom # Date 1281553409 -3600 # Node ID 2e833c2a6782f18d4eed776c5bfbf0b48ffd63f1 # Parent 51fcdd1558d8b0a973b2e6963ad37cce2b497aab Added csv file to sis exports; improved csv file location in main.cpp diff -r 51fcdd1558d8 -r 2e833c2a6782 contactengine/.make.cache --- 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 : diff -r 51fcdd1558d8 -r 2e833c2a6782 contactengine/contactengine.pro --- 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 += diff -r 51fcdd1558d8 -r 2e833c2a6782 contactengine/contactengine.pro.user --- 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 @@ ProjectExplorer.Project.ActiveTarget - 1 + 3 ProjectExplorer.Project.EditorSettings @@ -316,8 +316,114 @@ + ProjectExplorer.Project.Target.3 + + Symbian Device + Qt4ProjectManager.Target.S60DeviceTarget + 0 + 0 + + + qmake + QtProjectManager.QMakeBuildStep + + + + Make + Qt4ProjectManager.MakeStep + false + + + + + Create SIS Package + Qt4ProjectManager.S60SignBuildStep + false + + + + + 0 + + 3 + + Make + Qt4ProjectManager.MakeStep + true + + clean + + + + 1 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + C:/workspace/QtExamples/contactengine + 2 + 6 + false + + + + qmake + QtProjectManager.QMakeBuildStep + + + + Make + Qt4ProjectManager.MakeStep + false + + + + + Create SIS Package + Qt4ProjectManager.S60SignBuildStep + false + + + + + 0 + + 3 + + Make + Qt4ProjectManager.MakeStep + true + + clean + + + + 1 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + C:/workspace/QtExamples/contactengine + 2 + 6 + false + + 2 + + contactengine on Symbian Device + Qt4ProjectManager.S60DeviceRunConfiguration + + contactengine.pro + COM3 + + 1 + + + ProjectExplorer.Project.TargetCount - 3 + 4 ProjectExplorer.Project.Updater.FileVersion diff -r 51fcdd1558d8 -r 2e833c2a6782 contactengine/dbtools.cpp --- 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; diff -r 51fcdd1558d8 -r 2e833c2a6782 contactengine/main.cpp --- 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 +#include +#include #include "mainwindow.h" #include "dbtools.h" +#include 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();