Happy 20th anniversary, KDevelop

It’s exactly 20 years ago to the day, that on an equinox as well the first announcement of a KDevelop snapshot, the 0.1 Alpha, was made:

List: kde-announce
Subject: ANNOUNCE: kdevelop-0.1.tar.gz
From: konold () alpha ! tat ! physik ! uni-tuebingen ! de
Date: 1998-09-22 15:50:19

Dear KDE Enthusiast,

the KDE Team is pleased to announce the availability of:

kdevelop-0.1.tar.gz

It can be found at
ftp://ftp.kde.org/pub/kde/unstable/apps/ide/kdevelop-0.1.tar.gz

and at our U.S mirror site
ftp://ftp.us.kde.org/pub/kde/unstable/apps/ide/kdevelop-0.1.tar.gz.

it will probably appear firstly at
ftp://ftp.de.kde.org/pub/kde/unstable/apps/ide/kdevelop-0.1.tar.gz.

Here follows the LSM:

Begin3
Title: KDevelop
Version: 0.1 Alpha
Entered-date: 22 Sep 1998
Description: an IDE for X/Qt/KDE
Keywords: IDE, KDE, X11, Qt, development
Author: Sandy Meier, Stefan Heidrich, Stefan Bartel
Maintained-by: Sandy Meier
Primary-site: http​://www.cs.uni-potsdam.de/~smeier/kdevelop/kdevelop-0.1.tar.gz
Home-page: http​://www.cs.uni-potsdam.de/~smeier/kdevelop/index.html
Original-site: http​://www.cs.uni-potsdam.de/~smeier/kdevelop/kdevelop-0.1.tar.gz
Platform: Linux, needs Qt 1.4 and the kde libs
Copying-policy: GNU Public License
End

20 years of getting feature by feature, sometimes first of its kind, being partially rewritten, getting ported from Qt1 to Qt2 to Qt3 to Qt4 to now Qt5, being made run on non-Linux platforms, seeing hand-overs of maintainers.
At its 20th anniversary KDevelop, now to be called an extensible cross-platform IDE for C, C++, Python, PHP and other languages, continues to provide developers a very reliable and powerful environment to get their code work done. While being inviting to enhance their tool, KDevelop, itself, being a FLOSS software and with no company agenda attached.

I have been a happy user of KDevelop all the years, and currently am giving back to it by doing some development and feature additions.
Be a happy user as well, and then one giving back.
Looking forward to more 20 years, and then some.

KDevelop, ensuring development equity, by day and night. 🙂

Advertisements

From code to related bug report or review in just a hover & click

When working on existing code bases, now and then one reads code that raises some questions and the desire for more context, to understand the purpose or the intention of that code. Context like the commit message, the author, the commit date, or some review discussion of the commit or some bug report or feature request the commit was done for.

In the Beginning There Were Raw Commit Ids…

KDevelop, the extensible cross-platform IDE for C, C++, Python, PHP and other languages, has supported showing line-by-line commit data annotations since many years, starting by showing the commit id and in the tooltip info like author, date and message.
See here a screenshot from the KDevelop 4.1 Dot article (2010):

Annotations border in KDevelop 4.1

Then There Were Year and Author…

Not everyone was capable to deal with raw commit ids, also is it just a reference to the actual metadata, so since some versions of KDevelop the annotation border was changed to show the author name and the commit year instead.
See here a screenshot how it looks by the example of upcoming KDevelop 5.3:

Annotations border in KDevelop 5.3

Soon We Might Get the Message and More

While year and author are already interesting info about a commit, if one is looking at a bunch of lines coming from different commits, it can be unpleasant having always to do some explicit action to get further data, like the commit message, by moving the mouse to trigger the tooltip. And with the recent trend in screen sizes, there often is some vertical space left asking to get its Return-On-Investment 😉 .
More, if in the raw commit message displayed in the tooltip some review discussion or bug report is mentioned, one has to remember the review id or bug id and manually navigate to e.g. the respective web page. Again unpleasant if having to do this multiple times.

End of last year two patches have been started with the goal to improve those things:

The first patch would extend KTextEditor by a new class AbstractAnnotationItemDelegate (modelled after QAbstractItemDelegate), which then gives KDevelop and other potential API users full independent flexibility to decide on which data about annotations to render and how, as developers and users prefer by the time.
The second patch would change KDevelop to make use of that delegate option and change what is rendered for a start: for groups of consecutive lines from the same commit the first would show the commit message summary line, with the age of the commit, a second line would show the author. And it would make use of the KDevelop::ActiveToolTip class (as also used e.g. for code type information tooltips), which allows the user to interact with the content of the tooltip, like copying text or clicking links in the commit message, which would be shown enriched with links where feasible.
The latter though currently misses some support from the KDevelop git plugin, which only delivers the message summary line in the data model (due to making use of git blame --porcelain, possibly needs rewrite using libgit2 instead of parsing git output). So tooltips for now still only show the summary line as before at least with git (did not test the other VCS plugins yet).
See here a screenshot how it looks with the patches applied to master branches of KTextEditor & KDevelop (and some example complete commit message text for demoing what is possible):

