Discussion:
Review Request 130109: Workaround to fix PasswordDialog's focus
Lamarque Souza
2017-04-28 19:27:45 UTC
Permalink
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/130109/
-----------------------------------------------------------

Review request for Network Management and Jan Grulich.


Bugs: 379279
http://bugs.kde.org/show_bug.cgi?id=379279


Repository: plasma-nm


Description
-------

PasswordField does not get focus in PasswordDialog. Using PasswordField::setFocus() does not work.


Diffs
-----

kded/passworddialog.cpp 18c686f

Diff: https://git.reviewboard.kde.org/r/130109/diff/


Testing
-------


Thanks,

Lamarque Souza
Jan Grulich
2017-05-02 05:58:01 UTC
Permalink
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/130109/#review103173
-----------------------------------------------------------



It doesn't seem to work. With regular password dialog it seems that the focus is on "Cancel" button, while e.g. with vpnc password dialog the focus is on "group password" which is second editable field.

- Jan Grulich
Post by Lamarque Souza
-----------------------------------------------------------
https://git.reviewboard.kde.org/r/130109/
-----------------------------------------------------------
(Updated Dub. 28, 2017, 7:27 odp.)
Review request for Network Management and Jan Grulich.
Bugs: 379279
http://bugs.kde.org/show_bug.cgi?id=379279
Repository: plasma-nm
Description
-------
PasswordField does not get focus in PasswordDialog. Using PasswordField::setFocus() does not work.
Diffs
-----
kded/passworddialog.cpp 18c686f
Diff: https://git.reviewboard.kde.org/r/130109/diff/
Testing
-------
Thanks,
Lamarque Souza
Nick Cross
2017-05-03 08:50:45 UTC
Permalink
Post by Lamarque Souza
Post by Jan Grulich
It doesn't seem to work. With regular password dialog it seems that the focus is on "Cancel" button, while e.g. with vpnc password dialog the focus is on "group password" which is second editable field.
Assuming I installed the patch correctly ;-) this does seem to work perfectly for me ; I can now activate a OpenVPN connection that asks for password and I get the focus in the password field.


- Nick


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/130109/#review103173
-----------------------------------------------------------
Post by Lamarque Souza
-----------------------------------------------------------
https://git.reviewboard.kde.org/r/130109/
-----------------------------------------------------------
(Updated April 28, 2017, 7:27 p.m.)
Review request for Network Management and Jan Grulich.
Bugs: 379279
http://bugs.kde.org/show_bug.cgi?id=379279
Repository: plasma-nm
Description
-------
PasswordField does not get focus in PasswordDialog. Using PasswordField::setFocus() does not work.
Diffs
-----
kded/passworddialog.cpp 18c686f
Diff: https://git.reviewboard.kde.org/r/130109/diff/
Testing
-------
Thanks,
Lamarque Souza
Jan Grulich
2017-05-03 08:56:25 UTC
Permalink
Post by Nick Cross
Post by Jan Grulich
It doesn't seem to work. With regular password dialog it seems that the focus is on "Cancel" button, while e.g. with vpnc password dialog the focus is on "group password" which is second editable field.
Assuming I installed the patch correctly ;-) this does seem to work perfectly for me ; I can now activate a OpenVPN connection that asks for password and I get the focus in the password field.
It does work with OpenVPN (now verified), but doesn't work with regular wireless password dialog or other VPN dialogs.


- Jan


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/130109/#review103173
-----------------------------------------------------------
Post by Nick Cross
-----------------------------------------------------------
https://git.reviewboard.kde.org/r/130109/
-----------------------------------------------------------
(Updated Dub. 28, 2017, 7:27 odp.)
Review request for Network Management and Jan Grulich.
Bugs: 379279
http://bugs.kde.org/show_bug.cgi?id=379279
Repository: plasma-nm
Description
-------
PasswordField does not get focus in PasswordDialog. Using PasswordField::setFocus() does not work.
Diffs
-----
kded/passworddialog.cpp 18c686f
Diff: https://git.reviewboard.kde.org/r/130109/diff/
Testing
-------
Thanks,
Lamarque Souza
Anthony Fieroni
2017-05-03 10:54:42 UTC
Permalink
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/130109/#review103178
-----------------------------------------------------------




kded/passworddialog.cpp (lines 140 - 142)
<https://git.reviewboard.kde.org/r/130109/#comment68661>

When you define a focusProxy you should setFocus to main dialog i.e.
pass = new PasswordDialog(this);
pass->show();
pass->raise();
pass->setFocus();
http://doc.qt.io/qt-5/qwidget.html#setFocus


