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.
Summary:
This is what I envision for the Konsole Tab / Splits
management. One tab contain a QSPlitter that can contain
multiple TerminalDisplays / Splits.
You can test this behavior by hitting ctrl + shift + 9
and ctrl + shift + 0 to activate the splits, and ctrl +
shift + t to activate a new tab.
Old:
{F6484123}
New:
{F6484124}
What works:
- Tab Creation
- Split Creation (Even Recursive splitting)
- Terminal Close will close the Split on last split
- Last last split to close will close the tab
- Last tab to close will close konsole
- Detaching
- Tab Renaming
- Closing splits after detach
- Closing windows after detach
- Detach / Reattach works!
This patch series has the commits of Thomas Surrel, Maciej Niedbdalski and Myself.
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: luc4, hallas, anthonyfieroni, gennad, ngraham, thsurrel, maciejn, mglb, hindenburg, konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D17643
Summary:
Instead of iterating over the sessions to fetch the view and
duplicate the current screen once for each split, ignore all
of them and just create a new terminal view. The only thing
this terminal view shares with the previous current widget
is the profile.
use createView instead of manually trying to create the view
Fixes bug while closing the split
Don't duplicate tabs in the splits
BUG: 385697
BUG: 380455
FIXED-IN: 19.04
Reviewers: thsurrel, hindenburg, gennad, ngraham, #konsole
Reviewed By: thsurrel, hindenburg, ngraham, #konsole
Subscribers: ngraham, hindenburg, gennad, konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D17267
Summary:
Show tabbar and hide tabbar got lost in the transition to a modern
QTabBar, this re-enables them. These options will override the
current settings if you use --hide-tabbar or --show-tabbar.
Changing these options in the settings will change these settings.
To use the current preferences just start konsole without --hide-tabbar
or --show-tabbar
Reviewers: #konsole, sandsmark, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: ngraham, konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D14294
Summary:
this is a WIP, I don't plan to merge this yet, there are many thigns to solve.
Drop the handmade TabWidget used inside of konsole in favor of Qt's QTabWidget
This drops tons of code we manually did, but it also drops a bit of functionality.
Missing features:
- Close Button
- New Tab on double click
- Drag'n Drop
- Detach
and lots of testing.
Subscribers: konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D13882
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
Summary:
Use the new initialization syntax plus a initialization vector
to remove the need to call parser->addOption(QCommandLineOption
on every single command line option.
The code now store things in a vector, that is in fact slower
but this should be negligible, and the code is easier to extend
and to read.
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: hindenburg, konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D12966
On FreeBSD, QStringLiteral here generates this error:
512:53: error: lambda expression in an unevaluated operand
foreach (const QString &value, m_parser->values(QStringLiteral("p"))) {
In previous incarnations of kuniqueapplication it used to inject a common
command option --nofork which is meant to bypass single-instance behavior.
Given that konsole can and is being invoked from scripts they may well want
to ensure that the fork they created is the actual instance of konsole.
i.e. to monitor return values and life time
Presently, since the options are divergent between konsole4 and konsole5,
scripts are either incompatible with older konsoles or with newer konsoles.
To make life easier for everyone add a compat alias --nofork, which
behaves exactly like separate.
(this unbreaks steam, which is a notable recent offender of falling into
this particular trap)
REVIEW: 129647
CHANGELOG: Added compatibility command option `--nofork` for single-instance behavior
If a new Konsole instance is launched via DBus (e. g. single process
mode), it re-used the QCommandLineParser each time, so each new instance
would inherit all parsed options.
Most noticeably is if you have konsole running, press Shift+F4 in
Dolphin to launch a Konsole instance in the current folder (which leads
Konsole to use a temporary profile), and then try to open a new konsole
instance outside of that, it would open in the folder from Dolphin.
REVIEW: 129217
It's apparently not possible to set WA_TranslucentBackground after
show(). The MainWindow constructor calls applyKonsoleSettings() which
calls KMainWindow::setAutoSaveSettings() which in turn calls
setVisible(true), which makes any calls to setTransparency() from the
Application::newMainWindow() irrelevant, even if updateUseTransparency()
is called from it.
REVIEW: 128669
BUG: 366368