From bf15c3977c27536e47578e8b0ecaedb852c5ff52 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Wed, 24 Jan 2018 11:25:46 +0100 Subject: Fixed initial account login. Because we ended up trying to load the resources before they even existed (directly after the account was created), we ended up creating a second set of unconfigured resources. Storing the password by modifying the resource was an artifact of the past anyways, and a login function results in a cleaner system and fixes the problem at hand. --- accounts/gmail/gmailsettings.cpp | 1 - accounts/imap/imapsettings.cpp | 1 - accounts/imap/qml/Login.qml | 5 +---- accounts/kolabnow/kolabnowsettings.cpp | 2 -- accounts/kolabnow/qml/Login.qml | 4 +--- 5 files changed, 2 insertions(+), 11 deletions(-) (limited to 'accounts') diff --git a/accounts/gmail/gmailsettings.cpp b/accounts/gmail/gmailsettings.cpp index 681ee1d4..ab050661 100644 --- a/accounts/gmail/gmailsettings.cpp +++ b/accounts/gmail/gmailsettings.cpp @@ -38,7 +38,6 @@ void GmailSettings::save() mSmtpServer = "smtps://smtp.gmail.com:465"; mSmtpUsername = mEmailAddress; - mSmtpPassword = mImapPassword; saveAccount(); saveImapResource(); diff --git a/accounts/imap/imapsettings.cpp b/accounts/imap/imapsettings.cpp index a9749878..1f338e83 100644 --- a/accounts/imap/imapsettings.cpp +++ b/accounts/imap/imapsettings.cpp @@ -33,7 +33,6 @@ void ImapSettings::load() void ImapSettings::save() { - mSmtpPassword = mImapPassword; saveAccount(); saveImapResource(); saveMailtransportResource(); diff --git a/accounts/imap/qml/Login.qml b/accounts/imap/qml/Login.qml index 14e13e89..c9304b0e 100644 --- a/accounts/imap/qml/Login.qml +++ b/accounts/imap/qml/Login.qml @@ -33,7 +33,7 @@ Item { } function login(){ - settings.save() + settings.login({accountSecret: pwField.text}) } GridLayout { @@ -53,10 +53,7 @@ Item { id: pwField Layout.fillWidth: true focus: true - placeholderText: qsTr("Password of your IMAP account") - text: settings.imapPassword - onTextChanged: settings.imapPassword = text } } } diff --git a/accounts/kolabnow/kolabnowsettings.cpp b/accounts/kolabnow/kolabnowsettings.cpp index fe4c8c48..03c59ede 100644 --- a/accounts/kolabnow/kolabnowsettings.cpp +++ b/accounts/kolabnow/kolabnowsettings.cpp @@ -39,11 +39,9 @@ void KolabnowSettings::save() mSmtpServer = "smtps://smtp.kolabnow.com:587"; mSmtpUsername = mEmailAddress; - mSmtpPassword = mImapPassword; mCardDavServer = "https://apps.kolabnow.com/addressbooks/" + mEmailAddress; mCardDavUsername = mEmailAddress; - mCardDavPassword = mImapPassword; saveAccount(); saveImapResource(); diff --git a/accounts/kolabnow/qml/Login.qml b/accounts/kolabnow/qml/Login.qml index e416b089..856f8ba4 100644 --- a/accounts/kolabnow/qml/Login.qml +++ b/accounts/kolabnow/qml/Login.qml @@ -33,7 +33,7 @@ Item { } function login(){ - settings.save() + settings.login({accountSecret: pwField.text}) } GridLayout { @@ -55,8 +55,6 @@ Item { focus: true placeholderText: qsTr("Password of your Kolab Now account") - text: settings.imapPassword - onTextChanged: settings.imapPassword = text } } } -- cgit v1.2.3