-rw-r--r-- | noncore/tools/opie-sh/inputdialog.cpp | 6 | ||||
-rw-r--r-- | noncore/tools/opie-sh/opie-sh.cpp | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/noncore/tools/opie-sh/inputdialog.cpp b/noncore/tools/opie-sh/inputdialog.cpp index 1c4e688..8046795 100644 --- a/noncore/tools/opie-sh/inputdialog.cpp +++ b/noncore/tools/opie-sh/inputdialog.cpp @@ -80,4 +80,9 @@ InputDialog::InputDialog(int w, int h, int newtype, QString labelString, QString } break; + case 3: + lineEdit = new QLineEdit(this, "line edit"); + lineEdit->setEchoMode(QLineEdit::Password); + layout->addWidget(lineEdit); + break; } layout->addSpacing(5); @@ -94,4 +99,5 @@ QString InputDialog::getString() { case 0: + case 3: return ((QLineEdit *)child("line edit"))->text(); break; diff --git a/noncore/tools/opie-sh/opie-sh.cpp b/noncore/tools/opie-sh/opie-sh.cpp index 96b4b93..a353d3f 100644 --- a/noncore/tools/opie-sh/opie-sh.cpp +++ b/noncore/tools/opie-sh/opie-sh.cpp @@ -127,4 +127,5 @@ void printusage() printf(" -l List input (newline separated list read in from file)\n"); printf(" -b A list box, enabling multiple selections (input same as -l)\n"); + printf(" -p Password input (display '*'s)\n"); printf(" -L [label] The label for the input field\n"); printf(" -F [filename] An input file (for when it makes sense) [Default = stdin]\n"); @@ -188,4 +189,9 @@ int input(int wi, int h, QWidget *w, int argc, QStringList args) } + if(args[i] == "-p") + { + type = 3; + } + if(args[i] == "-t") { |