Separate the credential dialog from their fetch #3350
authorJocelyn Turcotte <jturcotte@woboq.com>
Sat, 5 Sep 2015 13:39:22 +0000 (15:39 +0200)
committerJocelyn Turcotte <jturcotte@woboq.com>
Sat, 5 Sep 2015 14:00:45 +0000 (16:00 +0200)
commit6d027ebd40c85f5732eba74583a9eace08842524
tree37d3953dde05a8a9ed00d8a13b5886b20ef78195
parent89f69209dde7b5f859073cc9f7401aae2a847b07
Separate the credential dialog from their fetch #3350

This moves the responsibility of asking the user or not for
credentials from the Credentials classes back to the AccountState.
fetch() now only extract credentials from the keychain, reports
the result to the AccountState which then decides if askFromUser()
should be called or not. The result is once more reported to the
AccounState.

This also replaces the HttpCredentials::queryPassword virtual
which now lets HttpCredentialsGui and HttpCredentialsText do it
the way that they prefer.
17 files changed:
src/cmd/cmd.cpp
src/gui/accountstate.cpp
src/gui/accountstate.h
src/gui/application.cpp
src/gui/creds/httpcredentialsgui.cpp
src/gui/creds/httpcredentialsgui.h
src/gui/creds/shibbolethcredentials.cpp
src/gui/creds/shibbolethcredentials.h
src/libsync/account.cpp
src/libsync/account.h
src/libsync/connectionvalidator.cpp
src/libsync/connectionvalidator.h
src/libsync/creds/abstractcredentials.h
src/libsync/creds/dummycredentials.cpp
src/libsync/creds/dummycredentials.h
src/libsync/creds/httpcredentials.cpp
src/libsync/creds/httpcredentials.h