Notes on porting to Qt5

Boudewijn Rempt boud at valdyas.org
Mon Jul 29 11:12:09 BST 2013


Technical Issues when Porting Calligra to Qt5.1

* cmake

CMake for KF5 is in a state of flux. In my branch, I just copied what was 
needed to make Calligra work. That's not very clean -- but the "right" way 
to use cmake seems to keep changing all the time :-(.

* plugins

Sebastian Kuegler has a number of patches on reviewboard that make porting 
plugins from the old KDE style to the new Qt style a breeze. We need to 
investigate whether we can reuse that work without dragging in all of KF5 
or Qt 5.2.

* qt vs kde

There are a lot of places where we can port directly from a KDE class to a 
Qt class. In other places, we will lose some functionality if we go with a 
Qt-only solution (like file dialogs). On the other hand, in many cases 
that will improve portability of Calligra to Windows, OSX and Android. I 
am really in favour of going Qt-only as much as possible for that reason.

This means no new uses of KLineEdit, KComboBox etc.

* kdefakes

The kdefakes library as started by Sebastian Sauer needs be expanded to be 
more than a set of fake headers. for instance...

* xmlgui

Unless we re-implement (or clone from e.g. Qt Creator) the shortcut editor 
and menu merging parts of xmlgui, we will need the xmlgui framework. See 
my other mail for how much that drags in. Or we can copy the relevant 
classes to kokdefakes...

* kparts

Plan and Kexi really use KParts, it seems. This is a bit of a porting 
nightmare.

* Optional KDE dependencies:

  - kross: for optional scripting plugins
  - kdepim integration (the kdepim api's we use have been deprecated for 
half a decade, but we never fixed that...)
  - kio: heavily dependent on dbus to function, it's a problem already on 
Windows and OSX. It's integration with qwidget is a problem on all mobile 
platforms.  I propose to stop using kio.

* cleanup moc-includes


Appendix:

List of KDE headers included in Calligra (243 items)

#include <k3command.h>
#include <k3iconview.h>
#include <k3listbox.h>
#include <k3listview.h>
#include <kabc/addressbook.h>
#include <kabc/addressee.h>
#include <kabc/phonenumber.h>
#include <kabc/stdaddressbook.h>
#include <kabc/vcardconverter.h>
#include <kaboutdata.h>
#include <kabstractfilewidget.h>
#include <kacceleratormanager.h>
#include <kaccelgen.h>
#include <kactioncollection.h>
#include <kaction.h>
#include <kactionmenu.h>
#include <kactionselector.h>
#include <KActivities/ResourceInstance>
#include <kapplication.h>
#include <KArchiveDirectory>
#include <kassistantdialog.h>
#include <kcal/attachment.h>
#include <kcal/attendee.h>
#include <kcal/calendarlocal.h>
#include <kcal/calendarresources.h>
#include <kcalendarsystem.h>
#include <kcal/icalformat.h>
#include <kcal/todo.h>
#include <kcal/vcalformat.h>
#include <KCategorizedSortFilterProxyModel>
#include <KCategorizedView>
#include <KCategoryDrawer>
#include <kcharselect.h>
#include <kcharsets.h>
#include <kcmdlineargs.h>
#include <kcodecs.h>
#include <kcolorbutton.h>
#include <kcolorcombo.h>
#include <kcolordialog.h>
#include <kcolormimedata.h>
#include <kcolorscheme.h>
#include <kcolorutils.h>
#include <kcombobox.h>
#include <kcompletionbox.h>
#include <kcompletion.h>
#include <kcomponentdata.h>
#include <KConfigDialog>
#include <KConfigDialogManager>
#include <kconfiggroup.h>
#include <kconfig.h>
#include <KConfigSkeleton>
#include <kcursor.h>
#include <kdatepicker.h>
#include <kdatetable.h>
#include <kdatetime.h>
#include <kdatetimewidget.h>
#include <kdatewidget.h>
#include <kdebug.h>
#include <kdeclarative.h>
#include <kde_file.h>
#include <kdemacros.h>
#include <kdeprintdialog.h>
#include <kdesktopfile.h>
#include <kdeversion.h>
#include <kdewin_export.h>
#include <kdialogbase.h>
#include <kdialog.h>
#include <kdiroperator.h>
#include <kdirselectdialog.h>
#include <kdirwatch.h>
#include <KDoubleValidator>
#include <keditlistbox.h>
#include <kedittoolbar.h>
#include <kemailsettings.h>
#include <kencodingprober.h>
#include <KExtendableItemDelegate>
#include <KFadeWidgetEffect>
#include <kfiledialog.h>
#include <kfilefiltercombo.h>
#include <kfile.h>
#include <KFileItemDelegate>
#include <kfileitem.h>
#include <kfilewidget.h>
#include <kfilterdev.h>
#include <kfinddialog.h>
#include <kfind.h>
#include <kfontchooser.h>
#include <kfontdialog.h>
#include <kfontrequester.h>
#include <kformuladocument.h>
#include <kformulamimesource.h>
#include <kgenericfactory.h>
#include <kglobal.h>
#include <kglobalsettings.h>
#include <kguiitem.h>
#include <khbox.h>
#include <khelpmenu.h>
#include <khistorycombobox.h>
#include <khtml_part.h>
#include <khtmlview.h>
#include <kicondialog.h>
#include <kiconeffect.h>
#include <kicon.h>
#include <kiconloader.h>
#include <kicontheme.h>
#include <kimageio.h>
#include <kinputdialog.h>
#include <KIntNumInput>
#include <kio/copyjob.h>
#include <kio/deletejob.h>
#include <kio/global.h>
#include <kio/jobclasses.h>
#include <kio/job.h>
#include <kio/jobuidelegate.h>
#include <kio/netaccess.h>
#include <kio/previewjob.h>
#include <kio/renamedialog.h>
#include <kio/thumbcreator.h>
#include <KJob>
#include <klibloader.h>
#include <klineedit.h>
#include <klistwidget.h>
#include <klocale.h>
#include <klocalizedstring.h>
#include <kmainwindow.h>
#include <kmenubar.h>
#include <kmenu.h>
#include <kmessagebox.h>
#include <kmessage.h>
#include <kmimetype.h>
#include <kmimetypetrader.h>
#include <KMultiTabBar>
#include <knewpassworddialog.h>
#include <knewstuff3/downloaddialog.h>
#include <knewstuff3/uploaddialog.h>
#include <knewstuff/downloaddialog.h>
#include <knotification.h>
#include <knotifyconfigwidget.h>
#include <knuminput.h>
#include <knumvalidator.h>
#include <kpagedialog.h>
#include <kpagewidgetmodel.h>
#include <kparts/browserextension.h>
#include <kparts/componentfactory.h>
#include <kparts/event.h>
#include <kparts/factory.h>
#include <kparts/mainwindow.h>
#include <kparts/part.h>
#include <kparts/partmanager.h>
#include <kparts/plugin.h>
#include <kpassivepopup.h>
#include <kpassworddialog.h>
#include <kpluginfactory.h>
#include <KPluginInfo>
#include <KPluginLoader>
#include <KPluginSelector>
#include <kprocess.h>
#include <kprogressdialog.h>
#include <kpropertiesdialog.h>
#include <kpushbutton.h>
#include <krandom.h>
#include <krdetailsectiondata.h>
#include <krecentdirs.h>
#include <krecentdocument.h>
#include <krecentfilesaction.h>
#include <kreplacedialog.h>
#include <kreplace.h>
#include <KRichTextWidget>
#include <Kross/Action>
#include <kross/core/actioncollection.h>
#include <kross/core/action.h>
#include <kross/core/interpreter.h>
#include <kross/core/manager.h>
#include <kross/core/object.h>
#include <Kross/Manager>
#include <kross/ui/model.h>
#include <kross/ui/view.h>
#include <krpos.h>
#include <krreportdata.h>
#include <krsectiondata.h>
#include <krsize.h>
#include <krun.h>
#include <krutils.h>
#include <ksavefile.h>
#include <kselectaction.h>
#include <kselector.h>
#include <kseparator.h>
#include <kservice.h>
#include <kservicetype.h>
#include <kservicetypetrader.h>
#include <ksharedconfig.h>
#include <ksharedptr.h>
#include <KShell>
#include <kshortcut.h>
#include <kshortcutsdialog.h>
#include <ksplashscreen.h>
#include <ksqueezedtextlabel.h>
#include <kstandardaction.h>
#include <kstandarddirs.h>
#include <kstandardguiitem.h>
#include <kstandardshortcut.h>
#include <kstatusbar.h>
#include <kstdaccel.h>
#include <kstdaction.h>
#include <KStringHandler>
#include <kstyle.h>
#include <ksystemtimezone.h>
#include <KSystemTimeZones>
#include <KTabBar>
#include <ktabwidget.h>
#include <ktar.h>
#include <ktempdir.h>
#include <ktemporaryfile.h>
#include <ktextbrowser.h>
#include <ktextedit.h>
#include <ktexteditor/viewcursorinterface.h>
#include <ktexteditor/viewstatusmsginterface.h>
#include <ktimezone.h>
#include <ktip.h>
#include <KTitleWidget>
#include <ktoggleaction.h>
#include <ktogglefullscreenaction.h>
#include <ktoolbar.h>
#include <ktoolinvocation.h>
#include <ktrader.h>
#include <kuniqueapplication.h>
#include <kurlcombobox.h>
#include <kurlcompletion.h>
#include <kurl.h>
#include <kurlrequesterdialog.h>
#include <kurlrequester.h>
#include <kuser.h>
#include <kvbox.h>
#include <kwallet.h>
#include <kwidgetitemdelegate.h>
#include <kwindowsystem.h>
#include <kwordwrap.h>
#include <kxmlguibuilder.h>
#include <kxmlguiclient.h>
#include <kxmlguifactory.h>
#include <kxmlguiwindow.h>
#include <kxyselector.h>
#include <kzip.h>




More information about the calligra-devel mailing list