Commit Graph

197 Commits

Author SHA1 Message Date
Lucas Biaggi
29e86ddeb7 Add ability to load/save session layouts(split views) and add default layouts
Add three layouts to the toolbar; add --layout <file> to the command line.
The 3 defaults layouts are 2x2, 2x1, 1x2

GUI:
2021-04-24 21:30:11 +00:00
Kurt Hindenburg
70ffd75e24 Remove code for pre Qt 5.15.0 versions 2021-04-17 10:31:17 -04:00
Laurent Montel
8242763fb3 operator+/- is disabled for QFlags in qt6 2020-12-09 07:57:05 +01:00
Kurt Hindenburg
78a0092522 Convert src to use SPDX license/copyright
https://community.kde.org/Policies/Licensing_Policy#SPDX_Statements
https://community.kde.org/Guidelines_and_HOWTOs/Licensing
2020-11-12 22:17:06 -05:00
Gustavo Carneiro
5c9c22fab3 Move TerminalDisplay to terminalDisplay folder. 2020-10-07 03:12:43 +00:00
Martin T. H. Sandsmark
c78f45de82 shave ~10% of the startup time 2020-09-05 01:16:15 +00:00
Martin T. H. Sandsmark
31969ef81d MainWindow does the resize tricks itself 2020-09-05 01:16:15 +00:00
Gustavo Carneiro
c273dd88f8 Remove compile warning -Wparentheses 2020-07-28 18:35:51 -03:00
Martin Rys
74764db471 Unminimize Konsole when --new-tab is called 2020-07-28 17:13:29 +02:00
Martin Rys
999f6e373e Fix focus when using --new-tab
Note that Konsole is not un-minimized ATM.

BUG: 421408
FIXED-IN: 20.08

https://invent.kde.org/utilities/konsole/-/merge_requests/177
2020-07-28 10:21:20 -04:00
Gustavo Carneiro
d473572535 Move ProfileGroup and ProfileCommandParser Classes to a new files. 2020-07-27 23:21:25 -03:00
Tomaz Canabrava
0478529c6f Move Profile related classes to it's own folder
This also allowed me to remove a few includes of Profile.h
around the codebase, that used Profile::Ptr. now the compilation
is a bit faster and also does not recompile things as often.
2020-07-27 19:14:53 +02:00
Gustavo Carneiro
9b2e9731e0 move Session files to a new folder. 2020-07-15 09:30:42 +00:00
Gustavo Carneiro
b5fbbd81c7 Move widgets to a new folder. 2020-07-12 12:33:39 +00:00
Gustavo Carneiro
d2d818b08b konsole: Convert depreciated QString::SkipEmptyParts and QButtonGroup::idClicked
Qt v5.15.0:
	Convert QString::SkipEmptyParts to Qt::SkipEmptyParts
	Convert QButtonGroup::buttonClicked to QButtonGroup::idClicked
2020-06-06 02:01:54 +00:00
Kurt Hindenburg
90c81d0ecf Simpify return after else statements 2020-05-10 16:44:26 -04:00
Gustavo Carneiro
e788b2a894 Konsole: Add a color tabs support in Konsole
Signed-off-by: Gustavo Carneiro <gcarneiroa@hotmail.com>
2020-05-10 15:22:54 +00:00
Kurt Hindenburg
f3f8cca628 Use auto when initializing with a template cast to avoid duplicating the type 2020-05-02 22:07:19 -04:00
Mariusz Glebocki
52d2720007 Revert "GIT_SILENT: minor qstring optimization"
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.
2019-12-17 21:04:14 -05:00
Ahmad Samir
c83bb19a68 Port away from deprecated foreach, use for-range instead, first take
The code compiles and konsole loads and seems to work as before.
2019-11-24 19:24:12 +02:00
Laurent Montel
f96deb39aa GIT_SILENT: minor qstring optimization 2019-09-07 13:33:09 +02:00
Konstantin Kharlamov
c5a3340aac Application.cpp: remove unused include 2019-09-06 20:04:51 +03:00
Frederik Gladhorn
6029f813f7 Use QCommandLineOption::HiddenFromHelp instead of deprecated API
Summary: setHidden has been deprecated since Qt 5.8.

Reviewers: #konsole

Subscribers: konsole-devel

Tags: #konsole

