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
Laurent Montel
177b9f2e63
Remove duplicate headers from cpp/h
2022-06-20 07:07:09 +02:00
Kurt Hindenburg
220013df92
Simplify call and add notes about API
2022-02-08 18:28:15 -05:00
Laurent Montel
6eb30ff3c3
Remove duplicate include from .h/.cpp
2021-11-02 13:20:43 +01: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
Ahmad Samir
d06ea23903
Use Q_EMIT instead of emit
...
In C++20 there are new classes that have member functions named emit().
c.f.:
https://lists.qt-project.org/pipermail/development/2020-February/038812.html
https://en.cppreference.com/w/cpp/io/basic_osyncstream/emit
A similar change was done in the Frameworks:
https://invent.kde.org/frameworks/kio/-/merge_requests/315
2021-02-15 23:52:07 +00: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
Kurt Hindenburg
f3f8cca628
Use auto when initializing with a template cast to avoid duplicating the type
2020-05-02 22:07:19 -04:00
Kurt Hindenburg
bb157d33c8
Use = default to define a trivial default destructor
2020-04-26 21:22:23 -04:00
Kurt Hindenburg
e52ec8f420
Revert removal to allow Bookmark tabs as Folders to work
...
This reverts d0ae598348 which was
mistakenly removed.
2019-12-27 00:26:12 -05:00
Kurt Hindenburg
00c20b240d
Revert supportTabs() removal to fix bookmenu issue
...
This reverts 0995c1dc95bb0df2a04aa84e1034044448ab542e; it is needed
to allow KBookMarks to know we supports tabs and thus show 'Open
folder in tabs' menu item.
FIXED-IN: 19.12.1
BUG: 415549
2019-12-26 23:51:47 -05:00
Kurt Hindenburg
d0ae598348
Remove currentBookmarkList() - hasn't been used in years
2019-08-28 10:25:41 -04:00
Kurt Hindenburg
0995c1dc95
Remove supportsTabs() - hasn't been used in years
2019-08-28 10:07:43 -04:00
Martin T. H. Sandsmark
befaaa0255
Do not allow adding duplicates in bookmarks
...
This currently only catches bookmarks in top-level (ie not sub-folders)
Original code by Tomaz Canabrava <tcanabrava@kde.org >
BUG: 408939
FIXED-IN: 19.12
https://invent.kde.org/kde/konsole/merge_requests/8
2019-08-24 15:12:46 -04:00
Tomaz Canabrava
208218dec9
Small code simplifications
...
Summary:
- remove clang 9 warnings
- simplify if / else branches
Reviewers: #konsole, hindenburg, ngraham
Reviewed By: ngraham
Subscribers: ahmedbilal, gennad, ngraham, konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D20438
2019-04-10 20:26:33 +02:00
Kurt Hindenburg
a7c3bda7a5
Use QFileInfo::completeBaseName() instead of baseName()
...
This fixes some infinite loops and other issues when file names have
multiple dots in their file name.
Patch by ahmadsamir
BUG: 343071
Differential Revision: https://phabricator.kde.org/D10439
2018-02-12 09:39:07 -05:00
Kurt Hindenburg
c907fcea7a
remove unneeded casts
2017-09-16 16:12:09 -04:00
Kurt Hindenburg
2a2a56d73c
modernize use nullptr
2017-07-15 23:28:32 -04:00
Kurt Hindenburg
f9857256cf
uncrustify using kf5 config
2017-06-28 08:56:01 -04:00
Kurt Hindenburg
0fd9e2bd55
uncrustify using kf5 config
2017-05-28 10:52:10 -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
48ae849c8c
Use QStringLiteral and QList::reserve()
2015-10-03 21:51:13 -04:00
Kurt Hindenburg
7b07dd78cd
s/QLatin1String/QStringLiteral/
2015-09-12 12:35:49 -04:00
Michal Humpula
15d09f9161
port from KStandardDirs to QStandardPaths
...
REVIEW: 120498
2014-10-11 14:34:15 +02:00
Kurt Hindenburg
b6304bcc59
Port KUrl to QUrl
...
Thanks to Michal Humpula michal humpula hudrydum cz
REVIEW: 120430
2014-10-04 11:41:50 -04:00
Kurt Hindenburg
1ea501da62
remove include moc from .cpp files - removes build warnings
2013-10-22 20:07:23 -04:00
Kurt Hindenburg
346e174285
Fix build for new kdelibs-frameworks bookmark code
...
thanks to Casian Andrei skeletk13@gmail.com for patch
REVIEW: 113091
2013-10-04 21:56:22 -04:00
Alex Richardson
a83db71590
Port to KF5/Qt5
...
TerminalDisplayAccessible is disabled for Qt5 currently since I don't
have any experience with accessible stuff and it is more complicated
than just changing a few includes
REVIEW: 111937
2013-08-20 23:34:35 +02:00
Alex Richardson
ab5e15b1b7
Revert "Port to KF5/Qt5"
...
This reverts commit 4adfbe84bd .
This work will go into a new branch instead
2013-08-13 23:26:19 +02:00
Alex Richardson
4adfbe84bd
Port to KF5/Qt5
...
To build for KF5 pass the option -DQT5_BUILD=ON to CMake
TerminalDisplayAccessible is disabled for Qt5 currently since I don't
have any experience with accessible stuff and it is more complicated
than just changing a few includes
REVIEW: 111937
2013-08-13 21:26:59 +02:00
Kurt Hindenburg
7a2a5beb00
Correct spelling errors/word usage
...
All these are in the comments - no code changes
2013-01-09 22:07:11 -05:00
Kurt Hindenburg
5b083640ce
whitespace and style fixes
...
Use 'git diff -w --ignore-all-space' to see non-whitespace changes
2012-04-05 11:08:53 -04:00
Kurt Hindenburg
6e93204ae5
/s/NULL/0
2012-03-20 09:13:55 -04:00
Jekyll Wu
6b6a5944f6
Prefer foreach(...) over while(...) for simplicity and readability
2012-01-22 10:21:45 +08:00
Kurt Hindenburg
c73556ce39
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 01:10:04 -05:00
Kurt Hindenburg
bc087ae51b
Remove unused KDebug includes
2011-12-18 00:01:32 -05: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
Jekyll Wu
13fea35f69
Rename member variables to the form of _var for consistency
2011-11-02 10:51:13 +08:00
Jekyll Wu
cc998cd0ab
Adjust #include
2011-10-28 04:36:10 +08:00
Jekyll Wu
7e7a020fe8
Minor change on coding style
2011-10-20 22:53:18 +08:00
Jekyll Wu
dfce914c3c
Make BookmarkHandler::titleForView() slightly more readable.
2011-09-27 07:34:15 +08:00
Jekyll Wu
272ac9850e
Include KDE headers consistently in the from of "#include <KSomething>" .
...
However, some KDE headers are still only available in the form of
"#include <ksomething.h>"
krun.h ==> KRun
kicon.h ==> KIcon
kdebug.h ==> KDebug
kshell.h ==> KShell
kdialog.h ==> KDialog
kconfig.h ==> KConfig
klocale.h ==> KLocale
kglobal.h ==> KGlobal
kcolorutils.h ==> KColorUtils
kconfiggroup.h ==> KConfigGroup
kdesktopfile.h ==> KDesktopFile
kcolorscheme.h ==> KColorScheme
kstandarddirs.h ==> KStandardDirs
ktemporaryfile.h ==> KTemporaryFile
klocalizedstring.h ==> KLocalizedString
2011-09-23 05:04:46 +08:00
Jekyll Wu
473f1726c0
move member initialization into initialization list of constructor.
2011-08-27 14:41:29 +08:00
Jekyll Wu
e63c9b8388
Delete one line of useless code.
2011-08-27 14:38:36 +08:00
Laurent Montel
dd46511de1
Use QLatin1String in setObjectName (added with a script)
...
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=1178049
2010-09-22 07:35:22 +00:00
Kurt Hindenburg
adf7f96969
Add i18n context to strings - corection
...
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=1086487
2010-02-07 13:08:17 +00:00