- Anthony Fieroni
Post by Lamarque Souza
-----------------------------------------------------------
https://git.reviewboard.kde.org/r/130109/
-----------------------------------------------------------
(Updated АпрОл 28, 2017, 10:27 слеЎ ПбяЎ)
Review request for Network Management and Jan Grulich.
Bugs: 379279
http://bugs.kde.org/show_bug.cgi?id=379279
Repository: plasma-nm
Description
-------
PasswordField does not get focus in PasswordDialog. Using PasswordField::setFocus() does not work.
Diffs
-----
kded/passworddialog.cpp 18c686f
Diff: https://git.reviewboard.kde.org/r/130109/diff/
Testing
-------
Thanks,
Lamarque Souza
Lamarque Souza
2017-05-03 15:55:54 UTC
Permalink
Post by Lamarque Souza
kded/passworddialog.cpp, lines 140-142
<https://git.reviewboard.kde.org/r/130109/diff/1/?file=495604#file495604line140>
When you define a focusProxy you should setFocus to main dialog i.e.
pass = new PasswordDialog(this);
pass->show();
pass->raise();
pass->setFocus();
http://doc.qt.io/qt-5/qwidget.html#setFocus
That did not work here. I have changed the implementation and it seems to work now.


- Lamarque


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/130109/#review103178
-----------------------------------------------------------
Post by Lamarque Souza
-----------------------------------------------------------
https://git.reviewboard.kde.org/r/130109/
-----------------------------------------------------------
(Updated May 3, 2017, 3:54 p.m.)
Review request for Network Management and Jan Grulich.
Bugs: 379279
http://bugs.kde.org/show_bug.cgi?id=379279
Repository: plasma-nm
Description
-------
PasswordField does not get focus in PasswordDialog. Using PasswordField::setFocus() does not work.
Diffs
-----
kded/passworddialog.cpp 18c686f
Diff: https://git.reviewboard.kde.org/r/130109/diff/
Testing
-------
Thanks,
Lamarque Souza
Lamarque Souza
2017-05-03 15:54:38 UTC
Permalink
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/130109/
-----------------------------------------------------------

(Updated May 3, 2017, 3:54 p.m.)


Review request for Network Management and Jan Grulich.


Changes
-------

Works now with wifi, openvpn and pptp. Please test with other network types, I cannot test all of them from here.


Bugs: 379279
http://bugs.kde.org/show_bug.cgi?id=379279


Repository: plasma-nm


Description
-------

PasswordField does not get focus in PasswordDialog. Using PasswordField::setFocus() does not work.


Diffs (updated)
-----

kded/passworddialog.cpp 18c686f

Diff: https://git.reviewboard.kde.org/r/130109/diff/


Testing
-------


Thanks,

Lamarque Souza
Jan Grulich
2017-05-04 06:56:29 UTC
Permalink
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/130109/#review103180
-----------------------------------------------------------


Ship it!




Seems to work, tested with wifi and some vpn dialogs.

- Jan Grulich
Post by Lamarque Souza
-----------------------------------------------------------
https://git.reviewboard.kde.org/r/130109/
-----------------------------------------------------------
(Updated Kvě. 3, 2017, 3:54 odp.)
Review request for Network Management and Jan Grulich.
Bugs: 379279
http://bugs.kde.org/show_bug.cgi?id=379279
Repository: plasma-nm
Description
-------
PasswordField does not get focus in PasswordDialog. Using PasswordField::setFocus() does not work.
Diffs
-----
kded/passworddialog.cpp 18c686f
Diff: https://git.reviewboard.kde.org/r/130109/diff/
Testing
-------
Thanks,
Lamarque Souza
Lamarque Souza
2017-05-04 12:39:43 UTC
Permalink
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/130109/
-----------------------------------------------------------

(Updated May 4, 2017, 12:39 p.m.)


Status
------

This change has been marked as submitted.


Review request for Network Management and Jan Grulich.


Changes
-------

Submitted with commit 2c6b059626dedd1ae82fb06f0d6f8737dae8e5b5 by Lamarque V. Souza to branch master.


Bugs: 379279
http://bugs.kde.org/show_bug.cgi?id=379279


Repository: plasma-nm


Description
-------

PasswordField does not get focus in PasswordDialog. Using PasswordField::setFocus() does not work.


Diffs
-----

kded/passworddialog.cpp 18c686f

Diff: https://git.reviewboard.kde.org/r/130109/diff/


Testing
-------


Thanks,

Lamarque Souza

Loading...