Mark Air/Water temp field red for wrong input.

As a warining for the user mark the field red.
If the user inputs invalid input that will be ignored
while parsing.
But with adding a one character error margin to prevent it from toggling
between Red and Yellow while editing existing values, for example "After
Deleting unit and last number after '.'"

Signed-off-by: Yousef Hamza <jo.adam.93@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Add option to save userid in data files

The userid of Subsurface Webservice can be included in locally saved xml
files and git repository.
For xml files, it is stored in userid tag. For git repo, it is stored
in 00-Subsurface file present in the repo.
Preference dialog and webservice dialog modified to include option
for saving userid locally.

In case of difference in default userid and userid in local file,
some semantics are followed. These can be referred to here:
http://lists.hohndel.org/pipermail/subsurface/2014-April/011422.html

Fixes #473

Signed-off-by: Venkatesh Shukla <venkatesh.shukla.eee11@iitbhu.ac.in>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Add a CMake based buildsystem for the tests.

This commit adds a CMake based buildsystem for the tests,
it separated the subsurface sources in small libraries to
make testing easyer ( subsurface core, subsurface ui,
subsurface profile, etc. )

There's no test yet, this however produces a compiled
and executable binary *on linux*. This file shouldn't
be needed on any other platform as this is not the main
build system, but the test build system.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
First test case implemented.

This is just a stub test case to show how a test case should be
implemented. every 'private slot' on the test classes will be
automatically executed when you run 'make test' on the terminal,
and a report will be generated with a failure / success.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Add a Readme.testing file with explanations on how to use the tests.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Use a list of files instead of filtering for *.c

While filtering for *.c / *.cpp is much smaller, it has the
disvantage of getting garbage on some computers as the devs
tends to create test files around.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Add the option to specify the LIBDCDEVEL path.

Use cmake .. -DLIBDCDEVEL="../your/library" to specify
where the libdc is, or leave it blank if you have it
installed on the system. you can change the location later
by running ccmake.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
git-save: improve commit authorship data

We used to always just commit as "subsurface@hohndel.org" because
libgit-19 doesn't have the interfaces to do user name lookup.  This does
better if you have libgit-20, using "git_signature_default()" to get the
actual user that does the saving.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>