This fixes some problems which were reported by Coverity. None of these
is critical and some are only theoretical issues which will never be
triggered. But better prepare the code for future changes and fix these
warnings properly instead of just silencing them.
This disables all cells in generated columns for editing in the Browse
Data tab. Since the values of these columns are generated by SQLite
there is no way to edit them directly and each attempt will result in an
error. So it is best to not allow editing them in the UI.
See issue #2107.
Store a pointer to the table object of the currently browsed table in
the SqliteTableModel objects. This avoids fetching the table object from
the DBBrowserDB object repeatedly which in turn should speed up some
functions of the model a bit.
This fixes inserting new rows into tables with generated columns by not
trying to insert NULL values into these columns. With this change these
columns are effectively treated as if they had a default value which
means that the Add Record dialog does not need to show by default
anymore.
See issue #2107.
This is continuation of 60f3f4404a
The crash happened now in DBBrowserDB::getObjectByName when called from
TableBrowser::updateRecordsetLabel.
This fixes the crash in my system.
Squashed commit of the following:
commit f81fc8fa651c9d0aca704ab3dfa2a164b65740b6
Author: mgrojo <mgrojo@gmail.com>
Date: Sat Feb 15 23:36:56 2020 +0100
Some improvements to the Spanish translation
- Do not use Title Case in Spanish as recommended by:
https://es.l10n.kde.org/normas_generales.php
- Consistency in references to GUI elements
- Do not translate Shift since it has to match the official Qt translation
and they seem to keep changing it in different versions. Leaving it
untranslated, it is automatically translated when reference in GUI elements
commit 39b847010adad0c11c7319509c665272eaf28fbe
Merge: d19a1b2ad393dd37
Author: mgrojo <mgrojo@gmail.com>
Date: Sat Feb 15 21:39:50 2020 +0100
Merge branch 'master' of https://github.com/lulol/sqlitebrowser into lulol-master
Fixed some undefined entities.
# Conflicts:
# src/translations/sqlb_es_ES.ts
commit d393dd3763
Author: lulol <melus0@wanadoo.es>
Date: Sat Feb 15 15:00:39 2020 +0100
Updated Spanish translation
It didn't like the 'iquest' entity for '¿' in the html block. Will try the UTF-8 version directly and try again.
Used the new source 6683a9f
commit d6486b1b12
Author: lulol <melus0@wanadoo.es>
Date: Sat Feb 15 14:42:53 2020 +0100
Updated Spanish Translation.
Trying again uploading the right file. :(
commit ec6883c212
Author: lulol <melus0@wanadoo.es>
Date: Sat Feb 15 14:36:48 2020 +0100
Updated Spanish translation
Fixed a formatting typo and consistency.
commit 851e3e2f7d
Author: lulol <melus0@wanadoo.es>
Date: Sat Feb 15 13:25:10 2020 +0100
Updated Spanish translation
This improves the accuracy of the number of the last row in the
recordset number label at the bottom of the Browse Data tab by using the
seemingly more accurate visualIndexAt approach instead of the rowAt
approach from before and by taking the horizontal scrollbar into
account.
It also updates the label when resizing the row heights or column
widths.
See issue #232.
Setting save points does not make sense for read-only databases, so
do never set a save-point while executing a user query if the database has
been opened in read-only mode.
If setSavePoint is ever called in read-only mode, a warning is printed and
the save-point is not set.
If ever a read-write query is executed, it would be rejected by SQLite so
there is no risk of immediately committing any change to the DB.