Commit graph

10303 commits

Author SHA1 Message Date
Tomaz Canabrava
bf3c18787e Silence warnings in treemodel
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-08 20:58:22 -08:00
Tomaz Canabrava
19299b94d0 Silence warnings in tankinfomodel
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-08 20:58:21 -08:00
Tomaz Canabrava
231f770e0c Silence warnings in models.cpp
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-08 20:58:21 -08:00
Tomaz Canabrava
bba62fec82 Silence warnings in GpsListModel
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-08 20:58:21 -08:00
Tomaz Canabrava
554b3fe630 Silence warnings in diveplotdatamodel.cpp
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-08 20:58:21 -08:00
Tomaz Canabrava
6c6e1ce6ff Silence warnings in Diveplannermodel
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-08 20:58:21 -08:00
Tomaz Canabrava
b23ff086cf Silence warnings in divelocationmodel.cpp
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-08 20:58:21 -08:00
Tomaz Canabrava
302f3ac6ae Silence warnings in divecomputermodel
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-08 20:58:21 -08:00
Tomaz Canabrava
14ad5b0bd2 Silence warnings in Divecomputerextradatamodel.cpp
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-08 20:58:21 -08:00
Tomaz Canabrava
fb037ba55f Silence warnings in CylinderModel
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-08 20:58:21 -08:00
Tomaz Canabrava
5f822948e6 Silence warnings in cleanerTableModel
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-08 20:58:17 -08:00
Tomaz Canabrava
6f494964de Silence warnings in TankItem
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-08 20:58:13 -08:00
Tomaz Canabrava
98e8a04d01 Silence warnings in Profilewidget2
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-08 20:58:09 -08:00
Tomaz Canabrava
16320bb580 Silence warnings in DiveProfileItem
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-08 20:58:05 -08:00
Tomaz Canabrava
dc6299185b Silence warnings in DiveEventItem
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-08 20:58:02 -08:00
Tomaz Canabrava
07606160cb Silence warnings in DiveCartesianAxis
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-08 20:57:52 -08:00
Dirk Hohndel
44deaf6c51 QMLProfile: account for device pixel ratio when transforming the profile
This is turning into the never ending story. The documentation is not helpful,
so this is the result of a ton of trial and error - and I worry that the next
device I try this on will once again break things.

I think the scaling may finally be correct. Take the viewport rectangles
of the profile and the painter, create their ratio, multiply in the device
pixel ratio and the scene size with a little margin added around it.

