Commit Graph

185 Commits

Author SHA1 Message Date
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
Harald Sitter
0e62a108ba Merge branch 'Applications/16.12'
# Conflicts:
#	CMakeLists.txt
2016-12-19 09:09:30 +01:00
Harald Sitter
c6ffcaff55 Add --nofork as compatibility alias for --separate
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
2016-12-19 09:09:03 +01:00
R.J.V. Bertin
378518ea4b shortcut adaptation to platform standards on Mac
REVIEW: 120323
2016-11-24 17:35:31 +01:00
Martin T. H. Sandsmark
b410e7f08c Silence warning from QCommandLineParser 2016-11-03 10:34:55 +01:00
Martin T. H. Sandsmark
a9b0878b56 Remove debug output I forgot to remove 2016-11-03 10:18:08 +01:00
Martin T. H. Sandsmark
4ec9b56580 Fix reparsing of command line arguments
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
2016-10-22 22:20:16 +02:00
Kurt Hindenburg
d73270a470 Fix issues where --tabs-from-file doesn't exist or is invalid
Cleanly exit if there are any issues with the given file for
--tabs-from-file option.

BUG: 367855
2016-08-27 11:41:51 -04:00
Martin T. H. Sandsmark
a28902e912 Fix transparent backgrounds
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
2016-08-13 20:33:48 +02:00
Kurt Hindenburg
31fcbd11c3 Add QStringLiteral per clazy 2016-06-21 22:34:01 -04:00
Kurt Hindenburg
7a53329ca2 workingDir is unused - comment out 2016-06-19 15:53:02 -04:00
Martin T. H. Sandsmark
27dec8d02f Port away from kdelibs4support.
Original work by Dāvis Mosāns.

REVIEW: 127625
REVIEW: 126808
2016-06-11 17:24:12 +02:00
Kurt Hindenburg
d68a03ba7c Set a detached window to same size as original window
Thanks to Roman Gilg subdiff gmail com for patch

REVIEW: 127801
2016-05-23 17:19:03 -04:00