Commit Graph

39 Commits

Author SHA1 Message Date
Friedrich W. H. Kossebau
451ed33d63 Add explicit moc includes to sources for moc-covered headers
* speeds up incremental builds as changes to a header will not always
  need the full mocs_compilation.cpp for all the target's headers rebuild,
  while having a moc file sourced into a source file only adds minor
  extra costs, due to small own code and the used headers usually
  already covered by the source file, being for the same class/struct
* seems to not slow down clean builds, due to empty mocs_compilation.cpp
  resulting in those quickly processed, while the minor extra cost of the
  sourced moc files does not outweigh that in summary.
  Measured times actually improved by some percent points.
  (ideally CMake would just skip empty mocs_compilation.cpp & its object
  file one day)
* enables compiler to see all methods of a class in same compilation unit
  to do some sanity checks
* potentially more inlining in general, due to more in the compilation unit
* allows to keep using more forward declarations in the header, as with the
  moc code being sourced into the cpp file there definitions can be ensured
  and often are already for the needs of the normal class methods
2023-07-28 12:17:12 +00:00
Ahmad Samir
97569b764c Run clang-format on the whole repo
Also install the relevant git hook.

GIT_SILENT
2021-09-06 12:51:39 +02: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
9a1c47e739 Move CheckableSessionModel class to a new file. 2020-07-23 01:12:15 +00: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
Tomaz Canabrava
e1474c3bc9 remove clang warnings: else after return
Reviewers: #konsole, hindenburg, ngraham

Reviewed By: ngraham

Subscribers: konsole-devel

Tags: #konsole

Differential Revision: https://phabricator.kde.org/D20444
2019-04-10 20:27:46 +02:00
Kurt Hindenburg
2e1071fc90 Use QVariant::toInt() 2019-04-07 19:36:08 -04:00
Kurt Hindenburg
8f44c36aec modernize use auto 2018-10-27 22:05:38 -04:00
Kurt Hindenburg
b0e4e474a9 For QPointer do not compare to nullptr, use isNull() 2018-04-01 14:45:13 -04:00
Kurt Hindenburg
5b6ba95255 Do not setShortcut() on the OK button on dialogs
using okButton->setShortcut(Konsole::ACCEL | Qt::Key_Return); causes
the Alt+O to not work on the OK button.  Both Ctrl+Return and Alt+O
now work to close the dialog.

BUG: 364716
FIXED-IN: 18.04
2018-02-28 21:14:42 -05:00
Kurt Hindenburg
7f35a5af09 initialize members in the initialization list 2018-01-04 09:14:55 -05:00
Kurt Hindenburg
516902701e uncrustify using kf5 config 2017-05-28 11:42:21 -04:00
Kurt Hindenburg
a540e6fdd0 Fix readability-implicit-bool-cast issues using nullptr 2017-04-21 10:51:31 -04:00
Kurt Hindenburg
2b586e6ff8 use auto 2017-03-28 11:25:26 -04:00
R.J.V. Bertin
378518ea4b shortcut adaptation to platform standards on Mac
REVIEW: 120323
2016-11-24 17:35:31 +01:00
Kurt Hindenburg
ff66b231bf Remove unneeded includes 2015-09-16 23:34:40 -04:00
Kurt Hindenburg
917d932f46 Add const and & 2015-09-15 10:23:08 -04:00
Kurt Hindenburg
f316dc77f6 s/reset/beginResetModel endResetModel/
Qt5 port away from QAbstractItemModel::reset() to
QAbstractItemModel::(begin|end)ResetModel()
2015-09-13 21:21:41 -04:00
Montel Laurent
83515eafbc Port to new connect api 2014-10-18 14:11:18 +02:00
Montel Laurent
6c15e52276 Port to QDialog 2014-10-17 08:58:01 +02:00
Alex Richardson
a3ce74d4eb Convert to Qt5 signal slot syntax
REVIEW: 117482
2014-04-30 19:16:54 +02:00
Kurt Hindenburg
dea32dcb08 s/KLineEdit/QLineEdit 2014-01-18 14:19:03 -05:00
Kurt Hindenburg
597d4657a7 s/kde4_add_ui_files/qt5_wrap_ui cmake fix 2014-01-12 10:22:51 -05:00
Kurt Hindenburg
cdf2b2bc78 Switch from c-style casting to c++ casting via static_cast 2012-12-19 21:20:18 -05:00
Jekyll Wu
131091c983 Adjust including form for some Qt headers as preparation for Qt5
So if someone notices later some Qt header is included in the form
of "#include <Class>" instead of the more common form of "#include
<Module/Class>", do not rush changing it.

