diff -r 0f0f3f26f787 -r 383b67fbdb11 ui/commandhandlers/commoncommandhandlers/src/glxcommondialogs.cpp --- a/ui/commandhandlers/commoncommandhandlers/src/glxcommondialogs.cpp Fri Aug 06 20:44:25 2010 +0530 +++ b/ui/commandhandlers/commoncommandhandlers/src/glxcommondialogs.cpp Mon Aug 23 18:06:16 2010 +0530 @@ -20,10 +20,11 @@ #include #include -GlxTextInputDialog::GlxTextInputDialog() +GlxTextInputDialog::GlxTextInputDialog(bool disableOkForEmptyText) : mDialog ( NULL ), mEventLoop ( 0 ), - mResult ( false ) + mResult ( false ), + mDisableOkForEmptyText(disableOkForEmptyText) { } @@ -41,9 +42,10 @@ mDialog->setPromptText(label); mDialog->setInputMode(HbInputDialog::TextInput); mDialog->setValue(text); - connect(mDialog->lineEdit(0), SIGNAL( textChanged (const QString &) ), - this, SLOT( textChanged (const QString &))); - + if(mDisableOkForEmptyText){ + connect(mDialog->lineEdit(0), SIGNAL( textChanged (const QString &) ), + this, SLOT( textChanged (const QString &))); + } mDialog->open( this, SLOT( dialogClosed( HbAction* ) ) ); eventLoop.exec( ); mEventLoop = 0 ; @@ -55,9 +57,10 @@ if ( mResult ) { retText = mDialog->value().toString().trimmed(); } - - disconnect(mDialog->lineEdit(0), SIGNAL( textChanged (const QString &) ), - this, SLOT( textChanged (const QString &))); + if(mDisableOkForEmptyText){ + disconnect(mDialog->lineEdit(0), SIGNAL( textChanged (const QString &) ), + this, SLOT( textChanged (const QString &))); + } delete mDialog; mDialog = NULL; return retText;