Commit Graph

3386 Commits

Author SHA1 Message Date
Martin Kleusberg
73b2a1c23d Avoid possible database busy message when using the Browse Table action
Avoid a possible database busy warning when using the Browse Table
context menu action in the Database Structure tab. This happened because
of an unnecessary schema update.

Also do not refresh the view when changing between the main tabs. This
makes tab switching faster, makes sure the scroll position is not lost,
and avoid two queries instead of one when using the Browse Table action.

See issue #2283.
2020-08-17 17:21:05 +02:00
mgrojo
47aa591dfb Return the configured font for data browser in the model
Otherwise it cannot be used by the format toolbar to get the cell font when
the default has not been overwritten.

See comment in issue #1976
2020-08-16 22:28:58 +02:00
Martin Kleusberg
1e1e87e61c Allow multiple TableBrowser tabs in the Browse Data tab
This adds a new tab widget inside the Browse Data tab which allows you
to create multiple TableBrowser widgets. This way you can browse
multiple tables at the same time and switch between them.

I don't consider this done. The UI for this is likely to change in the
future. This commit is just a first step towards this goal.

See issue #2283.
2020-08-15 20:43:38 +02:00
Martin Kleusberg
8323f2a1b6 Add 'Don't ask again' button to collation message box
This adds a button called 'Yes. Don't ask again' to the collation
message box which asks you to confirm adding a default collation when
your database needs a custom collation.

See issue #2356.
2020-08-15 17:25:53 +02:00
Martin Kleusberg
83ba6a4150 Fix warnings 2020-08-15 17:13:19 +02:00
mgrojo
20e94984f0 Avoid attaching the plot when the signal is notifying the row count
since the data wouldn't be available yet.

See issue #2286
2020-08-15 17:06:02 +02:00
SeongTae Jeong
7f7c9e40ec Rename Mac OS X to macOS in code and documents 2020-08-12 21:55:33 +02:00
Martin Kleusberg
69eec2b602 dbhub: Redownload database when checking out current commit
When double clicking the currently checked out commit in the commits
list in the Remote dock only open the local file if it has not been
modified. If it was modified show a warning about the modifications and
redownload the file if the user decides to proceed.

See issue #2349.
2020-08-12 20:26:50 +02:00
mgrojo
c77cb97226 Resize rows to contents only for visible rows
This will improve performance in tables with lots of rows.

See issue #2365
2020-08-12 17:17:55 +02:00
Martin Kleusberg
d76d6c2584 dbhub: Fix saving latest commit to file
Fix the "Save Revision to File" action in the context menu of the
commits list so it also allows downloading the latest commit.

See issue #2349.
2020-08-12 16:15:24 +02:00
Martin Kleusberg
70eb15a8e2 dbhub: When deleting last local database of a user, remove user too
When deleting the last local database of a user in the Local files view,
remove the now empty user directory too.

See issue #2349.
2020-08-12 13:55:11 +02:00
Martin Kleusberg
8db6e16f3d dbhub: Add "Upload Database" action to context menu of local file list
This adds a new action for uploading the selected database to the list
of local databases in the Remote dock.

See issue #2349.
2020-08-12 13:29:36 +02:00
Martin Kleusberg
cefb4b70df dbhub: Fix reply handler for push actions
When introducing custom reply handlers for fetch actions we had to
remove the general reply handler. This left push actions without any
reply handler. This commit reverts the temporary workarounds and makes
sure the general reply handler is called for push actions.

See issue #2359.
2020-08-12 11:28:14 +02:00
Martin Kleusberg
9274e24ee2 dbhub: Fix updating branch list when database name is changed
This fixes a broken signal slot connection which is triggered when the
name of the database in the Push dialog is changed.

See issue #2359.
2020-08-12 11:22:29 +02:00
Justin Clift
8a9879359f Merge pull request #2366 from vuod/patch-1
Spelling - sqlb_fr.ts
2020-08-12 12:14:51 +10:00
vuod
2903ce1d86 Spelling - sqlb_fr.ts
Uriliser > Utiliser
2020-08-11 18:41:49 -04:00
mgrojo
d5b9d80959 Add status message when opening a file from the recent file list
In this way, using the Ctrl+n being n a number gives a hint of what has
been done.