But the other magic (especially the shifting of the profile on the
painter) makes absolutely no sense to me.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-08 20:50:56 -08:00
Dirk Hohndel
298235eec7 QML UI: pass initial screen information to QMLManager
And make sure updates are delivered as they appear.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-08 20:50:49 -08:00
Dirk Hohndel
f798132862 QMLProfile: correctly track the device pixel ratio
And set the font size accordingly.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-08 20:50:47 -08:00
Dirk Hohndel
7f99d9e9c3 QMLManager: helper function for devivePixelRatio
This allows us to use the single manager object to keep track of the dpr of the
screen and to pass it on if it changes (or when it first becomes known).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-08 20:50:42 -08:00
Dirk Hohndel
308b69359d QMLManager: fix order of initialization
Just avoids warnings.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-08 20:50:35 -08:00
Dirk Hohndel
af2a90b536 QML UI: remove incorrect calculation of devicePixelRatio
That's just bogus.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-08 20:50:29 -08:00
Dirk Hohndel
c6c3967dd9 Fix include file ordering problem
Otherwise dc_serial_qt_open() is not declared.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-07 17:18:10 -08:00
Tomaz Canabrava
9d4429c212 Silence warnings in SettingsObjectWrapper.cpp
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-07 16:45:16 -08:00
Tomaz Canabrava
e64f13104d Silence warnings in save-git.c
Also, another unused function removed.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-07 16:44:50 -08:00
Tomaz Canabrava
a86a2e52c6 Silence warnings in planner.c
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-07 16:44:12 -08:00
Tomaz Canabrava
91ee285d93 Silence warnings in deco.c
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-07 16:43:57 -08:00
Tomaz Canabrava
f81dd80a48 Silence warnings in cochran.c
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-07 16:43:43 -08:00
Tomaz Canabrava
19b4477cd9 Silence warnings in libdivecomputer.c
There was also a function not being used that could be safely removed.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-07 16:42:56 -08:00
Tomaz Canabrava
2258939566 Silence warnings in parse-xml.c
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-07 16:42:30 -08:00
Tomaz Canabrava
b77c1d0d95 Silence warnings in load-git.c
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-07 16:42:26 -08:00
Tomaz Canabrava
3b782da960 Silence warnings in liquivision.c
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-07 16:34:17 -08:00
Tomaz Canabrava
62bdc9e3ec Silence warnings in git-access.c
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-07 16:32:41 -08:00
Tomaz Canabrava
9d3be5a165 Silence warnings in gaspressures.c
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-07 16:32:18 -08:00
Tomaz Canabrava
04e39704e2 Fix annoyances on file.c
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-07 11:24:10 -08:00
Tomaz Canabrava
beb0bc7a1d Silence more warnings
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-07 11:23:27 -08:00
Tomaz Canabrava
d7d8660bbb Clean up more unused variables
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-07 11:21:44 -08:00
Tomaz Canabrava
5bf0e48700 Remove unused variable
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-07 11:17:16 -08:00
Tomaz Canabrava
726e251ffc Simplify Q_FOREACH
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-07 11:16:44 -08:00
Tomaz Canabrava
3a003cb4fa Silence warnings for the GpsLocation
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-07 11:13:11 -08:00
Tomaz Canabrava
f25dce8511 Create a constructor with default parameters for some structs
Structs and classes in C++ are basically the same thing and we want to
create a few zero-initialized values for some of them; Sadly, C++ doesn't
have the nice static struct initialization that C has.

One way to deal with that is to create a constructor and pass default
values to it, another is lambda-initialization, but we don't use C++11,
yet.

Since we initializate stuff on the constructor, we don't need to
re-initializate things again on the initialization list (which is also why
I removed the QStrings from the initialization lists, they are
automatically initialized to empty)

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-07 11:13:11 -08:00
Tomaz Canabrava
2745beca5f Silence warning about unused parameter
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-07 11:00:27 -08:00
Dirk Hohndel
1e8b0874ab iOS build: show correct program name on launch screen
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-06 19:35:37 -08:00
Dirk Hohndel
8a96f6e90b iOS build: bundle application icons and Info.plist
This way the iDevice will show the correct name and icon for
Subsurface-mobile.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-06 17:51:09 -08:00
Dirk Hohndel
ba8014eb5c iOS build: restructure build.sh to create fat libraries
This way QtCreator can successfully link and deploy the app.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-06 17:49:35 -08:00
Dirk Hohndel
7ae4eed734 iOS build: more build.sh hacking
This now can create all the support libraries in armv7, but that isn't
sufficient for QtCreator which wants fat libraries with both armv7 and arm64 in
them.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-06 15:11:49 -08:00
Dirk Hohndel
8a6728eb08 Revert "iOS build: add the pri file for generating the version"
This reverts commit 7fac2a38b2.

Oops, that should have been dropped in the rebase before pushing the
changes. I did this instead in commit 99d1d8876e ("iOS build: create
ssrf-version.h by hand")
2016-03-06 11:13:04 -08:00
Dirk Hohndel
99d1d8876e iOS build: create ssrf-version.h by hand
It grabs the mobile version from the cmake file via grep.
🤦

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-06 11:03:11 -08:00
Tomaz Canabrava
7fac2a38b2 iOS build: add the pri file for generating the version
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-06 11:03:11 -08:00
Dirk Hohndel
8d9bffff64 iOS build: fix libdivecomputer build
This uses new configure options added to the Subsurface-branch of
libdivecomputer.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-06 11:03:11 -08:00