Commit 64e80c8f authored by Michael Gratton's avatar Michael Gratton 🤞

Merge branch 'wip/vala-abstract-ctors' into 'master'

Constructors of abstract classes should not be public

See merge request !171

(cherry picked from commit b61621f8)

e09475e8 Constructors of abstract classes should not be public
parent 99678cb9
Pipeline #68284 passed with stages
in 44 minutes and 4 seconds
......@@ -506,7 +506,7 @@ private abstract class Accounts.AddPaneRow<Value> :
internal Components.Validator? validator { get; protected set; }
public AddPaneRow(string label, Value value) {
protected AddPaneRow(string label, Value value) {
base(label, new Gtk.Entry());
this.activatable = false;
}
......@@ -517,7 +517,7 @@ private abstract class Accounts.AddPaneRow<Value> :
private abstract class Accounts.EntryRow : AddPaneRow<Gtk.Entry> {
public EntryRow(string label, string? placeholder = null) {
protected EntryRow(string label, string? placeholder = null) {
base(label, new Gtk.Entry());
this.value.placeholder_text = placeholder ?? "";
......
......@@ -310,7 +310,7 @@ internal abstract class Accounts.AccountRow<PaneType,V> :
internal Geary.AccountInformation account { get; private set; }
public AccountRow(Geary.AccountInformation account, string label, V value) {
protected AccountRow(Geary.AccountInformation account, string label, V value) {
base(label, value);
this.account = account;
this.account.changed.connect(on_account_changed);
......@@ -351,10 +351,10 @@ private abstract class Accounts.ServiceRow<PaneType,V> : AccountRow<PaneType,V>
}
public ServiceRow(Geary.AccountInformation account,
Geary.ServiceInformation service,
string label,
V value) {
protected ServiceRow(Geary.AccountInformation account,
Geary.ServiceInformation service,
string label,
V value) {
base(account, label, value);
this.service = service;
this.service.notify.connect_after(on_notify);
......
......@@ -295,8 +295,8 @@ public abstract class ClientWebView : WebKit.WebView, Geary.BaseInterface {
public signal void remote_image_load_blocked();
public ClientWebView(Configuration config,
WebKit.UserContentManager? custom_manager = null) {
protected ClientWebView(Configuration config,
WebKit.UserContentManager? custom_manager = null) {
WebKit.Settings setts = new WebKit.Settings();
setts.allow_modal_dialogs = false;
setts.default_charset = "UTF-8";
......
......@@ -12,7 +12,7 @@
public abstract class FolderList.AbstractFolderEntry : Geary.BaseObject, Sidebar.Entry, Sidebar.SelectableEntry {
public Geary.Folder folder { get; private set; }
public AbstractFolderEntry(Geary.Folder folder) {
protected AbstractFolderEntry(Geary.Folder folder) {
this.folder = folder;
}
......
......@@ -26,7 +26,7 @@ public abstract class Geary.EmailProperties : BaseObject {
*/
public int64 total_bytes { get; protected set; }
public EmailProperties(DateTime date_received, int64 total_bytes) {
protected EmailProperties(DateTime date_received, int64 total_bytes) {
this.date_received = date_received;
this.total_bytes = total_bytes;
}
......
......@@ -23,8 +23,8 @@ internal abstract class Geary.App.ConversationOperation : BaseObject {
protected weak ConversationMonitor? monitor = null;
public ConversationOperation(ConversationMonitor? monitor,
bool allow_duplicates = true) {
protected ConversationOperation(ConversationMonitor? monitor,
bool allow_duplicates = true) {
this.monitor = monitor;
this.allow_duplicates = allow_duplicates;
}
......
......@@ -36,7 +36,7 @@ public abstract class Geary.MessageData.StringMessageData : AbstractMessageData,
private uint stored_hash = uint.MAX;
public StringMessageData(string value) {
protected StringMessageData(string value) {
this.value = value;
}
......@@ -66,7 +66,7 @@ public abstract class Geary.MessageData.IntMessageData : AbstractMessageData,
Gee.Hashable<IntMessageData> {
public int value { get; private set; }
public IntMessageData(int value) {
protected IntMessageData(int value) {
this.value = value;
}
......@@ -89,7 +89,7 @@ public abstract class Geary.MessageData.Int64MessageData : AbstractMessageData,
private uint stored_hash = uint.MAX;
public Int64MessageData(int64 value) {
protected Int64MessageData(int64 value) {
this.value = value;
}
......@@ -113,7 +113,7 @@ public abstract class Geary.MessageData.BlockMessageData : AbstractMessageData {
public string data_name { get; private set; }
public Geary.Memory.Buffer buffer { get; private set; }
public BlockMessageData(string data_name, Geary.Memory.Buffer buffer) {
protected BlockMessageData(string data_name, Geary.Memory.Buffer buffer) {
this.data_name = data_name;
this.buffer = buffer;
}
......
......@@ -60,10 +60,10 @@ private abstract class Geary.ImapEngine.GenericAccount : Geary.Account {
new Gee.HashMap<Geary.SpecialFolderType, Gee.List<string>>();
public GenericAccount(AccountInformation config,
ImapDB.Account local,
Endpoint incoming_remote,
Endpoint outgoing_remote) {
protected GenericAccount(AccountInformation config,
ImapDB.Account local,
Endpoint incoming_remote,
Endpoint outgoing_remote) {
Imap.ClientService imap = new Imap.ClientService(
config,
config.incoming,
......
......@@ -55,7 +55,7 @@ private abstract class Geary.ImapEngine.ReplayOperation : Geary.BaseObject, Gee.
private Nonblocking.Semaphore semaphore = new Nonblocking.Semaphore();
public ReplayOperation(string name, Scope scope, OnError on_remote_error = OnError.THROW) {
protected ReplayOperation(string name, Scope scope, OnError on_remote_error = OnError.THROW) {
this.name = name;
this.scope = scope;
this.on_remote_error = on_remote_error;
......
......@@ -87,7 +87,7 @@ private abstract class Geary.ImapEngine.AbstractListEmail : Geary.ImapEngine.Sen
private Gee.HashMap<Imap.UID, Geary.Email.Field> unfulfilled = new Gee.HashMap<Imap.UID, Geary.Email.Field>();
public AbstractListEmail(string name, MinimalFolder owner, Geary.Email.Field required_fields,
protected AbstractListEmail(string name, MinimalFolder owner, Geary.Email.Field required_fields,
Folder.ListFlags flags, Cancellable? cancellable) {
base(name, OnError.IGNORE_REMOTE);
......
......@@ -21,7 +21,7 @@ public abstract class Geary.Imap.Flag : BaseObject, Gee.Hashable<Geary.Imap.Flag
*
* The given keyword must be an IMAP atom.
*/
public Flag(string name) {
protected Flag(string name) {
this.value = name;
}
......
......@@ -14,7 +14,7 @@ public abstract class Geary.Imap.Flags : Geary.MessageData.AbstractMessageData,
protected Gee.Set<Flag> list;
public Flags(Gee.Collection<Flag> flags) {
protected Flags(Gee.Collection<Flag> flags) {
list = new Gee.HashSet<Flag>();
list.add_all(flags);
}
......
......@@ -19,7 +19,7 @@
public abstract class Geary.Imap.FetchDataDecoder : BaseObject {
public FetchDataSpecifier data_item { get; private set; }
public FetchDataDecoder(FetchDataSpecifier data_item) {
protected FetchDataDecoder(FetchDataSpecifier data_item) {
this.data_item = data_item;
}
......
......@@ -25,7 +25,7 @@ public abstract class Geary.Imap.ServerResponse : RootParameters {
*
* The supplied root is "stripped" of its children.
*/
public ServerResponse.migrate(RootParameters root) throws ImapError {
protected ServerResponse.migrate(RootParameters root) throws ImapError {
base.migrate(root);
if (!has_tag())
......
......@@ -18,7 +18,7 @@ public abstract class Geary.Smtp.Authenticator : BaseObject {
public Credentials credentials { get; private set; }
public Authenticator(string name, Credentials credentials) {
protected Authenticator(string name, Credentials credentials) {
this.name = name;
this.credentials = credentials;
......
......@@ -81,7 +81,7 @@ public abstract class Geary.SmartReference : BaseObject {
public virtual signal void reference_broken() {
}
public SmartReference(ReferenceSemantics reffed) {
protected SmartReference(ReferenceSemantics reffed) {
this.reffed = reffed;
reffed.release_now.connect(on_release_now);
......
......@@ -13,7 +13,7 @@ public abstract class ClientWebViewTestCase<V> : TestCase {
protected V? test_view = null;
protected Configuration? config = null;
public ClientWebViewTestCase(string name) {
protected ClientWebViewTestCase(string name) {
base(name);
this.config = new Configuration(GearyApplication.APP_ID);
ClientWebView.init_web_context(
......
......@@ -213,7 +213,7 @@ public abstract class TestCase : Object {
public delegate void TestMethod() throws Error;
public TestCase(string name) {
protected TestCase(string name) {
this.suite = new GLib.TestSuite(name);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment