KDevelop 5.1.0 released

We are happy to announce the release of KDevelop 5.1! Tons of new stuff entered KDevelop 5.1. Here's a summary of what's new in this version:

LLDB support

We had a great student for GSoC 2016 implementing LLDB support in KDevelop. The end result is that we now have a debugger framework which can be used both for the GDB & LLDB MI communcation. The LLDB plugin teaches KDevelop to talk to the standalone LLDB MI Driver (lldb-mi); so now it's possible to use LLDB as an alternative debugger backend for KDevelop. One interesting thing with LLDB that it's also potentially useful on OS X & Windows for us, especially when the Windows port of LLDB is getting more and more stable.

Analyzer run mode

With 5.1, KDevelop got a new menu entry Analyzer which features a set of actions to work with analyzer-like plugins. During the last months, we merged analyzer plugins into kdevelop.git which are now shipped to you out of the box:

Cppcheck

Cppcheck is a well-known static analysis tool for C/C++ code. Cppcheck is useful for taking a closer look at your source code checking for common programming faults such as out of bounds accesses, memory leaks, null pointer dereferences, uninitialized variables, etc. pp. With the Cppcheck integration in KDevelop running the cppcheck executable is just one click away. KDevelop will pass the correct parameters to cppcheck including potential include paths and other options.

KDevelop with Cppcheck integration
KDevelop with Cppcheck integration

Other analyzers in the pipeline: Valgrind, clang-tidy, krazy2

While the Cppcheck plugin is shipped out of the box, other analyzers are not considered 100% stable yet and still reside in their own repositories. The clang-tidy plugin looks super promising (another static analysis & refactoring tool for C/C++) as it really easy to use from the command-line and thus easy to integrate into our IDE. We plan to import more of those analyzers into kdevelop.git so they'll be part of the kdevelop tarball and are thus available to you without having to install yet another package.

Initial OpenCL language support, CUDA support upcoming

Since 5.1 KDevelop is able to parse code written in the Open Computing Language (OpenCL). The OpenCL language support inside KDevelop is backed by our Clang-based language support backend and thus just required minimal changes in KDevelop to start supporting it. Support for handling NVidia's CUDA files will be part of 5.2 instead. Stay tuned.

KDevelop with OpenCL language support
Properly highlighted OpenCL file in KDevelop

 

Note that for KDevelop to detect .cl files as OpenCL files, an up-to-date shared-mime-info package which contains this patch is required. Alternatively, you can add the mime type yourself by creating the file /usr/share/mime/text/x-opencl-src.xml with appropriate contents and re-running update-mime-database yourself.

Improved Python language support

Python language support now supports Python 3.6 syntax and semantics. In addition, thanks to the work of Francis Herne, various long-standing issues in the semantic analysis engine have been fixed:

  • Loops and comprehensions infer types correctly in many more cases, including on user-defined types with __iter__ and __next__ methods.
  • Type guessing works for arguments named by keywords (not only **kwargs), and works better for class/staticmethods.
  • Property accesses get the return type of the decorated method.
  • Types are inferred correctly from PEP-448 syntax in container literals.
  • Unsure types are handled in subscripts and tuple unpacking.
  • Uses are found for __call__() and __get/setitem__().

These improvements were accompanied by cleaning up dusty code, making future changes simpler as well.Furthermore, our style checker integration has been rewritten, making it much faster and easier to configure.

Screenshot of advanced features under kdev-python
Some of the newly-handled Python language features.

Perforce integration

Thanks to Morten Danielsen Volden we now have Perforce integration in kdevplatform.git, which can be used freely starting with KDevelop 5.1. Perforce is a commercial, proprietary revision control system. The Perforce integration in KDevelop simply works by running a local version of the p4 executable (needs to be installed independently of KDevelop) with appropriate parameters. This is similar to how KDevelop integrates with other VCS, such as Git & Bazaar.

Color scheme selection inside KDevelop

It is now possible to select the current color scheme from within KDevelop, a feature which has been requested several times in the past. This is especially useful for when KDevelop is run under a different desktop environment than KDE Plasma, where the color scheme settings may not be easily accessible.

Screenshot of KDevelop's color scheme selection menu
Selecting the current color scheme inside KDevelop 

Ongoing support for other platforms

