Commit Graph

3306 Commits

Author SHA1 Message Date
Martin Kleusberg f6f2885588 dbhub: Use current locale for formatting all timestamps 2020-07-14 14:30:32 +02:00
Martin Kleusberg 4d62e4b82a dbhub: Make sure the directories for the remote code exist
When the directories for the cloned remote databases or for our meta
database do not yet exist create them.

See issue #2327.
2020-07-13 23:02:17 +02:00
Martin Kleusberg 5d89bb8991 dbhub: Show list of commits in Remote dock
When opening a clone of a remote database show a list of all branches,
releases, and tags in the Remote dock and show the commit list when
selecting one of them.
2020-07-13 23:02:17 +02:00
Karim ElDeeb ebd8977210 Save the install location to Windows Registry
See issue #2328.
2020-07-12 11:57:17 +02:00
mgrojo 651c19990d Fix colour assigned to plot being always black
After 7f60aaa1fd the check for validity no
longer works in this case, since background() always returns a valid colour
as used by default for the widget. Consequently, a comparison with the
default colour in the first column is used.
2020-07-11 23:55:28 +02:00
mgrojo 5f53d6301e Restore original default for having condition format in filter line
Filter lines in Table Browser had lost conditional format entries in their
context menu. This restores the original behaviour.

And the name of the member boolean is changed to avoid double negations.
2020-07-11 18:01:20 +02:00
Martin Kleusberg 635dba93c2 dbhub: Automatically switch to the correct identity when opening file
When opening a local clone of a remote database, make sure the current
identity is set to the identity used for cloning this file. This avoids
possible confusion and can simplify the workflow a bit.
2020-07-10 22:28:24 +02:00
Martin Kleusberg 8428c934a3 dbhub: Show some information on the currently opened database file
If the current database file is a clone of a remote database show some
information on it in the Remote dock. Even though this information is
already nice to have the new tab in the Remote dock is mainly added as a
place for future features. Also switch to the new tab automatically when
opening a remote database to show the user that this is a tracked
database.
2020-07-10 22:16:14 +02:00
Martin Kleusberg 22c87ff57a Fix build for older versions of Qt 2020-07-10 18:42:01 +02:00
Martin Kleusberg c776af9880 dbhub: Add view of all checked out databases
The Remote dock shows a list of all databases on dbhub.io. Double
clicking a database downloads and opens it. If the database has already
been downloaded before, the local file is simply opened. This only works
for a small number of databases: To open the database you want, you just
search for it and double click it. But for a larger number of databases
on dbhub.io this does not perform very well since finding a database can
be very difficult. Because of this this commit adds a new view which
shows all checked out databases, i.e. those databases which are already
downloaded. Double clicking one of these opens it without trying to
update it first.

In the future this might also provide a place to add extra options like
deleting local copies.
2020-07-10 18:19:43 +02:00
Martin Kleusberg 910ca3d2b9 dbhub: Fix port number mismatch when using port 443
This fixes checking out databases and pushing changes to them later.
Because for the first the port number was omitted and for the second it
was expected, looking up the last commit id in the database returned no
results which led to an 'Update required' error from the dbhub server.
2020-07-10 10:53:51 +02:00
Martin Kleusberg 6c2e38c269 dbhub: Improve support for different branches
This adds initial support for handling of different branches. Before
this we would always assume we were working with the master branch even
if in fact we were not. Now we respect the actual branch name and
support checkouts of different branches of the same database.
2020-07-10 10:52:08 +02:00
Martin Kleusberg d763672994 Fix tests after 0eb01fe000
This reorganises the dependencies between the different files to make
the tests build again.
2020-07-09 23:05:08 +02:00
Martin Kleusberg 0eb01fe000 Add more options for setting font sizes
This adds two more options to the Preferences dialog which allow you to
change the font sizes. One option allows changing the font size of the
tree widgets in the Database Stucture tab and the Database Schema dock.
The other option allows changing the font size of all UI elements for
which there is no other font size option.

See issue #2306.
2020-07-09 22:36:42 +02:00
Martin Kleusberg a09df5bc0a Also update schema when clicking the Refresh button in Browse Data tab
When clicking the Refresh button in the Browse Data tab only the table
contents were refreshed, not the database schema. Hitting F5 however
updated both schema and data. This commit make sure the schema is
updated in both cases.

