[geary/wip/778276-better-flag-updates: 2/25] Fix some engine build warnings.
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/wip/778276-better-flag-updates: 2/25] Fix some engine build warnings.
- Date: Mon, 18 Dec 2017 22:42:27 +0000 (UTC)
commit d40ad83b6c934d3bd9387f8eed9cf90e68435021
Author: Michael James Gratton <mike vee net>
Date: Sat Dec 2 00:55:33 2017 +1100
Fix some engine build warnings.
* src/engine/imap/command/imap-create-command.vala: Enums can't be null?
* src/engine/rfc822/rfc822-message.vala: Gee.Map has deprecated contains?!
src/engine/imap/command/imap-create-command.vala | 9 +++++++--
src/engine/rfc822/rfc822-message.vala | 2 +-
2 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/src/engine/imap/command/imap-create-command.vala
b/src/engine/imap/command/imap-create-command.vala
index 5da3d1e..f09d8bc 100644
--- a/src/engine/imap/command/imap-create-command.vala
+++ b/src/engine/imap/command/imap-create-command.vala
@@ -15,7 +15,10 @@ public class Geary.Imap.CreateCommand : Command {
public const string USE = "use";
public MailboxSpecifier mailbox { get; private set; }
- public Geary.SpecialFolderType? use { get; private set; default = null; }
+
+ public Geary.SpecialFolderType use {
+ get; private set; default = Geary.SpecialFolderType.NONE;
+ }
private static MailboxAttribute? get_special_folder_type(Geary.SpecialFolderType type) {
@@ -52,8 +55,10 @@ public class Geary.Imap.CreateCommand : Command {
add(mailbox.to_parameter());
}
- public CreateCommand.special_use(MailboxSpecifier mailbox, Geary.SpecialFolderType use) {
+ public CreateCommand.special_use(MailboxSpecifier mailbox,
+ Geary.SpecialFolderType use) {
this(mailbox);
+ this.use = use;
MailboxAttribute? attr = get_special_folder_type(use);
if (attr != null) {
diff --git a/src/engine/rfc822/rfc822-message.vala b/src/engine/rfc822/rfc822-message.vala
index a2e2868..267203a 100644
--- a/src/engine/rfc822/rfc822-message.vala
+++ b/src/engine/rfc822/rfc822-message.vala
@@ -211,7 +211,7 @@ public class Geary.RFC822.Message : BaseObject {
string cid = "";
do {
cid = CID_TEMPLATE.printf(cid_index++);
- } while (cid in email.cid_files);
+ } while (email.cid_files.has_key(cid));
if (email.replace_inline_img_src(name,
CID_URL_PREFIX + cid)) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]