Merge branch 'master' into QJson_Experiments
[buliscores] / src / src / backendkicker.cpp
index f52755d..fb7acd6 100644 (file)
@@ -9,6 +9,7 @@
 #include <QApplication>
 
 #include <qjson/qobjecthelper.h>
+#include <qjson/serializer.h>
 
 #include "backendkicker.h"
 
@@ -76,11 +77,14 @@ QVariant BackendKicker::serializableData()
     QList<QVariant>         list;
     QListIterator<Match*>   iter(m_matchlist);
     Match*                  match;
+    QJson::Serializer       serializer;
+
 
     while (iter.hasNext()) {
         match = iter.next();
 
         matchvariantmap = QJson::QObjectHelper::qobject2qvariant(match);
+        qDebug() << serializer.serialize(matchvariantmap);
         list.append(QVariant(matchvariantmap));
     }
 
@@ -236,7 +240,9 @@ bool BackendKicker::selectLeague(QString league)
     if (league == "1. Bundesliga") {
         m_URL = "http://www.kicker.de/news/fussball/bundesliga/spieltag/1-bundesliga/2010-11/spieltag.html";
     } else if (league == "2. Bundesliga") {
-        m_URL = "http://www.kicker.de/news/fussball/bundesliga/spieltag/2-bundesliga/2010-11/spieltag.html";
+        m_URL = "http://www.kicker.de/news/fussball/bundesliga/spieltag/2-bundesliga/2010-11/spieltag.html"; 
+    } else if (league == "3. Liga") {
+        m_URL = "http://www.kicker.de/news/fussball/3liga/spieltag/3-liga/2010-11/spieltag.html";
     } else if (league == "tipp3 Bundesliga") {
         m_URL = "http://www.kicker.de/news/fussball/intligen/oesterreich/tipp3-bundesliga/2010-11/spieltag.html";
     } else {
@@ -273,9 +279,9 @@ void BackendKicker::dlndFinished(QNetworkReply *reply)
 
     secstonextupdate = secsToNextGame();
     if ((secstonextupdate == -1) ||
-        (secstonextupdate > 6 * 3600)) {
+        (secstonextupdate > 8 * 3600)) {
         // all games finished for this matchday
-        secstonextupdate = 6 * 3600;
+        secstonextupdate = 8 * 3600;
     } else if (secstonextupdate < INTERVAL_FAST) {
         secstonextupdate = INTERVAL_FAST;
     }