Review Request 128032: Fix command line argument handling
Arno Möller
arno at disconnect.de
Sat May 28 18:15:52 UTC 2016
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/128032/
-----------------------------------------------------------
(Updated May 28, 2016, 6:15 p.m.)
Review request for KDE Utils and Urs Wolfer.
Repository: krdc
Description
-------
The first patch fixes command line URL parsing. When passing an rdp:// URL, krdc tries to "fix" it, because it thinks that the URL is unusable, turning it in a vnc:// URL.
Fix the fix by explicitly checking for supported schemes, e.g. vnc://, rdp:// and nx:// (are there more?)
The second patch prevents the newly opened RdpView from being closed after app.exec(). app.exec() calls MainWindow::saveHostPrefs(), which closes the just created view. I have no idea why that is necessary. Removing the call to view->startQuitting() survived all tests.
Also, I don't understand why we need to destroy the view in MainWindow::newConnection() if the user chose *not* to see the preferences for the host. Just show the dialog, or not...
Diffs
-----
main.cpp 73093f373be3047630cc4b5668be7d2a7f5cdb71
mainwindow.cpp dd1d8a059a36ea1d63ca6f55aeb463de12980119
Diff: https://git.reviewboard.kde.org/r/128032/diff/
Testing
-------
Invoke:
$ krdc rdp://<your.favorite.rdp.host>
Without the 1. patch krdc converts the URL to vnc:// as seen in the windowTitle.
With the 1. patch, but without the 2., the RDP connection is opened, but the view is closed instantly by MainWindow::saveHostPrefs(), leaving the user with a new connection tab.
With both patches krdc works as expected.
Thanks,
Arno Möller
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-utils-devel/attachments/20160528/e32888ed/attachment.html>
More information about the Kde-utils-devel
mailing list