[geary/wip/713006-better-error-reporting: 2/6] Make account-related implementation debugging ids a bit more consistent.
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/wip/713006-better-error-reporting: 2/6] Make account-related implementation debugging ids a bit more consistent.
- Date: Sun, 12 Nov 2017 11:23:41 +0000 (UTC)
commit 403a99f768388d202ffbc536ce43b2c81a797c20
Author: Michael James Gratton <mike vee net>
Date: Thu Nov 9 17:32:33 2017 +1100
Make account-related implementation debugging ids a bit more consistent.
src/engine/api/geary-folder.vala | 5 ++---
src/engine/imap-db/imap-db-account.vala | 7 +++----
src/engine/imap/api/imap-account.vala | 2 +-
3 files changed, 6 insertions(+), 8 deletions(-)
---
diff --git a/src/engine/api/geary-folder.vala b/src/engine/api/geary-folder.vala
index 63772d0..2fd549d 100644
--- a/src/engine/api/geary-folder.vala
+++ b/src/engine/api/geary-folder.vala
@@ -552,12 +552,11 @@ public abstract class Geary.Folder : BaseObject {
*/
public abstract async Geary.Email fetch_email_async(Geary.EmailIdentifier email_id,
Geary.Email.Field required_fields, ListFlags flags, Cancellable? cancellable = null) throws Error;
-
+
/**
* Used for debugging. Should not be used for user-visible labels.
*/
public virtual string to_string() {
- return "%s:%s".printf(account.to_string(), path.to_string());
+ return "%s:%s".printf(this.account.information.id, this.path.to_string());
}
}
-
diff --git a/src/engine/imap-db/imap-db-account.vala b/src/engine/imap-db/imap-db-account.vala
index 870f63a..6870dfa 100644
--- a/src/engine/imap-db/imap-db-account.vala
+++ b/src/engine/imap-db/imap-db-account.vala
@@ -233,11 +233,10 @@ private class Geary.ImapDB.Account : BaseObject {
public Account(Geary.AccountInformation account_information) {
this.account_information = account_information;
- contact_store = new ImapEngine.ContactStore(this);
-
- name = "IMAP database account for %s".printf(account_information.imap_credentials.user);
+ this.contact_store = new ImapEngine.ContactStore(this);
+ this.name = account_information.id + ":db";
}
-
+
private void check_open() throws Error {
if (db == null)
throw new EngineError.OPEN_REQUIRED("Database not open");
diff --git a/src/engine/imap/api/imap-account.vala b/src/engine/imap/api/imap-account.vala
index da8a066..fec5610 100644
--- a/src/engine/imap/api/imap-account.vala
+++ b/src/engine/imap/api/imap-account.vala
@@ -55,9 +55,9 @@ private class Geary.Imap.Account : BaseObject {
public signal void login_failed(Geary.Credentials? cred, StatusResponse? response);
public Account(Geary.AccountInformation account_information) {
- name = "IMAP Account for %s".printf(account_information.imap_credentials.to_string());
this.account_information = account_information;
this.session_mgr = new ClientSessionManager(account_information);
+ this.name = account.id + ":imap";
this.session_mgr.ready.connect(on_session_ready);
this.session_mgr.login_failed.connect(on_login_failed);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]