Commit Graph

1803 Commits

Author SHA1 Message Date
Martin Kleusberg b5651d8b4d Keep the UI responsive when executing many statements in Execute SQL tab 2017-05-04 19:08:38 +02:00
Martin Kleusberg 6da71b6788 Move fetching data for data browsing to a separate thread
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.
2017-05-04 18:58:38 +02:00
Martin Kleusberg 3ff686d96f Show consistent slashes in recent files menu actions
See issue #735.
2017-05-03 21:11:29 +02:00
Martin Kleusberg f7421a9d62 Fix messed up table browser
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.
2017-05-03 20:43:31 +02:00
Justin Clift 46555bc819 Launch DB4S as user not Admin for Win installer
See #338 for details
2017-05-03 00:53:41 +01:00
Justin Clift becd385c86 Update Windows build path for Qt 5.8 2017-05-02 22:59:00 +01:00
Martin Kleusberg 3596bf6c8d grammar: Add support for CHECK table constraints
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
);
2017-04-30 23:35:48 +02:00
Martin Kleusberg 1eece9ef06 tests: Add regex test files to qmake project file 2017-04-29 13:50:57 +02:00
Martin Kleusberg e72df17bc3 grammar: Support signed default values
This adds support for table definitions with a signed default value,
like this:

CREATE TABLE test(
    a int DEFAULT -1
);
2017-04-29 13:49:00 +02:00
Martin Kleusberg d52263fc02 Fix crash when trying to show tooltips for views in Browse Data tab
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.
2017-04-19 11:45:05 +02:00
Martin Kleusberg 760ef092cd Try setting a saner default row height in the data browser
Maybe this helps with issue #419.
2017-04-10 15:07:51 +02:00
Martin Kleusberg f11c0181ca Improve wording in comment 2017-04-10 14:17:01 +02:00
Justin Clift ec916226b0 Add dodgy temporary workaround for Qt OSX's missing cert verify() 2017-04-06 20:37:31 +01:00
Genyk f031f24cdd sqlb_uk_UA_сhange8.ts
Корекція 3054-3510
 3198, 3203, 3208, 3336, 3371, 3386 - ? зміст?
