Merge finished
authorJan Lapinkataja <jan.lapinkataja@ixonos.com>
Wed, 27 May 2009 12:46:20 +0000 (15:46 +0300)
committerJan Lapinkataja <jan.lapinkataja@ixonos.com>
Wed, 27 May 2009 12:46:20 +0000 (15:46 +0300)
src/BusinessLogic/Engine.cpp

index 104bbdf..dc62dc3 100644 (file)
@@ -103,15 +103,11 @@ void Engine::closeApplication()
 void Engine::observedEventDetected()
 {
        qDebug() << "Engine::observedEventDetected()";
-<<<<<<< HEAD:src/BusinessLogic/Engine.cpp
-       iWindowManager->refreshMeetings( iMeetings );
-=======
        if ( !iIdleTimeCounter->isActive() )
        {
                iWindowManager->weeklyView()->showCurrentWeek();
        }
        iWindowManager->showWeeklyView();
->>>>>>> 56f763c68a2ff56d344ef150b7378ca417d08b36:src/BusinessLogic/Engine.cpp
        // prepare to restart idle counter
        if (iIdleTimeCounter->isActive() )
        {
@@ -215,7 +211,6 @@ void Engine::fetchMeetingDetails(Meeting *aMeeting)
        iCommunication->fetchMeetingDetails( *aMeeting);
 }
 
-<<<<<<< HEAD:src/BusinessLogic/Engine.cpp
 void Engine::meetingsFetched( const QList<Meeting*> &aMeetings )
 {
        qDebug() << "Engine::meetingsFetched( const QList<Meeting*> & )";
@@ -228,51 +223,6 @@ void Engine::meetingsFetched( const QList<Meeting*> &aMeetings )
        for ( int i = 0; i < aMeetings.count(); ++i ) {
                Meeting* m = new Meeting( *(aMeetings.at( i )) );
                iMeetings.append( m );
-=======
-bool Engine::isMeetingInList(const QList<Meeting*> &aList, const Meeting *aMeeting)
-{
-       qDebug()
-                       << "Engine::isMeetingInList( const QList<Meeting*> &, const Meeting * )";
-       for (int i = 0; i < aList.count(); i++)
-       {
-               if (aMeeting->equals( *(aList.at(i))) )
-               {
-                       return true;
-               }
-       }
-       return false;
-}
-
-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++)
-       {
-               // if the (i)th meeting is not in the local meeting list
-               if ( !isMeetingInList(iMeetings, aMeetings.at(i) ) )
-               {
-                       // add to the local database =)
-                       Meeting* m = new Meeting( *(aMeetings.at( i )) );
-                       iMeetings.append(m);
-                       // and signal the changes
-                       iWindowManager->insertMeeting(m);
-               }
-       }
-
-       // check if there is any meeting NOT in the list came from the server -> deleted
-       for (int i = 0; i < iMeetings.count(); i++)
-       {
-               // if the (i)th meeting is in the local but NOT in the server's meeting list
-               if ( !isMeetingInList(aMeetings, iMeetings.at(i) ) )
-               {
-                       Meeting* m = iMeetings.takeAt(i);
-                       // signal the changes
-                       iWindowManager->deleteMeeting(m);
-                       // delete the meeting from the local list
-                       delete m;
-               }
->>>>>>> 56f763c68a2ff56d344ef150b7378ca417d08b36:src/BusinessLogic/Engine.cpp
        }
 
        iWindowManager->refreshMeetings( iMeetings );
@@ -376,3 +326,4 @@ void Engine::fetchMeetingDetailsCancelled()
        iCommunication->cancelFetchMeetingDetails();
        iWindowManager->closeProgressBar();
 }
+