Change the layout of the preferences dialog a bit.
Remove the server selection combo box from the preferences dialog as it
will probably never be required. The way we do logins using certificates
kind of makes this obsolete, I think.
Restructure the whole remote code a little bit. Also add helper
functions here and there.
Show a list of our the CA certificates built into the application in the
preferences dialog. This list is read only of course but still
informative as it tells the user which sites are supported ny DB4S.
SQLite version 3.15.0 introduced a new feature called row values. These
are basically vectors of values that can be used to simplify some
expressions.
For example instead of this
CREATE TABLE x(a int, b int, c int, CHECK(a=1 and b=2));
you could write this:
CREATE TABLE x(a int, b int, c int, CHECK((a,b) = (1,2)));
However, the new syntax wasn't supported by our grammar parser which
made it impossible to access or edit that table. This commit attempts to
fix this.
Previously we'd only ignore errors about a single self signed
certificate but apparently it's an entirely different matter to Qt or
OpenSSL if we're talking about a self signed certificate in a
certificate chain.
This adds basic support for fetching databases via HTTPS using client
certificates. You can include CA certificates to verify any responses
from a server. For now, one test CA certificate is included but it's
easy to add more.
It's also possible to authentify the client using a client certificate,
a client key and a password. As of this commit all three items are
hardcoded.
It's still possible to access any remote database via HTTP but if a
request URL starts with 'https' this new mechanism will be used.
All certificates, keys, and password included in here are taken from my
node.js test server repository. They will be replaced soon-ish.
This adds some initial support for opening remote files. You can enter a
URL and DB4S will try to download the file. When successful you'll be
able to specify a place and name to save the file under, and after
saving it locally to disk it'll be opened just like any local database
file.
See the included TODO comments for missing features. Most notably
missing is the HTTPS and certificate handling code. Also any support
for storing the remote source of a database is lacking.
With this commit, we start to handle empty and NULL single cell
selections in a special way. Well, there's nothing special about it.
We just push them to inner buffer and clear outer clipboard. That's it.
NB: possible side effect might appear if you copy empty value,
then select some text and paste your empty value here. Nothing will
happen with text though, because, well, we wiped clipboard.
Plus, it fixes single-cell multiline text copy-pasting (#541)
Store and restore the plot settings for each table - just like the
filter values or the column widths. This way you can have multiple
plots, one for each table.
Also, save these settings in the project files.
Fetching all table data using the button in the plot area might take a
long time. This commit adds a progress dialog which is displayed while
loading all the data.
See issue #499.
This enables plotting even for those columns which contain NULL values.
To distinguish NULL from a numeric 0 there is nothing drawn for NULL
values, i.e. there is a gap in the graph.
See issue #822.
When editing a table (e.g. renaming a column) and there is another table
referencing the edited table in a foreign key, this could cause problems
when foreign key enforcement is enabled. We tried to circumnavigate
these issues by temporarily disabling foreign keys but that wouldn't
work. This commit tries to implement a better way of achieving the same
goal.
This hopefully prevents an error message from appearing when trying to
edit a table with multiple indices referring to it. While restoring
these indices the SQL commands wouldn't be separated by semicolons and
that might have caused problems.
Also trim the SQL commands to remove any excessive whitespace that might
be in them.
See issue #771.
Make the reload shortcut (at the moment F5 and Ctrl+R) dependent on the
currently active tab. This way it always performs some meaningful task,
depending on the current context.
See issue #759.
Report any errors that might occur while saving changes to the database
to the user. Also warn the user that this means the database wasn't
saved entirely.
See issue #770.
This was supposed to be fixed by 842aec8, but it wasn't. It now removes
everything that starts with two consecutive dashes, up until the end of
the respective line.
Building the project with Qt5 on macOS and browsing a huge table, the
scrollbar height was smaller than necessary. Scrolling to the end, some
rows were not showing up.
This was caused by the default vertical scroll mode, which is set to
ScrollPerPixel on macOS, and ScrollPerItem on other systems.
While profiling using Valgrind, two uninitialized value errors popped up,
because the dataSource iVar was used in the if check from the editTextChanged
function before initializing it. This commit moves the dataSource
initializations before any other calls.