Annotations border in a future KDevelop?

Please Help to See If It Is Good

Work on those patches has been picked up again the last week, and they have now reached Merge Candidate state and are ready for final review, targeting KTextEditor of KF 5.52 (to be merged right after tagging 5.51) and KDevelop 5.4.

If you are interested in this feature, please consider to help now by testing those patches and/or reviewing their code (see links to patches above), so the feature will be good once it arrives at users like yourself 🙂

Improve your C++ code in KDevelop with Clang-Tidy

You might be aware of Clang-Tidy, the clang-based C++ “linter” tool which allows static analysis of your code, including fixing it automatically where possible.
And you remember the introduction of the “Analyzer run mode” with version 5.1 of KDevelop, the extensible cross-platform IDE for C, C++, Python, PHP and other languages.

While development of a separate KDevelop plugin for the integration of Clang-Tidy was started in 2016, named kdev-clang-tidy, activity stalled after some time, with other things in life to do.
One good thing about Copyleft software is that where somebody left others can pick up and continue: with Clang-Tidy getting more and more useful, there has been new motivation to have such integration with KDevelop, and after some bits of code pushing here we are now, looking at the first released versions of kdev-clang-tidy with basic functionality, which already helped to improve some code bases.

The latest release 0.3 enables KDevelop users to do this:

  • running clang-tidy on a single file, subdirectories or the whole project, with the result shown in the Problems tool view, invokable from file context menus and main menu (Analyzer section)
  • per-project config UI:
    • free field for additional command line parameters to clang-tidy
    • checkbox whether to include system headers in the check
    • toggle between using .clang-tidy files or options in the config UI:
      • header filter regular expression
      • opt-in list of checks

See kdev-clang-tidy 0.3 in activity in some screenshots, here with KDevelop 5.3 pre-beta:

Configure Clang-Tidy globally
Configure Clang-Tidy for a project
Running Clang-Tidy on a subdirectory of a project (here the Clazy integration plugin part of upcoming KDevelop 5.3)

(And yes, in the screenshots one can spot upcoming support for another static code analyzer, clazy, which will be shipped as part of upcoming KDevelop 5.3, more on that soon in another blog post)

The current version 0.3 of kdev-clang-tidy can be built against the versions 5.2, upcoming 5.3 and the current development branch (master) of KDevelop.

Learn more about the kdev-clang-tidy plugin from its README.md file, e.g. how to build it, how to package it, how to use it, where to report issues, and what the planned roadmap is.

The latest released kdev-clang-tidy version is currently also included in the Nightly AppImage builds of the current stable KDevelop code version (which already switched to the 5.3 branch).

KMarkdownWebView 0.5.0

KMarkdownWebView 0.5.0 has been released.

Example: KMarkdownWebView KParts plugin used by Ark (using Oxygen theme for some retro look 🙂 )

The KMarkdownWebView software is for the rendered display of Markdown documents, using web technologies. It implements a C++/Qt-based wrapper around a local webpage with a JavaScript library (“marked”) which creates HTML from the plain text in Markdown format passed in.
The software contains

  • a KParts plugin for rendered display of Markdown files, which enables KParts-using applications (like the archiving tool Ark or the file manager Krusader) to show Markdown files in the target format.
  • a Markdown file KIO thumbnail generator plugin, which allows KIO-powered file managers & dialogs to show thumbnails and previews of files in Markdown format in the target format (currently only available when building against QtWebKit)

The KMarkdownWebView KParts plugin is also prepared for improved experience with the KTextEditor Document Preview plugin for KTextEditor-based applications like the editor Kate and IDE KDevelop.

KMarkdownWebView can be built with either QtWebEngine (preferred by the build system) or QtWebKit. Pass -DUSE_QTWEBKIT=TRUE to CMake to enforce the use of QtWebKit.

Changes since 0.4.0

  • Update of “marked” source copy to latest release v0.3.12
  • Translations updated for some languages (fi, fr, sl)

Download sources

Download from: https://download.kde.org/stable/kmarkdownwebview/0.5.0/src/

sha256: 84bcc4b2626109241633a52ee5cd203105fd2488277b478572a3a5b593d3de42 kmarkdownwebview-0.5.0.tar.xz

Signed with my PGP key
E191 FD5B E6F4 6870 F09E 82B2 024E 7FB4 3D01 5474
Friedrich W. H. Kossebau
kmarkdownwebview-0.5.0.tar.xz.sig

KMarkdownWebView 0.4.0

KMarkdownWebView 0.4.0 has been released.

Example: KMarkdownWebView KParts plugin used by Ark

The KMarkdownWebView software is for the rendered display of Markdown documents, using web technologies (native wrapper around a webpage with a JavaScript library which creates HTML from the plain text handed in).
The software contains

  • a KParts plugin for rendered display of Markdown files, which enables KParts-using applications (like the archiving tool Ark or the file manager Krusader) to show Markdown files in the target format.
  • a Markdown file KIO thumbnail generator plugin, which allows KIO-powered file managers & dialogs to show thumbnails and previews of files in Markdown format in the target format (currently only available when building against QtWebKit)

