Qt models uniquely for mobile or desktop

Jan Mulder jlmulder at xs4all.nl
Wed Jan 10 03:43:53 PST 2018


On 09-01-18 10:36, Jan Mulder wrote:
> I found out (more or less accidentally) that, for example, the 
> divelistmodel.h/cpp code is uniquely used in mobile only. It is highly 
> likely that this is true for more models, or models that are uniquely 
> used in desktop.
> 
> So my question (mainly to Dirk, I think). Is it worthwhile to adapt our 
> build system to make this more explicit? I would at least help 
> developers to realize this. Not sure it would help with respect to 
> footprint of the (primarily mobile) application, as the tool chain might 
> weed out that unused code.

In the meantime, I added a PR (#1033) to implement a split in the models 
(only mobile, only desktop, and both). This is cmake stuff only, and no 
other code changes.

That said, with one small code change, I have another PR in queue (that 
waits for the decision on #1033), in which I have split-up the models 
even further: 3 models generically used, 3 models unique for mobile, and 
the remaining 17 models unique for desktop.(when I say model, I mean 
.cpp source file containing the model code). Obviously, those 17 desktop 
only model code it littered with #ifdef MOBILE blocks, put in in the 
early phases of the mobile development, as we did want it to get 
compiled. Formally, they are useless know, but notice that the current 
split action is based on the current functionality of the mobile app. 
And we all know that functionality can change, so models might get moved 
over time.

So, some more food for thought.

--jan


More information about the subsurface mailing list