REVIEW: 105819
2012-08-14 17:32:06 +08:00
Kurt Hindenburg
220ab68002 Use c++ casts - static_cast instead of c-casting 2012-06-27 10:42:46 -04:00
Jekyll Wu
25b8b5353c Trivial style change: remove extra blank lines 2012-03-17 19:53:21 +08:00
Jekyll Wu
f42fd4721b Clean up unneeded #includes 2012-02-20 19:41:38 +08:00
Jekyll Wu
3d8da1f878 Make 'foreach(...)' more readable 2012-01-14 22:54:56 +08:00
Kurt Hindenburg
933cbb044e Apply astyle-kdelibs
Over the years, the coding style is all over the place.

Use 'git diff -w --ignore-all-space' to see non-whitespace changes.
2011-12-24 10:14:53 -05:00
Jekyll Wu
d300378cae Make the "copy input to" dialog also being window modal
It is generally a good idea to make it modeless in the future
2011-11-06 12:53:22 +08:00
Jekyll Wu
125e2c7bd2 Declare pointer and reference in a consistent way
Most code use the "const QString& text" form, instead of the "const
QString &text" form. So change the minority to be consistent with
the majority.
2011-11-06 06:13:28 +08:00
Jekyll Wu
8f1bbd4353 Remove trailing white spaces 2011-11-05 19:49:23 +08:00
Jekyll Wu
cf92cece2b Remove leading white spaces in blank lines to make them really empty 2011-11-05 07:29:21 +08:00
Laurent Montel
1660658aab Fix mem leak
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=1156171
2010-07-28 17:03:39 +00:00
Robert Knight
956277c014 Convert tabs to 4 spaces to match kdelibs conventions. Previously
there was a mix of tabs and spaces for indentation.

CCMAIL:Stefan.Becker@nokia.com


svn path=/trunk/KDE/kdebase/apps/konsole/; revision=863326
2008-09-21 20:06:58 +00:00
Albert Astals Cid
1222b0e15b avoid unnecessary copies by using const & in foreach
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=800783
2008-04-24 20:41:04 +00:00
Robert Knight
8119515cca Copy Input Dialog: Fix 'Select All' / 'Deselect All' buttons.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=796546
2008-04-13 18:49:24 +00:00
Robert Knight
3ddffbd214 Re-implement 'Send Input to All' (now Edit -> Copy Input To...)
Improvements in the KDE 4 version:

- Input can be copied to all other sessions or only a subset of sessions,
  selection is via a filter-able list which appears when 'Copy Input To...' is clicked.
- Input can be sent from a tab in one window to a tab in another window
  (all sessions in all windows are displayed in the filter window)

BUG: 152072
BUG: 77682

Squashed commit of the following:

commit 3184e1958d3aa7e7574081df32814dbe44591c9e
Author: Robert Knight <robertknight@gmail.com>
Date:   Sun Apr 13 19:24:22 2008 +0100

    Remove debugging messages.

commit 31afd9b2a3a327ca3e43deff47415de41a1ad74e
Author: Robert Knight <robertknight@gmail.com>
Date:   Sun Apr 13 19:16:33 2008 +0100

    Copy input dialog.  Hide 'Number' column and header.  Show the check box in the title column.  Focus the search filter before showing the dialog.