See issue #2325.
2020-07-09 22:04:30 +02:00
Martin Kleusberg cf9fc5c25e dbhub: Make URL in progress dialog a bit shorter 2020-07-09 11:21:21 +02:00
Martin Kleusberg fc71212d91 dbhub: Use port 5550 for local development server
When connecting to a locally running development server use port 5550
instead of 443. This allows the server to run without any special
rights.
2020-07-09 09:51:48 +02:00
Martin Kleusberg 46ecf9094c dbhub: Update CA certificate for local testing
This updates the CA certificates which are used for a local dbhub server
as used for testing purposes.
2020-07-08 22:49:17 +02:00
Martin Kleusberg f4f014e741 Fix warning in SQL error log when creating an in-memory database
This fixes an invalid database pointer warning when trying to create a
new in-memory database.
2020-07-08 15:44:12 +02:00
Martin Kleusberg 7c3cce56d4 Fix SQL import of files with BOM
This fixes the import of SQL files with a leading BOM.

See issue #2323.
2020-07-08 15:37:51 +02:00
Martin Kleusberg d089a60bf7 Fix executing selected SQL text when there are multi-byte characters
Fix executing the selected SQL statement(s) when there are multi-byte
characters before the selection. Because QScintilla gives us the start
position of the selection in bytes and we used the value for counting
characters, the executed part of the text was off by a few characters.

See issue #2311.
2020-07-05 15:26:40 +02:00
mgrojo 0562f16dfa New settings for changing the selection appearance in editors
Default values follow desktop style as before.

See issue #2320.
2020-07-04 20:50:51 +02:00
mgrojo 662dbcf900 New setting for configuring brace matching background
This allows modifying this background colour and provides a better
default, which does not make the cursor invisible (in dark mode) and it
is itself visible outside of the current line (in light mode).

See issues #2203 and #2320
2020-07-04 17:08:01 +02:00
Justin Clift 0bb3b23070 No longer force Light theme on macOS when "Follow the desktop style" is chosen 2020-07-05 00:08:01 +10:00
Martin Kleusberg b9b67cce70 Disable lazy popululation for queries with compound operators
This disables the lazy population feature for queries in the Execute SQL
tab which contain a compound operator (UNION, EXCEPT, INTERSECT). Adding
a LIMIT clause to the statements (as needed for lazy population) results
in a syntax error, so running these queries does not show any data.

See issue #2316.
2020-07-01 13:11:45 +02:00
Martin Kleusberg ea6d008991 Fix a harmless warning when searching for an empty font name
When the index of the selected cell is invalid, i.e. no cell is
selected, we cannot retrieve the font of the selected cell. Trying to
look up the empty font name for updating the font combo box in the
Format toolbar then fails, outputting a warning with some Qt versions.

See issue #2288.
2020-07-01 12:52:15 +02:00
Justin Clift 7f60aaa1fd Merge pull request #2287 from scottfurry/obsoleteFNs
Qt Function Obsolescence
2020-06-27 19:33:41 +10:00
Justin Clift fd9104f7bf Add 3.12.0 release date to the README 2020-06-26 04:06:40 +10:00
Martin Kleusberg a157713c97 Reduce margin in docks
Reduce the margins in the layouts of the dock widgets in the main window
a bit. This reduces the amount of wasted screen space.

See issue #2299.
2020-06-24 23:07:42 +02:00
Martin Kleusberg 85e1d0863c tests: Clean up test cases 2020-06-23 16:36:53 +02:00
mgrojo a803069d5e Font change in Browse Data table not applied to RTL Text editor
See issue #2295
2020-06-22 12:39:52 +02:00
mgrojo efb5b1a07a Improve binary detection for cases starting by chance by a BOM
The presence of a sequence of bytes resembling a BOM does not guarantee
that the data is text. We can in those cases use the detection provided
by Qt. If the codec matches the one selected, we can consider that text.

See issue #2197
2020-06-21 23:18:09 +02:00
mgrojo f4d78ad786 Set savepoint before logging the SQL statement
Otherwise the sequence of savepoint and update statement is inverted in the
SQL log.

See issue  #1859
2020-06-21 17:56:43 +02:00
mgrojo 3485a52e16 Bar charts did not display labels in x axis when NULL values present
The problem was signaled by an error when calling addTicks:
[...]AddTicks[...] passed unequal length vectors for positions and labels

