Ticket #1446 (new defect)
Opened 2 years ago
kdepim-sync opensync 0.40 category filter is broken
| Reported by: | deloptes | Owned by: | dgollub |
|---|---|---|---|
| Priority: | normal | Milestone: | OpenSync 0.40 |
| Component: | OpenSync | Version: | |
| Severity: | normal | Keywords: | |
| Cc: |
Description
When looking into the code it seems that the plugin should add any category when the value is left empty however it does not.
There is also a minor issue with the print format in the connect_wrapper
diff -ur src.orig//datasource.cpp src/datasource.cpp
--- src.orig//datasource.cpp 2011-01-27 21:11:04.000000000 +0100
+++ src/datasource.cpp 2011-01-27 21:26:53.000000000 +0100
@@ -15,7 +15,7 @@
static void connect_wrapper(OSyncObjTypeSink *sink, OSyncPluginInfo *info, OSyncContext *ctx, void *userdata)
{
- osync_trace(TRACE_ENTRY, "%s(%p, %p, %p)", __PRETTY_FUNCTION__, sink, userdata, info, ctx);
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %p, %p)", __PRETTY_FUNCTION__, sink, userdata, info, ctx);
OSyncDataSource *obj = static_cast<OSyncDataSource *>(userdata);
obj->connect(sink, info, ctx);
osync_trace(TRACE_EXIT, "%s", __PRETTY_FUNCTION__);
@@ -286,6 +286,7 @@
bool OSyncDataSource::has_category(const QStringList &list) const
{
+ if ( list.isEmpty() ) return true; // no filter defined -> match all
if ( categories.isEmpty() ) return true; // no filter defined -> match all
for (QStringList::const_iterator it = list.begin(); it != list.end(); ++it ) {
Note: See
TracTickets for help on using
tickets.
