aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2013-10-15Get the version at make time, not qmake timeGravatar Dirk Hohndel
Let's see how many tries it will take me to get this one right... The name of the .dmg needs to be determined when running make, not qmake. Otherwise we'd have to force the user to run qmake every time version.h changes. This looks better. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-14Actually get the correct full version for DMGGravatar Dirk Hohndel
This is what I get for trying to be smart and pushing a change from the Linux box because the fix was 'obvious'. Duh. It was not. In order to get the real full version including the git hash we always have to pass 'linux' to the gen-version script, even on a Mac. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-14Use full version for Mac dmg fileGravatar Dirk Hohndel
Only tagged releases should get the short version number. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-14Only calculate decompression if the user turned the preference onGravatar Dirk Hohndel
There's no point in wasting the cycles otherwise. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-14Print: remove profile border when printingGravatar Lubomir I. Ivanov
Custom widget frame styles such as 'Sunken' and 'Raised' which seem to varry between OS will be captured as well: http://harmattan-dev.nokia.com/docs/library/html/qt4/qframe.html#Shape-enum So instead we temporarily set the profile frame to QFrame::NoFrame and then restore it to the previous value. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-14INSTALL: add notes for a native win32 buildGravatar Lubomir I. Ivanov
There are more details to it, but i decided to exclude them as these seem situational: - libraries tend to mostly fail to build from source on win32... - libiconv may be required by an oddly pre-built libxml2 package - pkg-config requires a CMD wrapper so that an extra CRLF line is trimmed from stdout If someone takes on this task, i guess he/she may pop on the mailing list for questions. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-14Enable file selection dialog for preferencesGravatar Miika Turkia
This enabled a file selection dialog for selecting default log file under the preferences. [Dirk Hohndel: added missing declaration to .h file] Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-14Fix the DC ceiling in the profile.Gravatar Patrick Valsecchi
entry->ndl is computed and therefore should not be used for showing the DC's ceiling. That made the DC ceiling jump to 0m when the computed celing was at 0. Signed-off-by: Patrick Valsecchi <patrick@thus.ch> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-13Use QDir::currentPath to get the current directoryGravatar Miika Turkia
applicationDirPath() does not find the source directory (if build directory differs from source directory). Using currentPath() allows one to still run built Subsurface from the source directory and find e.g. xslt_path. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-13Models: fix two potential crashesGravatar Lubomir I. Ivanov
CylinderModels::setDive() and WeightModel::setDive() have potential to pass the 'last' argument to beginInsertRows() as a negative number which triggers an assert that 'last' cannot be smaller than 'first'. Patch attempts to fix that by only calling beginInsertRows() when there is at least one row to insert. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-13subsurface-install.pri: attempt to fix the perl command lineGravatar Lubomir I. Ivanov
\$^ or $(DESTDIR_TARGET) do not expand for some reason, but also we cannot use $$DESTDIR, $$TARGET, or $$DESTDIR_TARGET because these are empty. So what we use is a hardcoded path (debug/release) and a target with an .exe suffix on win32. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-13subsurface-configure.pri: fix for the QMAKE_HOST.os checkGravatar Lubomir I. Ivanov
Looks like having $$ before QMAKE_HOST.os does not work. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-13Adds missing "EndPress" column header for cylinder tableGravatar Tim Wootton
The end pressure was appearing in the column headed "O2" Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-13Try to fix the Google Maps issueGravatar Dirk Hohndel
This is trial and error, based on a few websites describing the api. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-13Fix uninitialized variableGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-12Include location flag in bundleGravatar Dirk Hohndel
The little marker flag for our dives was missing on the Mac. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-12Fix two issues with directory searches on WindowsGravatar Thiago Macieira
First, make sure we actually match /c/windows from the beginning, not if it occurs in the middle of the path. Second, make sure that directories containing the binaries are searched first. Do that by using unshift (prepend) instead of push (append). Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-11Fix dive planner sidebar depth unitsGravatar Linus Torvalds
The dive planner always showed the depth in our internal units, ie millimeter, in the sidebar that showed the plan points. That made little sense in metric mode, and none at all in imperial. The _graph_ showed things in meter and feet. So make the DivePlannerPointsModel always convert things to and from the user units. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-11Install qt translations into Mac bundleGravatar Dirk Hohndel
This is much harder than it should be... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-11Better diagnostic message when not finding translationsGravatar Dirk Hohndel
This way we know where the program was looking for the files. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-11Ignore the Subsurface.app folderGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-11Get cross build to work againGravatar Dirk Hohndel
...and re-enable silent mode by default for cross builds Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-11Tabify win-ldd.pl - subsurface coding styleGravatar Thiago Macieira
Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-11Ignore the Windows system directories when searching for DLLsGravatar Thiago Macieira
We don't want to deploy kernel32.dll or such. Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-11Fix the DLL search path orderGravatar Thiago Macieira
The correct order on Windows is: 1. Local directory (relative to the binary) 2. $PATH 3. System dirs We insert our -L flags between 1 and 2 above. Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-11Set the objdump default to "objdump" in win-ldd.plGravatar Thiago Macieira
The environment variable is to be used if the caller knows that the default objdump can't parse Windows DLL files (COFF-PE). On Fedora, Debian, and OpenSUSE, the default objdump can, and obviously the native one on Windows can too. Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-11Fix deployment: make isn't expanding $(DESTDIR_TARGET) for meGravatar Thiago Macieira
I don't know why. Working around the issue by using $^ (all dependencies) and listing the files to be processed as dependencies for the rule. Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-11Fix the sed regexp: we want to match "lib" followed by : or at the endGravatar Thiago Macieira
There was one extra backslash that got passed to sed, which meant it matched a literal dollar sign. Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-11Fix non-expansion of some Makefile variablesGravatar Thiago Macieira
Apparently SED isn't set on Windows-native Makefiles. And for some reason, $(CC) wasn't getting expanded properly -- it expanded to "cc", even though it is set at the beginning of the Makefile to "gcc". Reported-by: Lubomir I. Ivanov Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-11Advise people to compile libdivecomputer only staticallyGravatar Thiago Macieira
Because Linus says so. Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-11Remove some arguments, that we find in plot_dataGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-11Remove unused arg in plot_cylinder_pressureGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-11Fix bug in Documentation make invocationGravatar Dirk Hohndel
Without the trailing slash the Makefile in Documentation would create the wrong target name (with run-together path / filename) and therefore would always recompile the documentation. And we don't need to check that the Documentation directory exists - it's part of our sources... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-11We no longer use the .translation fileGravatar Dirk Hohndel
This was a broken workaround, anyway. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-11Fix translation compilationGravatar Dirk Hohndel
Now the Makefile should automatically detect when it needs to create a specific .qm file and do the right thing to create it. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-11Finish clearing up the TableModelsGravatar Tomaz Canabrava
There are other models ( Tree Models and Model Items ) that are not affected by this commits, this is already a good cleanup but it can be extended to also fix those two other possibilities. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-10-11Another Model CleanupGravatar Tomaz Canabrava
Conversion of the WSInfoModel, that populates the list of weigthsystems in the Equipment tab. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-10-11Second model converted to be less boilerplated.Gravatar Tomaz Canabrava
Second model converted to be less boilerplated, there are right now 7 models that will need to be ported. each model can remove around 30 to 40 LOC, so this is not such a bigger improvement, but it's an 'keeping an eye on the future'. Also fixed a bug where the returned value was dummy. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-10-11Begin to Cleanup the Models, trying to reduce boilerplate.Gravatar Tomaz Canabrava
The Model View system in Qt is *very* verbose, this is the beginning of a series of patches that will concentrate the boilerplate somewhere and reduce the amount of lines and will also try to make the code cleaner and easyer to understand, Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-10-11Good deal of whitespace fixes and code cleanup.Gravatar Tomaz Canabrava
I just went thru all of subsurface code removing some whitespaces issues and trying to make the code prettyer, I also removed a few QString issues.d Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-10-11Added rules on gitignore for the Translations generation.Gravatar Tomaz Canabrava
Added rules on the gitignore file for ignoring the translations that are generated during compile time. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-10-10Automatically build translationsGravatar Dirk Hohndel
This runs lrelease against the .ts files and automatically recreates the .qm files if any of the .ts files changes. This also moves the .ts files into the translations directory. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-10Try harder to find the translation filesGravatar Dirk Hohndel
They could be below the data directory ("share") or next to it. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-10Work around a Qt Locale bug on MacGravatar Dirk Hohndel
With Qt4.8.5 Locale::uiLanguages() sometimes doesn't return the country, just the language. This works around this by recreating the locale if this has happened. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-10Fix some paths for Mac and add translations to bundleGravatar Dirk Hohndel
'share' is under Subsurface.app - you don't need a 'subsurface' directory under 'share'. This also installs the processed translations. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-10Fix typo in the Mac build instructionsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-10subsurface-gen-version.pri: pass the current OS to get-versionGravatar Lubomir I. Ivanov
We check the current OS and pass it as 'darwin' (osx), 'linux' or 'win' to the get-version shell script. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-10subsurface-configure.pri: disable auto-"silent" mode for win32Gravatar Lubomir I. Ivanov
Certain versions of mingw32-make will try to "CreateProcess" passing the contents of CC and CXX. On win32, with CONFIG += silent CC and CXX become composite containing multiple commands such as "@echo... && gcc", which produces undesired results. For the time being, do not automatically enable "silent" mode if the current OS is win32. Possibly a better solution can be found later on. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-10Added salinity to the Dive Info tab.Gravatar Patrick Valsecchi
Took the opportunity to remove some copy&paste. Signed-off-by: Patrick Valsecchi <patrick@thus.ch>
2013-10-10Fixed mix of spaces and tabs in maintab.uiGravatar Patrick Valsecchi
Signed-off-by: Patrick Valsecchi <patrick@thus.ch>