Commit Graph

11 Commits

Author SHA1 Message Date
Laurent Montel
73295a8557 Use std::as_const (we depend against c++17) 2023-10-27 05:52:51 +00:00
Ahmad Samir
97569b764c Run clang-format on the whole repo
Also install the relevant git hook.

GIT_SILENT
2021-09-06 12:51:39 +02:00
Kurt Hindenburg
64dbb83d01 Port away from deprecated ::endl to Qt::endl 2021-04-17 13:15:50 -04:00
Carlos Alves
d351756c77 OptimizeOnFirstUsageOption is ignored by compiler
This option is deprecated on Qt since 5.12. Konsole cmake minimal Qt
version set is 5.12, giving warning messages while making.
A regular expression is automatically optimized the first time it is
used now.
2020-11-19 10:46:14 -03:00
Kurt Hindenburg
600f68de2a Convert tools to use SPDX license/copyright
https://community.kde.org/Policies/Licensing_Policy#SPDX_Statements
https://community.kde.org/Guidelines_and_HOWTOs/Licensing
2020-11-12 09:07:00 -05:00
Mariusz Glebocki
52d2720007 Revert "GIT_SILENT: minor qstring optimization"
This reverts commit f96deb39aa.

This was anti-optimization.
QStringLiteral is a QString created at build time. Initialization of
QString with it has no overhead.
QLatin1String is 8 bit C string wrapper which needs run-time conversion
to 16 bit encoding used in QString.
2019-12-17 21:04:14 -05:00
Laurent Montel
f96deb39aa GIT_SILENT: minor qstring optimization 2019-09-07 13:33:09 +02:00
Laurent Montel
ef1beaab86 Remove unused includes 2019-08-23 08:09:17 +02:00
Mariusz Glebocki
4b2cd7c4d9 Remove code for unsupported Qt versions
Summary:
Since minimum Qt version is 5.9.7, code for older versions is not
needed.

Reviewers: #konsole, hindenburg

Reviewed By: #konsole, hindenburg

Subscribers: hindenburg, konsole-devel

Tags: #konsole

Differential Revision: https://phabricator.kde.org/D17746
2018-12-22 22:25:19 -05:00
Yuri Chornoivan
6fb6ac4775 Fix minor EBN issues and typos 2018-10-06 12:20:23 +03:00
Mariusz Glebocki
5f32cb3c44 Add a tool for generating character width tables
Summary:
The uni2characterwidth tool, converts Unicode Character Database files
into character width lookup tables. It uses a template file to place
the tables in a source code file together with a function for finding
the width for specified character. It also allows to generate few forms
of lists with width data for debug and test purposes, or for future use
as a replacement of Unicode files.

Set `KONSOLE_BUILD_UNI2CHARACTERWIDTH` cmake flag to build the tool.
Use `--help` argument for more detailed usage.

There is a possibility to generate separate "width" for Ambiguous
characters. It can be used to add ability to configure the characters
width in Konsole settings.

The `example.template` file contains all possible named tags, and some
additional tags to show how to use them.

CCBUG: 396435

Depends on D15756

Test Plan:
Download files listed below from `11.0.0` and `emoji/11.0` directories
on `https://unicode.org/Public/`. You can also directly use URLs to the
files.

* UnicodeData.txt
* EastAsianWidth.txt
* emoji-data.txt

Generate any available list except compact-ranges (e.g. `details`):

```
uni2characterwidth \
    -U UnicodeData.txt  -A EastAsianWidth.txt  -E emoji-data.txt \
    -g details  result.txt
```

The list should contain ranges for all possible widths
(-2, -1, 0, 1, 2). You can choose some characters with a width you know
and check how they were classified. -2 is a special non-standard width
for ambiguous characters, which can be overriden by adding `-a 1` or
`-a 2` parameter. With this flag, all ranges from -2 group should
disappear and become assigned to selected width (1 or 2).

Generate output using a template:

```
uni2characterwidth \
    -U UnicodeData.txt  -A EastAsianWidth.txt  -E emoji-data.txt \
    -g code,./template.example  result.txt
```

Reviewers: #konsole, hindenburg

Reviewed By: #konsole, hindenburg

Subscribers: hindenburg, konsole-devel

Tags: #konsole

Differential Revision: https://phabricator.kde.org/D15757
2018-09-30 12:22:30 -04:00