Kexi/Porting to Qt&KF 5: Difference between revisions
< Kexi
No edit summary |
|||
Line 56: | Line 56: | ||
*KDE Frameworks 5 (KF5) are needed as build-time and run-time dependencies for Calligra, Kexi and our frameworks (KProperty, etc). | *KDE Frameworks 5 (KF5) are needed as build-time and run-time dependencies for Calligra, Kexi and our frameworks (KProperty, etc). | ||
*[https://community.kde.org/Frameworks/Building Use the kdesrc-build] tool to conveniently build KF5. Building by hand in an option if you accept extra work usually not needed for our development (see [[Frameworks/Building/Details]]). | *[https://community.kde.org/Frameworks/Building Use the kdesrc-build] tool to conveniently build KF5. Building by hand in an option if you accept extra work usually not needed for our development (see [[Frameworks/Building/Details]]). | ||
*There is the [[Frameworks/Building#Adjust_the_paths|Adjust the paths]] step. For Kexi development (and Calligra in general) it's good to re-use paths that we already use, see the [[Calligra/Building#Recommended_Setup|Recommended setup of the Calligra build instructions. This means that recommendation for the <tt>kdesrc-buildrc</tt> config file is: | *There is the [[Frameworks/Building#Adjust_the_paths|Adjust the paths]] step. For Kexi development (and Calligra in general) it's good to re-use paths that we already use, see the [[Calligra/Building/3#Recommended_Setup|Recommended setup]] of the Calligra build instructions. This means that recommendation for the <tt>kdesrc-buildrc</tt> config file is: | ||
source-dir /home/YOU/kde/src | source-dir /home/YOU/kde/src | ||
build-dir /home/YOU/kde/build | build-dir /home/YOU/kde/build |
Revision as of 11:37, 17 July 2015
The grand plan:
- [100%, builds, example and autotests work] Port
PredicateKDb↓ lib to Qt5/KF5- [100%] Port the SQLite driver
- [100%] Port the MySQL driver
- [10%] Port the PostgreSQL driver
- [10%] Port the xBase driver
- [10%] Port the Sybase driver
- [100%, builds, example and autotests work] Move koproperty lib from calligra to a separate KProperty↓ repo, port to Qt5/KF5
- [100%, builds, example and autotests work] Move koreport lib from calligra to a separate KReport↓ repo, port to Qt5/KF5
- Remove scripting or port scripting?
- [75%] Port Kexi (without KexiDB/calligradb, reporting, koproperty, koreport) to Qt 5 and use KDb/KProperty/KReport
- [100%] Remove unused calligradb lib and parts of KexiDB lib
- [92%] Port the Table plugin
- [92%] Port the Query plugin
- [90%] Port the Form plugin
- [90%] Port the Report plugin
- [50%] Port the Import/Export plugin
- [20%] Port the Migration module
- [0%] Reimplement report scripting using a simple solution to keep backward compatibility with Kexi 2 (see Scripting::*, KRScriptConstants, KRScriptDraw, KRScriptDebug)
- [35%] Improve Kexi stability after porting
- -- Kexi 3.0 beta release here. To indicate the nature of this version we never release 3.0 stable. --
- Add tests and/or examples to KReport, make it easier to understand as a framework
- Port some code from Kexi Reports (e.g. KexiReportView [1]) to KReport
- Make KReport lib dependent on KDb and remove code/API that becomes redundant (e.g. KoReportData)
- Add a new scripting module
- Use the module in Kexi Reports too, keeping backward compatibility with Kexi 2 scripting (add unit tests before porting to be very sure that compatibility is kept)
Rules
- To build Kexi, first build & install KDb, KProperty, KReport (master branches), then use calligra's 'framework' branch:
cd <<BUILDDIR>> cmake -DPRODUCTSET=kexi -DCMAKE_INSTALL_PREFIX=<<PREFIX>> -DCMAKE_BUILD_TYPE=Debug <<SRCDIR>>
- Because Kexi 3 uses KReport/KDb/KProperty frameworks (a code pulled out of calligra/), its Qt5 port has larger patches than other apps. To avoid troubles for Boud who merges changes calligra/2.9->frameworks I am keeping the port for Kexi in a branch kexi-frameworks-staniek of calligra.git. staniek merges it with frameworks and calligra/2.9 occasionally. Type "git checkout kexi-frameworks<<N>>-staniek". Type "git cherry -v frameworks" to see what commits we have here. (N>=8, check the largest available number using git branch -a grep kexi-frameworks"). Post-commit audits on Phabricator is a good approach for reviews.
- Calligra apps (Kexi too) sit in the framework branch during porting. master branch is frozen to avoid merge conflicts. After a successful port of all planned code, we'll be back to development in master for unstable code and calligra-3.x for 3.x stable code.
- Use personal git scratch repos to avoid stress with buildbreaks and unnecessary BUG/review notifications
- Synchronize with (boud's?) branch of the Qt5 port. Boud's advice: My approach is more like, run each of montel's scripts, fix what's wrong, then go on. It's not something that's easy to paralellize.
- Don't run astyle on the code, it pollutes history, and astyle-kdelibs is a bit broken
- Based on "Porting notes" below, keep porting of one aspect in one commit to simplify reviews
- Use the Phabricator for reviews
- Use kde-dev-scripts.git porting scripts, in particular
- Libs that are separate repos should use the framework template (see Links) and be ported to this layout (for now it's just kdb, kproperty, kreport).
TODO...
Notes and Status
- TODO: publish detailed checklist (in a spreadsheet?)
Dependencies
Please read all this section carefully before taking action.
- Qt 5. Get >=5.2 stable version from your distro, not forgetting about development packages (headers). If you feel you want it, build Qt 5, but it's usually not necessary extra work.
- CMake: version >=2.8.12+ and 3.x are both supported. Get it from your distro (recommended) or build it.
- KDE Frameworks 5 (KF5) are needed as build-time and run-time dependencies for Calligra, Kexi and our frameworks (KProperty, etc).
- Use the kdesrc-build tool to conveniently build KF5. Building by hand in an option if you accept extra work usually not needed for our development (see Frameworks/Building/Details).
- There is the Adjust the paths step. For Kexi development (and Calligra in general) it's good to re-use paths that we already use, see the Recommended setup of the Calligra build instructions. This means that recommendation for the kdesrc-buildrc config file is:
source-dir /home/YOU/kde/src build-dir /home/YOU/kde/build kdedir /home/YOU/kde/inst5
- Speed up: before using the KF5 with kdesrc-build, edit the kf5-qt5-build-include file and comment these lines if you don't want to build the workspace, applications and KDEPIM. This way only include kf5-frameworks-build-include lefts.
include kf5-workspace-build-include include kf5-applications-build-include include kf5-kdepim-build-include
- In particular, the kdesrc-build will install extra CMake Modules: [2], which is needed to make our software able to find the KF5 components at build time.
KDb
- Download/Build/Release info → KDb.
- Use master branch, official for Qt 5/KF 5, for all platforms, always stable
- Our target version is 3.0.0.
- To avoid conflicts, Qt 4 version kept for reference, has version 0.0.0.
- Depends only on system libraries and Qt, so it's a tier 1 framework
- Windows and Mac-specific matters.
- Porting to Qt 5 started by Wojtek Kosowicz (Jan 2015)
- Porting to Qt 5/Mac OS X started by Wojtek Kosowicz too (Jan 2015)
- Directory structure reorganized according to recommendations --Jstaniek (talk) 20:59, 23 February 2015 (UTC)
kproperty
- Our target version is 3.0.0 and KProperty project in Playground/Libs category of KDE projects
- Depends on system libraries and Qt, plus minor deps on KF5WidgetsAddons/KF5GuiAddons for some editors; later we may move this dependency to a plugin (so the core would stay Qt-only)
- Official git repo: kproperty, master branch (use: git clone kde:kproperty)
- Directory structure reorganized according to recommendations --Jstaniek (talk) 20:59, 23 February 2015 (UTC)
kreport
- Our target version is 3.0.0 and KReport project in Playground/Libs category of KDE projects
- To avoid conflicts, Qt 4 version kept for reference, has version 0.0.0.
- Depends on system libraries, Qt, and KProperty (tier 1), so it's a tier 2 framework, some deps on KF5WidgetsAddons (may be moved to a plugin so the core would stay Qt-only)
- Official git repo: kreport, master branch (use: git clone kde:kreport)
- Directory structure reorganized according to recommendations --Jstaniek (talk) 20:59, 23 February 2015 (UTC)
- Deps from calligra libs (copied, renamed): KoRuler, KoUnit
Porting scripts usage status
These porting scripts from the kf5 dir of the kde:kde-dev-scripts repo would be applied.
Legend: - = not run, + = run, N = not applicable, T = TODO(we know it's needed)
KDb | KProperty | KReport | Kexi | script-name + + + + adapt_cmakelists_file.pl + + + + adapt_knewstuff3_includes.pl + + + + add_missing_kpart_include.pl + + + + clean-forward-declaration.sh + + + + clean-includes.sh N N N - cmakelists_install_vars.pl (N/A because KDb/KProperty/KReport don't use KDE_*DIR variables) N N N N convert-kabc-to-kcontacts.pl (unused) + + + + convert-kaction.pl + + + - convert-kbuttongroup.pl T + + + convert-kcmdlineargs.pl + + + N convert-kcolordialog.pl + + + + convert-kdebug.pl N N N N convert-kdebug-with-argument.sh (N/A because KDb/KProperty/KReport don't use that) N + N + convert-kdialog.pl (helps but KProperty is largery broken by this script) N N N N convert-kdoublenuminput.pl N N N N convert-kfiledialog.pl N N N N convert-kfontcombobox.pl N N N T convert-kicon.pl N N N N convert-kimageio.pl N N N N convert-kintnuminput.pl N N N N convert-kintspinbox.pl N N N N convert-kjob.pl N N N + convert-klineedit.pl N N N + convert-klistwidget.pl N N N N convert-klocale-formatdate.pl N N N + convert-kmd5.pl N N N N convert-kmenubar.pl N N N + convert-kmenu.pl N N + + convert-kmimetype.pl N N N + convert-kprogressdialog.pl N N N + convert-kpushbutton.pl N N N + convert-ksavefile.pl N N N + convert-ksharedptr.pl N N N + convert-kshortcut.pl N N N N convert-ksplashscreen.pl N N N + convert-kstandarddirs.pl N N N + convert-ktabwidget.pl N N N + convert-ktempdir.pl + N + + convert-ktemporaryfile.pl N N N + convert-ktextbrowser.pl N + + + convert-kurl.pl N N N + convert-kvbox.pl + + + - convert-qkdebug-to-qcdebug.sh + + + + convert-qt5.pl + + + + convert-to-cmake-automoc.pl T N N T convert-to-k4aboutdata.pl - - - - convert-to-new-signal-slot-signal.pl N N N N dnssd-to-kdnssd.sh + + + + fix-ecm-install-icons.pl - - - - fix-kcm-module-desktop-file.sh - - - - install_forwarding_headers.pl N N N N port-kauthactions.pl N N N + port_to_autogenerate_export_header.sh + + + + remove-kde4support.pl N N N N remove_virtual_prefix.pl N N N + resolve_kuit.py T T T T search-kdelibs4support-header.sh + + + + frameworks/plasma-framework/src/tools/port-cmake-style.sh + + + - frameworks/plasma-framework/src/tools/port-qslots.sh + + + - frameworks/plasma-framework/src/tools/port-includes.sh
Git surgery
(Jstaniek (talk) 09:54, 23 February 2015 (UTC)) Repos are prepared by history rewrites such as:
git filter-branch --prune-empty -f --tree-filter \ '(mkdir -p src;mv Predicate src/predicate;mv Drivers src/drivers) 2> /dev/null || true' -- HEAD
Links
- Calligra 3.0 Porting Plan
- Calligra 3.0 Porting Notes
- Kexi tasks at todo.kde.org (KDE Identity needed), public read-only view
- OLD: Predicate tasks at todo.kde.org (KDE Identity needed), public read-only view
- Framework repository template - use for creating new frameworks
- real world examples: KDiagram (recommended because it's a Calligra project -- next-gen kdchart, kdgantt), KArchive (tier 1), KIO (tier 3), KImageFormats plugins
- http://www.proli.net/2014/06/21/porting-your-project-to-qt5kf5/
- CMake porting script port-cmake.sh
Docs
Background