summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2016-10-09 23:20:16 -0700
committerPatrick Ohly <patrick.ohly@intel.com>2016-10-09 23:20:16 -0700
commit7d06fd28690b846db4566a9fe26e6e0c6243af83 (patch)
tree0ce8a2ffa338f03ec9765fa05754b87b996c04c2
parente05817a4929873c72b8880f571b96e9ea7a4b786 (diff)
TDEPIMCalendarSourceRegister.cpp: only grab generic types when active
When a backend is inactive, it is meant to ignore generic types like "calendar". The idea behind that is that typically users install or compile just the backends they want, and then ask for the "calendar" backend using the generic sync templates or instructions. When adding the TDEPIM calendar backend, that broke because it also instantiated itself for those terms when active. The other TDEPIM backends already did this as intended. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
-rw-r--r--src/backends/tdepim/TDEPIMCalendarSourceRegister.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/backends/tdepim/TDEPIMCalendarSourceRegister.cpp b/src/backends/tdepim/TDEPIMCalendarSourceRegister.cpp
index 4056ae51..9a73a41f 100644
--- a/src/backends/tdepim/TDEPIMCalendarSourceRegister.cpp
+++ b/src/backends/tdepim/TDEPIMCalendarSourceRegister.cpp
@@ -1,3 +1,4 @@
+
/*
* Copyright (C) 2016 Emanoil Kotsev emanoil.kotsev@fincom.at
*
@@ -46,7 +47,7 @@ static SyncSource *createSource ( const SyncSourceParams &params )
bool isMe = sourceType.m_backend == "TDE PIM Calendar";
#ifndef ENABLE_TDEPIMCAL
- if (isMe || sourceType.m_backend == "calendar" ) return RegisterSyncSource::InactiveSource(params);
+ if (isMe) return RegisterSyncSource::InactiveSource(params);
#else
if (isMe || sourceType.m_backend == "calendar" ) {
if ( sourceType.m_format == "" ||
@@ -60,7 +61,7 @@ static SyncSource *createSource ( const SyncSourceParams &params )
isMe = sourceType.m_backend == "TDE PIM Task List";
#ifndef ENABLE_TDEPIMCAL
- if (isMe || sourceType.m_backend == "todo") return RegisterSyncSource::InactiveSource(params);
+ if (isMe) return RegisterSyncSource::InactiveSource(params);
#else
if (isMe || sourceType.m_backend == "todo") {
if ( sourceType.m_format == "" ||
@@ -74,7 +75,7 @@ static SyncSource *createSource ( const SyncSourceParams &params )
isMe = sourceType.m_backend == "TDE PIM Memos";
#ifndef ENABLE_TDEPIMCAL
- if (isMe || sourceType.m_backend == "memo") return RegisterSyncSource::InactiveSource(params);
+ if (isMe) return RegisterSyncSource::InactiveSource(params);
#else
if (isMe || sourceType.m_backend == "memo") {
if ( sourceType.m_format == "" ||