We're continuously improving the Windows version of KDevelop and we're planning to release a first KDevelop version for OS X soon (yep, we're repeating us here, please stay tuned!). For the Windows version, we upgraded the KF5 version to 5.32 and the LLVM/Clang version to 3.9.1.

Get it

Together with the source code, we again provide a prebuilt one-file-executable for 64-bit Linux, as well as binary installers for 32- and 64-bit Microsoft Windows. You can find them on our download page.

The 5.1.0 source code and signatures can be downloaded from here.

Please give this version a try and as always let us know about any issues you find via our bug tracker.

ChangeLog

kdevplatform

  • Codegen: Fix crash when documenting template func. Commit. Fixes bug #377036
  • Grepview: Fix search in project root with trailing slash. Commit. Phabricator Code review D4774
  • Fix project tree state not being saved. Commit. Phabricator Code review D4665
  • Trim identifiers before triggering rename action. Commit. Fixes bug #376521
  • Update tab colors when the palette changes. Commit. Fixes bug #358776
  • Grepview: Fix crash on exit with grep dialog open. Commit. Fixes bug #348784
  • Template file dialog: kill old widgets on re-entering TemplateOptionsPage. Commit. Phabricator Code review D4413
  • GrepOutputView: show older search results fully expanded initially. Commit. Phabricator Code review D4605
  • Toolbar state was not being saved / restored. Commit. Phabricator Code review D4122
  • Fix Bug 374458 by properly blocking signals on debugger combo box. Commit. Phabricator Code review D4555
  • Prevent progress notifications on copying and writing back project files. Commit. Phabricator Code review D4409
  • Fix preview for file templates with options: add vars with default values. Commit. Phabricator Code review D4384
  • TemplatePreviewRenderer: inject also some dummy test data. Commit. Phabricator Code review D4369
  • Fix bug 374921: Tool view grouping no longer works in 5.1 branch. Commit. Fixes bug #373213. Phabricator Code review D4219
  • Enable "Open Config"/"Close Project" always if just one project is loaded. Commit. Fixes bug #375234. Phabricator Code review D4216
  • Fix bug 375007 - Asserts when pressing "Show Imports" button in problems tool view. Commit. Phabricator Code review D4152
  • Container types: do not write lock when calling addContentType(). Commit. See bug #374097
  • Fix progress widget flags. Commit. Fixes bug #374357
  • Don't hit assertion with "View Diff". Commit. Fixes bug #373763
  • Remove KDEV_USE_EXTENSION_INTERFACE. Commit. Phabricator Code review D3774
  • Add button to re-run search in files. Commit. Phabricator Code review D3550
  • Add "Documentation" settings category. Commit. Phabricator Code review D3700
  • Shell env script: Read user bashrc again. Commit. Fixes bug #373419
  • Add zsh support for kdevplatform konsole integration. Commit. Phabricator Code review D3171
  • Save/Restore Tool Views order. Commit. Phabricator Code review D3002
  • Fix context help for template data types. Commit. Phabricator Code review D3205
  • Port kdev_format_source script to C++/Qt. Commit. Phabricator Code review D2925
  • Documentation: small UI fix. Commit. Phabricator Code review D3255
  • Feature "Diff From Branch" on BranchManager. Commit. Phabricator Code review D3073
  • Add filtering for ProblemsView. Commit. Fixes bug #339839. Phabricator Code review D3108
  • More helpful error message when failing to load project plugin. Commit. See bug #369326
  • Add "Analyze" group to ContextMenuExtension. Commit. Phabricator Code review D3013
  • Add keyboard shortcut for "Switch Header/Source". Commit. Fixes bug #359136. Phabricator Code review D2757
  • Process QML runtime errors. Commit. Phabricator Code review D2735
  • Use folder prefix is filename is not unique. Commit. Phabricator Code review D1947
  • Implement color scheme selection from these installed in the system using KColorSchemeManager. Commit. Code review #127979. Fixes bug #279592
  • KDevPlatform changes for supporting the -iframework and -F header search path. Commit. Code review #128284
  • [OS X] Show job progress in the Dock tile. Commit. Code review #128188
  • Project controller: make displaying project config dialog async. Commit. Fixes bug #364433
  • Integrate kdev-perforce into kdevelop. Commit. Phabricator Code review D2001
  • Fix variable toolview not sync with framestack view. Commit. Phabricator Code review D1351
  • Respect KDE HIG. Commit. Fixes bug #360503
  • [GCI] Add buttons "jump to first (last) item" to standardoutputview/outputwidget. Commit. Fixes bug #338153. Phabricator Code review D750
  • Remove QtQuick1 dependency. Commit. Code review #125782
  • Don't close documents when saving. Commit. Fixes bug #351895

kdevelop

  • Qmljs: Fix crash access internal function context. Commit. Fixes bug #376586
  • CustomBuildSystemConfigWidget: clear configs before reloading. Commit. Fixes bug #376523
  • Add basic support for parsing OpenCL. Commit. Phabricator Code review D4930
  • Add path escaping to cmake completion. Commit. Fixes bug #338196. Phabricator Code review D4760
  • Return immediately with unsupported custom-build-job arguments. Commit. Fixes bug #376833
  • Improve the Qt5 QtQuick template and make it available in CMake as well. Commit. Phabricator Code review D4721
  • Fix a crash when gdb produces malformed output. Commit. Phabricator Code review D4714
  • Clang: Don't insert new include beyond moc include. Commit. Fixes bug #375274
  • Avoid utimes() in custommake projects, remove unsermake support. Commit. Phabricator Code review D4612. Fixes bug #376432
  • Ninjabuilder: Don't crash on `sudo ninja install`. Commit. Fixes bug #372888
  • Specify generator whenever there's no CMakeCache.txt. Commit. Fixes bug #349877
  • C/C++ Compilers config page: use KUrlRequester, focus edit field on Add. Commit. Phabricator Code review D4582
  • Switch to new X-KDevelop-Languages key. Commit. Phabricator Code review D4424
  • Add ClangClassHelper, to restore features of CppClassHelper. Commit. Phabricator Code review D4359
  • More unit tests and fixes for lldb formatters. Commit. Phabricator Code review D3942
  • Fix segfault when analyzing source code issue. Commit. Code review #129767. Fixes bug #374525
  • Add an app_template for a simple KDevelop plugin. Commit. Phabricator Code review D3785
  • Advanced configuration settings for the CMake ProjectManager. Commit. Code review #129416
  • QtHelp page loading fix. Commit. Phabricator Code review D3671
  • Add zsh support for kdevelop konsole integration. Commit. Phabricator Code review D3172
  • Assert if the gdb plugin was unloaded. Commit. See bug #370314. Code review #129131
  • Cmake manager: fix incorrect settings import from existing build directory. Commit. Phabricator Code review D2964
  • Remove non-existing include dir. Commit. Phabricator Code review D2898
  • Consider showing CppCheckPreferences page under "Analyzers" category in session global config menu. Commit. Phabricator Code review D2821
  • Report man pages loading error. Commit. Code review #128943
  • Fix KDevelop crashes when trying to debug from command-line. Commit. Fixes bug #367837
  • LLDB/GDB plugin: add support for coredumpctl in unittests, and fix LldbTest::testCoreFile. Commit. Phabricator Code review D2604
  • GDB/LLDB plugin: correctly handle string escaping and unescaping. Commit. Phabricator Code review D2375
  • Merge LLDB plugin into master. Commit. Phabricator Code review D2293
  • Reapply some patches to 5.0 that are lost when merging into master. Commit. Phabricator Code review D2292
  • Implement color scheme selection from these installed in the system using KColorSchemeManager. Commit. Code review #127980. Fixes bug #279592
  • Support -iframework and -F header search path options. Commit. Code review #128272
  • Recognise #import directive in the context browser. Commit. Code review #128276
  • Qmljs: Don't hold locks while performing filesystem accesses or calling qmlplugindump. Commit. Fixes bug #363509. Code review #128227
  • Fix issue with kdev-cppcheck selecting wrong project. Commit. Phabricator Code review D1116
  • Always show recursive "missing include" errors in problem view. Commit. See bug #358853
  • Add a testcase for BUG: 358853. Commit. See bug #358853
  • Preserve existing windowIcons via QIcon::fromTheme's fallback. Commit. Code review #126759
  • Make kdevelop-app and kdev-plugins use Qt5 resources for splash, rc, knsrc. Commit. Phabricator Code review D529
  • Make qmljs kdevelop plugin compile on OSX. Commit. Phabricator Code review D456
  • Use IProject->path() instead of folder() which is deprecated and will be removed. Commit. Code review #123117

kdev-python

  • Restore compile-time support for Python 3.4.3+. Commit. Phabricator Code review D4936
  • Very basic property getter support. Commit. See bug #372273. Phabricator Code review D4207
  • Fix OOM condition in style checking: move buffer processing out of read loop. Commit. Fixes bug #375037
  • Style checking: read data from stdin as bytes, not in some encoding. Commit. See bug #375037
  • Completion: wrap expression visitor into a read lock. Commit. Fixes bug #374097
  • Yet more range fixes. Commit. See bug #373850
  • Completion hint: Correct default-argument index for non-static methods. Commit. Fixes bug #369369
  • PEP-448 for list and set literals. Commit. Phabricator Code review D3868
  • PEP-448 unpacking in dict literals. Commit. Phabricator Code review D3867
  • Add types from unpacked dict argument to **kwargs parameter. Commit. Phabricator Code review D3861
  • Lambda expression improvements. Commit. Fixes bug #306212. Phabricator Code review D3555
  • Set mostly-correct endCol on numbers, single-quoted strings and subscripts. Commit. See bug #373850
  • Skip explicit `self` argument when calling via class. Commit. Fixes bug #369364
  • Make ExpressionVisitor::visitCall() clearer. Commit. Phabricator Code review D3524
  • Shorten class context range by one line. Commit. Fixes bug #309817
  • Pass docstring into `docstringContainsHint()` rather than declaration. Commit. Phabricator Code review D3535
  • Show uses for __call__() and __{get,set}item__(). Commit. Phabricator Code review D3512
  • Rename functionDeclarationForCalledDeclaration -> functionForCalled and tweak types. Commit. Phabricator Code review D3534
  • Get iterable content using __iter__() and __next__(). Commit. Fixes bug #369363. Phabricator Code review D3540
  • Make the hack for finding attribute ranges more robust. Commit. Phabricator Code review D3437
  • Get more possible types when subscripting unsure-types. Commit. Phabricator Code review D3427
  • Pass AbstractType::Ptr, not Declaration*, to accessAttribute(). Commit. Fixes bug #359912. Phabricator Code review D3422
  • Improved unpacking and iteration. Commit. Fixes bug #359915. Phabricator Code review D3352
  • Allow configuring a per-project Python interpreter for search paths. Commit. Fixes bug #368970
  • Support expanding widgets in the completion list. Commit. Fixes bug #368263
  • Fix porting bug: path for docfile generator files. Commit. Fixes bug #359905
  • Lock parse lock for a short moment when destroying language support. Commit. Fixes bug #359263
  • Fix path in docfile KCM. Commit. Fixes bug #358036

kdev-php

  • Support of Class::{expr}() syntax from Php 5.4. Commit. Phabricator Code review D4902
  • Support for $this as an array when implementing ArrayAccess. Commit. Phabricator Code review D4776
  • Php7 IIFE syntax parsing. Commit. Fixes bug #370515. Phabricator Code review D4391
  • Fix compile issue due to recent changes in kdevplatform. Commit. Phabricator Code review D3411
  • Fix parsing of the ::class constant. Commit. Phabricator Code review D988
  • Fix parsing of the ::class constant. Commit. Phabricator Code review D988

Comments

Wonderful release, lots of things I like on the C/C++ side. Sadly there's still no Perl support which previous incarnations of KDevelop had (pre-5.x). Would be really nice, if that could be added. ;-)

Permalink

In reply to by Drizzt (not verified)

KDevelop 4 did not have Perl support, and what KDevelop 3 (over 10 years ago) had in terms of language support was much more simplistic than what we consider a supported language nowadays. In this sense I wouldn't say KDevelop ever supported perl.
It's a lot of work to get a language supported, and we don't have the resources to add support for Perl at the moment. If you are interested in working on that, you are very welcome of course!

I found signatures for the source code but where are the signatures for the AppImage files?

Big thanks for python support enhancements.

Hi! Thanks for you work, I used KDevelop 4 and seems 5.x version made a great progress. Just a couple of questions:

1. Are there any support for building and deploying for Android and iOS, like QtCreator has? Or are there any plans to implement it?
2. Have you plans to integrate a tool like clazy?

Permalink

In reply to by Nikita (not verified)

(1): Not really, at this point
(2): Yes, it's theoretically possible to integrate clazy so the internal parser of KDevelop actually reports clazy issues, but there are some difficulties to do this with a distro-packaged libclang. So, plans, yes, but they haven't materialized yet.

I downloaded the appImage but the color theme menu is empty... How to get the themes ?

Although KDevelop is steadily maturing, there are some minor issues. I want to have 2 toolviews at each side and in the center the code. But when I restart KDevelop, these toolviews are either closed or another is open in their respective position. But not just after a restart, but even after a commit or returning from Debug mode to Code.

The same applies for some config options. Let's say I want to enable "Look ahead in code" or apply a certain formating style with astyle. Each time I restart it, I have to enable those again.