See issue #2363
2020-08-11 14:46:11 +02:00
Justin Clift
9f927a18c5 Merge pull request #2361 from robilic/patch-1
Older versions of Mac OS are not currently supported.
2020-08-10 12:29:57 +10:00
robilic
aea12f94d4 Older versions of Mac OS are not currently supported. 2020-08-10 01:48:17 +00:00
Justin Clift
aa3d28141d Comment out additional gotReply() signal connection
This is just a temporary patch until Martin has time to look at
this properly.

This code needs to be commented out (for now), as it's conflicting
with the previous commit. However that one is needed for the
application to function, so I'm giving that one priority.
2020-08-09 22:04:42 +10:00
Justin Clift
40c132e988 Update remote database information when an upload is completed 2020-08-09 16:49:17 +10:00
mgrojo
0e1eb7db78 Remove filter widgets when the table is empty
Instead of hiding them, which had some noticeable glitches.

See comments in issue #2188.
2020-08-07 22:22:34 +02:00
mgrojo
8503184524 Fix possible exception in setToNull() and abort at first updating error
If the selection includes the rowid (column 0) at() raises an out-of-range
exception.
2020-08-07 00:05:05 +02:00
mgrojo
09320c20e4 Cut to clipboard operation in data browsers
"Cut" copies the cells to clipboard and then deletes the data taking into
account a possible NOT NULL constraint in the field to leave the cell empty
instead of setting it to NULL. Rowid column is ignored.

See issue #2355
2020-08-06 22:22:21 +02:00
mgrojo
4bf7adfa59 Edit Table: alternating row colors in tables for better readability 2020-08-06 18:08:36 +02:00
mgrojo
424dd57d44 Edit Table: Change the key icons from header to tooltips
The icons added to keys in de28943ec5 have
been moved to a tooltip, since depending on the font used, the column
header could be truncated.
2020-08-06 17:55:26 +02:00
mgrojo
de28943ec5 GUI improvements in Edit Table Dialog
- Avoid editing data in checkable columns or columns with combo-boxes
- Select items to allow navigation with cursor keys in each row
- More edit triggers for editable columns
- Icons for primary and foreign key columns
- Dialog width increased so more columns fit

See issue #598
2020-08-05 14:35:38 +02:00
mgrojo
fc78fc2f3c Hide filters when table is empty
Additionally, the record set label wasn't been updated when a new record
is added or deleted.

See issue #2188 and (related) #2353
2020-08-05 14:35:38 +02:00
mgrojo
4f9e7c5d04 Fix crash when a format is applied and one or more columns are selected
The at() method raises exception when the key is not in the map, so for
std::map we have to check beforehand and return an empty filter.
2020-08-05 14:35:38 +02:00
Martin Kleusberg
b6e3db34d0 Fix bug which made tables from other schemas inaccessible in Browse Data
Fix a bug which made tables from other schemas than the main schema
inaccessible in the Browse Data tab. Most notably this always selects
table "main"."tbl" instead of for example "temp"."tbl".

See issue #2348.
2020-08-04 19:31:46 +02:00
mgrojo
aaa628bf34 Add new action to close project file and return to initial state
This will close all SQL tabs, asking if they have to be saved and close
the database file.

Fixed a bug when switching between two project files from the Recent Files
list. If the first project had a pending change and it was saved at that
very moment, the database was already closed and the project file was saved
without DB file.

