contactwidgethsplugin/contactwidgeths/src/commlauncherwidget.cpp
changeset 53 e6aff7b69165
parent 51 81c360d47083
child 66 554fe4dbbb59
equal deleted inserted replaced
51:81c360d47083 53:e6aff7b69165
   111     Destructor
   111     Destructor
   112 */
   112 */
   113 CommLauncherWidget::~CommLauncherWidget()
   113 CommLauncherWidget::~CommLauncherWidget()
   114 {
   114 {
   115     // Deleting request cancels all pending requests 
   115     // Deleting request cancels all pending requests 
   116     delete mRequest;
   116     if (mRequest) {
       
   117         delete mRequest;
       
   118         mRequest = NULL;
       
   119     }
       
   120 
   117 }
   121 }
   118 
   122 
   119 /*!
   123 /*!
   120     Sets the contact for the widget
   124     Sets the contact for the widget
   121 */
   125 */
   516 /*!
   520 /*!
   517     Handles call key events
   521     Handles call key events
   518 */
   522 */
   519 void CommLauncherWidget::keyPressEvent(QKeyEvent *event)
   523 void CommLauncherWidget::keyPressEvent(QKeyEvent *event)
   520 {
   524 {
       
   525 	qDebug() << "keyPressEvent event=" << event->key();
   521     if (event->key() == Qt::Key_Yes) {
   526     if (event->key() == Qt::Key_Yes) {
   522         // Call key initializes a call
   527         // Call key initializes a call
   523         makeCall();
   528         makeCall();
   524         event->accept();
   529         event->accept();
   525     } else {
   530     } else {
   526         HbPopup::keyPressEvent(event);
   531       close();
       
   532       //HbPopup::keyPressEvent(event);
   527     } 
   533     } 
   528 }
   534 }
   529 
   535 
   530 /*!
   536 /*!
   531     Counts the width for the launcher. 
   537     Counts the width for the launcher. 
   542     width = mButtonCount * buttonSize + (mButtonCount + 1) * verticalMargin;
   548     width = mButtonCount * buttonSize + (mButtonCount + 1) * verticalMargin;
   543     
   549     
   544     return width;
   550     return width;
   545 }
   551 }
   546 
   552 
       
   553