2017-04-06 19:20:29 +01:00
Genyk db2bad0a8a sqlb_uk_UA_сhange7.ts
Корекція 2013-3049
2017-04-06 19:20:20 +01:00
Genyk db89568cbd Updated Ukrainian translation 2017-04-06 19:19:56 +01:00
Justin Clift a3e1ab7ffb Add Ukrainian flag 2017-04-06 19:19:50 +01:00
Андрій Кондратьєв dd685afef1 Ukrainian translation 2017-04-06 19:19:44 +01:00
Justin Clift 8b2e93d547 Ensure 'File → Export → Table(s) to JSON' is enabled/disabled along with its siblings 2017-04-04 14:07:44 +01:00
Justin Clift ace89f124d Ensure window title for JSON export dialog is correct
It was still using the default title for the dialog (Export data
as CSV), which was a bit confusing.
2017-04-04 13:53:30 +01:00
Martin Kleusberg 1026e9e777 Allow changing case of column name in Edit Table dialog
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.
2017-03-25 22:19:22 +01:00
Martin Kleusberg 43a5175af1 dbhub: Keep track of the cloned databases
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.
2017-03-23 19:08:26 +01:00
Martin Kleusberg b5d352bcdc Fix includes 2017-03-20 23:19:57 +01:00
Martin Kleusberg f1194d845e Rename all the settings accessor functions
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.
2017-03-20 23:16:52 +01:00
Martin Kleusberg e6390b4d22 dbhub: Automatically generate a file name to save a database under
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.
2017-03-20 23:06:58 +01:00
Martin Kleusberg 1e9fec270b Merge automatic update check into dbhub.io code
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.
2017-03-19 17:29:20 +01:00
Martin Kleusberg dec1c6acb1 dbhub: Code refactoring 2017-03-19 16:56:14 +01:00
Martin Kleusberg 7426e2c143 dbhub: Fix progress dialog
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.
2017-03-18 21:36:09 +01:00
Martin Kleusberg d2dc1870a9 Fix compiler warnings 2017-03-18 21:25:07 +01:00
Martin Kleusberg 22791e5b26 Fix possible build error 2017-03-18 21:21:07 +01:00
Martin Kleusberg 0f75ad54b2 Fix possible build error 2017-03-18 21:09:43 +01:00
Martin Kleusberg 3e4f3fc3d2 dbhub: Add remote dock with directory browsing support
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.
2017-03-18 20:40:59 +01:00
Martin Kleusberg dc3550ee6a dbhub: Add another root CA for testing 2017-03-16 20:59:59 +01:00
Martin Kleusberg cf08c26e21 grammar: Fix assignment of table information
See issue #975.
2017-03-16 17:10:00 +01:00
Martin Kleusberg f67817ee68 Simplify code for reloading settings
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.
2017-03-16 16:59:23 +01:00
Justin Clift 836966dcf5 Merge pull request #972 from prutz1311/master
Fix plotting with datetimes on x axis (#738)
2017-03-05 13:50:29 +00:00
Oleg Prutz 84a5030d9e Fix plotting with datetimes on x axis (#738)
Use QDateTime::toMSecsSinceEpoch() instead of
deprecated QDateTime::toTime_t() which does not
correctly convert datetimes which do not exist
due to switch to Daylight Saving Time
2017-03-05 16:28:11 +03:00
sacha schutz 8ac4c0342a Add absolutePath to the recent Menu. Fix #965 (#967) 2017-02-28 15:44:39 +01:00
probonopd 3c526f9505 Create AppImage 2017-02-26 13:57:53 +00:00
Martin Kleusberg fd1f4f2d88 grammar: Detect parse errors in primary key and unique constraints
When having a table definition like this, detect the parse errors in the
table constraints correctly:

CREATE TABLE test(
	a INTEGER,
	b TEXT,
	PRIMARY KEY(a ASC),		-- ASC here
	UNIQUE(b COLLATE NOCASE)	-- COLLATE here
);

The next step is to actually parse and store this information.
2017-02-17 15:28:57 +01:00
Martin Kleusberg 9ea807f67f grammar: Parse collations in column definitions
Parse the COLLATE term in CREATE TABLE statements like these:

CREATE TABLE test(a TEXT COLLATE NOCASE);

See issue #411.
2017-02-17 13:50:42 +01:00
Martin Kleusberg bef6dc045f grammar: Simplify code 2017-02-17 13:41:43 +01:00
Martin Kleusberg eddeb78e27 Never set integer primary key fields to empty string
Don't attempt to set an INTEGER PRIMARY KEY field to an empty string as
it will always result in a 'datatype mismatch' error by SQLite. Instead
set it to '0'.

See issue #859.
2017-02-15 22:55:47 +01:00
Martin Kleusberg 85334330a5 cmake: Add options to disable usage of distribution's libraries
This adds two new options to the cmake script which, when set, force
cmake to use the version of the Antlr or QScintilla library in our
repository and not search for a system-wide version of the library.

See issue #961.
2017-02-15 22:13:35 +01:00
Martin Kleusberg b5345fe676 Update QHexEdit library to 0.8.3
This adds support for editing the ASCII data on the right side of the
hex editor widget.
2017-02-14 18:00:52 +01:00
Martin Kleusberg 81c0cf3d4c Fix memory leak (Coverity) 2017-02-11 21:22:22 +01:00
Martin Kleusberg 47cfd55fa6 Add Coverity badge to Readme file 2017-02-11 21:19:09 +01:00
Martin Kleusberg 304e179bcf Increase size of foreign key editor widgets
See issue #951.
2017-02-03 17:28:47 +01:00
Martin Kleusberg c62d291042 Add keyboard shortcuts for switching the currently browsed table
Add two new keyboard shortcuts for switching the currently selected
table in the Browse Data tab. These work as long as the table widget is
active. For now I have set them to Ctrl+PageUp and Ctrl+PageDown.

See issue #536.
2017-02-02 22:07:49 +01:00
Martin Kleusberg bf5ab01d7f Save some space in the Database Structure tab
See issue #620.
2017-02-02 21:44:03 +01:00