Kexi/Porting to Qt&KF 5: Difference between revisions

From KDE Community Wiki
Line 89: Line 89:
**real world examples: [https://projects.kde.org/projects/frameworks/karchive/repository KArchive] (tier 1), [https://projects.kde.org/projects/frameworks/kio/repository KIO] (tier 3), [https://projects.kde.org/projects/frameworks/kimageformats/repository KImageFormats plugins]
**real world examples: [https://projects.kde.org/projects/frameworks/karchive/repository KArchive] (tier 1), [https://projects.kde.org/projects/frameworks/kio/repository KIO] (tier 3), [https://projects.kde.org/projects/frameworks/kimageformats/repository KImageFormats plugins]
*http://www.proli.net/2014/06/21/porting-your-project-to-qt5kf5/
*http://www.proli.net/2014/06/21/porting-your-project-to-qt5kf5/
**CMake porting script [http://quickgit.kde.org/?p=plasma-framework.git&a=blob&h=4d49e9ac199817dbf05398b89acf69791aedb530&hb=bc26ac13349a7a057621143d75e9c7b2518f5486&f=src%2Ftools%2Fport-cmake.sh]
**CMake porting script [http://quickgit.kde.org/?p=plasma-framework.git&a=blob&h=4d49e9ac199817dbf05398b89acf69791aedb530&hb=bc26ac13349a7a057621143d75e9c7b2518f5486&f=src%2Ftools%2Fport-cmake.sh port-cmake.sh]
Docs
Docs
*[[Frameworks]]
*[[Frameworks]]

Revision as of 20:28, 6 April 2015

Note

Draft. Based on notes from the Calligra 2014 Sprint. Each step leads to compiling (running?) state.
Started by jstaniek (talk) 19:06, 7 July 2014 (CET).


The grand plan:

  1. [75%, builds, example runs] Port Predicate↓ lib to Qt 5
  2. [60%] Move koproperty↓ lib to a separate repo, make it Qt-only and port to Qt5
  3. [10%] Move koreport↓ lib to a separate repo, make it Qt-only and port to Qt 5
    1. Remove scripting or port scripting?
  4. Port Kexi (without KexiDB/calligradb, reporting, KoReport) to Qt 5 and port Kexi to Predicate and the new koproperty/koreport
    1. Reimplement report scripting using a simple solution to keep backward compatibility with Kexi 2
    2. Remove then unused calligradb lib and parts of KexiDB lib
  5. Improve Kexi stability after porting
  6. -- Kexi 3.0 release here --
  7. Make koreport lib dependent on Predicate and remove code/API that becomes redundant (e.g. KoReportData)
  8. Add a new scripting module
  9. 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

  • Kexi's port itself is kept with other Calligra apps in the framework branch. During this time 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 twhat'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 reviewboard 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 predicate, koproperty, koreport).

TODO...

Notes and Status

  • TODO: publish detailed checklist (in a spreadsheet?)

Dependencies

  • CMake: version 3.x [1] and 2.8.12+ are both supported.
  • Extra CMake Modules: [2]

Predicate

  • Download/Build/Release info → Predicate.
  • Our target version is 1.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)
  • repo: git clone kde:clones/predicate/staniek/work predicate

Branches:

qt4 - old Qt4-based master moved there, always stable

master - official Qt 5 branch, all platforms, always stable

qt5-kosowicz - Wojtek's Qt 5/Linux To have it build on that branch please export qt5 install dir

export QTDIR=<path to your qt5 install dir, or qtbase build dir if using uninstalled>
export PATH=$QTDIR:$PATH


qt5mac-kosowicz - Wojtek's Qt 5/Mac OS X

koproperty

  • Our target version is 1.0.0 and KProperty name.
  • 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 tier1 framework, not dependent on KF5
  • Files with full history extracted from calligra's master to a temp repo by staniek: scratch/staniek/kproperty (use: git clone kde:scratch/staniek/kproperty, master branch)
  • Directory structure reorganized according to recommendations --Jstaniek (talk) 20:59, 23 February 2015 (UTC)

koreport

  • Our target version is 1.0.0 and KReport name.
  • 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, but not dependent on KF5
  • Files extracted from calligra's master to a temp repo by staniek: scratch/staniek/kreport (use: git clone kde:scratch/staniek/kreport, master branch)
  • Directory structure reorganized according to recommendations --Jstaniek (talk) 20:59, 23 February 2015 (UTC)
  • Deps from calligra libs (copied, renamed): KoRuler, KoUnit

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

Docs

Background