summaryrefslogtreecommitdiff
path: root/noncore/tools/opie-sh
authordwmw2 <dwmw2>2002-09-19 13:29:25 (UTC)
committer dwmw2 <dwmw2>2002-09-19 13:29:25 (UTC)
commit0f1ad29634d6bf8a0f64272d7ae8bff74707a9b8 (patch) (side-by-side diff)
treebc37fc135ad81d720d4d1e806024173bc29bccca /noncore/tools/opie-sh
parentf339a98665a80dd6d5497629c3392cf63a456917 (diff)
downloadopie-0f1ad29634d6bf8a0f64272d7ae8bff74707a9b8.zip
opie-0f1ad29634d6bf8a0f64272d7ae8bff74707a9b8.tar.gz
opie-0f1ad29634d6bf8a0f64272d7ae8bff74707a9b8.tar.bz2
Add '-p' option to opie-sh, to get user input and display '*'s
Diffstat (limited to 'noncore/tools/opie-sh') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/tools/opie-sh/inputdialog.cpp6
-rw-r--r--noncore/tools/opie-sh/opie-sh.cpp6
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
@@ -81,2 +81,7 @@ 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;
}
@@ -95,2 +100,3 @@ QString InputDialog::getString()
case 0:
+ case 3:
return ((QLineEdit *)child("line edit"))->text();
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
@@ -128,2 +128,3 @@ void printusage()
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");
@@ -189,2 +190,7 @@ int input(int wi, int h, QWidget *w, int argc, QStringList args)
+ if(args[i] == "-p")
+ {
+ type = 3;
+ }
+
if(args[i] == "-t")