]> git.nothing2do.fr Git - diary-mobile.git/commitdiff
forget
authorNorbert Moutarde <norbert.moutarde@nothing2do.eu>
Sat, 28 Dec 2013 01:53:16 +0000 (02:53 +0100)
committerNorbert Moutarde <norbert.moutarde@nothing2do.eu>
Sat, 28 Dec 2013 01:53:16 +0000 (02:53 +0100)
mainwindow.cpp
ui.sql

index 461ef16af881f66a55ebb5c3f6784dda81b50abb..aa92d04195dde9595fa6e04d3503ec945329506b 100644 (file)
@@ -316,7 +316,6 @@ void MainWindow::createDB(){
     qDebug()<<"createDB()";
     exec(QList<QString>({"create table ui(keyword text, label text, action text);"}));
     exec(QList<QString>({"create table raw(date timestamp, texte text);"}));
-    exec(QList<QString>({"insert into ui (keyword, label, action) values ('begin', 'new', 'new')"}));
 }
 void MainWindow::addButtonDB(){
     qDebug()<<"addButtonDB()";
@@ -367,7 +366,7 @@ void MainWindow::updateUi(){
     QUrl update(conf->value(QString("update")).toString());
     m = new FileDownloader(update, this);
     connect(m, SIGNAL(downloaded()), SLOT(writeUpdate()));
-
+    start();
 
 
 }
@@ -428,7 +427,6 @@ QByteArray FileDownloader::downloadedData() const
 void MainWindow::writeUpdate(){
     qDebug()<<"downloaded : "<<m->downloadedData().size()<<" byte";
     /* put newly downloaded sql file into database */
-    //int nb=m->downloadedData().count(";");
     int a=m->downloadedData().count(';');
     for(int i=0; i<a; i++){
         qDebug()<<"q->prepare("<<i<<") : "<< q->prepare(m->downloadedData().split(';').at(i));
diff --git a/ui.sql b/ui.sql
index 306ca3750d0e20955ff987866cb47c606bc90cea..088aaf732db79108352f26953409be341b0976f2 100644 (file)
--- a/ui.sql
+++ b/ui.sql
@@ -1,5 +1,6 @@
 PRAGMA foreign_keys=OFF;
 BEGIN TRANSACTION;
+INSERT INTO "ui" (keyword, label, action) VALUES('begin','new', 'new');
 INSERT INTO "ui" (keyword, label, action) VALUES('begin','fille','fille');
 INSERT INTO "ui" (keyword, label, action) VALUES('fille','aurelie','f-aurelie');
 INSERT INTO "ui" (keyword, label, action) VALUES('fill-aurelie','discours','f-a-discours');
@@ -13,7 +14,7 @@ INSERT INTO "ui" (keyword, label, action) VALUES('lie-odysseu-subway','julie','l
 INSERT INTO "ui" (keyword, label, action) VALUES('lie-odysseum','oliver''s pub','lie-odysseu-oliver');
 INSERT INTO "ui" (keyword, label, action) VALUES('lie-odysseu-oliver','valentine','l-o-opub-val');
 INSERT INTO "ui" (keyword, label, action) VALUES('lie-odysseu-opub-val','s''enerve quand je lui demande ce qu''elle veut','begin');
-INSERT INTO "ui" (keyword, label, action) VALUES('begin','olìver'' s','begi-oliver ');
+INSERT INTO "ui" (keyword, label, action) VALUES('begin','oliver'' s','begi-oliver ');
 INSERT INTO "ui" (keyword, label, action) VALUES('begi-oliver','audrey','begi-olive-audrey');
 INSERT INTO "ui" (keyword, label, action) VALUES('begi-olive-audrey','Pourquoi vous me prenez pour un perver ?','begi-olive-audre-perver');
 INSERT INTO "ui" (keyword, label, action) VALUES('begi-olive-audre-perver','"On ne te prends pas pour un perver."','begi-olive-audre-perve-non');