simplify the url parsing
Summary:
all urls need to have their ports stripped and text set, so de-duplicate
the shared code out of the conditional branches to prevent bugs from
making changes in one branch but not the other
Test Plan: saving and changing proxy settings continues to work
Reviewers: dfaure, apol
Reviewed By: apol
Subscribers: kde-frameworks-devel
Tags: Frameworks
Differential Revision: https://phabricator.kde.org/D24559