syncevolution/src/backends/file
Patrick Ohly 12334eb676 SyncSource: remove special RegisterSyncSource::InactiveSource pointer
The special semantic of the former RegisterSyncSource::InactiveSource
(invalid pointer of value 1) caused bugs, like using it in
--print-databases (=> segfault) or not being able to store the result
of a createSource() directly in a smart pointer (=> potential leak in
SyncSource::createSource()).

Obviously a bad idea to start with. Replaced with a
RegisterSyncSource::InactiveSource() method which creates a real,
inactive SyncSource instance which can and must be deleted by the
caller.

This is a SyncSource API change for backend developers.
Instead of RegisterSyncSource::InactiveSource, return
RegisterSyncSource::InactiveSource().

Comparisons against RegisterSyncSource::InactiveSource needs
to be replaced with a call to the new SyncSource::isInactive().

User visible fixes:
* --print-databases: no longer crashes when EDS or KDE backends
  are not usable. Instead it prints "not enabled during compilation or
  not usable in the current environment".
* --print-databases: continues with other backends even if
  one backend throws an exception, as the KDE backend does
  when it cannot find Akonadi. Error messages are printed.
2012-03-09 07:25:11 +00:00
..
configure-sub.in Port build system to non-recursive Automake. 2011-08-30 16:38:34 +02:00
file.am Port build system to non-recursive Automake. 2011-08-30 16:38:34 +02:00
FileSyncSource.cpp phone sync: delete<->delete conflict + phone calendar+todo sync (BMC #23744) 2011-11-14 21:17:02 +01:00
FileSyncSource.h config: replaced overloaded "type" with "backend/databaseFormat/syncFormat/forceSyncFormat" (BMC #1023) 2011-02-03 12:59:02 +01:00
FileSyncSourceRegister.cpp SyncSource: remove special RegisterSyncSource::InactiveSource pointer 2012-03-09 07:25:11 +00:00