Commit e2ff5614 authored by Tapasweni Pathak's avatar Tapasweni Pathak

Use {} for function arguments initialisation

Closes #20.
parent 4bf358d2
......@@ -75,7 +75,7 @@ public:
*/
sigc::connection connect(const sigc::slot<bool(Glib::IOCondition)>& slot,
const Glib::RefPtr<Socket>& socket, Glib::IOCondition condition,
const Glib::RefPtr<Cancellable>& cancellable = Glib::RefPtr<Cancellable>(),
const Glib::RefPtr<Cancellable>& cancellable = {},
int priority = Glib::PRIORITY_DEFAULT);
private:
......@@ -93,7 +93,7 @@ private:
* @ingroup NetworkIO
*/
SignalSocket signal_socket(
const Glib::RefPtr<Glib::MainContext>& context = Glib::RefPtr<Glib::MainContext>());
const Glib::RefPtr<Glib::MainContext>& context = {});
/** An event source that can monitor a Gio::Socket.
* @see Gio::Socket::create_source().
......@@ -108,7 +108,7 @@ public:
static Glib::RefPtr<SocketSource> create(const Glib::RefPtr<Socket>& socket,
Glib::IOCondition condition,
const Glib::RefPtr<Cancellable>& cancellable = Glib::RefPtr<Cancellable>());
const Glib::RefPtr<Cancellable>& cancellable = {});
protected:
......@@ -122,7 +122,7 @@ private:
// This is just to avoid the need for Gio::Socket to create a RefPtr<> to itself.
static Glib::RefPtr<SocketSource> create(GSocket* socket,
Glib::IOCondition condition,
const Glib::RefPtr<Cancellable>& cancellable = Glib::RefPtr<Cancellable>());
const Glib::RefPtr<Cancellable>& cancellable = {});
// This is just to avoid the need for Gio::Socket to create a RefPtr<> to itself.
SocketSource(GSocket* socket, Glib::IOCondition condition,
......
......@@ -98,7 +98,7 @@ protected:
* @param application_id The application ID.
* @param flags The application flags.
*/
explicit Application(const Glib::ustring& application_id = Glib::ustring(), Flags flags = Flags::NONE);
explicit Application(const Glib::ustring& application_id = {}, Flags flags = Flags::NONE);
_IGNORE(g_application_new)
public:
......@@ -139,7 +139,7 @@ public:
* @param application_id The application ID.
* @param flags The application flags.
*/
_WRAP_CREATE(const Glib::ustring& application_id = Glib::ustring(), Flags flags = Flags::NONE)
_WRAP_CREATE(const Glib::ustring& application_id = {}, Flags flags = Flags::NONE)
_WRAP_METHOD(static bool id_is_valid(const Glib::ustring& application_id), g_application_id_is_valid)
......@@ -233,8 +233,8 @@ public:
* Character encoding is chosen with @a arg_type.
*/
void add_main_option_entry(OptionType arg_type, const Glib::ustring& long_name,
gchar short_name = '\0', const Glib::ustring& description = Glib::ustring(),
const Glib::ustring& arg_description = Glib::ustring(),
gchar short_name = '\0', const Glib::ustring& description = {},
const Glib::ustring& arg_description = {},
Glib::OptionEntry::Flags flags = Glib::OptionEntry::Flags::NONE);
_IGNORE(g_application_add_main_option_entries, g_application_add_main_option)
......@@ -255,8 +255,8 @@ public:
*/
void add_main_option_entry(const Glib::OptionGroup::SlotOptionArgString& slot,
const Glib::ustring& long_name,
gchar short_name = '\0', const Glib::ustring& description = Glib::ustring(),
const Glib::ustring& arg_description = Glib::ustring(),
gchar short_name = '\0', const Glib::ustring& description = {},
const Glib::ustring& arg_description = {},
Glib::OptionEntry::Flags flags = Glib::OptionEntry::Flags::NONE);
/** Adds a main option entry to be handled by the Application.
......@@ -276,8 +276,8 @@ public:
*/
void add_main_option_entry_filename(const Glib::OptionGroup::SlotOptionArgFilename& slot,
const Glib::ustring& long_name,
gchar short_name = '\0', const Glib::ustring& description = Glib::ustring(),
const Glib::ustring& arg_description = Glib::ustring(),
gchar short_name = '\0', const Glib::ustring& description = {},
const Glib::ustring& arg_description = {},
Glib::OptionEntry::Flags flags = Glib::OptionEntry::Flags::NONE);
// _WRAP_METHOD(void add_option_group(Glib::OptionGroup& group), g_application_add_option_group)
......@@ -319,7 +319,7 @@ public:
*
* @newin{2,32}
*/
void open(const type_vec_files& files, const Glib::ustring& hint = Glib::ustring());
void open(const type_vec_files& files, const Glib::ustring& hint = {});
_IGNORE(g_application_open)
/* Opens the given file.
......@@ -339,7 +339,7 @@ public:
*
* @newin{2,32}
*/
void open(const Glib::RefPtr<Gio::File>& file, const Glib::ustring& hint = Glib::ustring());
void open(const Glib::RefPtr<Gio::File>& file, const Glib::ustring& hint = {});
_WRAP_METHOD(int run(int argc, char** argv), g_application_run)
......
......@@ -627,10 +627,10 @@ public:
const Glib::VariantContainerBase& parameters,
const SlotAsyncReady& slot,
const Glib::RefPtr<Cancellable>& cancellable,
const Glib::ustring& bus_name = Glib::ustring(),
const Glib::ustring& bus_name = {},
int timeout_msec = -1,
CallFlags flags = Gio::DBus::CallFlags::NONE,
const Glib::VariantType& reply_type = Glib::VariantType());
const Glib::VariantType& reply_type = {});
_IGNORE(g_dbus_connection_call)
/// A non-cancellable version of call().
......@@ -640,10 +640,10 @@ public:
const Glib::ustring& method_name,
const Glib::VariantContainerBase& parameters,
const SlotAsyncReady& slot,
const Glib::ustring& bus_name = Glib::ustring(),
const Glib::ustring& bus_name = {},
int timeout_msec = -1,
CallFlags flags = Gio::DBus::CallFlags::NONE,
const Glib::VariantType& reply_type = Glib::VariantType());
const Glib::VariantType& reply_type = {});
/** Finishes an operation started with call().
* @param res A AsyncResult obtained from the SlotAsyncReady passed to
......@@ -694,10 +694,10 @@ public:
const Glib::ustring& method_name,
const Glib::VariantContainerBase& parameters,
const Glib::RefPtr<Cancellable>& cancellable,
const Glib::ustring& bus_name = Glib::ustring(),
const Glib::ustring& bus_name = {},
int timeout_msec = -1,
CallFlags flags = Gio::DBus::CallFlags::NONE,
const Glib::VariantType& reply_type = Glib::VariantType());
const Glib::VariantType& reply_type = {});
_IGNORE(g_dbus_connection_call_sync)
/// A non-cancellable version of call_sync().
......@@ -706,10 +706,10 @@ public:
const Glib::ustring& interface_name,
const Glib::ustring& method_name,
const Glib::VariantContainerBase& parameters,
const Glib::ustring& bus_name = Glib::ustring(),
const Glib::ustring& bus_name = {},
int timeout_msec = -1,
CallFlags flags = Gio::DBus::CallFlags::NONE,
const Glib::VariantType& reply_type = Glib::VariantType());
const Glib::VariantType& reply_type = {});
#ifdef G_OS_UNIX
/** Like call() but also takes a GUnixFDList object.
......@@ -745,10 +745,10 @@ public:
const SlotAsyncReady& slot,
const Glib::RefPtr<Cancellable>& cancellable,
const Glib::RefPtr<UnixFDList>& fd_list,
const Glib::ustring& bus_name = Glib::ustring(),
const Glib::ustring& bus_name = {},
int timeout_msec = -1,
CallFlags flags = Gio::DBus::CallFlags::NONE,
const Glib::VariantType& reply_type = Glib::VariantType());
const Glib::VariantType& reply_type = {});
_IGNORE(g_dbus_connection_call_with_unix_fd_list)
/** A non-cancellable version of call() (with a UnixFDList).
......@@ -761,10 +761,10 @@ public:
const Glib::VariantContainerBase& parameters,
const SlotAsyncReady& slot,
const Glib::RefPtr<UnixFDList>& fd_list,
const Glib::ustring& bus_name = Glib::ustring(),
const Glib::ustring& bus_name = {},
int timeout_msec = -1,
CallFlags flags = Gio::DBus::CallFlags::NONE,
const Glib::VariantType& reply_type = Glib::VariantType());
const Glib::VariantType& reply_type = {});
#endif // G_OS_UNIX
/** Finishes an operation started with call() (with a UnixFDList).
......@@ -786,10 +786,10 @@ public:
const Glib::RefPtr<Cancellable>& cancellable{.?},
const Glib::RefPtr<UnixFDList>& fd_list{.},
Glib::RefPtr<UnixFDList>& out_fd_list{.>>},
const Glib::ustring& bus_name{.NULL} = Glib::ustring(),
const Glib::ustring& bus_name{.NULL} = {},
int timeout_msec{.} = -1,
CallFlags flags{.} = Gio::DBus::CallFlags::NONE,
const Glib::VariantType& reply_type{.} = Glib::VariantType()
const Glib::VariantType& reply_type{.} = {}
),
g_dbus_connection_call_with_unix_fd_list_sync, errthrow, ifdef G_OS_UNIX
)
......@@ -813,8 +813,8 @@ public:
const Glib::ustring& object_path,
const Glib::ustring& interface_name,
const Glib::ustring& signal_name,
const Glib::ustring& destination_bus_name = Glib::ustring(),
const Glib::VariantContainerBase& parameters = Glib::VariantContainerBase());
const Glib::ustring& destination_bus_name = {},
const Glib::VariantContainerBase& parameters = {});
_IGNORE(g_dbus_connection_emit_signal)
/** Subscribes to signals on the connection and invokes @a slot with a
......@@ -850,11 +850,11 @@ public:
*/
guint signal_subscribe(
const SlotSignal& slot,
const Glib::ustring& sender = Glib::ustring(),
const Glib::ustring& interface_name = Glib::ustring(),
const Glib::ustring& member = Glib::ustring(),
const Glib::ustring& object_path = Glib::ustring(),
const Glib::ustring& arg0 = Glib::ustring(),
const Glib::ustring& sender = {},
const Glib::ustring& interface_name = {},
const Glib::ustring& member = {},
const Glib::ustring& object_path = {},
const Glib::ustring& arg0 = {},
SignalFlags flags = Gio::DBus::SignalFlags::NONE);
_IGNORE(g_dbus_connection_signal_subscribe)
......
......@@ -119,8 +119,8 @@ public:
*/
explicit InterfaceVTable(
const SlotInterfaceMethodCall& slot_method_call,
const SlotInterfaceGetProperty& slot_get_property = SlotInterfaceGetProperty(),
const SlotInterfaceSetProperty& slot_set_property = SlotInterfaceSetProperty()
const SlotInterfaceGetProperty& slot_get_property = {},
const SlotInterfaceSetProperty& slot_set_property = {}
);
InterfaceVTable(const InterfaceVTable& other) = delete;
......
......@@ -110,9 +110,9 @@ using SlotNameLost = sigc::slot<void(const Glib::RefPtr<Gio::DBus::Connection>&,
guint own_name(
BusType bus_type,
const Glib::ustring& name,
const SlotBusAcquired& bus_acquired_slot = SlotBusAcquired(),
const SlotNameAcquired& name_acquired_slot = SlotNameAcquired(),
const SlotNameLost& name_lost_slot = SlotNameLost(),
const SlotBusAcquired& bus_acquired_slot = {},
const SlotNameAcquired& name_acquired_slot = {},
const SlotNameLost& name_lost_slot = {},
BusNameOwnerFlags flags = Gio::DBus::BusNameOwnerFlags::NONE
);
_IGNORE(g_bus_own_name)
......
......@@ -80,7 +80,7 @@ protected:
const Glib::ustring& interface_name,
const SlotAsyncReady& slot,
const Glib::RefPtr<Cancellable>& cancellable,
const Glib::RefPtr<InterfaceInfo>& info = Glib::RefPtr<InterfaceInfo>(),
const Glib::RefPtr<InterfaceInfo>& info = {},
ProxyFlags flags = ProxyFlags::NONE);
Proxy(const Glib::RefPtr<Connection>& connection,
......@@ -88,7 +88,7 @@ protected:
const Glib::ustring& object_path,
const Glib::ustring& interface_name,
const SlotAsyncReady& slot,
const Glib::RefPtr<InterfaceInfo>& info = Glib::RefPtr<InterfaceInfo>(),
const Glib::RefPtr<InterfaceInfo>& info = {},
ProxyFlags flags = ProxyFlags::NONE);
Proxy(const Glib::RefPtr<Connection>& connection,
......@@ -96,14 +96,14 @@ protected:
const Glib::ustring& object_path,
const Glib::ustring& interface_name,
const Glib::RefPtr<Cancellable>& cancellable,
const Glib::RefPtr<InterfaceInfo>& info = Glib::RefPtr<InterfaceInfo>(),
const Glib::RefPtr<InterfaceInfo>& info = {},
ProxyFlags flags = ProxyFlags::NONE);
Proxy(const Glib::RefPtr<Connection>& connection,
const Glib::ustring& name,
const Glib::ustring& object_path,
const Glib::ustring& interface_name,
const Glib::RefPtr<InterfaceInfo>& info = Glib::RefPtr<InterfaceInfo>(),
const Glib::RefPtr<InterfaceInfo>& info = {},
ProxyFlags flags = ProxyFlags::NONE);
Proxy(BusType bus_type,
......@@ -112,7 +112,7 @@ protected:
const Glib::ustring& interface_name,
const SlotAsyncReady& slot,
const Glib::RefPtr<Cancellable>& cancellable,
const Glib::RefPtr<InterfaceInfo>& info = Glib::RefPtr<InterfaceInfo>(),
const Glib::RefPtr<InterfaceInfo>& info = {},
ProxyFlags flags = ProxyFlags::NONE);
Proxy(BusType bus_type,
......@@ -120,7 +120,7 @@ protected:
const Glib::ustring& object_path,
const Glib::ustring& interface_name,
const SlotAsyncReady& slot,
const Glib::RefPtr<InterfaceInfo>& info = Glib::RefPtr<InterfaceInfo>(),
const Glib::RefPtr<InterfaceInfo>& info = {},
ProxyFlags flags = ProxyFlags::NONE);
Proxy(BusType bus_type,
......@@ -128,14 +128,14 @@ protected:
const Glib::ustring& object_path,
const Glib::ustring& interface_name,
const Glib::RefPtr<Cancellable>& cancellable,
const Glib::RefPtr<InterfaceInfo>& info = Glib::RefPtr<InterfaceInfo>(),
const Glib::RefPtr<InterfaceInfo>& info = {},
ProxyFlags flags = ProxyFlags::NONE);
Proxy(BusType bus_type,
const Glib::ustring& name,
const Glib::ustring& object_path,
const Glib::ustring& interface_name,
const Glib::RefPtr<InterfaceInfo>& info = Glib::RefPtr<InterfaceInfo>(),
const Glib::RefPtr<InterfaceInfo>& info = {},
ProxyFlags flags = ProxyFlags::NONE);
public:
......@@ -147,7 +147,7 @@ public:
const Glib::ustring& interface_name,
const SlotAsyncReady& slot,
const Glib::RefPtr<Cancellable>& cancellable,
const Glib::RefPtr<InterfaceInfo>& info = Glib::RefPtr<InterfaceInfo>(),
const Glib::RefPtr<InterfaceInfo>& info = {},
ProxyFlags flags = ProxyFlags::NONE);
/// Non-cancellable version of create().
......@@ -156,7 +156,7 @@ public:
const Glib::ustring& object_path,
const Glib::ustring& interface_name,
const SlotAsyncReady& slot,
const Glib::RefPtr<InterfaceInfo>& info = Glib::RefPtr<InterfaceInfo>(),
const Glib::RefPtr<InterfaceInfo>& info = {},
ProxyFlags flags = ProxyFlags::NONE);
_WRAP_METHOD_DOCS_ONLY(g_dbus_proxy_new_finish)
......@@ -170,7 +170,7 @@ public:
const Glib::ustring& object_path,
const Glib::ustring& interface_name,
const Glib::RefPtr<Cancellable>& cancellable,
const Glib::RefPtr<InterfaceInfo>& info = Glib::RefPtr<InterfaceInfo>(),
const Glib::RefPtr<InterfaceInfo>& info = {},
ProxyFlags flags = ProxyFlags::NONE);
/// Non-cancellable version of create_sync().
......@@ -179,7 +179,7 @@ public:
const Glib::ustring& name,
const Glib::ustring& object_path,
const Glib::ustring& interface_name,
const Glib::RefPtr<InterfaceInfo>& info = Glib::RefPtr<InterfaceInfo>(),
const Glib::RefPtr<InterfaceInfo>& info = {},
ProxyFlags flags = ProxyFlags::NONE);
_WRAP_METHOD_DOCS_ONLY(g_dbus_proxy_new_for_bus)
......@@ -189,7 +189,7 @@ public:
const Glib::ustring& interface_name,
const SlotAsyncReady& slot,
const Glib::RefPtr<Cancellable>& cancellable,
const Glib::RefPtr<InterfaceInfo>& info = Glib::RefPtr<InterfaceInfo>(),
const Glib::RefPtr<InterfaceInfo>& info = {},
ProxyFlags flags = ProxyFlags::NONE);
/// Non-cancellable version of create_for_bus().
......@@ -198,7 +198,7 @@ public:
const Glib::ustring& object_path,
const Glib::ustring& interface_name,
const SlotAsyncReady& slot,
const Glib::RefPtr<InterfaceInfo>& info = Glib::RefPtr<InterfaceInfo>(),
const Glib::RefPtr<InterfaceInfo>& info = {},
ProxyFlags flags = ProxyFlags::NONE);
_WRAP_METHOD_DOCS_ONLY(g_dbus_proxy_new_for_bus_finish)
......@@ -212,7 +212,7 @@ public:
const Glib::ustring& object_path,
const Glib::ustring& interface_name,
const Glib::RefPtr<Cancellable>& cancellable,
const Glib::RefPtr<InterfaceInfo>& info = Glib::RefPtr<InterfaceInfo>(),
const Glib::RefPtr<InterfaceInfo>& info = {},
ProxyFlags flags = ProxyFlags::NONE);
/// Non-cancellable version of create_for_bus_sync().
......@@ -221,7 +221,7 @@ public:
const Glib::ustring& name,
const Glib::ustring& object_path,
const Glib::ustring& interface_name,
const Glib::RefPtr<InterfaceInfo>& info = Glib::RefPtr<InterfaceInfo>(),
const Glib::RefPtr<InterfaceInfo>& info = {},
ProxyFlags flags = ProxyFlags::NONE);
_WRAP_METHOD(ProxyFlags get_flags() const, g_dbus_proxy_get_flags)
......@@ -267,7 +267,7 @@ public:
const Glib::ustring& method_name{.},
const SlotAsyncReady& slot{callback?},
const Glib::RefPtr<Cancellable>& cancellable{.?},
const Glib::VariantContainerBase& parameters{.} = Glib::VariantContainerBase(),
const Glib::VariantContainerBase& parameters{.} = {},
int timeout_msec{.} = -1,
CallFlags flags{.} = Gio::DBus::CallFlags::NONE
),
......@@ -288,7 +288,7 @@ public:
Glib::VariantContainerBase call_sync(
const Glib::ustring& method_name{.},
const Glib::RefPtr<Cancellable>& cancellable{.?},
const Glib::VariantContainerBase& parameters{.} = Glib::VariantContainerBase(),
const Glib::VariantContainerBase& parameters{.} = {},
int timeout_msec{.} = -1,
CallFlags flags{.} = Gio::DBus::CallFlags::NONE
),
......
......@@ -128,8 +128,8 @@ public:
*/
explicit SubtreeVTable(
const SlotSubtreeEnumerate& slot_enumerate,
const SlotSubtreeIntrospect& slot_introspect = SlotSubtreeIntrospect(),
const SlotSubtreeDispatch& slot_dispatch = SlotSubtreeDispatch()
const SlotSubtreeIntrospect& slot_introspect = {},
const SlotSubtreeDispatch& slot_dispatch = {}
);
SubtreeVTable(const SubtreeVTable& other) = delete;
......
......@@ -84,8 +84,8 @@ using SlotNameVanished = sigc::slot<void(const Glib::RefPtr<Gio::DBus::Connectio
guint watch_name(
BusType bus_type,
const Glib::ustring& name,
const SlotNameAppeared& name_appeared_slot = SlotNameAppeared(),
const SlotNameVanished& name_vanished_slot = SlotNameVanished(),
const SlotNameAppeared& name_appeared_slot = {},
const SlotNameVanished& name_vanished_slot = {},
BusNameWatcherFlags flags = Gio::DBus::BusNameWatcherFlags::NONE
);
_IGNORE(g_bus_watch_name)
......@@ -107,8 +107,8 @@ _IGNORE(g_bus_watch_name)
guint watch_name(
const Glib::RefPtr<Connection>& connection,
const Glib::ustring& name,
const SlotNameAppeared& name_appeared_slot = SlotNameAppeared(),
const SlotNameVanished& name_vanished_slot = SlotNameVanished(),
const SlotNameAppeared& name_appeared_slot = {},
const SlotNameVanished& name_vanished_slot = {},
BusNameWatcherFlags flags = Gio::DBus::BusNameWatcherFlags::NONE
);
_IGNORE(g_bus_watch_name_on_connection)
......
......@@ -408,7 +408,7 @@ public:
* @param flags A set of CreateFlags.
* @return A FileOutputStream.
*/
Glib::RefPtr<FileOutputStream> replace(const Glib::RefPtr<Cancellable>& cancellable, const std::string& etag = std::string(), bool make_backup = false, CreateFlags flags = CreateFlags::NONE);
Glib::RefPtr<FileOutputStream> replace(const Glib::RefPtr<Cancellable>& cancellable, const std::string& etag = {}, bool make_backup = false, CreateFlags flags = CreateFlags::NONE);
/** Returns an output stream for overwriting the file, possibly creating a backup copy of the file first.
......@@ -441,7 +441,7 @@ public:
* @param flags A set of CreateFlags.
* @return A FileOutputStream.
*/
Glib::RefPtr<FileOutputStream> replace(const std::string& etag = std::string(), bool make_backup = false, CreateFlags flags = CreateFlags::NONE);
Glib::RefPtr<FileOutputStream> replace(const std::string& etag = {}, bool make_backup = false, CreateFlags flags = CreateFlags::NONE);
_IGNORE(g_file_replace)
......@@ -551,7 +551,7 @@ public:
* @param flags A set of CreateFlags.
* @param io_priority The I/O priority of the request.
*/
void replace_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, const std::string& etag = std::string(), bool make_backup = false, CreateFlags flags = CreateFlags::NONE, int io_priority = Glib::PRIORITY_DEFAULT);
void replace_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, const std::string& etag = {}, bool make_backup = false, CreateFlags flags = CreateFlags::NONE, int io_priority = Glib::PRIORITY_DEFAULT);
/** Asyncronously overwrites the file, replacing the contents, possibly creating a backup copy of the file first.
* For more details, see replace() which is the synchronous version of this call.
......@@ -563,7 +563,7 @@ public:
* @param flags A set of CreateFlags.
* @param io_priority The I/O priority of the request.
*/
void replace_async(const SlotAsyncReady& slot, const std::string& etag = std::string(), bool make_backup = false, CreateFlags flags = CreateFlags::NONE, int io_priority = Glib::PRIORITY_DEFAULT);
void replace_async(const SlotAsyncReady& slot, const std::string& etag = {}, bool make_backup = false, CreateFlags flags = CreateFlags::NONE, int io_priority = Glib::PRIORITY_DEFAULT);
_IGNORE(g_file_replace_async)
_WRAP_METHOD(Glib::RefPtr<FileOutputStream> replace_finish(const Glib::RefPtr<AsyncResult>& res),
......@@ -638,7 +638,7 @@ public:
*
* @newin{2,24}
*/
Glib::RefPtr<FileIOStream> replace_readwrite(const Glib::RefPtr<Cancellable>& cancellable, const std::string& etag = std::string(), bool make_backup = false, CreateFlags flags = CreateFlags::NONE);
Glib::RefPtr<FileIOStream> replace_readwrite(const Glib::RefPtr<Cancellable>& cancellable, const std::string& etag = {}, bool make_backup = false, CreateFlags flags = CreateFlags::NONE);
/** Returns an output stream for overwriting the file in readwrite mode, possibly creating a backup copy of the file first.
......@@ -658,7 +658,7 @@ public:
*
* @newin{2,24}
*/
Glib::RefPtr<FileIOStream> replace_readwrite(const std::string& etag = std::string(), bool make_backup = false, CreateFlags flags = CreateFlags::NONE);
Glib::RefPtr<FileIOStream> replace_readwrite(const std::string& etag = {}, bool make_backup = false, CreateFlags flags = CreateFlags::NONE);
_IGNORE(g_file_replace_readwrite)
......@@ -678,7 +678,7 @@ public:
*
* @newin{2,24}
*/
void replace_readwrite_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, const std::string& etag = std::string(), bool make_backup = false, CreateFlags flags = CreateFlags::NONE, int io_priority = Glib::PRIORITY_DEFAULT);
void replace_readwrite_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, const std::string& etag = {}, bool make_backup = false, CreateFlags flags = CreateFlags::NONE, int io_priority = Glib::PRIORITY_DEFAULT);
/** Asyncronously overwrites the file in read-write mode, replacing the contents, possibly creating a backup copy of the file first.
*
......@@ -693,7 +693,7 @@ public:
*
* @newin{2,24}
*/
void replace_readwrite_async(const SlotAsyncReady& slot, const std::string& etag = std::string(), bool make_backup = false, CreateFlags flags = CreateFlags::NONE, int io_priority = Glib::PRIORITY_DEFAULT);
void replace_readwrite_async(const SlotAsyncReady& slot, const std::string& etag = {}, bool make_backup = false, CreateFlags flags = CreateFlags::NONE, int io_priority = Glib::PRIORITY_DEFAULT);
_IGNORE(g_file_replace_readwrite_async)
_WRAP_METHOD(Glib::RefPtr<FileIOStream> replace_readwrite_finish(const Glib::RefPtr<AsyncResult>& res),
......
......@@ -47,7 +47,7 @@ protected:
* @param label The section label.
* @param detailed_action: The detailed action string.
*/
explicit MenuItem(const Glib::ustring& label = Glib::ustring(), const Glib::ustring& detailed_action = Glib::ustring());
explicit MenuItem(const Glib::ustring& label = {}, const Glib::ustring& detailed_action = {});
_IGNORE(g_menu_item_new)
/** Creates a new MenuItem representing a submenu.
......
......@@ -39,8 +39,8 @@ protected:
const Glib::ustring& protocol,
const Glib::ustring& destination_hostname,
guint16 destination_port,
const Glib::ustring& username = Glib::ustring(),
const Glib::ustring& password = Glib::ustring()), g_proxy_address_new)
const Glib::ustring& username = {},
const Glib::ustring& password = {}), g_proxy_address_new)
public:
_WRAP_CREATE(const Glib::RefPtr<InetAddress>& address,
......@@ -48,8 +48,8 @@ public:
const Glib::ustring& protocol,
const Glib::ustring& destination_hostname,
guint16 destination_port,
const Glib::ustring& username = Glib::ustring(),
const Glib::ustring& password = Glib::ustring())
const Glib::ustring& username = {},
const Glib::ustring& password = {})
_WRAP_METHOD(Glib::ustring get_protocol() const, g_proxy_address_get_protocol)
_WRAP_METHOD(Glib::ustring get_destination_protocol() const, g_proxy_address_get_destination_protocol)
......
......@@ -106,7 +106,7 @@ public:
*/
static Glib::RefPtr<Socket>
create(SocketFamily family, Type type, Protocol protocol,
const Glib::RefPtr<Cancellable>& cancellable = Glib::RefPtr<Cancellable>());
const Glib::RefPtr<Cancellable>& cancellable = {});
// gmmproc thinks that this function should be wrapped in this class because
// its only parameter is a GSocket. In fact, it is wrapped in the
......@@ -118,7 +118,7 @@ public:
* @throw Glib::Error
*/
static Glib::RefPtr<Socket> create_from_fd(int fd, const Glib::RefPtr<Cancellable>&
cancellable = Glib::RefPtr<Cancellable>());
cancellable = {});
/** When a socket is created it is attached to an address family, but it doesn't
* have an address in this family. Socket::bind() assigns the address (sometimes
......@@ -255,7 +255,7 @@ public:
* @param cancellable A Cancellable. The default value means the source is not cancellable.
* @return A newly allocated SocketSource.
*/
Glib::RefPtr<SocketSource> create_source(Glib::IOCondition condition, const Glib::RefPtr<Cancellable>& cancellable = Glib::RefPtr<Cancellable>());
Glib::RefPtr<SocketSource> create_source(Glib::IOCondition condition, const Glib::RefPtr<Cancellable>& cancellable = {});
_IGNORE(g_socket_create_source)
_WRAP_METHOD(void shutdown(bool shutdown_read, bool shutdown_write), g_socket_shutdown, errthrow)
......@@ -290,10 +290,10 @@ public:
_WRAP_METHOD(void set_timeout(guint timeout), g_socket_set_timeout)
_WRAP_METHOD_DOCS_ONLY(g_socket_receive_with_blocking)
gssize receive_with_blocking(gchar* buffer, gsize size, bool blocking, const Glib::RefPtr<Cancellable>& cancellable = Glib::RefPtr<Cancellable>());
gssize receive_with_blocking(gchar* buffer, gsize size, bool blocking, const Glib::RefPtr<Cancellable>& cancellable = {});
_WRAP_METHOD_DOCS_ONLY(g_socket_send_with_blocking)
gssize send_with_blocking(gchar* buffer, gsize size, bool blocking, const Glib::RefPtr<Cancellable>& cancellable = Glib::RefPtr<Cancellable>());
gssize send_with_blocking(gchar* buffer, gsize size, bool blocking, const Glib::RefPtr<Cancellable>& cancellable = {});
_WRAP_METHOD(bool get_option(int level, int optname, int& value) const, g_socket_get_option, errthrow)
_WRAP_METHOD(bool set_option(int level, int optname, int value), g_socket_set_option, errthrow)
......
......@@ -142,8 +142,8 @@ public:
const PropertyProxy_Base& source_property,
const PropertyProxy_Base& target_property,
Flags flags = Flags::DEFAULT,
const SlotTransform& transform_to = SlotTransform(),
const SlotTransform& transform_from = SlotTransform());
const SlotTransform& transform_to = {},
const SlotTransform& transform_from = {});
_IGNORE(g_object_bind_property, g_object_bind_property_full, g_object_bind_property_with_closures)
......
......@@ -388,7 +388,7 @@ public:
* @return Glib::IOStatus::NORMAL if the encoding was successfully set.
* @throw Glib::IOChannelError
*/
IOStatus set_encoding(const std::string& encoding = std::string());
IOStatus set_encoding(const std::string& encoding = {});
_IGNORE(g_io_channel_set_encoding)
/** Get the encoding of the I/O channel.
......@@ -397,7 +397,7 @@ public:
std::string get_encoding() const;
_IGNORE(g_io_channel_get_encoding)
void set_line_term(const std::string& term = std::string());
void set_line_term(const std::string& term = {});
_IGNORE(g_io_channel_set_line_term)
std::string get_line_term() const;
......
......@@ -92,7 +92,7 @@ public:
/** Creates a new option context.
* @param parameter_string A string which is displayed in the first line of --help output, after programname [OPTION...]
*/
explicit OptionContext(const Glib::ustring& parameter_string = Glib::ustring());
explicit OptionContext(const Glib::ustring& parameter_string = {});
//Note that, unlike Glib::wrap(), this would create a second C++ instance for the same C instance,
//so it should be used carefully. For instance you could not access data in a derived class via this second instance.
......
......@@ -69,7 +69,7 @@ public:
*/
using SlotOptionArgFilename = sigc::slot<bool(const Glib::ustring&, const std::string&, bool)>;
OptionGroup(const Glib::ustring& name, const Glib::ustring& description, const Glib::ustring& help_description = Glib::ustring());
OptionGroup(const Glib::ustring& name, const Glib::ustring& description, const Glib::ustring& help_description = {});
/** This always takes ownership of the underlying GOptionGroup,
* so it is only useful with C functions that return newly-allocated GOptionGroups.
......
......@@ -195,7 +195,7 @@ void spawn_async_with_pipes(const std::string& working_directory,
const std::vector<std::string>& argv,
const std::vector<std::string>& envp,
SpawnFlags flags = SpawnFlags::DEFAULT,
const SlotSpawnChildSetup& child_setup = SlotSpawnChildSetup(),
const SlotSpawnChildSetup& child_setup = {},
Pid* child_pid = nullptr,
int* standard_input = nullptr,
int* standard_output = nullptr,
......@@ -221,7 +221,7 @@ void spawn_async_with_pipes(const std::string& working_directory,
void spawn_async_with_pipes(const std::string& working_directory,
const std::vector<std::string>& argv,
SpawnFlags flags = SpawnFlags::DEFAULT,
const SlotSpawnChildSetup& child_setup = SlotSpawnChildSetup(),
const SlotSpawnChildSetup& child_setup = {},
Pid* child_pid = nullptr,
int* standard_input = nullptr,
int* standard_output = nullptr,
......@@ -252,7 +252,7 @@ void spawn_async(const std::string& working_directory,
const std::vector<std::string>& argv,
const std::vector<std::string>& envp,
SpawnFlags flags = SpawnFlags::DEFAULT,
const SlotSpawnChildSetup& child_setup = SlotSpawnChildSetup(),
const SlotSpawnChildSetup& child_setup = {},
Pid* child_pid = nullptr);
/** Like the main spawn_async() method, but inheriting the parent's environment.
......@@ -271,7 +271,7 @@ void spawn_async(const std::string& working_directory,
void spawn_async(const std::string& working_directory,
const std::vector<std::string>& argv,
SpawnFlags flags = SpawnFlags::DEFAULT,
const SlotSpawnChildSetup& child_setup = SlotSpawnChildSetup(),
const SlotSpawnChildSetup& child_setup = {},
Pid* child_pid = nullptr);
/** Executes a child synchronously (waits for the child to exit before returning).
......@@ -310,7 +310,7 @@ void spawn_sync(const std::string& working_directory,
const std::vector<std::string>& argv,
const std::vector<std::string>& envp,
SpawnFlags flags = SpawnFlags::DEFAULT,
const SlotSpawnChildSetup& child_setup = SlotSpawnChildSetup(),
const SlotSpawnChildSetup& child_setup = {},
std::string* standard_output = nullptr,
std::string* standard_error = nullptr,
int* exit_status = nullptr);
......@@ -334,7 +334,7 @@ void spawn_sync(const std::string& working_directory,
void spawn_sync(const std::string& working_directory,
const std::vector<std::string>& argv,
SpawnFlags flags = SpawnFlags::DEFAULT,
const SlotSpawnChildSetup& child_setup = SlotSpawnChildSetup(),
const SlotSpawnChildSetup& child_setup = {},
std::string* standard_output = nullptr,
std::string* standard_error = nullptr,
int* exit_status = nullptr);
......
......@@ -42,7 +42,7 @@ namespace Glib
* @ingroup UriUtils
* @newin{2,16}
*/
std::string uri_unescape_string(const std::string& escaped_string, const std::string& illegal_characters = std::string());
std::string uri_unescape_string(const std::string& escaped_string, const std::string& illegal_characters = {});
//TODO: Use iterator?
//char * g_uri_unescape_segment (const char *escaped_string,
......@@ -80,6 +80,6 @@ std::string uri_parse_scheme(const std::string& uri);
* @ingroup UriUtils
* @newin{2,16}
*/
std::string uri_escape_string(const std::string& unescaped, const std::string& reserved_chars_allowed = std::string(), bool allow_utf8 = true);
std::string uri_escape_string(const std::string& unescaped, const std::string& reserved_chars_allowed = {}, bool allow_utf8 = true);
} // namespace Glib
......@@ -368,7 +368,7 @@ public:
_WRAP_METHOD_DOCS_ONLY(g_variant_new_maybe)
static VariantContainerBase create_maybe(const VariantType& child_type,
const VariantBase& child = VariantBase());
const VariantBase& child = {});
_WRAP_METHOD(gsize get_n_children() const, g_variant_n_children)
......
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