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.
The new icons are believed to be more easy to parse and identify.
They are derived from @damieng's Silk Companion 1 (icon table_row.png) and
the Silk's bullet icons for (+) and (-).
https://damieng.com/creative/icons/silk-companion-1-icons
See issue #2083
Building with qmake did not work on macOS or at least not on all macOS
systems. This can be fixed by not compiling the header-only json library
into an empty static library - which is not needed anyway.
See issue #2014.
Otherwise the UI dynamic property does not seem to work, although it
use to and should. Please, improve it if a way to return to the correct
behaviour.
Fixes issue #2078
New options and spin boxes are added for entering any non-printable
character in the Import CSV dialog.
This adds support for Concordance DAT files and similar cases. See issue
#2012
QScintilla text(line) returns the string of the passed line including the
line terminator. Given the differences in platforms in that regard, we
only supported the case for a single character separator.
This should solve issue #2073 for Windows.
It also should solve #1768 and #1632, which were only reproduced in Windows
or editing files with lines ending in "\r\n" in general.
According to documentation
https://doc.qt.io/qt-5/qstring.html#simplified
> Whitespace means any character for which QChar::isSpace() returns true.
> This includes the ASCII characters '\t', '\n', '\v', '\f', '\r', and ' '.
So replacing '\n' is redundant and can be removed without effect.
The end of the function is unified for failed and successful cases, so
the savepoint reversion is always made when it has to be.
Reported in issue #2073
For the error indicators and scrolling to the failing query, all the
whitespace present at the starting end of the query is skipped. Otherwise
the point indicated to the user could be very far to the actual query.
See issue #2073
The string has to be correctly quoted so contained apostrophes are doubled.
This prevented applying a format to cells containing apostrophes (single
quotes) since the SQL code raised a syntax error in SQLite.
The Discard option will be more specific about losing changes than an
ambiguous No, if user does not read the dialog message.
In my platform it is displayed as a "Close without saving"
button.
A new button has been added in "Edit DB Cell" dock, which saves the cell
data to a temporary file with extension according to detected data and
opens default external application for the file type. It then asks user to
reload the data in a dialog when they have finished editing the data. It
can be also used for viewing if the user cancels the reload.
See related issues #1791 and #1746