X-Git-Url: http://git.maemo.org/git/?p=groove;a=blobdiff_plain;f=gscom.cpp;h=9506ed8786af504201de1f23a32de7b1802acb4c;hp=1e6d055f85614c351de193c5eec5aef780bfec6a;hb=a20498e05a0b00c41521182cf972294d9ae1269f;hpb=c1ea8a35f5d845999c3ba212f3e09e101cf7721a;ds=sidebyside diff --git a/gscom.cpp b/gscom.cpp index 1e6d055..9506ed8 100644 --- a/gscom.cpp +++ b/gscom.cpp @@ -19,7 +19,7 @@ gscom::gscom() model->setHorizontalHeaderLabels( QStringList() << "Online"); addDebugMsg("You may now search for a song"); - addProgressbar("test"); + //addProgressbar("test"); //getSessionKey(); } @@ -53,7 +53,7 @@ QStandardItemModel* gscom::getSongModel(QString song) jlist.insertMulti("header",header); QVariantMap param; param.insert("type","Songs"); - param.insert("query",song.toAscii()); + param.insert("query",song); jlist.insertMulti("parameters",param); QJson::Serializer *serializer = new QJson::Serializer(); //qDebug() << serializer->serialize(jlist); @@ -174,6 +174,8 @@ void gscom::replyFinished(QNetworkReply *reply) if(cookie.name() == "PHPSESSID") { phpSession = new QString(cookie.value()); + qDebug() << QDateTime::currentDateTime(); + qDebug() << cookie.expirationDate(); } } reply->readAll(); @@ -197,6 +199,7 @@ void gscom::replyFinished(QNetworkReply *reply) sessionKey = new QString(result["result"].toString()); qDebug() << sessionKey->toAscii(); } + qDebug() << result; currentaction = none; reply->close(); emit finishedSearch(); @@ -216,6 +219,7 @@ void gscom::replyFinished(QNetworkReply *reply) currentaction = getPHP; manager->get(QNetworkRequest(QUrl(QString("http://") + GS_LISTEN))); qDebug() << reply->readAll(); + qDebug() << result; reply->close(); return; } @@ -274,7 +278,7 @@ void gscom::addProgressbar(QString debug) gradient.setColorAt(0, QColor::fromRgbF(0, 1, 0, 1)); gradient.setColorAt(0.9, QColor::fromRgbF(0, 1, 0, 1)); gradient.setColorAt(1, QColor::fromRgbF(0, 0, 0, 0)); - QBrush brush(gradient); + QBrush brush(Qt::red); QStandardItem *pBar = new QStandardItem(text); pBar->setBackground(brush); pBar->setSelectable(false);