From 6ae10fc66ed3c35e98e49bac8bf6670f0a9e2d6b Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Wed, 28 Nov 2018 00:04:05 +0900 Subject: Adapted to new KPasswordEdit::password() signature. This relates to bug 2961. Signed-off-by: Michele Calgaro --- kdialog/README | 6 ------ kdialog/kdialog.cpp | 4 ++-- kdialog/widgets.cpp | 2 +- kdialog/widgets.h | 2 +- 4 files changed, 4 insertions(+), 10 deletions(-) (limited to 'kdialog') diff --git a/kdialog/README b/kdialog/README index d029419c0..7841e38f8 100644 --- a/kdialog/README +++ b/kdialog/README @@ -5,10 +5,4 @@ The syntax is very much inspired from the "dialog" command However the width and height attributes have been removed for most dialogs - Qt/KDE have layouts ;) -A tutorial on using kdialog is available at -http://developer.kde.org/documentation/tutorials/kdialog/t1.html -If you change or add any functionality, please contact Brad -Hards to ensure it is reflected in the -tutorial. - Current maintainer: David Faure diff --git a/kdialog/kdialog.cpp b/kdialog/kdialog.cpp index 19dd197e6..671be7465 100644 --- a/kdialog/kdialog.cpp +++ b/kdialog/kdialog.cpp @@ -279,9 +279,9 @@ static int directCommand(TDECmdLineArgs *args) // --password text if (args->isSet("password")) { - TQCString result; + TQString result; bool retcode = Widgets::passwordBox(0, title, TQString::fromLocal8Bit(args->getOption("password")), result); - cout << result.data() << endl; + cout << result.utf8() << endl; return retcode ? 0 : 1; } diff --git a/kdialog/widgets.cpp b/kdialog/widgets.cpp index fb90bbb25..f68acfe4f 100644 --- a/kdialog/widgets.cpp +++ b/kdialog/widgets.cpp @@ -65,7 +65,7 @@ bool Widgets::inputBox(TQWidget *parent, const TQString& title, const TQString& return ok; } -bool Widgets::passwordBox(TQWidget *parent, const TQString& title, const TQString& text, TQCString &result) +bool Widgets::passwordBox(TQWidget *parent, const TQString& title, const TQString& text, TQString &result) { KPasswordDialog dlg( KPasswordDialog::Password, false, 0, parent ); diff --git a/kdialog/widgets.h b/kdialog/widgets.h index e6576d36e..0ef4242a6 100644 --- a/kdialog/widgets.h +++ b/kdialog/widgets.h @@ -27,7 +27,7 @@ namespace Widgets { bool inputBox(TQWidget *parent, const TQString& title, const TQString& text, const TQString& init, TQString &result); - bool passwordBox(TQWidget *parent, const TQString& title, const TQString& text, TQCString &result); + bool passwordBox(TQWidget *parent, const TQString& title, const TQString& text, TQString &result); int textBox(TQWidget *parent, int width, int height, const TQString& title, const TQString& file); int textInputBox(TQWidget *parent, int width, int height, const TQString& title, const TQStringList& args, TQCString &result); bool listBox(TQWidget *parent, const TQString& title, const TQString& text, const TQStringList& args, const TQString &defaultEntry, TQString &result); -- cgit v1.2.1