In the plot code use the blockSignals() method instead of connecting and
disconnecting signals and slots every time. The disconnects didn't
really work using the new C++11 connection code, so this commit restored
the functionality as it was intended.
This means that *a ton* of calls to updatePlot() are eliminated which
improves the performance.
It also avoid messing up the graph selection table in the Plot Dock in
certain cases.
See issue #950.
This reverts commit 6da71b6788.
This was causing just too many problems for one. The ones I noticed
were:
- Messing up the table view when scrolling down very large table where
the prefetching code is triggered.
- Crashing when setting an auto increment PK in the Edit Table dialog
because the sqlitetablemodel is used for a check in there.
- Probably more crashed in other places but for the same reason.
- Easy to fix but an issue nonetheless: when doing plotting a number of
empty rows would be inserted into the data browser.
- It just feels a little laggy.
When browsing a table and changing the sort order, then switching to
another table, and then switching back, we would sort the table twice:
once using the default sort order and then again using the previously
used sort order. This results in four instead of two queries for those
tables (including the COUNT queries). This commit fixes this so that
only two queries are executed which should cut the run time for these
cases in half.
See issue #1007.
This moves the data fetching code into a separate thread for
asynchronous execution. The Browse Data and the Execute SQL tabs are
affected by this.
Note that this is a somewhat naive implementation that is meant for some
first testing.
This is to work around a Qt bug which is present in at least version
5.7.1. The problem is this: when you browse a table/view with n
colums, then switch to a table/view with less than n columns, you'll be
able to resize the first (hidden!) column by resizing the section to the
left of the first visible column. By doing so the table view gets messed
up. But even when not resizing the first hidden column, tab-ing through
the fields will stop at the not-so-much-hidden rowid column, too. All
this an be fixed by this line. I haven't managed to find another
workaround or way to fix this yet.
If anybody knows more about this issue please let me know.
This adds support for CHECK table constraints. We already had support
for CHECK column constraints and still mostly use that but with this
commit there are no more hickups when encountering such a table. It also
adds basic support for editing those tables: the CHECK constraint isn't
removed anymore when editing a different part of the table.
Example:
CREATE TABLE test(
a int CHECK a IN(1,2,3), -- This was supported before
b int,
CHECK b IN (1,2,3) -- This is added by this commit
);
When browsing a view in the Browse Data tab and hovering a cell we would
try to show a foreign key tool tip just like for tables. However, there
was no check if the browsed object is a table or a view, it was just
assumed it is a table. That would cause a crash whenever it actually was
a view. With this commit we check if it is a table first and, if not,
don't even try to show a tool tip.
Allow changing the case of a column name in the Edit Table dialog
without complaining about the name already being taken. This happened
when for example changing a column called 'A' to 'a', making this sort
of changes impossible.
See issue #985.
This adds a local database to keep track of all the cloned databases.
For now we only use this information to prevent exactly the same
database being downloaded twice.
Rename the settings accessor functions from Settings::getSettingsValue()
(and similar) to Settings::getValue() (and similar). The 'Settings' bit
seems a bit redundant and costs a lot of screen space.
When fetching a remote database automatically generate a file name to
save the database as instead of asking the user for a path and name.
Also add a preferences option to set the directory for all cloned remote
databases.
This is obviously a trade-off: on the one hand this makes opening remote
databases simpler (it's just a double click), on the other hand it takes
control away from the users. The main reason for doing this, however, is
to indicate to the user that the cloned databases are going to be
controlled by DB4S. We have to keep track of the local databases in
order to update them from the right place, push them back to the right
place, etc. And because the local copies are under DB4S control we don't
want the user to move, rename, or delete them.
Move the network part of the automatic version check code into the
dbhub.io parts. While semantically this doesn't make a lot of sense it
simplifies the code a bit, reduces the size of the main window class,
and avoids duplication of code e.g. when introducing proxy support.
Fix progress dialog interfering with the save file dialog.
Fix cancelling of progress dialog. Before this you couldn't download a
file anymore after cancelling a download.
This adds a new dock to the main window that contains all the remote
functionality (or is supposed to contain it all in the future).
It also adds a directory browsing feature which allows you to browse
through the folders and files on the dbhub server.
By double clicking a database you can download and open it. The Open
Remote menu action isn't needed anymore and has been removed.
This also fixes an issue with pushing databases where, after sending the
file is completed, the save dialog was opened.
Note that this is still WIP and is far from polished.
This simplifies the code for reloading the settings in the Execute SQL
area.
It might also fix a bug where setting a new font for the success/error
message at the bottom of each Execute SQL tab would be overwritten to
Monospace immediately after setting it.