[Libreoffice] Trinity Desktop Environment (TDE) desktop integraton for LibreOffice

Lubos Lunak l.lunak at suse.cz
Tue Nov 1 10:27:47 PDT 2011


On Monday 31 of October 2011, Timothy Pearson wrote:
> >  And I don't remember any reply to my questions, and I don't see anything
> > changing since then, so they still stand: What are the reasons this is
> > done as a huge copy&paste s/KDE/TDE/ patch?
>
> Primarily so that we can start hacking on the TDE module without breaking
> the KDE3 module, and also if you look at the patch the Qt classnames have
> all been altered.  The TDE developers are nearing the end of a yearlong
> project to convert TDE to use those class names, and as soon as the final
> transition is done the KDE3 module will be completely unbuildable, let
> alone usable, on TDE.

 If it's really only class name changes, then it's nothing that a couple of 
typedef's or #define's wouldn't solve.

> I have been discussing this with Michael Meeks, and basically if
> LibreOffice would rather we hack up the KDE3 module to work with TDE that
> is fine, but we will not be able to guarantee that our changes do not
> seriously break the module when used under KDE3.  I have serious concerns
> about the maintainability of such code, including readability,

 I picked a file at random, vcl/unx/kde/salnativewidgets-kde.cxx, compared it 
with the TDE file from the patch, and if I ignore type name changes, the 
differences boil down to the attached a.patch, which is 2 changes of less 
than 20 lines in total, for a file that is 70k big. Second random file 
picked, just in case, fpicker/source/unx/kde/kdefilepicker.cxx , is pretty 
much identical (again minus the type name changes).

 In other words, to me it looks like it would have been much less work to 
create the TDE version by something like:

foo-tde.cxx:
#define BUILDING_TDE
#define QApplication QTApplication
...
#include "foo-kde.cxx"

foo-kde.cxx:
...
#ifdef BUILDING_TDE // or possibly even better "#if TDE_IS_VERSION( 3,7,0 )"
...
#endif
...

> speed of patch acceptance (due to offsite KDE3 tests most likely being
> mandatory), and how prone the code will be to accidental breakage.

 If you start taking care of the KDE3/TDE code, you'll more or less end up 
being the maintainer of it. People occassionally do a build fix or similar, I 
rarely do a bugfix when I find the time and/or somebody whines a lot, but 
that's about it I expect.

 I would assume that TDE still maintains some kind of backwards 
compatibility[*], so you should generally know whether your changes are safe 
or whether it's something new that needs an #ifdef (in which case the 
TDE_IS_VERSION check is needed anyway). If something slips through, it can 
get fixed when somebody notices.

 So I don't know the extent of the changes you plan in the code, but from what 
I can see there does not seem to be a good reason to have a special copy of 
the sources for TDE.

[*] I still don't see it said anywhere if TDE maintains any API backwards 
compatibility with KDE3 or not. The configure checks in the patch search for 
KDE3/Qt3 names, so I would assume the answer is yes. If not, then at least 
that part of the patch is definitely wrong.

-- 
 Lubos Lunak
 l.lunak at suse.cz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: a.patch
Type: text/x-diff
Size: 1373 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20111101/6ce421b5/attachment.patch>


More information about the LibreOffice mailing list