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>
This commit is contained in:
parent
e05817a492
commit
7d06fd2869
|
@ -1,3 +1,4 @@
|
|||
|
||||
/*
|
||||
* Copyright (C) 2016 Emanoil Kotsev emanoil.kotsev@fincom.at
|
||||
*
|
||||
|
@ -46,7 +47,7 @@ static SyncSource *createSource ( const SyncSourceParams ¶ms )
|
|||
|
||||
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 ¶ms )
|
|||
|
||||
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 ¶ms )
|
|||
|
||||
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 == "" ||
|
||||
|
|
Loading…
Reference in New Issue