The original regexp was two pages long and was quite complex to debug
Let's start small. This fixes a few bugs matching files, starts to
match folders too (which is userfull if we want to open a folder in
dolphin for instance) and works correctly with quoted files and spaces.
This change matches what Qt was doing behind the scenes.
int QFontMetrics::width(QChar ch) const
{
return horizontalAdvance(ch);
}
int QFontMetrics::width(const QString &text, int len) const
{
return horizontalAdvance(text, len);
}
Tested with varies files in the konsole/tests folder.
This change matches what Qt was doing behind the scenes.
setWorldMatrix(const QMatrix &matrix, bool combine)
{
setWorldTransform(QTransform(matrix), combine);
}
Tested with varies files in the konsole/tests folder.
This will allow % in URLs; also sync test code with actual code.
Previously the tests were using toUtf8(); however fromPercentEncoding
seems better.
BUG: 420791
Differential Revision: https://phabricator.kde.org/D29322
Summary:
Before this patch cursors (bloc, i-beam, underline)
were always drawn with 1px lines. They are now
adjusted to follow the font size.
BUG: 397986
Test Plan:
1. Open Konsole
2. Go to Edit Profile and set various font sizes and weights
3. Also mix the different cursor types
4. The cursor width should follow the font size and not
remain always 1px wide.
Test case:
- press Ctrl and hover on a link, the mouse cursor changes to a hand,
click the link and a browser or text editor ... etc is launched
- if you have focus stealing prevention set to low or none, the launched
app could cover the terminal window and the mouse cursor will be stuck
at the hand shape, even when the mouse cursor enters the konsole window
again, until you hover on a link again