The conversion to using stable_sort requires <= be changed to < to be
valid strict weak ordering (irreflexive requirements).
(cherry picked from commit b3ceeb044d)
Summary:
Fixes a few minor memory leaks found with address sanitizer.
The newTabButton and closeTabButton was not passed a parent and is not
deleted in the destructor of TabbedViewContainer which will cause them
to be leaked when closing a tab. Instead pass the TabbedViewContainer as
the parent.
The same goes for the profileMenu, it was not passed a parent pointer at
contruction and the setMenu function doesn't take ownership of it, so
therefore it was also leaked.
Backported the original version
https://phabricator.kde.org/D19634
The test still works fine with it, allowing it to run without a
display server.
Test Plan: Ran the test in an environment which doesn't allow X
Reviewers: #konsole, hindenburg
Subscribers: konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D20067
(cherry picked from commit f1e7d89667)
Summary:
Arguments in some QCOMPARE calls in KeyboardTranslatorTest had slightly
different types, what according to Qt documentation is not allowed.
The types of both QCOMPARE arguments must be exactly the same, otherwise
the code doesn't compile with some Qt versions.
With this fix it is safe to lower minimum Qt version to 5.9.0. Patch
number is incremented only for bugfix releases, so as long as invalid
code is not used everything should work.
The fix allows to compile Konsole using system libs on larger number
of systems, e.g. Ubuntu 18.04 LTS (Qt 5.9.5).
Tested with Qt 5.9.[0-5] and 5.11.1
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: hindenburg, konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D19859
(cherry picked from commit e9bb01a02e)
This allows DragonflyBSD and Ubuntu 18.04LTS to compile.
There are Qt >= 5.10.0 checks in KeyboardTranslatorTest due to
qCompare errors.
(cherry picked from commit ed8847ec94)
Summary:
The find action in Yakuake (and other konsolepart users) is missing
a shortcut. This is because the shortcut is only defined for Konsole
and not for the part.
BUG: 313841
Test Plan: Press Ctrl + Shift + F in Yakuake, search bar opens
Reviewers: #konsole, hindenburg, hein
Reviewed By: #konsole, hindenburg
Subscribers: konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D19451
Summary:
Fixes crash when using the Copy Input To All Tabs feature. The crash is
caused because the sessions are removed from the SessionManager before
the MainWindow is updated. When the MainWindow receives the
activeViewChanged signal it assumes that the
SessionManager::sessionProfile returns a valid Profile pointer, but in
this case it has already been freed and is therefore nullptr. The fix is
to simply check if the new active Session has a valid Profile, if not
simply ignore it.
Test Plan:
1. Open Konsole window
2. Open multiple tabs within that Konsole window
3. (apparently an important piece) Scroll through the tabs and go back to the first one opened, on the far left of the tab bar
4. Select Edit menu -> Copy Input To -> All Tabs in Current Window
5. Type a ctrl-D to issue logout command to all tabs in window
BUG: 405158
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: hindenburg, konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D19642
Summary:
Fixes memory leaf of HotSpots. This is caused by the Filter::reset()
function failing to delete the allocated HotSpots before clearing the
list.
Test Plan:
Compile konsole with address sanitizer
Select a link in the terminal
Close konsole
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: hindenburg, konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D19636
Summary:
Since anti-aliasing was enabled in the painter, coordinates need to
be shifted half a pixel so that they align with the pixel grid,
otherwise the result gets "blurred" due to the anti-aliasing.
And as parts of the blurred shape leak outside the cursor rectangle,
this also leaves artifacts when the cursor moves or blinks as these
parts are not cleared.
This is basically the same as commit
e7085310d6 for the
standard block cursor.
BUG: 402589
Test Plan:
- Switch cursor shape to "I-Beam" or "Underline" in the "Advanced"
profile settings
The cursors are a single line again now, before they were blurred by
anti-aliasing.
Screenshots:
Before:
{F6656366}
{F6656370}
After:
{F6656371}
{F6656373}
Also, there are no more artifacts when the cursor is moved or
cursor blinking is enabled.
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: hindenburg, konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D19513
On GTK based desktops, some of the icons are missing in the Edit Profile
dialog which makes it look terrible. For the correct icons, install
oxygen-icon-theme and qt5ct and setting QT_QPA_PLATFORMTHEME=qt5ct
Summary:
Initial window width is set to be wider than (default) minimum possible
size. This adds some whitespace and increases width of text inputs
on "tabs" page.
This was made unconditionally, which could increase the width past
screen's right edge on small screens.
It is changed to be at most 2/3 of the screen's width now. Note that
minimum window size is still in effect; the limit affects only
additional width.
Test Plan:
(Instructions for X11)
* Run `Xephyr -dpi 96 -screen 800x600 :1`
* Run `DISPLAY=:1 kwin_x11`
* Run `DISPLAY=:1 ./konsole`
* Open edit profile dialog, resize it to minimum allowable size.
* Measure the window size.
* Close Xephyr.
* Run `Xephyr -dpi 96 -screen WxH :1`, where `W` is the measured window
width + 20, and `H` is anything larger than measured height.
* Run `DISPLAY=:1 kwin_x11`
* Run `DISPLAY=:1 ./konsole`
* Open edit profile dialog
**Expected result:**
Edit Profile dialog's width should be a bit smaller than Xephyr's
screen
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: hindenburg, konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D19400
Summary:
Make the feature work and improve it slightly - the weight used as bold
is dependent on selected font's weight. "Regular" will use "Bold", but
e.g. "Thin" will use "Light".
`styleName` is almost always redundant - all font properties like
weight, stretch, etc, are stored separately.
Source Code Pro 12pt with font weight set to: Extra Light, Light,
Regular, Medium, Semibold, Bold:
{F6631951}
Test Plan:
In every case: turn on "Draw intense colors in bold font" in Edit
Profile → Appearance.
**The feature:**
* Use some font which has "Bold" style available and set it to "Regular"
style.
* Run: `printf '\033[1mBold|\033[0m|Normal\n'`
* "Bold|" text should use bold font.
**Different weights:**
* Use some font which has multiple weights available (e.g. Thin, Bold,
Heavy, ...), e.g. Source Code Pro.
* Select lightest style.
* Run: `printf '\033[1mBold|\033[0m|Normal\n'`
* Select "regular" font style.
* Bold text for "regular" style should be bolder than the text for
lightest style should be.
Reviewers: #konsole, #vdg, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: hindenburg, ngraham, konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D19266
Summary:
* Fix bold lines (BUG 402415).
* Make drawing pixel-perfect.
* Make line width proportional to font size.
* Move relevant code to separate file and namespace.
* Remove code for checking supported line characters from Character
class. Information about what is supported is now in one place
together width drawing code.
* Remove fontembedder/LineFont files (no longer used).
* Add test script for displaying supported characters table.
* Add triple and quadruple dashes (U+2504...U+250B).
* Change shade block characters (U+2591...U+2593) look. When
antialiasing is turned on, shades are drawn as transculent solid
rectangles with 25%, 50% and 75% alpha. This matches the characters
name/description and their usage. Without antialiasing, previous
method with patterns is used.
**Screenshots**
Font size: 10pt; character width: 8px
{F6602823}
Font size: 11pt; character width: 9px
{F6602824}
Font size: 12pt; character width: 10px
{F6602825}
Font size: 13-14pt; character width: 11px; w/o antialiasing
{F6602826}
Font size: 13-14pt; character width: 11px
{F6602827}
Font size: 15pt; character width: 12px
{F6602828}
Font size: 6-7pt; character width: 5px
{F6602829}
Font size: 8-9pt; character width: 7px; w/o antialiasing
{F6602830}
Font size: 8-9pt; character width: 7px
{F6602831}
Alignment test (8pt)
{F6602832}
Note: Copyrights in LineBlockCharactersDrawer.cpp are based on
`git blame -w src/TerminalDisplay.cpp` executed before moving the code
to a separate file. Years from first/last commit. Authors sorted by
year. Whitespace-only changes were ignored. Maksim's code was commited
by Waldo Bastian who mentioned him as the author in commit message
(see 5062b40dd).
BUG: 402415
Test Plan:
== Common steps for all tests ==
* Open //Edit Current Profile → Appearance//.
* Turn on //Draw intense colors in bold font//.
* Turn off //Use line characters contained in font//.
* (Optional) select a font which is able to display bold characters in
Konsole (e.g. DejaVu Sans Mono).
== Check characters validity ==
* Run `./tests/line_block_characters_table.py`.
* Open //Edit Current Profile → Appearance//.
* By switching //Use line characters contained in font// on and off,
compare built-in characters drawing with characters from a font.
General shape and line directions must be the same. Small offsets,
line width differences (as long as proportions between lines in
a character are kept), and quality differences are allowed.
== Review overall quality ==
* Run `./tests/line_block_characters_table.py`.
* Review glyphs quality in different font sizes.
* Open //Edit Current Profile → Appearance//.
* Toggle //Smooth fonts//, review quality again.
== Check alignment ==
* Display `tests/UTF-8-demo.txt`
* At the bottom of the file you can find a few alignment images. Check
if all lines align properly. If you're unsure how it should look,
compare it with font characters by turning on //Use line characters
contained in font// option.
Reviewers: #konsole, #vdg, fvogt, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: hindenburg, sandsmark, fvogt, konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D18735
Summary:
Click with the middle mouse click on a tab: close it
Click with the middle click on empty portion of tab bar creates a new tab.
This makes konsole more streamlined with default behavior
found in other tabbed applications like browsers.
GUI option to enable/disable closing tab w/ mouse button. The default
is to have closing tab with button disabled to avoid possible data loss.
Tomaz Canabrava <tcanabrava@kde.org> also coded portion of this.
FEATURE: 398940
FIXED-IN: 19.04
GUI:
Test Plan: {F6618852}
Reviewers: ngraham, hindenburg, tcanabrava
Reviewed By: ngraham, hindenburg
Subscribers: emateli, thsurrel, ngraham, hindenburg, shubham, broulik, konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D15742
Summary:
A lot of methods that no one called, a lot of methods that the
only calee could be removed to a direct call.
Reviewers: #konsole, hindenburg, ngraham
Reviewed By: #konsole, hindenburg
Subscribers: sandsmark, konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D18520
Summary:
Group spaces following any non-wide character with the character. This
allows for rendering ambiguous characters with wide glyphs without
clipping them. Characters are still clipped when followed by another
visible character.
{F6591346}
BUG 401298
Test Plan:
* Display: `⛰ ⛩ `
and/or:
* Install Font Awesome or other font with square icons in Private Use
Area
* Pick some icons using KCharSelect or similar tool (or copy this:
` `)
* Put space after each icon and display them in Konsole
**Actual result:**
Only left half of icons is rendered
**Expected result:**
Full icon should be rendered (it can be clipped on top or bottom though)
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: hindenburg, konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D18784
Summary:
When doing word selection use the previous selection anchor if the new one is out of bounds (user scrolled out of view or similar).
A more proper (but still not really proper) fix than b85bbaa8c8 reverted by 213afc0e0c
I have a branch refactoring the word selection stuff a bit, but it's a bit more invasive. This is the minimal change I could get to fix it.
Test Plan: see b85bbaa8c8213afc0e0c914067d14a
Reviewers: hindenburg, pavelkh, ngraham
Reviewed By: hindenburg
Subscribers: konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D18862
Konsole mis-uses KBookmark; it is not really setup to handle commands
as bookmarks. KBookmark encodes the URL which causes issues. This
testing is currently determining if decoding the URL will work with
commands and URLs.
See BUG 311543, 368777 and possible others