Always add domain delimiter if "Domain" checkbox is selected

Authored by bruns on May 3 2018, 10:38 PM.

Description

Always add domain delimiter if "Domain" checkbox is selected

Summary:
EwsConfigDialog::fullUsername() always adds the domain delimiter when
the "Domain" checkbox is set, even if the actual domain name is empty,
while the login procedure in EwsResource::passwordRequestFinished(...)
only adds a domain delimiter if the domain is non-empty. Make sure
login in the config dialog and during normal operation is equivalent.

Not sending an (empty) domain causes login failures for some servers,
while sending it seems to be unproblematic, and can be forced off by
unselecting the checkbox.

This fixes a regression caused by commit
7c74258355cd ("EWS: Refactor server connection and password retrieval"),
which changed the check for sending the domain from mSettings->hasDomain()
to mSettings->domain().isEmpty().

BUG: 388496
CCBUG: 390798

Test Plan:
Check the login from the config-dialog, once with, once without
checking "Domain"
Try to sync the resource

Reviewers: dvratil, nowicki

Reviewed By: dvratil

Subscribers: KDE PIM

Tags: KDE PIM

Differential Revision: https://phabricator.kde.org/D12474

Details