emit the parsingScheduleBegin() signal earlier, so we get the progressbar a bit earli...
[toast/confclerk.git] / src / sql / schedulexmlparser.cpp
index 23151a058607941b6d96a86afe64b81a7650d8bb..cd515c667cb135475153da5591554bfe821cfcd2 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
 /*
  * Copyright (C) 2010 Ixonos Plc.
+ * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
  *
  * This file is part of ConfClerk.
  *
  *
  * This file is part of ConfClerk.
  *
@@ -51,6 +52,7 @@ void ScheduleXmlParser::parseData(const QByteArray &aData, const QString& url)
         QDomElement conferenceElement = scheduleElement.firstChildElement("conference");
         if (!conferenceElement.isNull())
         {
         QDomElement conferenceElement = scheduleElement.firstChildElement("conference");
         if (!conferenceElement.isNull())
         {
+            emit(parsingScheduleBegin());
             QHash<QString,QString> conference;
             conference["id"] = QString::number(0); // conference ID is assigned automatically, or obtained from the DB
             conference["title"] = conferenceElement.firstChildElement("title").text();
             QHash<QString,QString> conference;
             conference["id"] = QString::number(0); // conference ID is assigned automatically, or obtained from the DB
             conference["title"] = conferenceElement.firstChildElement("title").text();
@@ -66,7 +68,6 @@ void ScheduleXmlParser::parseData(const QByteArray &aData, const QString& url)
             SqlEngine::addConferenceToDB(conference);
             confId = conference["id"].toInt();
             conference_title = conference["title"];
             SqlEngine::addConferenceToDB(conference);
             confId = conference["id"].toInt();
             conference_title = conference["title"];
-            emit(parsingScheduleBegin());
         }
 
         // we need to get count of all events in order to emit 'progressStatus' signal
         }
 
         // we need to get count of all events in order to emit 'progressStatus' signal
@@ -102,7 +103,6 @@ void ScheduleXmlParser::parseData(const QByteArray &aData, const QString& url)
                         room["name"] = roomElement.attribute("name");
                         room["event_id"] = eventElement.attribute("id");
                         room["conference_id"] = QString::number(confId,10);
                         room["name"] = roomElement.attribute("name");
                         room["event_id"] = eventElement.attribute("id");
                         room["conference_id"] = QString::number(confId,10);
-                        room["picture"] = ""; // TODO: implement some mapping to assign correct picture to specified room_name
                         SqlEngine::addRoomToDB(room);
 
                         // process event's nodes
                         SqlEngine::addRoomToDB(room);
 
                         // process event's nodes