projects
/
qtmeetings
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
1.0.6 candidate
[qtmeetings]
/
src
/
IO
/
Communication
/
CommunicationManager.cpp
diff --git
a/src/IO/Communication/CommunicationManager.cpp
b/src/IO/Communication/CommunicationManager.cpp
index
2f340a0
..
0880920
100644
(file)
--- a/
src/IO/Communication/CommunicationManager.cpp
+++ b/
src/IO/Communication/CommunicationManager.cpp
@@
-6,14
+6,17
@@
#include <QDateTime>
#include <QDomDocument>
#include <QDebug>
#include <QDateTime>
#include <QDomDocument>
#include <QDebug>
+#include "../../Domain/Configuration/Configuration.h"
static const int ERROR_BASE=100;
static const int ERROR_BASE=100;
-CommunicationManager::CommunicationManager( const ConnectionSettings &aConnection )
+
+CommunicationManager::CommunicationManager()
{
{
- iConnectionSettings = new ConnectionSettings( aConnection );
+
iModifyingCommunication = NULL;
iModifyingCommunication = NULL;
- iFetchingCommunication = new Communication( aConnection );
+
+ iFetchingCommunication = new Communication();
if ( iFetchingCommunication )
{
if ( iFetchingCommunication )
{
@@
-28,11
+31,12
@@
CommunicationManager::CommunicationManager( const ConnectionSettings &aConnectio
SLOT( requestFinished( int, int ) )
);
}
SLOT( requestFinished( int, int ) )
);
}
+
}
CommunicationManager::~CommunicationManager()
{
}
CommunicationManager::~CommunicationManager()
{
- delete iConnectionSettings;
+ //delete iConnectionSettings;
delete iModifyingCommunication;
delete iFetchingCommunication;
while ( !iMeetings.isEmpty() )
delete iModifyingCommunication;
delete iFetchingCommunication;
while ( !iMeetings.isEmpty() )
@@
-150,6
+154,9
@@
void CommunicationManager::requestFinished( int aRequestId, int aError )
err = 10;
delete rd;
emit error( ERROR_BASE+(int)err, CommunicationManager::FetchingCommunication );
err = 10;
delete rd;
emit error( ERROR_BASE+(int)err, CommunicationManager::FetchingCommunication );
+ while ( !iMeetings.isEmpty() )
+ delete iMeetings.takeFirst();
+ emit meetingsFetched( iMeetings );
return;
}
return;
}
@@
-164,9
+171,17
@@
void CommunicationManager::requestFinished( int aRequestId, int aError )
int err = msg.getMeetingsFromResponse( iMeetings, *(rd->room) );
if( err )
int err = msg.getMeetingsFromResponse( iMeetings, *(rd->room) );
if( err )
+ {
emit error( ERROR_BASE+8, CommunicationManager::FetchingCommunication );
emit error( ERROR_BASE+8, CommunicationManager::FetchingCommunication );
+ while ( !iMeetings.isEmpty() )
+ delete iMeetings.takeFirst();
+ emit meetingsFetched( iMeetings );
+ }
else
else
+ {
+ qDebug("*** COMMUNICATIONMANAGER ::: Meetings fetched!");
emit meetingsFetched( iMeetings );
emit meetingsFetched( iMeetings );
+ }
break;
}
case ConvertId:
break;
}
case ConvertId:
@@
-185,7
+200,13
@@
void CommunicationManager::requestFinished( int aRequestId, int aError )
ResMsgGetCalendarItem msg( *response );
int err = msg.getMeetingDetailsFromResponse( *(rd->meeting) );
if( err )
ResMsgGetCalendarItem msg( *response );
int err = msg.getMeetingDetailsFromResponse( *(rd->meeting) );
if( err )
+ {
emit error( ERROR_BASE+9, CommunicationManager::FetchingCommunication );
emit error( ERROR_BASE+9, CommunicationManager::FetchingCommunication );
+ while ( !iMeetings.isEmpty() )
+ delete iMeetings.takeFirst();
+ emit meetingsFetched( iMeetings );
+ }
+
else
emit meetingDetailsFetched( *(rd->meeting) );
break;
else
emit meetingDetailsFetched( *(rd->meeting) );
break;
@@
-235,3
+256,4
@@
const CommunicationManager::RequestData* CommunicationManager::findRequest( Requ
}
return NULL;
}
}
return NULL;
}
+