[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: unsermake and qtonly
From:       Angus Leeming <leeming () lyx ! org>
Date:       2005-10-29 23:12:18
Message-ID: dk0vgi$jml$1 () sea ! gmane ! org
[Download RAW message or body]

Benjamin Meyer wrote:

> On Saturday 29 October 2005 11:42 am, Angus Leeming wrote:
>> Hi!
>>
>> I'm attempting to port KDVI to Windows
>>     http://sourceforge.net/projects/qdvi
>> by stripping out the kdelibs dependencies.
> 
> Do you happen to have a list of what features you had the hardest time
> removing/replacing?

My real difficulty has been in keeping the four repositories in sync. (Two
QDVI and two KViewShell, one for the 3.5 "working" branch and one for the
trunk) Fortunately, the KDVI developers, Wilfried and Stefan, have been
more than welcoming, and I've been able to contribute some bits back to
the kdvi sources as I've gone along with my big boots on, stomping on
things.

It'd be nice to think that the two repositories will merge a little, using
common wrappers for things like kdDebug/qDebug, KMenu/QMenu. That would
make it easier to see where the real, substantive changes are.

Onto the code:

KDialogBase was a bit of a challenge. I think that my result,
qdvi_dialogbase.{cpp,h} in the trunk repository is a lot cleaner, but then
I would, wouldn't I :) I've managed to replace the (Janus and MainWidget)
pointers with just one, but I've still to port KJanus. Fortunately, I need
only a tabbed view for QDVI and Qt4 does most of the work anyway.

I'd say, as a newcomer looking in, that there's a fair bit of redundancy
between the non-gui parts of Qt and KDE. For example KProcess and QProcess
do the same thing. I can, of course, see why both have existed
historically, but certainly as far as KDVI is concerned, there's no need
for KProcess anymore. Similarly, why KTempFile/QTemporaryFile,
KURL/QURL/Q3Url... ?

The main problem I've had is that of any newcomer: not knowing where to
look first :) That's not helped by the fact that the KParts code (which I
don't need at all) is not documented very well. I spent the first 6 weeks
or so just trying to get familiar with the code. Only in the last month or
so have I made real inroads into the port.

If we look at the remaining kdelibs includes in QDVI, they can be split
into three parts.

Part A is the DVI widget itself. That's everything up to the first
====================== line below.

Part B is the stuff that I've wrapped up in qdvi_foo clothes and that will
need porting eventually. That's everything up to the second
====================== line below. qdvi_messagebox, qdvi_iconloader,
qdvi_dialogbase. Lots of work, but none of it very technically
challenging.

Part C is the supporting main window, toolbars, menubars, statusbar. That's
everything below the second ====================== line below.

I plan to keep parts A and B, replacing the kdelibs stuff, and to throw
away part C, writing my own simple interface. As such, the list below no
longer looks toooooooo scary :)

qdvi/dviRenderer.h:
        #include <kurl.h>

qdvi/kmultipage.h:
        #include <kurl.h>
        #include <kxmlguiclient.h>

qdvi/kprintDialogPage_pageoptions.h:
        #include <kdeprint/kprintdialogpage.h>

qdvi/kviewpart_iface.h:
        #include <kurl.h>
        #include <kxmlguiclient.h>

qdvi/dviRenderer.cpp:
        #include <kmimemagic.h>
        #include <kprocess.h>
        #include <kstandarddirs.h>

qdvi/dviRenderer_export.cpp:
        #include <kfiledialog.h>
        #include <kprinter.h>
        #include <kprocess.h>

qdvi/dviRenderer_prescan.cpp:
        #include <kmimetype.h>

qdvi/infodialog.cpp:
        #include <kio/global.h>

qdvi/kdvi_multipage.cpp:
        #include <kaboutdata.h>
        #include <kaction.h>
        #include <kconfigdialog.h>
        #include <kfiledialog.h>
        #include <kinstance.h>

qdvi/kmultipage.cpp:
        #include <kactioncollection.h>
        #include <kfiledialog.h>
        #include <kio/job.h>
        #include <kprinter.h>
        #include <ktoolinvocation.h>

qdvi/optionDialogSpecialWidget.cpp:
        #include <ktoolinvocation.h>

qdvi/presentationwidget.cpp:
        #include <kcursor.h>
        #include <kwin.h>

qdvi/psgs.cpp:
        #include <kurl.h>

qdvi/renderedDocumentPagePrinter.cpp:
        #include <kprinter.h>

qdvi/special.cpp:
        #include <kmimetype.h>

============================================================

qdvi/qdvi_messagebox.cpp:
        #include <kapplication.h>
        #include <kconfig.h>
        #include <kdialog.h>
        #include <kdialogbase.h>
        #include <kguiitem.h>
        #include <kmessagebox.h>
        #include <kstdguiitem.h>

qdvi/qdvi_dialogbase.cpp:
        #include <kjanuswidget.h>
        #include <ktoolinvocation.h>
        #include <kurllabel.h>
        #include <kvbox.h>

qdvi/qdvi_iconloader.cpp:
        #include <kglobal.h>
        #include <kiconloader.h>

============================================================

qdvi/kviewpart.cpp:
        #include <kaboutdata.h>
        #include <kaccel.h>
        #include <kaction.h>
        #include <kconfigdialog.h>
        #include <kdirwatch.h>
        #include <kfiledialog.h>
        #include <kfilterbase.h>
        #include <kfilterdev.h>
        #include <kinstance.h>
        #include <kstdaction.h>

qdvi/kviewshell.cpp:
        #include <k3urldrag.h>
        #include <kaction.h>
        #include <kapplication.h>
        #include <kedittoolbar.h>
        #include <kkeydialog.h>
        #include <kmenubar.h>
        #include <kmimetype.h>
        #include <kstatusbar.h>
        #include <kstdaction.h>

qdvi/main.cpp:
        #include <kaboutdata.h>
        #include <kapplication.h>
        #include <kcmdlineargs.h>
        #include <kurl.h>

qdvi/qdvi_mainwindow.h:
        #include <kmainwindow.h>

qdvi/qdvi_mainwindow.cpp:
        #include <kaccel.h>
        #include <khelpmenu.h>
        #include <kinstance.h>
        #include <kstandarddirs.h>
        #include <kstatusbar.h>
        #include <kxmlguifactory.h>


 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic