Fix command line argument handling

Review Request #128032 - Created May 28, 2016 and discarded

Information
Arno Möller
krdc
master
Reviewers
kdeutils
uwolfer
  • Use QUrl::fromUserInput() for parsing command line arguments
  • Bail out MainWindow::newConnection() if we don't have a plugin for the requested URL
  • Ignore the return value from showDialogIfNeeded(). Since we're already there, the user made quite clear that he wants to see the view, either by passing it via the command line or typing it into the new connection bar.

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.

Issues

  • 6
  • 2
  • 0
  • 8
Description From Last Updated
This cannot be done this way. Protocol support is implemented via plugins. If you hardcode it here, the whole gain ... Urs Wolfer Urs Wolfer
Please add a space after if (here and below also). Urs Wolfer Urs Wolfer
Can you please move this to a separate change? I prefer to have one change in one commit. Also, I'm ... Urs Wolfer Urs Wolfer
Strange... Have you analyzed Git history to check why this was here? Urs Wolfer Urs Wolfer
Don't you think this logic could remain here? Urs Wolfer Urs Wolfer
I prefer this also in an separate change since it is not closelry related to the first issue, right? Urs Wolfer Urs Wolfer
Arno Möller
Arno Möller
Arno Möller
Elvis Angelaccio
Arno Möller
Urs Wolfer
Arno Möller
Urs Wolfer
Urs Wolfer
Arno Möller
Review request changed

Status: Discarded

Loading...