As mentioned in the first comment to Bug 148575, the newline escape sequence ("\n") does not work with --inputbox. The code kdialog --msgbox "foo\nbar" works as expected, but kdialog --inputbox "foo\nbar" does not. I'm using KDialog 1.0 on KDE 4.14.9. Reproducible: Always Steps to Reproduce: 1. kdialog --inputbox "foo\nbar" Actual Results: 2. Dialog appears with the following text: foo\nbar Expected Results: 2. Dialog should appear with the following text: foo bar
I can confirm this bug with Debian testing/stretch. The output from kdialog --version is: Qt: 4.8.7 KDE: 4.14.10 KDialog: 1.0
Created attachment 94746 [details] Fixes Bug 352981 The attached patch fixes this bug.
Created attachment 94749 [details] Fixes Bug 352981 Please ignore the previous patch; I mistakenly uploaded the wrong file.
Problem is still reproducible with KDialog 20.08.1.
The --password and --newpassword dialogs have the same problem. Possibly further dialogs are also affected.
Comment on attachment 94749 [details] Fixes Bug 352981 Patch is now obsolete due to API changes and refactoring/further development of kdialog.cpp.
Git commit 3a34c761a0ef28d8ae1028caae82ead2059a079b by Tristan Miller. Committed on 12/10/2020 at 13:59. Pushed by sitter into branch 'master'. make \n work with (img)inputbox and (new)password Note that \n in password prompts are converted to spaces due to bug#427141. M +6 -4 src/kdialog.cpp https://invent.kde.org/utilities/kdialog/commit/3a34c761a0ef28d8ae1028caae82ead2059a079b