Merge branch 'master' of https://git.maemo.org/projects/qtmeetings
[qtmeetings] / src / UserInterface / Utils / PasswordDialog.cpp
index a31616b..064c7d3 100644 (file)
@@ -28,12 +28,9 @@ PasswordDialog::PasswordDialog( const QString &aPassword, const QString &aText,
 
        QVBoxLayout *layout = new QVBoxLayout;
 
-       if ( !aText.isNull() )
-       {
-               QLabel *text = new QLabel( aText );
-               layout->addWidget( text );
-               layout->addStretch();
-       }
+       iText = new QLabel( aText );
+       layout->addWidget( iText );
+       layout->addStretch();
 
        iPasswordEdit = new QLineEdit;
        iPasswordEdit->setEchoMode( QLineEdit::Password );
@@ -51,8 +48,8 @@ PasswordDialog::PasswordDialog( const QString &aPassword, const QString &aText,
        layout->addLayout( buttonLayout );
 
        // Connect the user action signals to corresponding slots
-       connect( buttonOK, SIGNAL( pressed() ), this, SLOT( okButtonPressed() ) );
-       connect( buttonCancel, SIGNAL( pressed() ), this, SLOT( cancelButtonPressed() ) );
+       connect( buttonOK, SIGNAL( released() ), this, SLOT( okButtonPressed() ) );
+       connect( buttonCancel, SIGNAL( released() ), this, SLOT( cancelButtonPressed() ) );
 
        // Enable the layout
        setLayout( layout );
@@ -95,3 +92,8 @@ void PasswordDialog::cancelButtonPressed()
        emit passwordEntered( PasswordDialog::Canceled );
 }
 
+void PasswordDialog::update( const QString &aText )
+{
+       qDebug() << "PasswordDialog::update()";
+       iText->setText( aText );
+}