Having spaces (especially leading or trailing ones) in translatable
strings is probably not a pretty good idea as that is a source of
errors. Maybe there can be some refactoring of the setSuffix function
to add a space by itself, so it can be left out of the translatable
string.
For now I added a hint that this space has to be translated as well.
I ran into this because it is not there in the German translation for
"row(s)".
https://invent.kde.org/utilities/konsole/-/merge_requests/126
New unit test, triggers faulty code in `Screen::copyLineToStream`
which goes outside `Character` array boundaries, overwriting
memory of other objects.
Compiling the code with address-sanitizer makes the fault
visible when running those new UTs.
'Konsole::Screen` defined an array of 1024 elements, where user
may resize the konsole to have more columns than this array can handle.
Selecting a row in such case, is going to cause a buffer-overflow.
Bug: 330066
Due to some internal handling in GTK itself, we end up with text copied
from Firefox where a newline is represented as CRLF (\r\n); since the
doPaste() method replaces each \n with \r, we ended up with \r\r, which
ultimately led to extra newlines in the pasted code. To fix the issue
simply detect the CRLF case and replace each \r\n with \r.
To test, copy some multiline text from Firefox, open vim in konsole and
paste, you end up with two newlines between each block of text. Compare the
results after applying this patch
BUG: 421480
FIXED-IN: 20.08
Add the move-tab-to-right and move-tab-to-left actions in
ViewManager to the _multiTabOnlyActions collection to allow
override them in Yakuake with grow-terminal-right and
grow-terminal-left
BUG: 415164
Match files in subdirs of the current dir too, this enables opening
files from the output of e.g. `grep`.
Also use QSet::cbegin/cend to prevent detaching (if the container is not
const, calling begin/end on it will make it detach).
This partially reverts 0b489b0c69.
Before we opened a link via mousePress but if we want to make a
selection that will open a file and drag.
Now we check if there is a selection before trying to open something.
So if you click and drag a url, it will not open. If you directly
click and release without dragging, it will open.
FIXED-IN: 20.08
https://invent.kde.org/utilities/konsole/-/merge_requests/9
This patch fixes the issue where the input method (e.g. IBus or
Fcitx) window would not be under the cursor.
Also, Qt::ImMicroFocus is depreciated so use Qt::ImCursorRectangle.
BUG: 420799
FIXED-IN: 20.08
This allows for a user configured thumbnail image to be displayed
when the mouse is hovering over a file link. Any file that KIO can
transform into a thumbnail (image, video, folder) will be displayed.
Simply move the mouse to a file while holding an user selected keypress
(Alt, Shift, Control or a combination of them). The default
requires no key press. The profile setting 'Underline files' much be
enabled for this to work.
https://invent.kde.org/utilities/konsole/-/merge_requests/93
FIXED-IN: 20.08
FEATURE:
GUI:
CHANGELOG: Add thumbnails for certain file types on mouse hover
Don't call .data() for whenever we want to deal with the Smart
pointer. they have overloaded operators for those things, and we
should use them.
Makes the code much more pleasant.
There's a `autoDelete` option for a task, but it's up to the
task to implement how it will delete itself. For SearchHistoryTask
this never happened.
I tested holding the `search` button for around one minute and the
memory was slowly growing and never freed. Adding a destructor with a
debug to remove any doubt made me realize: The search task was only
removed when konsole closed.
This is not just about the Memory Management, as the search was also
connected to multiple objects and could potentially mishandle searches.
Whenever we trigger something that redraws the screen we trigger
all the filters, and the FileFilter - that looks for files and folders
in the current directory - is constantly re-triggered to.
The creation of the vector / set containing all files takes now around
30msec, but searching takes just 3 - 4 msec. If we only generate the
list of files when we change directories, this goes down from 34 msec
to just 4, making konsole consume less cpu, spend less energy and help
with battery when we are selecting text or updating the screen with new
data.
This fails to highlight a file if the file is created after we read the
files in the directory, as we are not updating the list of files
anymore. Not an acceptable loss, we need to fix this, but not by
re-reading all of the files in folders and subfolders on every mouse
move.
The time that it takes to search a collection of just too many strings
can take up to 48msec - tested triggering the code on /usr/lib with
around 7000 files.
changing to QSet this went down to 35msec. This is not a lot but
it's triggered at *every* mouse move event, so the gain is cummulative
The whole experience is a bit smoother.
Add the switch-to-tab-%i actions in ViewManager to the
_multiTabOnlyActions collection to allow override them in Yakuake
BUG: 420503
(cherry picked from commit 13697e07d9290f3c14d57ec27884bb9756999f27)
QMenu since 5.15 is hidden when an action is triggered, this caused a
crash in Konsole when trying to access the text encoding menu.
Now Session emits a signal when the text encoding is changed, the
SessionController can connect to that singal to set the current codec in
the KCodecAction object.
Also fix the EditProfileDialog so that when the KCodecAction menu is
shown the currently set codec is selected.
BUG: 419526
FIXED-IN: 20.08