Note: As my experience and understanding of migrating to Qt5 / Sailfish Alpha 2 increases, I will update this post if required.
Having installed the second Sailfish Alpha (which I will refer to as Alpha 2), and checked that the default "Hello Sailors" project runs on the Emulator, I jumped in feet first to try and get LandedSettings running using Qt5.
Almost at once I ran into a problem, one that should have been obvious from the start: LandedSettings depends on an import library AbstractUI, and of course this must be migrated first.
As abstractui is intended to abstract out the differences between Harmattan and Sailfish, and Sailfish is now on a higher Qt level than Harmattan this does raise the question whether this approach is still valid. But I prefer to defer that question to slightly later For the moment I want to get LandedSetttings up and running on the new Alpha, thus I need to get AbstractUI ported.
The irony of a tool that was intended to ease porting needing porting itself does not escape me.
Therefore I decided to make a throwaway demo import library native to Qt5, and a throwaway QML project to import it. I could then compare the throwaway library to AbstractUI, and identify what needs changing.
The first pleasant surprise is that there is now a project template for Libraries. I chose "New Project / Libraries / Qt Quick 2 Extension Plugin". In the first alpha this template was not available. if I remember correctly i actually created the project in the Qt Project SDK as a a Qt Quick 1 Extension Plugin, and adapted it for Sailfish to the point that I got it working.
Having tested that the throwaway was importable and installable (more on this in a follow-up post) it was time to start porting abstractui.
As the original Sailfish flavour of the abstractui library was not created in the Sailfish SDK (but now could be), I decided to start from fresh, creating a new project in the Saillfish QtCreator, and would then merge in the bits of code required from the old version of the library.