Summary:
There is a bug in the Qt glib event loop leading to timers never being
able to deliver signals.
Work around this by disabling the glib event loop.
References:
http://lists.qt-project.org/pipermail/interest/2015-September/018846.htmlhttps://bugreports.qt.io/browse/QTBUG-48344
Test plan:
From the referenced bug:
Stefan Westerfeld 2010-03-10 11:40:24 UTC
Running the following program within konsole:
#include <stdio.h>
int
main()
{
for (int i = 0; i < 100000000; i++)
{
fprintf (stderr, "foo %d\n", i);
}
}
leads to a freeze - not single message is printed - no reaction on
return. Only after a long time (30 seconds) something happens.
If I run the same program in an xterm, the messages are scrolling
through, as I would expect from that kind of output.
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: hindenburg
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D6078
BUG: 230184
Summary:
When there was at least one search attempt, search box is still opened,
and the screen and/or history is cleared, there is a high chance that
the line number remembered by the search is invalid. The line number is
used as the lines array index, so this can lead to overflow and crash.
This is at this moment fixed with a check in `copyLineToStream()`, which
is a generic function that happens to be used by search function and
where the line number is used. There still is an `assert` which is
triggered in debug builds.
The patch moves the check directly to a search function, where the line
number is initialized before first search.
Test Plan:
You have to do the test in debug build - there is a hack in
`copyLineToStream()` which prevents crash, but `assert` before it
catches an error condition.
* Run `seq 5000`
* Open search box, search for `000`
* Clear screen/history
* Search up/down
Actual result: Crash
Expected result: Search should begin from last/first visible line
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: hindenburg, konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D14106
Summary:
Resetting the widget palette to the app main palette fixes black
background problem in short and clean way.
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: tcanabrava, konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D14039
Summary:
When the focus is in `IncrementalSearchBar`, unhandled keys (i.e. those
not handled by text input box or `unhandledMovementKeyPressed` signal)
are sent to a program running in the terminal, which is probably not
what user expects. Example of propagated keys: Up, Down, PgUp, PgDown,
Fn, Tab.
This patch disables propagation. Shortcuts, movement keys, and keys
handled by search bar still works.
Test Plan:
* Run `cat`
* Open search box
* Press Up/Down/PgUp/PgDown/Tab/Fn keys
Actual result: keys are sent to `cat`
Expected result: nothing should happen (implemented)
Alternative expected result: focus should move from text input to first
button
**Regression test**
Following keys/shortcuts should work:
* Shift+Up/Down/PgUp/PgDown - terminal contents scrolling
* Ctrl+Shift+T - open new tab (unless it was changed)
* Enter - search next
* Esc - close search box
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D14037
Summary:
Prevent search widget from moving when scrolling session.
BUG: 396119
Test Plan:
* Run `seq 1000`
* Turn on search
* Hold Shift+Up, Shift+Down
Actual result: the search box scrolls with terminal contents
Expected result: only terminal should scroll, the box should remain
unchanged
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: hindenburg, ngraham, konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D14038
Summary:
Parent propagates the font to the child,
this was messing up the font used in the SearchBar.
Test Plan: Manually opened the search bar and verified the font.
Reviewers: hindenburg, ngraham, #konsole
Reviewed By: ngraham
Subscribers: konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D14012
Actually use the profile's blur setting instead of just echoing it.
Note that a restart is currently needed after changing the blur setting.
CCBUG: 395520
Summary:
This fixes quite a few bugs and open space for a massive cleanup.
Because the symbols where not exported we recompiled the same object
three times, one for the private library, one for the desktop
application and another for the KPart, all of those having a static
object inside of the same compilation unit - but linked in three
different objects.
This added a static data in three different objects, the object that
was supposed to be a singleton (!) - The result: KonsoleSettings::self()
in mainwindow.cpp had one pointer, in TerminalDisplay had another,
making the singleton useless.
Having just one singleton fixes a major misdesign in Konsole:
There's a call-chain starting from main.cpp that goes thru all objects
changing every setting needed, and most of the calls are just forwarding
calls to another object.
With this fixed we can remove this call-chain, and do a
connect(KonsoleSettings::self(), &KonsoleSettings::settingsChanged(),
...) inside of the object that needs to react to the changed setting
making the code much smaller and easier to figure out what's going
on.
Reviewers: hindenburg, #konsole, #kde_applications, broulik, dfaure, aacid
Reviewed By: dfaure
Subscribers: ngraham, konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D13891
It was decided to implement the revertOVerlayScrollbar in breeze
so it would work for all kde apps in one go.
The Hide scrollbar when uneeded without the overlay would make the text
jump so it's also reverted.
Summary:
A common power user complaint about Plasma is the lack of a
{key Ctrl Alt T} keyboard shortcut to open Konsole. It turns out
that one has existed for quite some time in the form of an
off-by-default example for instructional purposes, shipped with
`khotkeys`.
This patch adds one such shortcut to Konsole itself, ensuring that
it will always be available when Konsole is installed.
Test Plan:
Either log into a new user account or reboot into an existing user
account; {key Ctrl Alt T} opens Konsole! It even includes the
bouncing app launch animation since Konsole opened via the
desktop file.
The shortcut itself shows up as a sub-item under the `KMenuEdit`
category in the {nav Shortcuts} KCM:
{F5950456}
Reviewers: davidedmundson, #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: #plasma, tcanabrava, konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D13708
Summary:
Move the SearchBar to TerminalDisplay, killing the dependency from
the MainWindow and allowing it to be positioned as an overlay.
This fixes the following bugs:
- Opening and closing the SearchBar while top/htop is open
would garble the screen as top would wrongly redraw
two rows below, filling the screen with wrong text
- with tabs and splits, opening two searchbars and
clicking in the close button of the first without
focusing the terminal display first would cause
the tabbar not to close
- Smaller and prettier.
This never belonged here.
Searchbar belongs to the TerminalDisplay
Correctly position the SearchBar on topLeft
Fix initial size of the SearchBar
Icons, Position and Borders
Change the icons, positions and borders
of the SearchBar
Fix fill background of the Search Tab
Don't show the menubar by default
Fix icons & text
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: ahmadsamir, ngraham, konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D13511
Summary:
Move the SearchBar to TerminalDisplay, killing the dependency from
the MainWindow and allowing it to be positioned as an overlay.
This fixes the following bugs:
- Opening and closing the SearchBar while top/htop is open
would garble the screen as top would wrongly redraw
two rows below, filling the screen with wrong text
- with tabs and splits, opening two searchbars and
clicking in the close button of the first without
focusing the terminal display first would cause
the tabbar not to close
- Smaller and prettier.
This never belonged here.
Searchbar belongs to the TerminalDisplay
Correctly position the SearchBar on topLeft
Fix initial size of the SearchBar
Icons, Position and Borders
Change the icons, positions and borders
of the SearchBar
Fix fill background of the Search Tab
Don't show the menubar by default
Fix icons & text
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: ahmadsamir, ngraham, konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D13511
Summary:
Favor manual list creator over for loop for small list
Three items, create them manually, cleaner and less
computationally expensive.
Btw - this is ugly, both ways. I blame QStandardItemModel.
Simplify Logic
Use auto when types are explicit
Simplify Logic: use ternary when it improves readability
Stack when heap's uneeded.
There's absolutely no point on creating a QPointer
and manually deleting the item later. Just create
the variable on the stack
Auto when type's explicit
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D13532
Summary:
Favor manual list creator over for loop for small list
Three items, create them manually, cleaner and less
computationally expensive.
Btw - this is ugly, both ways. I blame QStandardItemModel.
Simplify Logic
Use auto when types are explicit
Simplify Logic: use ternary when it improves readability
Stack when heap's uneeded.
There's absolutely no point on creating a QPointer
and manually deleting the item later. Just create
the variable on the stack
Auto when type's explicit
Subscribers: konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D13532
Summary:
Use initializer list to create QSet
Don't check what doesn't needs to be checked.
the QBitArray knows how to deal with true / false
directly, so remove the if's. the speedgain of the
if's are probabely slower than just setting the values
to true / false again anyway as we are not suffering
from a possible branch-prediction, and plus, code is
cleaner.
No need to test for true / false to set true false
Just set it directly
Subscribers: konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D13512
the QBitArray knows how to deal with true / false
directly, so remove the if's. the speedgain of the
if's are probabely slower than just setting the values
to true / false again anyway as we are not suffering
from a possible branch-prediction, and plus, code is
cleaner.
Summary:
Change the profile of the running session through d-bus.
This can be useful for scripting the changing of profiles throughout
the day, putting less strain on one's eyes at night and being bright
in the day.
Test Plan:
qdbus $KONSOLE_DBUS_SERVICE $KONSOLE_DBUS_SESSION setProfile Shell
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D13486
Summary:
Great part of the code inside saveShortcuts and saveFavorites
is similar, extract it to a new function and call it.
Test Plan: Edited shortcuts, saved, saves where correct.
Reviewers: hindenburg, #konsole
Reviewed By: hindenburg, #konsole
Subscribers: konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D13539
Summary:
It hides the scrollbar when there isn't enough lines to scroll.
This also affects KParts like Yakuake or Dolphin and others.
Test Plan: {F5780078}
Reviewers: hindenburg, #konsole, #vdg
Reviewed By: hindenburg, #konsole, #vdg
Subscribers: konsole-devel, mglb, zzag, Pitel, ngraham, #konsole
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D11843
Summary: This enables text below scrollbar.
Test Plan:
The new trial: {F5912720}
The current Master: {F5912721}
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: Fuchs, ngraham, abetts, konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D13543
Summary: This enables text below scroolbar.
Test Plan:
The new trial: {F5912720}
The current Master: {F5912721}
Reviewers: #konsole, hindenburg
Subscribers: Fuchs, ngraham, abetts, konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D13543
Summary:
If anything throwed we would have a memleak,
this is smaller and safer.
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D13538
Summary:
Removed some calls that the only thing it did was to forward
with the same arguments the call to another object, call the
object directly
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: pedroarthurp, konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D12967