projects
/
qtmeetings
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
bf549ce
)
First commit to dev_local, trying to merge with master..
author
Zoltan Papp
<zoltan.papp@ixonos.com>
Tue, 26 May 2009 11:05:42 +0000
(14:05 +0300)
committer
Zoltan Papp
<zoltan.papp@ixonos.com>
Tue, 26 May 2009 11:05:42 +0000
(14:05 +0300)
src/BusinessLogic/Engine.cpp
patch
|
blob
|
history
src/BusinessLogic/Engine.h
patch
|
blob
|
history
src/UserInterface/WindowManager.cpp
patch
|
blob
|
history
src/UserInterface/WindowManager.h
patch
|
blob
|
history
diff --git
a/src/BusinessLogic/Engine.cpp
b/src/BusinessLogic/Engine.cpp
index
bbee693
..
19f8250
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 )
{
@@
-233,6
+234,12
@@
bool Engine::isMeetingInList( const QList<Meeting*> &aList, const Meeting *aMeet
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++ )
{
@@
-269,6
+276,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 );
}
@@
-277,7
+289,15
@@
void Engine::errorHandler( int aCode, const QString &aAddInfo )
qDebug() << "Engine::ErrorHandler, aCode: " << aCode;
// inform UI about the problem
if( aCode >= 100 && aCode <= 150 )
qDebug() << "Engine::ErrorHandler, aCode: " << aCode;
// inform UI about the problem
if( aCode >= 100 && aCode <= 150 )
+ {
qDebug() << "CommunicationManager signaled an error:" << aCode;
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 ) );
}
diff --git
a/src/BusinessLogic/Engine.h
b/src/BusinessLogic/Engine.h
index
461b437
..
ef489f1
100644
(file)
--- a/
src/BusinessLogic/Engine.h
+++ b/
src/BusinessLogic/Engine.h
@@
-180,6
+180,8
@@
private:
QTimer *iAutoRefresh;
QList<Meeting*> iMeetings;
QTimer *iAutoRefresh;
QList<Meeting*> iMeetings;
+
+ bool iCommunicationFailed;
};
#endif /*ENGINE_H_*/
};
#endif /*ENGINE_H_*/
diff --git
a/src/UserInterface/WindowManager.cpp
b/src/UserInterface/WindowManager.cpp
index
535434b
..
ff5c8fd
100644
(file)
--- a/
src/UserInterface/WindowManager.cpp
+++ b/
src/UserInterface/WindowManager.cpp
@@
-212,3
+212,16
@@
void WindowManager::updateProgressBar( const QString &aMessage )
if( iProgressBar != 0 )
iProgressBar->update( aMessage );
}
if( iProgressBar != 0 )
iProgressBar->update( aMessage );
}
+
+void WindowManager::connectionLost()
+{
+ //TODO: Inform all views
+ qDebug() << "WindowManager::connectionLost()";
+}
+
+void WindowManager::connectionEstablished()
+{
+ //TODO: Inform all views
+ qDebug() << "WindowManager::connectionEstablished()";
+}
+
diff --git
a/src/UserInterface/WindowManager.h
b/src/UserInterface/WindowManager.h
index
f284192
..
b62517e
100644
(file)
--- a/
src/UserInterface/WindowManager.h
+++ b/
src/UserInterface/WindowManager.h
@@
-99,6
+99,12
@@
public:
void insertMeeting( Meeting *aMeeting );
void deleteMeeting( Meeting *aMeeting );
void insertMeeting( Meeting *aMeeting );
void deleteMeeting( Meeting *aMeeting );
+
+ //! Shows any view specific indicators for connection error
+ void connectionLost();
+
+ //! Removes any view specific indicators for connection error
+ void connectionEstablished();
signals:
//! Request current status of the room.
signals:
//! Request current status of the room.