From: Norbert Moutarde Date: Fri, 30 May 2014 06:41:12 +0000 (+0200) Subject: I don't know (fucking brain) X-Git-Url: https://git.nothing2do.fr/?a=commitdiff_plain;h=12e0fa7e08514fa6379aa17bb5bc6a168696e082;p=diary-mobile.git I don't know (fucking brain) --- diff --git a/mainwindow.cpp b/mainwindow.cpp index 556ec44..23411ee 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -686,13 +686,12 @@ void MainWindow::insertButton(const QString & keyword, const QString & label, co tmp.append(label); tmp.append(action); exec(tmp); - if(!q->first()){qDebug()<<"q-first() don't work"; - } - int count=1; + q->first(); + int count=0; QString key=keyword, id=q->value(0).toString(); while(q->next()){ count++; - key=key+" "+q->value(1).toString(); + key=q->value(1).toString()+" "+key; } if(count==0)exec(QList({conf->value(QString("addbuttons")).toString(), label, key, action})); else{exec(QList({conf->value(QString("updatebuttons")).toString(), key, label, action, id}));