Commit Graph

2595 Commits

Author SHA1 Message Date
Martin Kleusberg
81b39ccdaa qmake: Add new option for enabling more warnings 2018-11-15 14:08:20 +01:00
Martin Kleusberg
f715dc95e6 Fix a possible compiler warning
See issue #1603.
2018-11-15 13:47:06 +01:00
Derek
dcf252e7f2 Update README.md (#1609) 2018-11-12 16:00:45 +11:00
mgrojo
92cc5d287a German translation update for #1588 2018-11-10 20:17:01 +01:00
mgrojo
8043e94452 Updated translations with messages from issue #1588
Only relevant changes to ongoing translations are committed, so that
future conflicts are minimised.

Added Spanish translation for the new messages.
2018-11-10 20:01:50 +01:00
mgrojo
c923cc29b5 Regexp filters
This adds support for the REGEXP operator using the syntax /regexp/ in the
filter line boxes.

A new helper option for a not-containing filter is added using this new
syntax. This could be simplified using a NOT LIKE filter, but we don't
currently support that.

The "Use in Filter Expression > Containing" option escapes a possible
slash in the beginning, so it is not interpreted as a regexp filter.

See issue #1522
2018-11-08 23:00:30 +01:00
Martin Kleusberg
a393bbf25d Improve read only project file loading
This slightly changes the behaviour regarding the read-only mode in
project files. It makes sure that we always respect the user's choice to
open a file in read-only mode, even if the project file says it wasn't
opened in read-only mode before.
2018-11-08 16:59:08 +01:00
Martin Kleusberg
a8338406c9 Save read-only state in project file
When opening a database in read-only mode and creating a project file,
save the read-only flag in the project file.

When loading a project file with a read only flag set, open the database
in read-only mode.

See issue #1598.
2018-11-08 16:55:52 +01:00
Martin Kleusberg
a81ea2b983 Fix possible warnings
See issue #1603.
2018-11-08 16:55:51 +01:00
Martin Kleusberg
11ace1efa6 Show current database action in status bar and add cancel button
This adds a label to the status bar which becomes visible whenever the
database is busy. It also specifies the currently running action. Also
add a button which allows you to cancel this action at the next
opportunity.

Note that this doesn't work for the Execute SQL tab yet which requires
some more rewriting of the code there.
2018-11-08 16:52:38 +01:00
Martin Kleusberg
f1e01dde8c Use new Query class from outside SqliteTableModel to assemble queries 2018-11-08 16:20:34 +01:00
Martin Kleusberg
ed06c0289e Move query generation from SqliteTableModel into a separate class 2018-11-08 16:20:34 +01:00
Martin Kleusberg
35a5b43ce0 Move SQL object classes into a separate directory 2018-11-08 16:20:33 +01:00
mgrojo
e6830b91ba Updated Arabic translation for the 3.11 release
Generated 990 translation(s) (990 finished and 0 unfinished)
    Ignored 7 untranslated source text(s)

See issue #1567
2018-11-05 20:51:32 +01:00
mgrojo
dadccef861 Avoid deadlock and cancel dialog when using conditional formats
When a conditional format is used and the table does not load all the rows
at once, a deadlock ocurred when scrolling to a not yet loaded area.

This avoids the deadlock by unlocking before the conditional format query
is performed.

Additionally the cancel-query dialog is avoided when the threading mode of
SQLite is Serialize, since in that case the queries can be sent to SQLite
concurrently.

See discussion in PR #1503
2018-11-04 23:55:24 +01:00
mgrojo
bcf2c660b6 Fix to the French translation for the 3.11 release
Authored by @mvt91
2018-11-03 13:06:39 +01:00
Manuel
23f7346f78 Avoid setting the db dirty with some trailing whitespace and comments (#1543)
If we execute a select statement and there is some trailing whitespace or
comments in the buffer, we are passing that to SQLite and fooling
ourselves thinking that it may be a query modifying the database. Since
we aren't very smart about knowing which queries modify the database, this
change at least avoids this particular case by breaking when there is only
trailing whitespace and comments.

The issue has probably origin in #1455, since previously we didn't pass
the comments to SQLite.
2018-10-30 22:01:21 +01:00
Martin Kleusberg
1da7ca8d43 Change project file format to support multiple sort columns (#1593)
This commit changes the project file format (and some internal data
structures) to support multiple sort columns in the Browse Data tab.
Note that this does not add actual support for multiple sort columns,
it's just a preparation for that.
2018-10-30 21:47:55 +01:00
Martin Kleusberg
064ce6f8fe Simplify code
Merge two very similar functions into one while keeping the best parts
of both.
2018-10-30 21:38:57 +01:00
Manuel
abb6f686a3 Initial implementation of "conditional formatting" (#1503)
After setting a filter, the user can select from the context menu in the
filter line a new option "Use for Conditional Format", that assigns
automatically a colour to the background of cells fulfilling that
condition.

The formatting is preserved after the user has removed the filter. Several
conditional formats can be successively added to a column using different
filters.

The conditional formats of a column can be cleared when the filter is empty
selecting "Clear All Conditional Formats" from the filter line context
menu.

The conditional formats are saved and loaded in project files as other
browse table settings.

A new class Palette has been added for reusing the automatic colour
assignment of the Plot Dock. It takes into account the theme kind of the
application (dark, light) for the colour selection.

A new class CondFormat for using the conditional formatting settings from
several classes. The conversion of a filter string from our format to an
SQL condition has been moved here for reuse in filters and conditional
formatting.

Whether the conditional format applies is resolved by SQLite, so filters
and conditional formats give the same exact results.

Code for getting a pragma value has been reused for getting the condition
result, and consequently renamed to selectSingleCell.

Possible future improvement:
- New dialog for editing the conditional formatting (at least colour and
application order of conditions, but maybe too: adding new conditions and
editing the condition itself).
2018-10-30 21:22:14 +01:00
bss, shaoshi
4031a165fa update Simplified Chinese translation (#1594)
Updated for 3.11 release
2018-10-28 22:12:58 +01:00
mgrojo
184cdae9e1 French translation updated for the 3.11 release
Authored by @mvt91
2018-10-28 20:51:15 +01:00
Iulian Onofrei
d526fa0b64 Add last location saving and loading per action type (#1587)
* Fixed code style

* Added last location saving and loading per action type

This saves and loads different paths per action type when presenting the
native file dialog popup.
2018-10-27 22:24:01 +02:00
Martin Kleusberg
aad06b8d7c Fix spelling error 2018-10-24 13:57:13 +02:00
Martin Kleusberg
5a1d338647 Allow specifying an ON CONFLICT strategy in the Import CSV dialog
Add a new dropdown box to the Import CSV dialog to set an ON CONFLICT
strategy when importing into an existing table. You can now choose
between the old and still default behaviour of aborting the import in
case of a conflict, ignoring the conflicting row from the CSV file, and
replacing the existing row in the table.

See issue #1585.
2018-10-24 13:38:28 +02:00
mgrojo
9d2b476283 Fix formatting problems in the Spanish translation 2018-10-23 22:06:12 +02:00
Martin Kleusberg
f11b1a0445 Better error handling in import CSV dialog
Make sure to show the correct error message when there is an error
during CSV import.

Make sure to release the DB handle used for the import before rolling
back to the last savepoint in case of an error in the CSV import. This
avoids a deadlock situation.

See issue #1590.
2018-10-23 19:52:34 +02:00
Martin Kleusberg
5ec03baef4 Make use of the improved ALTER TABLE abilities from SQLite 3.25.0
SQLite 3.25.0 introduced an extended ALTER TABLE command which now
allows renaming an existing field. Before this we were emulating this
functionality in our code. There are however three reasons to switch to
the new feature from SQLite, even though it doesn't safe us any code:
1) It is faster because it does less steps
2) It is less error prone for the same reason
3) It is better at also renaming the field in triggers and views

This is somewhat improving the situation in issue #1444 but not
addressing the main problem described there.
2018-10-22 23:05:55 +02:00
Martin Kleusberg
aaa88367ba Fix build 2018-10-22 23:03:19 +02:00
mgrojo
8c5ba61b45 Command line option for running with some setting set to a given value
There are cases where the default configuration makes impossible to
use the application, due to some misbehaviour, like in issue #1560. This
new command line option allows users to set any setting to any value.
The setting is not saved unless user enters Preferences and saves the
current values. This allows overriding the preferences for the session
duration from the command line and also overriding the defaults for the
first session to work around problems with those defaults.

See issue #1588
2018-10-22 21:23:09 +02:00
Oleg V. Polivets
713139ab7f Update sqlb_ru.ts (#1581)
See issue #1567
2018-10-20 16:21:55 +02:00
Karim ElDeeb
31c3a05f9a Fix Windows Vista style when using Qt 5.10 and up
Since Qt 5.10, the Windows Vista style has been moved to its own plugin. This plugin must be included in order to show the new style. It will be included for the 64-bit build only for now, since we are using a different Qt version (5.7) for the 32-bit build.

See #1580.
2018-10-20 11:30:56 +02:00
Manuel
eab31b69ee Unlock view status was lost after switching view or refresh (#1565)
This solves these two problems that seem to have being introduced in
d5a049062d

- The unlocked-view status was not applied again when switching back to the
view (you cannot edit and the Delete Record button is not reenabled) or
after refreshing.

- The 'Unlock view editing' check state persisted when switching between
views.

See issue #141.
2018-10-19 22:04:08 +02:00
Manuel
92295a3e94 Merge pull request #1579 from FriedrichFroebel/German_translation
Update German translation for PR #1558
2018-10-19 19:09:18 +02:00
Justin Clift
ce086d10bf Update the nightly build .msi installer version number to 3.11.99 2018-10-20 02:00:51 +11:00
FriedrichFroebel
2ef17405b8 fix typo 2018-10-19 11:24:02 +02:00
Justin Clift
4a39e343db Update Qt path for the 64-bit Windows nightly builds 2018-10-19 18:41:06 +11:00
FriedrichFroebel
bd685eab1b update German translations for PR #1558 2018-10-18 19:12:55 +02:00
mgrojo
ef99ea28ad Update es_ES translation for PR #1558 2018-10-18 00:11:02 +02:00
mgrojo
d4f2f6fca8 Fixed two filters in pt_BR translation 2018-10-17 23:36:34 +02:00
Manuel
52ce626a9e Merge pull request #1571 from bernardosulzbach/pretty-pt-br
Updated the PT-BR translation for v3.11.x
2018-10-17 23:26:46 +02:00
Bernardo Sulzbach
779d83315b Fixed Portuguese translations being in Title Case 2018-10-16 19:19:27 -03:00
mgrojo
a321f43b51 Update of translation files for PR #1558
There are two new strings in Preferences (an option and its tooltip) and
two functions call-tips that are updated with this appendix:
"Use of this function must be authorized from Preferences."

Line number changes have been discarded after lupdate so the amount of
changes for merging of translation pull requests are minimised.
2018-10-17 00:11:37 +02:00
lulol
1ba28fcd0a Updated Spanish translation (#1574)
Updated Spanish translation for v3.11.0-alpha1 branch and some consistency changes.
2018-10-16 12:48:04 +11:00
Bernardo Sulzbach
f3bc297b0a Added missing Portuguese translation 2018-10-15 20:57:01 -03:00
Bernardo Sulzbach
feb9fb2e45 Should always translate to "banco de dados"
This improves overall consistency.
2018-10-15 20:57:01 -03:00
Bernardo Sulzbach
b6574c7ac1 Should always translate Schema to Esquema 2018-10-15 20:56:57 -03:00
mgrojo
5e81444ff6 Merge branch 'FriedrichFroebel-german_translation' 2018-10-15 20:32:06 +02:00
Bernardo Sulzbach
17a1bb25f1 Updated the PT-BR translation 2018-10-14 22:02:36 -03:00
FriedrichFroebel
29b45ae06f update German translation 2018-10-14 20:17:31 +02:00