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
This adds support for searching "this|that" to find either "this" or "that"
or using quantifiers like "{number}". The change applies to the
Find/Replace dialog and the search bar.
See https://en.cppreference.com/w/cpp/regex/ecmascript for details of the
syntax.
This raises the requirement for an external version of QScintilla to v2.11.
See issue #1625
A new find dialog, bound to Ctrl+F, has been added to all the Scintilla
editors. The dialog is basically the Find/Replace dialog, whose replace
related controls have been set to invisible.
This shortcut and the new menu contextual entry are disabled for the
Execute SQL editors, since there the shortcut is already assigned to the
search bar and it would also be redundant.
See issue #1746
A new option, in the toolbar of the Edit Database Cell, is added for
setting word wrapping for the text editor modes. It is now independent of
the SQL preference. The configuration reading the editor/wrap_lines setting
is moved to the particular SQL editor class.
Added icon from the Silk icon set.
See issue #1796
Use the QScintilla widget for all the text modes of the Edit Database Cell
dock. All the features are believed to be preserved.
- The plain text mode is materialised removing the lexer.
- Null values are indicated now in the margin instead of using a
placeholder. The same pattern is also used for the Image and BLOB data
cases when the editor is switched to a text mode. In the dark mode, the
line number margin matches now the style-sheet and instead of the
configurable editor colours.
- Read-only state in the editor is hinted by the caret not blinking, but
the text is still selectable by keyboard or mouse.
Features and fixes added by using this widget:
- Find/Replace dialog for the plain text editor. See issue #1746
- The QScintilla widget does not strip CR characters. See issue #1793
- Line numbers and visible caret line in the text mode.
In order to have matching colours in all the preferences, the individual
colour settings in Data Browser and SQL tabs are reset to default values
matching the corresponding style setting (dark stylesheet or follow desktop,
which could be dark or light as always).
Additionally, several problems with colour settings in QScintilla have
been fixed:
- We don't use indentation guides
- both sets of lexer colour settings must be used, otherwise the result is
inconsistant and unpredictable:
* lexer->setDefaultColor|Paper and lexer->setColor|Paper
In Mac the standard shortcut for deleting word to the left is Alt+Backspace
so we set this key sequence in Scintilla editors as alternate for Mac.
Reference:
http://doc.qt.io/qt-5/qkeysequence.html
Section Standard Shortcuts:
DeleteStartOfWord is Alt+Backspace in macOS column.
See issue #815
The POSIX flag is passed to QScintilla for stardardisation of the regex
implementation. This only changes the syntax for sub-expressions. Before
this change it was '\( \)'. With the POSIX flag it is simply '( )' for
sub-expressions, consequently \( and \( have to be used for matching
parenthesis.
Both the Qt implementation (used in filters and REGEXP operator) and the
C++11 standard (possibly used in the future for the editor, if QScintilla
add support) use the the new syntax for sub-expressions.
References:
https://en.cppreference.com/w/cpp/regex/syntax_option_type
> If no grammar is chosen, ECMAScript is assumed to be selected.
https://en.cppreference.com/w/cpp/regex/ecmascript
> The Atom ( Disjunction ) is marked subexpression
Qt also uses subexpressions in the POSIX style.
http://doc.qt.io/qt-5/qregexp.html#capturing-parentheses
See issue #1625
Add printing support for QScintilla widgets (SQL, JSON and XML). It can be
access through the contextual menu, shortcut (Ctrl+P) or (in the case of
the "Execute SQL" tab) from a button in the toolbar.
Ctrl+P was previously assigned to Plot Dock since
63c338c359 but, as it was foreseen in that
commit, it should be assign to print is ever supported. This change must
be mentioned in release notes.
First part of printing support. See issue #1525.
A new setting is added to the 'SQL' tab of the Preferences dialog. It
enables the line wrapping in the editors with none/character/word/
whitespace boundaries.
See comments in issue #1173.
All the colour configurations have been reviewed under an operating-system theme
dark theme.
Some hard-coded colours in QScintilla editors and Data Browser have been
replaced by queries of the system palette or reuse of our settings.
New settings for foreground and background colours for QScintilla editors
defaulting to system colours. This is mainly needed because if the user
saves colour settings for a dark theme and then he changes the system theme
back to a light theme, then the foreground colours are preserved while the
background would fall back to the system theme leading to an incompatible
combination. This also gives more freedom to the user in defining his own
colour combinations.
Since only the default colour settings adapt to the system theme, and once
settings are saved this can no longer happen, a 'Restore Defaults' button
is added so the default adapted colour settings can be restored. This is
also useful for restoring default behaviour when wanted.
Other fixes and improvements: waiting cursor while saving; check boxes in
SQL tab for bold, italic and underline when applicable; avoid translation
of hidden colour setting names used in code.
See related issue #1324.
The new editor mode shares the same Scintilla widget as the JSON mode.
The JsonTextEdit class has been generalised. Future modes supported by
Scintilla could be added with the current pattern. As a consequence, the
EditMode is not always equal to the current stacked widget.
Some code in EditDialog has been refactored, so it is easier to understand
and modified with so many modes. textNullSet has been replaced by the use
of dataType as Null.
SVG is promoted to a new recognised data type, so it can be edited in the
XML mode.
The XML data is formatted and validated following the pattern established
by the JSON mode.
New modules are needed by the XML mode: the Qt XML module and some new
Scintilla files required by the HTML/XML lexer.
The indent_compact was incorrectly named in Setting::getDefaultValue.
See issue #1253.
SQL and JSON text editor classes have been refactored. A new parent class
for both editors have been added for the common logic implementable without
depending on the specific lexer.
The only visible effect of this change should be that the JSON editor
(issue #1173) now has the same find/replace dialog as the SQL editor.
This prepares for the implementation of the XML editor (issue #1253).