Avoid inconsistent passworddialog
ClosedPublic

Authored by cryptodude on Nov 13 2017, 2:40 PM.

Details

Summary

In case the user starts the KPasswordDialog without the KPasswordDialog::ShowUsernameLine,
the dialog will look a bit odd as the text will still state;
"Supply a username and password below."
while there is no username field to fill in.

This patch adds a string and sets it in the constructor on the "prompt" to match the flags passed into the constructor.

Test Plan

Diff Detail

Repository
R236 KWidgetsAddons
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
cryptodude created this revision.Nov 13 2017, 2:40 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptNov 13 2017, 2:40 PM
Restricted Application added a subscriber: Frameworks. · View Herald Transcript

Thanks for the patch! For UI changes, a before-and-after screenshot pair is always nice. Also, have you tested that the default username-and-password combo still works?

The changes are pretty simple, but testing it would require a lot of work as it requires a full up-to-date KDE development system and I just don't have that option.

So I can't give you a screenshot, as the "test plan" indicates, I visually can't test it.

The whole point of KDE Frameworks is that you don't need a "full up-to-date KDE development system".

You can just install distro packages for Qt5 devel, and ECM, and then compile and test kwidgetaddons from git without even having to install it, using a unittest and/or a test program.
I worked on making this possible, so if something doesn't work, let me know ;-)

(depending on your distro, you might have to lower the required version of ECM in CMakeLists.txt, but that is usually fine)

so if something doesn't work, let me know ;-)

It took me quite some figuring out how this works. Thanks for stating it really should work. The only way that I managed to get it to work is load the project in QtCreator and select the 'debug' build there. I'm guessing it needs some tricky cmake flags and library flags (from konsole it always uses the distro library).

cryptodude edited the test plan for this revision. (Show Details)Nov 20 2017, 12:36 PM
ngraham accepted this revision.Nov 20 2017, 2:17 PM
This revision is now accepted and ready to land.Nov 20 2017, 2:17 PM

@dfaure, does this look sane and sensible to you?

dfaure accepted this revision.Nov 22 2017, 8:12 AM

Sure.

This revision was automatically updated to reflect the committed changes.