commit 8c74e736d322e74d7af812a14500d748e748a224
Author: Robert Knight <robertknight@gmail.com>
Date:   Sun Apr 13 19:03:59 2008 +0100

    Remove sessions from the internal checked/fixed sets when they are removed.  Fix crashes if sessions exited while SessionController was showing a dialog for that session.  Add QPointer<T> guards around the dialog exec() methods.

commit e4085069c2ff8cedb987639f50b73a3c679319f6
Author: Robert Knight <robertknight@gmail.com>
Date:   Sun Apr 13 18:44:40 2008 +0100

    Remove sessions from the SessionGroup and SessionListModel when they terminate.

commit 29db3a3dd84f392ee333918e261bd6bcd75fd062
Author: Robert Knight <robertknight@gmail.com>
Date:   Sun Apr 13 18:39:24 2008 +0100

    Use an extended rather than single selection in CopyInputDialog

commit 3f93507405053c84e09337225fa6e2a582776264
Author: Robert Knight <robertknight@gmail.com>
Date:   Sun Apr 13 17:54:22 2008 +0100

    Copy Input Dialog:  Show tab text in the Title column.  Show clear button in filter line edit.

commit 0619f7ad72a1a346118a0174e5aee01ce94ddc52
Author: Robert Knight <robertknight@gmail.com>
Date:   Sun Apr 13 17:40:07 2008 +0100

    Copy Input Dialog:  Add buttons to select and deselect all visible sessions.

commit 126afb3d394894a0325c5772fb32a25380932c44
Author: Robert Knight <robertknight@gmail.com>
Date:   Sun Apr 13 17:23:07 2008 +0100

    Show the master session as checked and disabled.

commit c559bd5f5bcc59adecc3f29ee5b16200adb37b09
Author: Robert Knight <robertknight@gmail.com>
Date:   Sun Apr 13 17:20:40 2008 +0100

    Create a SessionGroup in the SessionController when copyInputToAll() is called and use the CopyInputDialog to allow the user to choose which sessions the current one copies to.

commit 64c12e58a582a17b5cdeddcc8f9df7a89885f9e5
Author: Robert Knight <robertknight@gmail.com>
Date:   Sun Apr 13 17:19:47 2008 +0100

    Display session list with check boxes and filter to select sessions to copy input to.  Show master session as a disabled, checked item.

commit 43eb5ccdfc768b42c5e650b6e56d1e1120ab5c5b
Author: Robert Knight <robertknight@gmail.com>
Date:   Sun Apr 13 17:19:06 2008 +0100

    Add header data and Session* pointer to items in SessionListModel.

commit a8236a6658e1540a924aa6467dc90aeed346a0be
Author: Robert Knight <robertknight@gmail.com>
Date:   Sun Apr 13 17:18:28 2008 +0100

    Remove connection to removed slot.

commit 03990fa244159b50152cc721a0fe4e403551d47c
Author: Robert Knight <robertknight@gmail.com>
Date:   Sun Apr 13 17:17:54 2008 +0100

    Make SessionGroup take a QObject* parent argument in the constructor.

commit e2f91001c09a8422fb44ad58cf95f8dcba22c063
Author: Robert Knight <robertknight@gmail.com>
Date:   Sun Apr 13 15:25:26 2008 +0100

    Add CopyInputDialog to build.

commit 3b33e1d6abdde56bbafd2bbd64c89c008a41d096
Author: Robert Knight <robertknight@gmail.com>
Date:   Sun Apr 13 14:32:36 2008 +0100

    Add header and implementation files for 'Copy Input To' dialog.

commit 9ebc36e3f09865f29702768cbb17279054e8cb4c
Author: Robert Knight <robertknight@gmail.com>
Date:   Thu Apr 10 07:04:48 2008 +0100

    Add a dialog for selecting sessions to copy input to.

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=796545
2008-04-13 18:49:20 +00:00