Commit Graph

5 Commits

Author SHA1 Message Date
Friedemann Kleint
d56becc808 Python Editor: Introduce simple folding
Mainly go by code indentation, ignoring empty lines.
Handle comment blocks at 0 as a special case.

Change-Id: Ibe5bef7286c640a2eea8b50140dae256b6635a56
Reviewed-by: hjk <hjk@qt.io>
2017-09-13 06:40:06 +00:00
Eike Ziller
d0da958f99 Fix whitespace highlighting within python comments and strings
Change-Id: Ib3c72483b42c4843efc8deb1c15eddf953c661af
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-05-23 08:50:48 +00:00
Eike Ziller
cf57965ebc Simplify text format handling in syntax highlighters
Pass the mapping from custom enum to text style in form of a function,
which then can use a switch which is checked by compilers, and
avoids the need to lookup a different enum somewhere else to find
out what the mapping actually is.
That mapping is cached to keep performance as before.

Also, most highlighters created an enum just for the purpose of mapping
to text styles, basically creating duplicated subsets of text style like
enums everywhere. Instead provide a default, identity mapping from text
styles to text styles.

Change-Id: I2ea1ca702b99e36b8742dfda510b1b2753f0a1c2
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-05-23 07:47:22 +00:00
Eike Ziller
ecbe001f2e Get rid of special "EndOfBlock" format in python highlighter
Change-Id: Ie02d3ae02b2453b33a3c779307f6f44348e2d0cd
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-05-08 08:49:49 +00:00
hjk
56a098598f PythonEditor: Modernize/Streamline
Remove virtual, add override, add = delete, remove QLatin1*,
flatten filesystem hierarchy, remove unneeded 'inline',
use initializer list, etc.

Change-Id: I0a95d806d73ca1a33cfd1ba85c2664d9ebc32690
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-08-26 08:20:22 +00:00