[SailfishDevel] SailfishOS as an OS/platform in Qt

Mohammed Hassan mohammed.hassan at jolla.com
Sat Dec 6 18:13:08 UTC 2014

At least my C++ includes have the same names.

The difference is the implementation but all implementations adhere to the same interface.


On Dec 6, 2014 2:46 PM, Tone Kastlunger <users.giulietta at gmail.com> wrote:
I think the idea to include different project files for defining which platform to compile on is a correct workaround;
however, this forces you to include files with different names depending on which system you want to compile on,
which means you need to have specific .pro files; which is ok, of course, but kind of just pushes the problem a bit further away, and does not make it disappear.

On Fri, Dec 5, 2014 at 4:03 PM, Mohammed Hassan <mohammed.hassan at jollamobile.com<mailto:mohammed.hassan at jollamobile.com>> wrote:
On Thu, Dec 04, 2014 at 10:12:37PM +0200, Tone Kastlunger wrote:
>  Anything that makes a developer's life easier is absolutely welcomed
>  I'd say.
>  I must admit to have cursed many times over such a feature not being
>  present (either as macro OR as selectior that win32:unix:mac: are..)
>  best,
>  tortoisedoc

I have an application which I build for Harmattan, SailfishOS and Android.

I have a common C++ codebase (95% common maybe), A QML abstraction and
platform specific QML ui bits.
I also have a separate .pro file per platform.
Each .pro file adds an OS specific macro.
harmattan.pro<http://harmattan.pro> adds -DHARMATTAN=1
sailfish.pro<http://sailfish.pro> adds -DSAILFISH=1
android.pro<http://android.pro> adds -DANDROID=1

Here is an example:

Works fine for me.

SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscribe at lists.sailfishos.org<mailto:devel-unsubscribe at lists.sailfishos.org>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20141206/dc3672ea/attachment.html>

More information about the Devel mailing list