Even when trying to attach a non-encrypted database in the SQLCipher
build we would try to give a passphrase - though an empty one. This
yields an invalid SQL statement, so attaching would never work. This is
fixed by this commit.
See issue #1088.
The 'attach database' menu item was only activated after making changes
to the database and saving them. With this commit it's activated right
after opening a database, too.
This feature isn't explicitly available via the UI (yet) but should
prevent errors when the user is faster than the network connection, e.g.
when opening two directories very quickly.
In the Execute SQL tab we need to detect PRAGMA and VACUUM statements
before executing them in order to now execute them inside a transaction
which isn't supported by SQLite. If such a statement followed any other
statement however, the detection would fail, e.g.
pragma user_version=1; -- this works
pragma app_version=2; -- this fails
This should be fixed by this commit.
Some time ago we changed the Execute SQL tab to allow open SQL files
even if no database is loaded in order to provide an SQL editor without
needing a database.
If no database file is opened the Execute buttons were greyed out but
the F5/Ctrl+R shortcut would still work, causing an "out of memory"
error. That error doesn't cause any harm but is a bit confusing. So this
commit disables the keyboard shortcuts too.
When changing the client certificate we need to clear the authentication
and access cache of our Qt network access manager instance. If we don't
do so, Qt might decide to use the old certificate information which is
still in the cache for some recurring queries.
This improves the user experience for pushing database files. Before
this you had to type in the entire URL for pushing, e.g.:
https://db4s-beta.dbhub.io:5550/username/databasename
With this the host name as well as the user name is taken from the
currently active client certificate. So all you have to type in now is
the database name. And for this we make a sensible automatic suggestion
based on the name of the local file you're trying to push.
Note that while this makes pushing databases a lot easier, it still
doesn't implement proper version control or any extra code for handling
conflicts etc.
This commit removes the File -> Remote menu entirely. The only menu item
that was left was the Save to Remote item which is replaces by a button
in the remote dock.
The button is only enabled when a database file is opened and the user
has logged in using a certificate.
Clicking the button opens the same dialog and performs the same actions
as before. The only difference is that we don't use the first client
certificate - no matter which one it is - but instead use the client
certificate that was used for logging in.
Remove the browse mode ("Remote" / "Local") combo box from the remote
dock as it's currently not used for anything and probably won't be used
for the time being. So before it causes any confusion as to what it does
we should probably just get rid of it for now.