Instead of a separate CMakeLists.txt for the tests, make them built
together with the rest of the main project. This behaviour is off
by default, and can be enabled using ENABLE_TESTING.
Furthermore, the testing facilities of cmake are now used, so ctest
(invoked by `make test`) knows about the sqlb-unittests. Thus, adapt
the Travis build steps, building the main sources and executing the
tests twice, one for sqlite and one for sqlcipher.
The sqlitetablemodel will need to access the color
setting for null fields. This breaks the tests if
the PreferencesDialog files are not linked to the
test executable.
Now that the dependeny to the main window is removed from the
DBBrowserDB class we can get rid of all the dialogs and widget related
stuff in the cmake file used for the unit test project. Because our
Application class depends on the main window, too, the code for the CSV
tests is changed to use Qt's standard QApplication class.
Add a new test class for testing the import functionality. Currently
it's only covers some test cases for the CSV import.
Since the function to test here (DBBrowserDB::decodeCSV) is part of the
DBBrowserDB class, that class has a reference to the main window and the
main window basically depends on the entire rest of the project the
makefile grew quite a bit unfortunately.