Instead of a single executable running different unit tests at the
same time, split the sqlobjects and import parts out of it.
While this currently duplicates the cmake boilerplate for each,
it allows to finetune each properly (like build only the sources for
it, in the future), and to call each separately.
Add the QTEST_MAIN in each test, and remove the manual QCoreApplication
handling in TestImport (handled by QTEST_MAIN).
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.
Add an option to remember the location of the last opened or saved file
and use it as the default location for the next file dialog because
always going back to the default location set in the preferences dialog
can be a real hastle.
See issues #224, #276 and #281.
In the Database Structure tab and the DB Schema pane, replace any
sequence of whitespace characters by a single space character if the
one-line Schema view is enabled.
See issue #283.
Make sure to write the temporary CSV file in the proper encoding
(i.e. the one specified by the test data), and to use that encoding
when reading back from it.
This way the test should behave correctly, no matter the current
system charset.
Furthermore, fix and extend unicode data: the current utf8chars is
actually UTF-16 data, so rename it and change its encoding as such.
Add a proper utf8chars data with UTF-8-only characters.
Add support for non-integer primary keys, especially on table without
rowid column. The previous code often assumed that the rowid column or
its equivalent was a 64bit integer but SQLite allows any data, including
text, to be stored in there.
See issue #240.
Remove the DBBrowserDB::tableColumns() method which queries the database
for the column names of a given table and which is used for the SQL
export only. This function isn't needed at all because it generates a
whole bunch of queries for data which is already hold in memory...
In the Database Structure tab of the main window, add a new action to
the popup menu which open upon right clicking the tree view to allow
directly changing to the Browse Data tab with the current table being
selected automatically.
See issue #246.
If a syntax error is reported by SQLite during execution in the Execute
SQL tab of the main window try to locate the problematic SQL statement
and highlight it using a red squiggling line.
This is a first rough implementation of QScintilla support as SQL text
editor.
It should work mostly and build fine with qmake as well as cmake. The
new code supports all the features of the old one plus adding a few
subtle improvements. The main point of this, however, is reducing the
code we have to maintain and making it easier to add new features to the
editor.