The KMarkdownWebView KParts plugin is also prepared for improved experience with the KTextEditor Document Preview plugin for KTextEditor-based applications like the editor Kate and IDE KDevelop.

KMarkdownWebView can be built both with QtWebEngine (preferred by the build system) and QtWebKit. Pass -DUSE_QTWEBKIT=TRUE to CMake to enforce the use of QtWebKit.

Changes since 0.3.0

  • New feature in KParts plugin: show hovered link in status bar
  • Fix: KParts plugin appstream metadata had wrong type
  • Translations updated for some languages (cs, da, de, en_GB, fr, ko, pl, sr@ijekavian, sr@ijekavianlatin, sr@latin, sr, zh_CN)

Download sources

Download from: https://download.kde.org/stable/kmarkdownwebview/0.4.0/src/

sha256: 38b72ba6fa4b513002e7873d2b774e50d676fc878a38b18e6eb9636b53b4c29d kmarkdownwebview-0.4.0.tar.xz

Signed with my new PGP key
E191 FD5B E6F4 6870 F09E 82B2 024E 7FB4 3D01 5474
Friedrich W. H. Kossebau
kmarkdownwebview-0.4.0.tar.xz.sig

KTextEditorPreviewPlugin 0.2.1 (last stand-alone)

KTextEditorPreviewPlugin 0.2.1 has been released.

Example: KTextEditor Document Preview plugin used with Kompare KParts plugin in Kate

The KTextEditorPreviewPlugin software provides the KTextEditor Document Preview Plugin, a plugin for the editor Kate, the IDE KDevelop, or other software using the KTextEditor framework.

The plugin enables a live preview of the currently edited text document in the final format, in the sidebar (Kate) or as tool view (KDevelop). So when editing e.g. a Markdown text or an SVG image, the result is instantly visible next to the source text. For the display the plugin uses that KParts plugin which is currently selected as the preferred one for the MIME type of the document. If there is no KParts plugin for that type, no preview is possible.

Download from:
https://download.kde.org/stable/ktexteditorpreviewplugin/0.2.1/src

sha256:
f5fd393f15fb04a49b22b16b136b1f614f4d5502a9a9a0444d83a74eff3a1e19 ktexteditorpreviewplugin-0.2.1.tar.xz

Signed with my new PGP key
E191 FD5B E6F4 6870 F09E 82B2 024E 7FB4 3D01 5474
Friedrich W. H. Kossebau
ktexteditorpreviewplugin-0.2.1.tar.xz.sig

Change since 0.2.0

  • Translations improved and added for new languages (es, pl, ru)

Notes

This is the last stand-alone release of this plugin. It has been merged post-release as planned into the Kate repository, so will see its future releases as part of Kate, with the first being the ones as part of KDE Applications 17.12.

Developers: Improve your favourite KParts plugin

While a usual KParts plugin works out of the box, for a perfect experience with the Automatic Updating option some further improvements might be needed:

A few KParts plugins have already seen such adaptions, like the SVGPart and the KUIViewerPart (see also blog post), adaptions to be released with KDE Applications 17.12.
Another KParts plugin has been written with that in mind from the start, the KMarkdownWebViewPart (see also blog post), which already has been released.

You might want to take some guidance by the respective commit “Support loading by stream and restoring state on reload” to the SVGPart repository.

KMarkdownWebView 0.3.0

KMarkdownWebView 0.3.0 has been released.

Example: KMarkdownWebView KParts plugin used by the KTextEditor Document Preview plugin used in KDevelop

The KMarkdownWebView software is for the rendered display of Markdown documents, using web technologies (native wrapper around a webpage with a JavaScript library which creates HTML from the plain text handed in).
The software contains

  • a KParts plugin for rendered display of Markdown files, which enables KParts-using applications (like the archiving tool Ark or the file manager Krusader) to show Markdown files in the target format.
  • a Markdown file KIO thumbnail generator plugin, which allows KIO-powered file managers & dialogs to show thumbnails and previews of files in Markdown format in the target format (currently only available when building against QtWebKit)

The KMarkdownWebView KParts plugin is also prepared for best experience with the KTextEditor Document Preview plugin for KTextEditor-based applications like the editor Kate and IDE KDevelop.

KMarkdownWebView can be built both with QtWebEngine (preferred by the build system) and QtWebKit. Pass -DUSE_QTWEBKIT=TRUE to CMake to enforce the use of QtWebKit.

Changes since 0.2.0

  • New feature in KParts plugin: text search
  • Fix: Unbreak navigation to local anchors in QWebKit variant

Download sources

Download from: https://download.kde.org/stable/kmarkdownwebview/0.3.0/src/

sha256: 8b58c85c64641ba2194db1741ed5cc65504b18ced89728b09c6bfd090da847e4 kmarkdownwebview-0.3.0.tar.xz

Signed with my new PGP key
E191 FD5B E6F4 6870 F09E 82B2 024E 7FB4 3D01 5474
Friedrich W. H. Kossebau
kmarkdownwebview-0.3.0.tar.xz.sig