Commit Graph

26 Commits

Author SHA1 Message Date
Martin Kleusberg
63e8540de4 Add option to disable auto completion in the SQL editor
See issue #537.
2016-04-23 21:13:48 +02:00
Martin Kleusberg
0fed833e55 Move a connect in SqlTextEdit to avoid unnecessary slot calls
Move the connect for updating the line number area width from the reload
settings method to the constructor to make sure it's only called once.
Otherwise there would be more and more unnecessary connections made
whenever the settings are reloaded.
2015-12-22 18:19:55 +01:00
m
3b5053c0a0 set default color to black 2015-06-23 03:09:03 +08:00
m
9af70c042e fix line numbers position recalculation 2015-06-23 02:57:26 +08:00
m
84ba7d8a17 fix: UTF-8 characters (when out of comments or quotes) are drawn with different font 2015-06-23 02:46:09 +08:00
Martin Kleusberg
5e0d1ba34e Add option for disabling the SQL error indicators
See issue #302.
2015-06-22 12:38:50 +02:00
Martin Kleusberg
2715d75f01 Add option for setting SQL editor font
See issue #299.
2015-05-06 19:54:02 +02:00
Martin Kleusberg
7e3d9cd0a3 sqltextedit: Enable UTF-8
See issue #282.
2015-05-01 13:38:17 +02:00
Martin Kleusberg
cf412a211d qscintilla: Reload settings properly after they have changed 2015-04-23 19:52:07 +02:00
Martin Kleusberg
94846336df qscintilla: Finetune auto completion
Only start auto completion after a three letter threshold.

Only take words for auto completion from the API word list, not from the
current document.
2015-04-23 19:52:07 +02:00
Martin Kleusberg
649b1790e5 Mark syntax errors in Execute SQL tab
If a syntax error is reported by SQLite during execution in the Execute
SQL tab of the main window try to locate the problematic SQL statement
and highlight it using a red squiggling line.
2015-04-23 19:52:06 +02:00
Martin Kleusberg
6fed5ec7c2 qscintilla: Enable code folding 2015-04-23 19:52:06 +02:00
Martin Kleusberg
cde2393539 Use QScintilla instead of own implementation of a code editor
This is a first rough implementation of QScintilla support as SQL text
editor.

It should work mostly and build fine with qmake as well as cmake. The
new code supports all the features of the old one plus adding a few
subtle improvements. The main point of this, however, is reducing the
code we have to maintain and making it easier to add new features to the
editor.
2015-04-23 19:51:54 +02:00
schdub
2bfeb03b7e Suggestion: 'Tab' indents multiline selection in SQL editor 2015-04-15 11:13:59 +03:00
Peinthor Rene
d8cdcbd572 add an option for the tabsize in the sql editor (default 4) 2015-04-10 09:21:01 +02:00
Peinthor Rene
31915c4061 compat: change to compile under qt4.7 2014-11-28 19:49:15 +01:00
Martin Kleusberg
f257f9248e Move syntax highlighter objects to SqlTextEdit class
Any SqlTextEdit object has its SQL syntax highlighter anyway, so it
makes sense to move the syntax highlighter object inside the text edit
class instead of maintining somewhere else. This hopefully makes the
code a bit easier to maintain.
2014-11-09 12:20:02 +01:00
Peinthor Rene
5a9b1672a7 qt5: include QMimeData 2014-02-13 23:52:35 +01:00
Martin Kleusberg
7a81189d50 PreferencesDialog: New settings for font size of SQL editor and log
Add two new settings to allow changing the font size inside the SQL log
and the SQL editor.

Increase the default font size from 8 to 9 - better a bit too big on
some systems than too small on others.

Also do some restructuring in the MainWindow to avoid duplicate code to
reload settings.
2013-06-07 20:57:58 +02:00
Martin Kleusberg
929bb9026d SqlTextEdit: Support opening files by drag and drop
When dropping a file on the editor widget try to open and read it.
2013-05-17 15:05:21 +02:00
Martin Kleusberg
5b9d5cc40b Remove some debug messages. Change some error messages..
Remove some useless debug messages, e.g. because they just print an SQL
string which you can see in the SQL log window anyway.

Change some "critical" errors messages to just warning. No sense in
printing a critical error message when the program can handle the
problem by itself.
2013-05-08 22:03:04 +02:00
Martin Kleusberg
432180ec03 SqlTextEdit: Show line numbers
Show line numbers in the SqlTextEdit widget. This code is based on the
CodeEditor example from the Qt documentation.
2013-05-07 20:16:17 +02:00
Martin Kleusberg
0de7ff8564 SqlTextEdit: Highlight current line 2013-05-04 21:10:50 +02:00
Martin Kleusberg
57b44b891d Add auto completion in SQL editor again 2013-05-03 11:47:53 +02:00
Peinthor Rene
340af96deb fix additional space if we have no completionPrefix 2013-03-29 14:54:25 +01:00
Peinthor Rene
ba34c1e986 add basic autocompletion for tables and fields to the sql text input
this does only work on full table names, NOT on aliases
for a full auto completion to work we need a sqlite parser
2013-02-14 17:32:54 +01:00