Don't use the QSettings class directly. This keeps the code more
consistent and makes it a bit easier to read. It also means that all
parts of the code profit from the settings cache that we have
implemented in the Settings class.
This should hopefully build just like before but reduce the number of
packages download when setting up the build environment. This way we
should get our Travis results faster and reduce the number of falsely
reported build errors, too.
This improves the BLOB detection in the Browse Data tab which was
working pretty poorly because it was only looking for null bytes, not
for any other non-printable characters.
See issue #1201.
Antlr uses the current system locale when parsing SQL statements. This
is problematic because SQL is case-independent and for converting
characters to lower/upper case it is going to use the locale. For
Turkish however this adds implicit conversions between the dotted and
dotless I which triggers another problem in Antlr: it doesn't cover the
whole Unicode character set. This commit fixes the implicit conversions.
See issue #1194.
This should improve the detection of read-only query statements vs.
modifiying statements in the Execute SQL tab. The idea is to stop
looking for the SELECT keyword at the beginning of the statement and
instead fully rely on whether SQLite returns any data for this
statement.
See issue #1185.
Remove the valid flag from the SqliteTableModel class and remove its
usage in the Execute SQL tab of the main window. I believe this hasn't
been used for some time now because the main sources of error should
really be noticed before the query is even handed over to the model.
Additionally the valid flag wasn't as realible either anymore because of
the multi-threaded execution of the model queries.
When changing between the filter line edits in the Browse Data tab, make
sure to only re-run the SQL query if the value of the filter line edits
have actually changed.
See issue #1187.
* Added an option in the context menu for using the currently selected cell
as filter in this column. This allows quick filtering by selected values.
* Changes to pull request #1182 requested by @MKleusberg: get internal cell data and check for the NULL special case.
Show better error message in some cirsumstances. This is most notable
when dropping a (database) file onto the structure tree view when no
database file is opened.
Don't ask the user whether to load a collation function if the requested
collation is already built into SQLite. Also, never override the
built-in functions.
See issue #1172.
Fix our default collation which we install when an unknown collation is
requested to (more or less) support UTF16 strings as well. Before this
UTF16 strings wouldn't compare correctly because they might contain null
bytes which would lead to only the first (few) byte(s) getting compared.
See issue #1172.
The no collate function warning is triggered in a thread which is used
for loading data. However, the warning is a message box and GUI elements
can only be drawn in the main thread. So the old code would crash. This
is fixed here by jumping to the main thread for showing the message box.
In the SqliteTableModel class we need to know the total number of rows
in the table or returned by the query. This takes a considerable amount
of time and can be moved into a separate thread. I haven't done any
performance measurements with this but it might speed up switching
between large tables a bit.
This fixes the automatic column width adjustment in the Execute SQL tab
results view. This was broken by the introduction of multi-threaded
loading of the table data.
There's no need to set sqlitebrowser as active window when updating
the main application window. The `activateWindow()` call prevents
switching workspaces in GNOME and Cinnamon desktops.
Fixes#934
Set a maximum height for the error area in the Execute SQL tab. This way
it doesn't occupy as much space by default.
Use two separate splitters instead of just one. This fixes the
horizontal tiling option.
See issue #380.
This avoids querying the database twice when selecting a new table. It's
an easy fix which works in most circumstances (all except for views with
enabled view editing). It can always be improved if necessary.
See issue #1108.