[evolution-mapi] Avoid e_return_data_cal_error_if_fail().
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-mapi] Avoid e_return_data_cal_error_if_fail().
- Date: Mon, 1 Apr 2013 21:15:00 +0000 (UTC)
commit a087af109f8d09c3e6297413a2c0c9b23abe61fd
Author: Matthew Barnes <mbarnes redhat com>
Date: Mon Apr 1 17:09:36 2013 -0400
Avoid e_return_data_cal_error_if_fail().
GError is not meant for programming errors.
src/calendar/e-cal-backend-mapi.c | 30 ------------------------------
1 files changed, 0 insertions(+), 30 deletions(-)
---
diff --git a/src/calendar/e-cal-backend-mapi.c b/src/calendar/e-cal-backend-mapi.c
index c12fd5b..b7f3aa4 100644
--- a/src/calendar/e-cal-backend-mapi.c
+++ b/src/calendar/e-cal-backend-mapi.c
@@ -901,7 +901,6 @@ ecbm_get_object (ECalBackend *backend, EDataCal *cal, GCancellable *cancellable,
ECalComponent *comp;
cbmapi = (ECalBackendMAPI *)(backend);
- e_return_data_cal_error_if_fail (E_IS_CAL_BACKEND_MAPI (cbmapi), InvalidArg);
priv = cbmapi->priv;
@@ -1622,10 +1621,6 @@ ecbm_create_object (ECalBackend *backend, EDataCal *cal, GCancellable *cancellab
kind = e_cal_backend_get_kind (E_CAL_BACKEND (backend));
- e_return_data_cal_error_if_fail (E_IS_CAL_BACKEND_MAPI (cbmapi), InvalidArg);
- e_return_data_cal_error_if_fail (calobj != NULL, InvalidArg);
- e_return_data_cal_error_if_fail (new_ecalcomp != NULL, InvalidArg);
-
if (!e_backend_get_online (E_BACKEND (backend))) {
g_propagate_error (error, EDC_ERROR (RepositoryOffline));
return;
@@ -1808,9 +1803,6 @@ ecbm_modify_object (ECalBackend *backend, EDataCal *cal, GCancellable *cancellab
kind = e_cal_backend_get_kind (backend);
- e_return_data_cal_error_if_fail (E_IS_CAL_BACKEND_MAPI (cbmapi), InvalidArg);
- e_return_data_cal_error_if_fail (calobj != NULL, InvalidArg);
-
if (!e_backend_get_online (E_BACKEND (backend))) {
g_propagate_error (error, EDC_ERROR (RepositoryOffline));
return;
@@ -1954,8 +1946,6 @@ ecbm_remove_object (ECalBackend *backend, EDataCal *cal, GCancellable *cancellab
cbmapi = E_CAL_BACKEND_MAPI (backend);
priv = cbmapi->priv;
- e_return_data_cal_error_if_fail (E_IS_CAL_BACKEND_MAPI (cbmapi), InvalidArg);
-
if (!e_backend_get_online (E_BACKEND (backend))) {
g_propagate_error (error, EDC_ERROR (RepositoryOffline));
return;
@@ -2061,9 +2051,6 @@ ecbm_send_objects (ECalBackend *backend, EDataCal *cal, GCancellable *cancellabl
kind = e_cal_backend_get_kind (E_CAL_BACKEND (backend));
- e_return_data_cal_error_if_fail (E_IS_CAL_BACKEND_MAPI (cbmapi), InvalidArg);
- e_return_data_cal_error_if_fail (calobj != NULL, InvalidArg);
-
conn = e_cal_backend_mapi_get_connection (cbmapi, cancellable, &mapi_error);
if (!conn) {
if (!mapi_error)
@@ -2239,9 +2226,6 @@ ecbm_receive_objects (ECalBackend *backend, EDataCal *cal, GCancellable *cancell
priv = cbmapi->priv;
kind = e_cal_backend_get_kind (E_CAL_BACKEND (backend));
- e_return_data_cal_error_if_fail (E_IS_CAL_BACKEND_MAPI (cbmapi), InvalidArg);
- e_return_data_cal_error_if_fail (calobj != NULL, InvalidArg);
-
if (!e_backend_get_online (E_BACKEND (backend))) {
g_propagate_error (error, EDC_ERROR (RepositoryOffline));
return;
@@ -2379,19 +2363,10 @@ static void
ecbm_get_timezone (ECalBackend *backend, EDataCal *cal, GCancellable *cancellable, const gchar *tzid, gchar
**object, GError **error)
{
ETimezoneCache *timezone_cache;
- ECalBackendMAPI *cbmapi;
- ECalBackendMAPIPrivate *priv;
icaltimezone *zone = NULL;
- cbmapi = (ECalBackendMAPI *) backend;
timezone_cache = E_TIMEZONE_CACHE (backend);
- e_return_data_cal_error_if_fail (E_IS_CAL_BACKEND_MAPI (cbmapi), InvalidArg);
- e_return_data_cal_error_if_fail (tzid != NULL, InvalidArg);
-
- priv = cbmapi->priv;
- e_return_data_cal_error_if_fail (priv != NULL, InvalidArg);
-
zone = e_timezone_cache_get_timezone (timezone_cache, tzid);
if (!zone) {
@@ -2412,16 +2387,11 @@ ecbm_get_timezone (ECalBackend *backend, EDataCal *cal, GCancellable *cancellabl
static void
ecbm_add_timezone (ECalBackend *backend, EDataCal *cal, GCancellable *cancellable, const gchar *tzobj,
GError **error)
{
- ECalBackendMAPI *cbmapi;
ETimezoneCache *timezone_cache;
icalcomponent *tz_comp;
- cbmapi = (ECalBackendMAPI *) backend;
timezone_cache = E_TIMEZONE_CACHE (backend);
- e_return_data_cal_error_if_fail (E_IS_CAL_BACKEND_MAPI (cbmapi), InvalidArg);
- e_return_data_cal_error_if_fail (tzobj != NULL, InvalidArg);
-
tz_comp = icalparser_parse_string (tzobj);
if (!tz_comp) {
g_propagate_error (error, EDC_ERROR (InvalidObject));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]