<div dir="ltr"><div><div><div><div><div><div><div><div><div><div><div><div>Hello Crazy People,<br><br></div>It's that time of the year again, where we should talk about new things to implement for next versions. I already talked to dirk about one thing that's been bothering me, but that needs a bit of background history first:<br><br></div>=== BACKGROUND HISTORY ===<br><br></div>Since I joined Subsurface a lot of time ago, the internet didn't really existed and geocities was still a thing, the biggest social network of that time was IRC and people used to think that computer virus could make people sick. As you may know, Those where dark ages, and subsurface was written in mainly in GTK back then because it was the language that the Finnish Guy (tm) used to know and love. Since than I started a crazy hacking spree (followed by Dirk, Robert, Anton, Deivide, and quite a few more) to port the original GTK version to Qt, and We actually managed to do that in around six months (adding a lot of new things, removing a lot of other things in the process, that where brougth back to life a bit later)<br><br></div>There are things that I'm really proud on how I ported Subsurface, Mainly the profile is *much* more flexible than the old one was (the proof is that Dirk and Robert keep adding things to it even tougth they always complain that they don't know C++ or Qt), and there are things that I'm really not proud on how I ported ( the MainTab, for instance, and the new Configuration - but the configuration is a different story... )<br><br></div>Then Mobile came to Existence and this was mostly a curse because the codebase for subsurface wasn't adapted at all for mobile, my port to Qt was a "let's try to port this as fast as we can, and also let's keep this as C as possible", but Qml doesn't understands C - it understands QObject inheritance and Q_PROPERTIES, so a lot of boilerplate code was created (the ObjectHelpers and *tons* of code for that) that basically duplicated the C code in a C++/Qt way to feed the QML interface on the Mobile usecase.<br><br></div>=== Where we stand today ===<br><br></div><div>One option is to try to make next Subsurface the Subsurface 5:<br><br></div>We have an *Awesome* dive log, and we can continue to develop that, or we can do a step back and try to change the *bare minimum* on the core to facilitate the integration on the Qml engine without code duplication, my take on that would be to port the C-Structs to C++ Classes that inherit from QObject (because we can fed those to QML), not messing with the algorithms nor anything else that we don't need to touch - those should still be in C, algougth compiled with a c++ compiler to have C++ linkage and we can call their codeĀ  from QML, while also using those parts on the Desktop version reducing the amount of duplicated code.<br><br></div>Other option is to try to make next Subsurface the Subsurface 4.7:<br><br></div>Continue duplicating code for the Mobile version (that has a small userbase but will probabbly gain an increase of usage over the years) and cleaning / improving the Desktop version, changing things on the core as little as we need.<br><br></div>What you guys think?<br></div>I'm back on hacking, but I need directions, remember that I don't dive that much. :)<br><br></div>Tomaz<br></div>