summaryrefslogtreecommitdiffabout
path: root/qtcompat/qinputdialog.cpp
Unidiff
Diffstat (limited to 'qtcompat/qinputdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--qtcompat/qinputdialog.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/qtcompat/qinputdialog.cpp b/qtcompat/qinputdialog.cpp
index 64c581e..ce46118 100644
--- a/qtcompat/qinputdialog.cpp
+++ b/qtcompat/qinputdialog.cpp
@@ -295,33 +295,33 @@ QString QInputDialog::getText( const QString &caption, const QString &label, con
295 295
296/*! 296/*!
297 Like above, but accepts an a \a mode which the line edit will use to display text. 297 Like above, but accepts an a \a mode which the line edit will use to display text.
298 298
299 \sa getText() 299 \sa getText()
300*/ 300*/
301 301
302QString QInputDialog::getText( const QString &caption, const QString &label, QLineEdit::EchoMode mode, 302QString QInputDialog::getText( const QString &caption, const QString &label, QLineEdit::EchoMode mode,
303 const QString &text, bool *ok, QWidget *parent, const char *name ) 303 const QString &text, bool *ok, QWidget *parent, const char *name )
304{ 304{
305 QInputDialog *dlg = new QInputDialog( label, parent, name, TRUE, LineEdit ); 305 QInputDialog *dlg = new QInputDialog( label, parent, name, TRUE, LineEdit );
306 dlg->setCaption( caption ); 306 dlg->setCaption( caption );
307 dlg->lineEdit()->setText( text ); 307 dlg->lineEdit()->setText( text );
308 dlg->lineEdit()->setEchoMode( mode ); 308 dlg->lineEdit()->setEchoMode( mode );
309 if ( !text.isEmpty() ) 309 if ( !text.isEmpty() )
310 dlg->lineEdit()->selectAll(); 310 dlg->lineEdit()->selectAll();
311 311 dlg->setMinimumWidth ( 230 );
312 bool ok_ = FALSE; 312 bool ok_ = FALSE;
313 QString result; 313 QString result;
314 ok_ = dlg->exec() == QDialog::Accepted; 314 ok_ = dlg->exec() == QDialog::Accepted;
315 if ( ok ) 315 if ( ok )
316 *ok = ok_; 316 *ok = ok_;
317 if ( ok_ ) 317 if ( ok_ )
318 result = dlg->lineEdit()->text(); 318 result = dlg->lineEdit()->text();
319 319
320 delete dlg; 320 delete dlg;
321 return result; 321 return result;
322} 322}
323 323
324/*! 324/*!
325 Static convenience function to get an integral input from the user. \a caption is the text 325 Static convenience function to get an integral input from the user. \a caption is the text
326 which is displayed in the title bar of the dialog. \a label is the text which 326 which is displayed in the title bar of the dialog. \a label is the text which
327 is shown to the user (it should mention to the user what he/she should input), \a num 327 is shown to the user (it should mention to the user what he/she should input), \a num