See issue #2289
2020-08-02 19:11:00 +02:00
SeongTae Jeong
ec6ff6a415 Move recent files items to new submenu and add clear recent file function (#2347)
* Add a new submenu ('File > Recent Files') and move recent file actions inside.

* Add a new menu item to the menu of recent files ('Clear List') and delete divider(QAction *recentSeparatorAct) because that is no longer used.

* Added general function to clear Settings value (including cache)
2020-08-01 18:07:06 +02:00
Justin Clift
ef18362698 Add Qt5Svg.dll to our windows packages
See issue #2321
2020-07-31 09:36:32 +10:00
Martin Kleusberg
8b5f34c406 dbhub: Show more information in tree views
This adds a column for the file size to the list of commits.

It also adds a couple of tooltips to the Remote and Commit tree views to
show additional information. Especially for remote databases this adds a
lot of valuable information.
2020-07-27 16:23:21 +02:00
Martin Kleusberg
cb39c1095d dbhub: Simplify code and remove debug code 2020-07-27 16:23:21 +02:00
mgrojo
72ecf141ca New predefined settings for Window Layout
A new predefined simplified layout has been added with the only the basic
functions: schema, browsing and SQL execution. Ideal for courses.

Also added options for moving all the docked windows to the bottom, left
side or top (for the right, the default can be restored with Reset Window
Layout as before).

See issue #2307
2020-07-26 20:28:12 +02:00
mgrojo
aaf671f4b5 Select column in table results when column header is pressed
See issue #2343
2020-07-25 19:20:18 +02:00
Martin Kleusberg
caa9e4d77f Fix build
Commit 56a4b4b1e3 broke the build when
automatic update checks are enabled. This should be fixed now.
2020-07-25 10:34:05 +02:00
Martin Kleusberg
4b65b0160f dbhub: Check for local modifications
Before warning about possibly overwriting local modifications to the
clone of a database, check if any changes to the file were made.
2020-07-25 10:22:09 +02:00
Martin Kleusberg
56a4b4b1e3 dbhub: Make network code less centralised
This adds the possibility to handle network replies individually instead
of routing all of them through a central handler routine. The
centralised approach made the code more complicated than necessary and
would inevitably lead to confusion when sending similar requests
simultaneously.
2020-07-24 16:03:34 +02:00
Martin Kleusberg
ddf5117331 dbhub: Refactor networking code
This splits up the RemoteDatabase class into two classes, RemoteDatabase
and RemoteNetwork. The first is for managing the directory of cloned
databases while the second is for network handling only. Moving the
network code into a separate class requires some rewriting but should
make the code easier to maintain and extend.
2020-07-24 13:30:52 +02:00
Martin Kleusberg
ab5b633709 dbhub: Add context menu action for saving a revision to another file
This adds a new context menu action to the commit list in the Current
Database tab of the Remote dock which downloads the database from that
commit and saves it to another file. This file can then be opened and
inspected just like any other database file and does not update the
local clones data.
2020-07-23 14:08:15 +02:00
Martin Kleusberg
dc0be2b2e1 dbhub: Fix 1af81359a9
Fix bug in 1af81359a9 which could show you
the override database warning when not actually downloading a database.
2020-07-23 13:46:37 +02:00
Martin Kleusberg
2e9580365b dbhub: Add toolbar action for fetching the latest commit
This adds a new toolbar action to the Current Database tab of the Remote
dock which downloads and updates to the latest commit of the currently
opened database and branch.
2020-07-23 13:22:50 +02:00
Martin Kleusberg
e51aa2eebe Add GUID display format
Add a display format to convert binary GUIDs to their text representation.

See issue #2342.
2020-07-23 11:22:29 +02:00
Martin Kleusberg
4c4e55f890 dbhub: Add context menu actions to all tree views
This adds context menus and some context menu actions to all the tree
views in the Remote dock. No new features are added. This just adds a
new way to trigger existing features but also establishes a place for
future actions for new features.
2020-07-23 11:03:50 +02:00
Martin Kleusberg
1af81359a9 dbhub: Only show warning about losing unsaved changes when downloading
Make sure to only show a warning that local changes might be lost before
actually downloading a database and overriding the local copy. When we
just open the local copy, no warning needs to be shown.
2020-07-22 14:55:39 +02:00
Martin Kleusberg
5cf95f82be Fix build for older versions of Qt 2020-07-22 14:48:50 +02:00
Martin Kleusberg
fc4deeb9bc dbhub: In Push dialog preselect the current branch
Instead of always selecting the default branch select the currently used
branch in the Push Database dialog. Only default to the default branch
if no current branch is available.
2020-07-22 14:32:01 +02:00
Martin Kleusberg
065adabe75 dbhub: Allow checking out different commits and different branches
After opening a clone of a remote database, allow checking out the
different branches and commits of this database in the Current Database
section. This way you access all branches and see their history in DB4S.
2020-07-22 14:21:35 +02:00