Differential Revision: https://phabricator.kde.org/D23143
2019-08-16 12:04:52 -04:00
Tomaz Canabrava
6e8153a78e Multiple Splits per Tab
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
2019-03-26 21:50:18 -04:00
Laurent Montel
f46c36bbb5 Const'ify where it's possible found by clazy 2019-01-11 07:29:12 +01:00
Patrick José Pereira
8c94b21980 Correct includes
Summary: Remove unneeded includes, add correct includes, move includes h <-> cpp

Reviewers: tcanabrava, hindenburg, #konsole

Reviewed By: hindenburg, #konsole

Subscribers: konsole-devel

Tags: #konsole

Differential Revision: https://phabricator.kde.org/D17759
2018-12-28 20:47:34 -05:00
Tomaz Canabrava
7a43e3b2cd Don't duplicate the tabs when Spliting the View
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
2018-12-10 10:02:01 -05:00
Tomaz Canabrava
8b377385ab Re-Enable --hide-tabbar and --show-tabbar
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
2018-07-25 09:18:11 -04:00
Tomaz Canabrava
83ebda5bf4 Use QTabBar: drop tons of code
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
2018-07-17 10:11:48 +02:00
Tomaz Canabrava
f084dbfbee Remove unnecessary forward-calls
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
2018-06-09 20:12:41 -04:00
Tomaz Canabrava
c4baeb5ab1 Reduce the boilerplate needed for commandLineArgs
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
2018-05-22 11:11:33 -04:00
Kurt Hindenburg
242a9fb19d update docs for file used with --tabs-from-file 2018-05-13 16:51:58 -04:00
Kurt Hindenburg
f4fbec0c02 Fix --background-mode so the shortcut works
I disabled this in 2014 since it did not work; it works now and
changing the shortcut works as well.

BUG: 353382
2018-02-14 16:20:56 -05:00
Kurt Hindenburg
4a6aa6b946 Remove unneeded Qt check
No need to check for > Qt5.6.0 since we require 5.6.0 now
2018-02-07 11:00:29 -05:00
Kurt Hindenburg
7693106396 s/QLatin1String/QStringLiteral/
Use separate varible to fix compilation on FreeBSD
2018-01-13 10:32:13 -05:00
Kurt Hindenburg
74e36bc6ff revert back to QLatin1String
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"))) {
2018-01-07 13:13:12 -05:00
Kurt Hindenburg
7cd1dd5367 QLatin1String -> QStringLiteral 2018-01-03 09:34:14 -05:00
Kurt Hindenburg
2a2a56d73c modernize use nullptr 2017-07-15 23:28:32 -04:00
Kurt Hindenburg
78a81b8e5b uncrustify using kf5 config 2017-06-19 09:48:21 -04:00
Kurt Hindenburg
00f566a84c uncrustify using kf5 config 2017-05-27 18:12:02 -04:00
Kurt Hindenburg
48a8a40566 More changes to QLatin1String, QLatin1Char and QStringLiteral 2017-05-08 09:38:57 -04:00
Kurt Hindenburg
8b2170bd9b add KUIT items 2017-04-26 23:53:16 -04:00
Kurt Hindenburg
eade05a4bd Do not specify Qt modules in includes 2017-04-26 21:33:34 -04:00
Kurt Hindenburg
a540e6fdd0 Fix readability-implicit-bool-cast issues using nullptr 2017-04-21 10:51:31 -04:00
Kurt Hindenburg
accf076104 Use member initializer lists in constructors 2017-04-11 12:07:34 -04:00
Kurt Hindenburg
dfafff97d4 remove QDebug/qWarning and use QCDebug 2017-03-31 21:06:18 -04:00
Kurt Hindenburg
2b586e6ff8 use auto 2017-03-28 11:25:26 -04:00
Martin T. H. Sandsmark
cbb7448434 Fix opening of new tabs with multiple processes
Make sure we re-use the process if the user wants a new tab.

BUG: 373440
REVIEW: 129886
2017-01-27 18:13:33 +01:00
Maximiliano Curia
a779c8314a Pre process the -e custom command argument
Special case parsing of -e, to avoid parsing parameters intended for the
command to be executed.

REVIEW: 129677
2017-01-27 15:51:14 +01:00
Kurt Hindenburg
cd61ee84d8 Add comment that topLevelWidets() returns no windows
CCBUG:373440
2017-01-22 13:25:41 -05:00