See comment in issue #2286
2020-06-20 16:59:39 +02:00
Martin Kleusberg 9481bd8ef6 tests: Activate more parser tests
Now that we have parser support for named constraints we can activate a
couple more tests.
2020-06-19 16:02:08 +02:00
Martin Kleusberg 26fc5ba7e8 parser: Add support for single quoted constraint names
This adds support for constraints with single quoted names (i.e. using
the string literal syntax).
2020-06-19 16:01:24 +02:00
Martin Kleusberg fb3a9a0638 parser: Simplify code
This removes no longer needed code like the handling of not fully parsed
column constraints. It simplifies the code even further by handling
constraints in a more consistent manner which allows us to remove some
redundancies.
2020-06-19 15:18:02 +02:00
Martin Kleusberg d08dcba329 parser: Add support for named CHECK, DEFAULT, and COLLATE constraints
This adds support for fully parsing named CHECK, DEFAULT, and COLLATE
colum constraints. With these changes it is possible to edit table using
these named constraints without losing any information. It is still not
possible to edit these names via the UI though.
2020-06-19 14:48:06 +02:00
Martin Kleusberg 1559fb3aab parser: Extended support for NOT NULL and UNIQUE column constraints
This adds support for conflict actions in NOT NULL and UNIQUE column
constraints. It also supports named NOT NULL and UNIQUE column
constraints. With this it is now possible to edit tables which make use
of these constraints without losing any information. Adding constraints
like this via the UI is still not supported though.

Once more constraints are handled like this, the code can be probably
simplified a lot.
2020-06-19 13:13:23 +02:00
Martin Kleusberg 60f121434c Fix empty filters in project files
Fix loading of project files with empty filter values. If an empty
filter value was saved in a project file, it did not show up in the UI
but was partially added to the query anyway. This lead to an invalid
query with no results.

Also fix a possible loophole which at least in theory could lead to an
empty filter value being stored in the project file.

See issue #2288.
2020-06-19 10:35:46 +02:00
Justin Clift f7e593a8a4 Updated bug report template for 3.12.0 release 2020-06-18 15:30:19 +10:00
Scott Furry 99193b96b9 Qt Function Obsolescence
During a build with all warnings enabled, compiler reported numerous
Qt Functions as being obsolete. Review of the used functions, these
functions have been marked as obsolete as far back as Qt-5.12.x series.

Obsolete functions involved the use of Foreground/Background colour setting.

API description showing obsolete functions:
https://doc.qt.io/qt-5/qlistwidgetitem-obsolete.html
https://doc.qt.io/qt-5/qtreewidgetitem-obsolete.html
2020-06-17 16:32:01 -06:00
Justin Clift 4bd2b916da Update currentrelease file for 3.12.0 2020-06-17 16:36:12 +10:00
Martin Kleusberg 7c6ef2ae51 dbhub: Add text to upload button
Add some text ("Upload") to the push database button in the Remote dock
to make its function more obvious.
2020-06-13 11:58:30 +02:00
Martin Kleusberg 5cdda28608 dbhub: Log in by only selecting an identity, no need to press a button
This removes the login button from the dbhub dock. Instead of selecting
an identity and then clicking the login button, you are now logged in by
just selecting an identity.
2020-06-13 11:37:30 +02:00
Justin Clift fa3a0f5756 Updated French translation 2020-06-11 15:39:52 +10:00
Martin Kleusberg 834e6508bf Refactor TableBrowser class to make it easier to read and maintain
While easier maintainability is the main point of this commit it has two
more side effects: It fixes a big which leads to the filter row being
cleared when toggling the rowid visibility and it should improve the
performance a bit by avoiding double work.
2020-06-10 21:02:26 +02:00
Martin Kleusberg 535243ad67 Remove unused code 2020-06-10 15:46:46 +02:00
Martin Kleusberg ff37c90155 Add iif SQL function to the list of known functions in Execute SQL tab
This adds the iif function to the list of known functions for which we
offer tooltips in the Execute SQL tab. It was introduced in SQLite
3.32.0.
2020-06-10 15:28:27 +02:00
Martin Kleusberg facbcec793 Replace more Qt containers by STL containers and fix a ton of warnings 2020-06-10 15:05:22 +02:00