projects
/
qtmeetings
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' into dev_local
[qtmeetings]
/
src
/
BusinessLogic
/
Engine.cpp
diff --git
a/src/BusinessLogic/Engine.cpp
b/src/BusinessLogic/Engine.cpp
index
3f4597a
..
af3e342
100644
(file)
--- a/
src/BusinessLogic/Engine.cpp
+++ b/
src/BusinessLogic/Engine.cpp
@@
-22,6
+22,7
@@
Engine::Engine() :
iClock( 0), iConfiguration(Configuration::instance() ), iCommunication( 0)
{
qDebug() << "Engine::Engine()";
iClock( 0), iConfiguration(Configuration::instance() ), iCommunication( 0)
{
qDebug() << "Engine::Engine()";
+ iCommunicationFailed = false;
// if reading of configuration fails, signal that initialization failed
if (iConfiguration == 0)
{
// if reading of configuration fails, signal that initialization failed
if (iConfiguration == 0)
{
@@
-228,6
+229,12
@@
bool Engine::isMeetingInList(const QList<Meeting*> &aList, const Meeting *aMeeti
void Engine::meetingsFetched(const QList<Meeting*> &aMeetings)
{
qDebug() << "Engine::meetingsFetched( const QList<Meeting*> & )";
void Engine::meetingsFetched(const QList<Meeting*> &aMeetings)
{
qDebug() << "Engine::meetingsFetched( const QList<Meeting*> & )";
+ if( iCommunicationFailed )
+ {
+ iCommunicationFailed = false;
+ //iWindowManager->connectionEstablished();
+ }
+
// check if there is any new meeting in the list came from the server -> added
for (int i = 0; i < aMeetings.count(); i++)
{
// check if there is any new meeting in the list came from the server -> added
for (int i = 0; i < aMeetings.count(); i++)
{
@@
-264,6
+271,11
@@
void Engine::meetingDetailsFetched(Meeting &aDetailedMeeting)
{
qDebug() << "Engine::meetingDetailsFetched( Meeting & )";
iWindowManager->closeProgressBar();
{
qDebug() << "Engine::meetingDetailsFetched( Meeting & )";
iWindowManager->closeProgressBar();
+ if( iCommunicationFailed )
+ {
+ iCommunicationFailed = false;
+ iWindowManager->connectionEstablished();
+ }
iWindowManager->showMeetingInfo( &aDetailedMeeting);
}
iWindowManager->showMeetingInfo( &aDetailedMeeting);
}
@@
-272,8
+284,16
@@
void Engine::errorHandler(int aCode, const QString &aAddInfo)
qDebug() << "Engine::ErrorHandler, aCode: " << aCode;
// inform UI about the problem
if( aCode >= 100 && aCode <= 150 ) { //communication errors
qDebug() << "Engine::ErrorHandler, aCode: " << aCode;
// inform UI about the problem
if( aCode >= 100 && aCode <= 150 ) { //communication errors
+ {
//we don't want these to close operation changing
qDebug() << "CommunicationManager signaled an error:" << aCode;
//we don't want these to close operation changing
qDebug() << "CommunicationManager signaled an error:" << aCode;
+ if( !iCommunicationFailed )
+ {
+ // Only inform window manager when first error appears
+ iCommunicationFailed = true;
+ //iWindowManager->connectionLost();
+ }
+ }
iWindowManager->closeProgressBar();
}
iWindowManager->error(ErrorMapper::codeToString(aCode, aAddInfo) );
iWindowManager->closeProgressBar();
}
iWindowManager->error(ErrorMapper::codeToString(aCode, aAddInfo) );