]> git.nothing2do.fr Git - diary-mobile.git/commitdiff
little bug correction
authorNorbert Moutarde <norbert.moutarde@nothing2do.eu>
Wed, 11 Jun 2014 13:36:41 +0000 (15:36 +0200)
committerNorbert Moutarde <norbert.moutarde@nothing2do.eu>
Wed, 11 Jun 2014 13:36:41 +0000 (15:36 +0200)
mainwindow.cpp

index 24636b0ecc86a00547f50ddbbcebb966807d35bf..c4bfd6d4f9bd3f282796889aaca66763371129dc 100644 (file)
@@ -222,7 +222,7 @@ void MainWindow::action(const QString &a){
         if(ok)action(e);
     }
     else if(b[0]==QString("sav")){
-        if(bs==2)send(c);
+        send(c);
     }
     else if(b[0]==QString("back")){
         if(way.size()>=2){
@@ -317,7 +317,7 @@ void MainWindow::action(const QString &a){
     else if(b[0]==QString("vid")){
         addMedia(c);
     }
-    else if(b[0]==QString("hist")){
+    else if(b[0]==QString("-hist")){
         flush();
         QString wi;
         lastprint=QString("hist");
@@ -895,7 +895,8 @@ void MainWindow::resizeEvent(QResizeEvent *event)
         conf->setValue(QString("maxline"), a);
         orientation=isLandscape;
         flush();
-        action("-"+lastprint);
+        if(lastprint[0]=='-')action(lastprint);
+        else action('-'+lastprint);
     }
 
  }
@@ -930,6 +931,7 @@ void MainWindow::send(const QString & a){
     tmp.close();
     qDebug()<<"a.open()="<<tmp.open(QIODevice::ReadOnly | QIODevice::Text);
     //QUrl upload(conf->value(QString("uploadRAW")).toString());
+    t=a+"file";
     QUrl upload(QString("ftp://")+conf->value(QString("userftp")).toString()+QString(":")+conf->value(QString("passftp")).toString()+QString("@")+conf->value(QString("hostftp")).toString()+QString("/")+conf->value(t).toString());
     net=new QNetworkAccessManager(this);
     //a.open(QIODevice::ReadOnly | QIODevice::Text);