code warnings cleaned
[qtmeetings] / src / BusinessLogic / UIManager.cpp
index eb80616..089eb9c 100644 (file)
@@ -37,8 +37,9 @@ UIManager::UIManager( Engine *aEngine, WindowManager *aWindowManager ) :
        if ( iEngine == 0 ) return;
        if ( iWindowManager == 0 ) return;
        
+       connect(iWindowManager, SIGNAL(showSettingsClicked()), this, SLOT(settingsViewRequest()));
+
        createWeeklyView();
-       createSettingsView();
        createRoomStatusIndicator();
        createPasswordDialog();
        createProgressBar();
@@ -134,12 +135,11 @@ void UIManager::connectCommunicationManager( CommunicationManager *aCommunicatio
 //             UIMANAGER SLOTS
 void UIManager::settingsViewRequest()
 {
+       createSettingsView();
+
        // Show the settings view and stop the idle timer
-       if ( iSettingsView != 0 )
-       {
-               iWindowManager->showView( static_cast<ViewBase *>( iSettingsView ) );
-               iEngine->stopIdleTimeCounter();
-       }
+       iWindowManager->showView( static_cast<ViewBase *>( iSettingsView ) );
+       iEngine->stopIdleTimeCounter();
 }
 
 void UIManager::settingsOkClicked()
@@ -148,7 +148,9 @@ void UIManager::settingsOkClicked()
        if ( iWeeklyView != 0 )
        {
                iWindowManager->showView( static_cast<ViewBase *>( iWeeklyView ) );
+               QT_DELETE(iSettingsView);
                iEngine->startIdleTimeCounter();
+               currentRoomChanged(iWeeklyView->currentRoom());
        }
 }
 
@@ -161,7 +163,7 @@ void UIManager::meetingsFetched( const QList<Meeting*> &aMeetings )
        }
 }
 
-void UIManager::showMeetingProgressBar( Meeting *aMeeting )
+void UIManager::showMeetingProgressBar( Meeting */*aMeeting*/ )
 {
        if ( iProgressBar != 0 )
        {
@@ -227,7 +229,6 @@ void UIManager::connectionLost()
 {
        qDebug() << "UIManager::connectionLost()";
        iWeeklyView->connectionLost();
-       iSettingsView->connectionLost();
        iRoomStatusIndicator->connectionLost();
 }
 
@@ -235,7 +236,6 @@ void UIManager::connectionEstablished()
 {
        qDebug() << "UIManager::connectionEstablished()";
        iWeeklyView->connectionEstablished();
-       iSettingsView->connectionEstablished();
        iRoomStatusIndicator->connectionEstablished();
 }
 
@@ -313,6 +313,7 @@ void UIManager::settingsCancelClicked()
        if ( iWeeklyView != 0 )
        {
                iWindowManager->showView( static_cast<ViewBase *>( iWeeklyView ) );
+               QT_DELETE(iSettingsView);
                iEngine->startIdleTimeCounter();
        }
-}
\ No newline at end of file
+}