Commit graph

2960 commits

Author SHA1 Message Date
Patrick Ohly
545c71be68 KCalExtended, QtContacts: fixed initialization of QCoreApplication
As noticed in BMC #7401, a Q[Core]Application is needed before
Qt can be used. There is a global qApp pointer, which we should
use to find the global singleton. Creating a QCoreApplication
instead of a QApplication is good enough for us.
2010-09-29 14:38:11 +02:00
Patrick Ohly
15f3a898f7 KCalExtended: extended error messages
These error messages might be useful to track down BMC #6061.
2010-09-29 14:26:36 +02:00
Patrick Ohly
29717c59de KCalExtended: fixed UTF-8 handling (BMC #7401)
QString("foobar") only works for ASCII strings. const char pointers
which are in UTF-8 must use fromUtf8() explicitly. Same for conversion
back to UTF-8. Previously the code used toLocal8Bit(), which may or
may not be UTF-8 depending on the locale.

On a related note, test code which does not instantiate a QApplication
or QCoreApplication is incorrect and leads to different results than
code with such an instance. Our backends instantiate a QApplication if
necessary (but the exact way of doing it needs some tweaking), so the
result is deterministic.
2010-09-29 14:22:41 +02:00
Patrick Ohly
0859a8ce3d HACKING: added commit guidelines
This summarizes and documents established practices in
SyncEvolution, no new guidelines are added.
2010-09-25 08:09:29 -07:00
Patrick Ohly
bff517156c sync-ui: wrong direction of data transfer when talking to device (BMC #7091)
The settings for a device sync shows two checkboxes, one to "Send
changes to MYPHONE" the other to "Receive changes from MYPHONE". The
meaning of these two buttons are interchanged.

The settings are the same as in a web service. They were not mapped
correctly for a device because "refresh/one-way-from-server/client"
implies different data transfer directions depending on whether the
peer is a client or a server.

The solution for this issue is to switch the sync mode depending on
whether the config refers to a client ("PeerIsClient"). Added
an utility function and adapted:
- displaying existing configs
- changing configs
- refresh syncs in the emergency dialog
2010-09-24 17:51:27 -07:00
Patrick Ohly
512f175e6f autotools: fix libnotify problem on FC13
Recent libnotify releases require the app to pick gtk.
2010-09-16 14:44:07 +02:00
Patrick Ohly
5285051e3a sync-gtk.desktop.in: fixed syntax in non-MeeGo desktop file
Syntax error introduced in latest release: trailing ; missing.
2010-09-16 13:24:52 +02:00
Patrick Ohly
aded2028f4 documentation: improved explanation of "type"
The trailing exclamation mark for forcing a specific format
wasn't mentioned.
2010-09-13 08:05:26 +02:00
Patrick Ohly
3c7dca90e8 version bump: 1.0.99.6 2010-09-09 11:38:27 +02:00
Patrick Ohly
5a8574b7b1 nightly testing: adapted Cmdline test to string changes 2010-09-09 11:38:05 +02:00
Patrick Ohly
a62e0d0a9d NEWS: updated for 1.1 pre-release 2010-09-08 14:13:33 +02:00
Patrick Ohly
9db07a66a7 Nokia phones: avoid data loss in two-way sync due to X-EVOLUTION-UI-SLOT (MBC #2566)
Sending the X-EVOLUTION-UI-SLOT parameter to a Nokia phone when
updating an existing contact confuses the phone such that it drops the
phone number or email that had the parameter; the initial import was
okay. Reported for Nokia N81, E72, root-caused on a N97 mini.

Sending the X-EVOLUTION-UI-SLOT has very little value except when
talking to another SyncEvolution instance. All other SyncML peers
are expected to simply ignore the parameter, so there is no point
in sending it in the first place.

This is the solution implemented in this patch. A "rule" parameter
of the <parameter> element that defines X-EVOLUTION-UI-SLOT declares
that the parameter is to be ignored when parsing or generating vCards,
except when the peer is known to be SyncEvolution.

A remote peer is detected by the new 00_syncevolution.xml remote rule.
Locally, the parameter needs to be enabled when talking to Evolution
(evolution.xml) or to files which can also store the parameter
(all.xml). The later case is important for a SyncEvolution HTTP server
with file storage.

Running "./client-test Client::Sync::vcard30::testItems" against such
a SyncEvolution server confirmed that without all.xml, the
X-EVOLUTION-UI-SLOT got lost, which also confirms that the rule
mechanism works.
2010-09-08 13:44:55 +02:00
Patrick Ohly
4e72438e8f sync-ui (GTK version): updated .desktop file
As commented by Pietro Battiston, the generic "Sync (GTK)" name, "Up
to date" comment and "Internet" category inherited from Moblin/MeeGo
are not quite suitable for a general purpose Linux desktop.

This patch changes the non-Moblin/MeeGo .desktop file. The MeeGo
installation is not modified.

We did not have a good idea for a generic name and thus kept the GTK
part to distinguish this SyncEvolution GUI from future other ones.
Category and comment were easier: "Synchronize PIM data" and
"Office;PDA;GTK", with GTK likely to be ignored.
2010-09-08 13:44:33 +02:00
Patrick Ohly
ac3f4656b2 nightly testing: suppress leak in libebook
This is a single string which leaks in e_contact_new_from_vcard().
We definitely free the contact, so I'm fairly sure that it is not
our code leaking the memory => suppressing the report.
2010-09-08 15:52:16 +08:00
Patrick Ohly
ce198f75f3 syncevo-dbus-server: fixed compile issue with libsoup disabled (MBC #6367)
Having libsoup disabled is not recommended when initiating HTTP
SyncML sessions in syncevo-dbus-server, although it may work
with libcurl when ignoring that the D-Bus server is unresponsive
while doing HTTP.

Compiling without libsoup and without libcurl is useful when
using syncevo-dbus-server as HTTP server.
2010-09-07 17:03:34 +02:00
Patrick Ohly
3062c42935 documentation: extended description of "sync" property (MBC #6373)
The role of the "sync" property depends on the way how the sync
is started. Added some comments about HTTP server and SAN initiated
syncs.
2010-09-07 17:03:34 +02:00
Patrick Ohly
fd42ff95cb nightly testing: improved valgrind suppressions
Included some more stack wild cards because actual reports
in e_book_new_* did not quite match the patterns.

Added one suppressions for libical.
2010-09-07 22:04:55 +08:00
Patrick Ohly
e5c4bcace7 README: several improvements
Matthijs Kooijman recently started using SyncEvolution and took notes
about unclear explanations and missing information (--daemon!). This
useful feedback allowed to improve the documentation.
2010-09-06 18:08:19 +02:00
Patrick Ohly
abd74b72f2 EDS: revised workaround for D-Bus method timeouts (BMC #4026)
Using INT_MAX (= unlimited) as default D-Bus timeout seems
to trigger some untested code paths in system libs (use
of uninitialized memory in poll, increased leaks). Use
a large but finite timeout instead.
2010-09-06 23:48:38 +08:00
Patrick Ohly
9286d914c0 EDS: workaround for D-Bus method timeouts (BMC #4026)
libecal/ebook implementation based on D-Bus (Evolution >= 2.30)
inevitably will run into D-Bus timeouts as the amount of data
increases.

This patch moves an earlier hack written for Maemo into the core
code and enables it by default, if the EDS backends are active.
It works by intercepting dbus_connection_send_with_reply()
and substituting timeout_milliseconds==-1 ("default timeout
of 25 seconds") with timeout_milliseconds=INT_MAX ("no timeout").

Setting SYNCEVOLUTION_DBUS_TIMEOUT to number of milliseconds
allows controlling the final timeout value.
2010-09-03 15:40:05 +02:00
Patrick Ohly
a5e6f4840b evo.supp: updated suppressions for libical (BMC #6275)
valgrind suppressions for upstream libical. Similar to what we
had there already. Still need to investigate and report this upstream.
2010-09-03 11:27:50 +02:00
Patrick Ohly
9a9a2574eb nightly testing: adapted synccompare to mkcal
mkcal showed a difference in Client::Source::ical20::testImport
which can be ignored:
- CLASS=PUBLIC is the default, doesn't have to be there
2010-09-02 14:38:12 +02:00
Patrick Ohly
44ef5a385b nightly testing: log report generation functions
Instead of calling os.system() directly, use "runCommand()". That logs
the command to stdout and checks the result.
2010-09-02 13:49:24 +02:00
Patrick Ohly
b715ba1601 nightly testing: reorder columns so that valgrind and overall result come first
The tables got fairly large, requiring scrolling to see the real information
(overall success and valgrind errors). This patch moves these columns to the left
where they are visible by default.
2010-09-02 13:49:24 +02:00
Patrick Ohly
5a4c91382c nightly testing: added a column for "network failure"
This column is useful to determine at a glance whether tests
failed because of something outside of our control. The value
is also shown for each single test.
2010-09-02 13:48:46 +02:00
Patrick Ohly
97426b498e nightly testing: disable testDeleteAllRefresh for Google
The test depends on "refresh from client" semantic, something that
Google doesn't support.
2010-09-02 13:48:22 +02:00
Patrick Ohly
d20cbf9428 nightly testing: only include services in report which actually were active
The code added all services to the list which it encountered, including
those which were disabled and thus got skipped during testing. This
artificially increased the size of the report; not even sure whether
this was intentional. Now only active services are added.
2010-09-02 13:48:05 +02:00
Patrick Ohly
856e291844 Nokia phones: alarm times in UTC, sending PHOTO (BMC #1657, #5860)
Introduced a new remote rule for all devices made by Nokia. In that
rule, we set certain defaults which turned out to be useful for
a variety of existing phones:
- send alarm times in UTC (BMC #1657)
- ignore the incorrect 256 bytes size limit for PHOTOs
  and other properties (BMC #5860)

Should a specific model require different values, then a rule for
it after the initial 00_nokia.xml can override the defaults.
2010-09-01 18:44:02 +02:00
Patrick Ohly
b7d9f26f69 nightly testing: fixed caching of Evolution sources (BMC #5864)
"text" stands for Evolution memos and depends on
EvolutionCalendarSource. Added.

The name lookup differs for local and for sync indices, must do
the name lookup before calling checkEvolutionSource(). Fixed.
2010-09-01 18:05:27 +02:00
Patrick Ohly
19f703588f nightly testing: avoid shutdown issues due to caching Evolution sources (BMC #5864)
Destroying ORBit based Evolution backends at the very end of the
process life time caused assertions in ORBit. Added explicit cleanup
code which is called before triggering the normal library shutdown by
leaving main().
2010-09-01 18:01:19 +02:00
Patrick Ohly
b6e11b7652 KCalExtended: use "mkcal" as generic type name
Follow the KCalExtended -> mkcal rename. KCalExtended is
still accepted as an alias.
2010-09-01 16:06:16 +02:00
Patrick Ohly
815ca3fa98 KCalExtended: adapted "update" code patch to new API
The code had not been updated yet. To get it to compile,
a work around for BMC #6181 (upcasting to IncidenceBase)
was needed.
2010-09-01 16:03:47 +02:00
Patrick Ohly
7071f941cd command line: use % as escape character for luids
The command line, like a lot of other code, used the escape/unescape
code in SafeConfigNode. For historic reasons, that code used ! as
escape character, which is awkward for the command line, because
that is a special character.

Instead of further overloading the SafeConfigNode, this patch moves
the escape/unescape code into its own utility class. This is the
cleaner approach anyway. It also adds unit testing for the code.

All other users of the old code are updated. Care must be taken here
to not accidentally switch to a different escape mechanism, because
the mechanism must remain compatible with the old implementation.
2010-09-01 15:59:48 +02:00
Patrick Ohly
21f76cff07 command line: code clean-up around LUID escaping
Using std::string for both local IDs as respresented by the backend
and encoded as printed by the command line was confusing. It didn't
help that the m_luids member contained encoded strings, instead of
normal luids.

This patch introduces a dedicated class which holds an encoded luid,
and provides the necessary conversion functions. m_luids now really
contains plain luids, so its values can be passed to the backends
directly.
2010-09-01 15:48:29 +02:00
Patrick Ohly
8b6302badc Merge branch 'master', remote branch 'origin' 2010-08-31 10:09:44 +02:00
Patrick Ohly
96722196ef nightly testing: allow enabling valgrind for "prebuilt" test (BMC #1007)
--enable evolution=foo parameters are used for --enable prebuilt-bar,
but without also enabling native Evolution tests.
2010-08-31 15:52:47 +08:00
Patrick Ohly
2ab93b301f KCalExtended: fix for invalid memory access
Accessing pointer into temporary instance is only valid inside
the expression. Need to copy into result std::string right away.
2010-08-31 10:02:17 +02:00
Patrick Ohly
4db5fc14b6 testing: fixed "make dist" issue
The new templates had not been included in file list...
2010-08-30 16:29:36 +02:00
Patrick Ohly
9e55780cdc QtContacts: more QtContacts API related fixes (BMC #5710)
First, "query-builder=fetch,save" is obsolete.

Second, the modification time stamp is not updated in
saved contacts. Instead it has to be fetched explicitly
in a second request. This behavior is currently under
debate because it is not quite consistent with some of
the API documentation.
2010-08-27 13:30:05 +02:00
Patrick Ohly
bd32d1faa9 syncevo-phone-config: set consumerReady in output (BMC #3803)
None of the config templates added to the wiki contain the "consumerReady"
flag. Therefore they don't show up in the sync-ui once a user follows the
instructions for downloading them.

The tool now adds the flag automatically, because a user who downloads
the template does so in order to use it, regardless whether it is
ready or not (which we haven't defined anyway for phones).
2010-08-27 13:30:05 +02:00
Patrick Ohly
fa9c4c6bb9 phone templates: updated, copied from syncevolution.org Wiki (BMC #5727)
Merged all Nokia templates (S40, S60, Maemo) into one, because the
settings were the same anyway. The rationale is that it reduces the
number of options the user has to choose from.

Added Sony Ericsson, based on K750i.

Added names of working phones based on Wiki entries.
2010-08-27 13:30:05 +02:00
Patrick Ohly
614f0390b0 nightly testing: workaround for Evolution 2.30 storage shutdown (BMC #5864)
The D-Bus based Evolution Data Server calendar and contact daemons
(e-calendar-factory and e-contact-factory) shut down after 10 seconds of
inactivity.

Normally libecal/libebook detect that, but not when the client only uses the
synchronous API ("destroyed" signal not delivered, see e-cal.c). That affects
SyncEvolution.

This patch ensures that a EvolutionContactSource resp. EvolutionCalendarSource
remains open throughout the lifetime of the client-test app. This prevents
the storages from shutting down.

This instances are created on demand and deleted when the process quits.
This might be too late for ORBit based Evolution; there were error messages
after all tests succeeded and an assertion failure in ORBit, leading to
a nonzero return code.
2010-08-27 18:47:16 +08:00
Patrick Ohly
2353ee20ba evo.supp: added suppressions for Evolution 2.30 (BMC #1007)
With these suppressions, valgrind reports no problems when
running on Debian Testing. valgrind 3.6 was necessary to
avoid reports about glibc.
2010-08-27 18:44:12 +08:00
Patrick Ohly
a00cabeafe D-Bus API: fixed type signature
a{s} needs to be a(s); broke compilation of GTK GUI.
2010-08-25 23:09:28 +02:00
Patrick Ohly
1b243b7b83 D-Bus API: added Server.ConfigChanged signal (BMC #3558)
Watching for configuration changes (e.g., for refreshing the list of
servers in the GUI) currently is a bit cumbersome. It requires
watching for SessionChanged, request GetConfigs, and look if
the configs have changed. This is not really a problem, but it
might be more convenient to get notifications about config
changes directly.

This patch introduces a Server.ConfigChanged signal which is at the
end of a session if and only if it modified (removed, updated, added)
a config. This includes the Session.SetConfig() as well as command
line operations executed inside the server.

Testing the signal can only proof that it is emitted. Checking that it
is not emitted would have to block waiting for something, and it is
uncertain what that should be. SessionChanged may be emitted before
the ConfigChange signal and thus isn't suitable.
2010-08-25 23:09:28 +02:00
Patrick Ohly
a9e7a49705 D-Bus API: added Session.GetConfigName() (BMC #3559)
This call is useful for clients which haven't started the session
and need to know what peer it relates to, and also fo clients which
use non-normalized config name and need to know the normalized name.
2010-08-25 23:09:22 +02:00
Patrick Ohly
e30ae98e57 D-Bus API: added suppression of libnotify notifications (BMC #3560)
Genesis is already providing feedback about running syncs and thus
wants to suppress the notifications generated by syncevo-dbus-server
for it. With this patch it is possible.

This patch removes the m_attachedClients member and moves the attach
count into the Client class. The reason is two-fold:
a) m_attachedClients was simply redundant
b) entries were not removed (bug in the control flow of clientGone:
   if the client was found, which is always the case for any attached
   client, it returned without calling detachClientRefs())

The other new entry in Client is the boolean setting whether that
client wants to suppress notifications. If any client disables them,
they are disabled globally.
2010-08-25 23:09:14 +02:00
Patrick Ohly
4fad1303ae command line: start D-Bus session with "no-sync" flag unless running a sync (BMC #3562)
The main goal of the new D-Bus API is to avoid unnecessary (and incorrect)
updates in Genesis when running non-sync sessions with the command line.
This patch sets the flag accordingly to achieve this.

Note that the modified command line now fails with
org.freedesktop.DBus.Error.UnknownMethod when running against an old
syncevo-dbus-server. There's no fallback to the older StartSession
method. This shouldn't be necessary because the command line is shipped
with the server.

Just in case an INFO message is printed when the method is found to
be missing.
2010-08-25 11:07:51 +02:00
Patrick Ohly
5e219fedef D-Bus API: added Server.StartSessionWithFlags() and Session.GetFlags()
Clients like Genesis would like to know for which purpose a session
was created. If it was for changing the configuration, they can ignore
the session.  If it was for sync, then progress and result should be
displayed.

Starting a session with the new "no-sync" flag in the new
StartSessionWithFlags() achieves that. Note that it is up to the
clients to provide that hint; currently none of the clients do that.
2010-08-25 10:37:58 +02:00
Patrick Ohly
c7be6f1c49 test-dbus.py: fixed Python syntax error in last commit
Single quotation marks inside the string terminated the string
prematurely.
2010-08-25 10:30:24 +02:00