Merged and got it partly working
[qtmeetings] / src / BusinessLogic / Engine.cpp
index 566b885..1a79851 100644 (file)
@@ -178,7 +178,7 @@ void Engine::fetchMeetings()
        fetchMeetings(iClock->datetime(), iClock->datetime().addDays( 7), room);
 }
 
-bool Engine::isMeetingInList( const QList<Meeting*> &aList, const Meeting *aMeeting )
+bool Engine::isMeetingInList(const QList<Meeting*> &aList, const Meeting *aMeeting)
 {
        qDebug()
                        << "Engine::isMeetingInList( const QList<Meeting*> &, const Meeting * )";
@@ -195,6 +195,7 @@ bool Engine::isMeetingInList( const QList<Meeting*> &aList, const Meeting *aMeet
 void Engine::meetingsFetched(const QList<Meeting*> &aMeetings)
 {
        qDebug() << "Engine::meetingsFetched( const QList<Meeting*> & )";
+       
        // check if there is any new meeting in the list came from the server -> added
        for (int i = 0; i < aMeetings.count(); i++)
        {
@@ -204,7 +205,6 @@ void Engine::meetingsFetched(const QList<Meeting*> &aMeetings)
                        // add to the local database =)
                        Meeting* m = new Meeting( *(aMeetings.at( i )) );
                        iMeetings.append(m);
-                       // and signal the changes
                }
        }
 
@@ -215,7 +215,6 @@ void Engine::meetingsFetched(const QList<Meeting*> &aMeetings)
                if ( !isMeetingInList(aMeetings, iMeetings.at(i) ) )
                {
                        Meeting* m = iMeetings.takeAt(i);
-                       // signal the changes
                        // delete the meeting from the local list
                        delete m;
                }