Postings by Milian Wolff

kdesu - console output and password keeping

Hey all,

We've recently integrated kdesu into hotspot [1] to be able to record profile
data as root. This is required to get access to some "advanced" performance
counters and trace points, most notably the sched:sched_switch tracepoint
required for off-CPU profiling.

Now, my colleague originally used kdesudo which doesn't seem to be alive (?)
upstream. I've seen there's some bzr repo that the kubuntu people seem to use.
But in KDE proper, only kdesu is available.

How to install icons for multiple themes

Hey all,

how is one supposed to install different versions of icons for different icon
themes? Say I have an icon for breeze, breeze-dark and oxygen. I went ahead
and plumbed it into CMake with ECM's ecm_install_icons specifying THEME
accordingly, but at runtime nothing is found...

Updating to color palette changes: breeze icons, events, ...

Hey all,

I notice that breeze icons now adapt to the selected color scheme - which is
really awesome! But I also see that they do not properly react on palette
changes. To reproduce, use a bright or dark color scheme, start any app, then
switch to a dark or bright color scheme. Results look like this then e.g. for

<a href="" title=""></a>

Any idea how we can update this? I know that there are two Qt events emitted
when we change the color scheme, i.e. ApplicationPaletteChange and
PaletteChange. Would applications need to react to that and trigger some kind
of update? How?

Enabling more warnings on the CI

Hey all,

can we enable more warnings on the CI? What -W flags are we currently building
with? What GCC version do we use?

Phabricator Questions

Hey all,

I got a few questions regarding Phabricator, can anyone answer them for me:

* Can I merge a change request using the web UI? If not, how exactly do I use
arc to merge a request I know via it's phabricator URL?

* On the main website (<a href="" title=""></a>) the dashboard shows me an
"Unbreak Now!" list with tasks from WikiToLearn and GCompris, both of which
I'm not interested in. How do I configure this list? In general, is there a
way for me to configure phabricator such that it only lists stuff that I'm
actually interested in?

A call for more KDE people at next year's CppCon

Hey all,

I've had the pleasure of attending CppCon last weak. It was a blast. I'll hope
to find time to put some kind of report into blog form. But before that, I
really must say one thing:

More of you should try to attend next year!

Really, convince your employer that it is necessary. I bet many of you use C++
professionally. Going to this conference should then be a given!

And, more importantly: More KDE/Qt content should be presented. Quite a few
sessions or lightning talks I attended could easily be replaced by higher-
quality Akademy talks!

Freeze on nested eventloops (QFileDialog::getOpen*)

Hey all,

in massif-visualizer's framework branch, and now also kate, I sometimes notice
GUI lockups when I try to open files via Ctrl + O. The backtraces look like
the following:

<a href="" title=""></a>

Any idea what might be going on here? Is it not a good idea to mix system
compiled KF5-based stuff (e.g. with kdesrc-build compiled
KF5 libraries (/home/milian/projects/kf5/*)?

The applications do not recover from this lockup.


Application-specific color settings

Hey all,

sometimes I need to run applications that do not work properly with a dark
system color scheme. Is there a way to set a different (bright) color scheme
for /some/ applications?

If not, where would such a feature need to be implemented, I guess in the
Qt4/Qt5 KDE integration plugins? Are those upstream in Qt or somewhere in our


How to port kfiledialog:/// feature of KFileDialog?

Hey all,

is there a utility function to port the "memory" effect of kfiledialog:///
URLs used in KFileDialog, when using QFileDialog now? If not, could we add it


multiple kwallet windows after session login

Hey all,

I'd like to know a few more things about kwallet:

Is there supposed to be any inter-process communication to prevent multiple
kwallet windows to be opened up?

Or is there only a limitation to prevent multiple windows from opening up in a
given application?

I ask, because whenever I login to my plasma 5 session, I get greeted by two
or more kwallet dialogs which is very annoying. One is for ksshaskpass (via
yakuake via keychain). One is for kmail.

Exporting symbols to access them from tests

Hey all,

what's the best-practice to export symbols for tests only? In Qt, there is the

No, this is not an evil backdoor. QT_BUILD_INTERNAL just exports more
for Qt's internal unit tests.

Managing different build configurations with kdesrc-build

Hey all, esp. Jeremy.

I have a question regarding kdesrc-build: Is it possible to manage multiple
build configurations with kdesrc-build? Most notably, I'd like to have two
builds of all modules in my configuration: One CMAKE_BUILD_TYPE=Debug build
and a ...=RelWithDebInfo build.

This is an important requirement for me in order to profile kf5 code
(RelWithDebInfo), as well as doing normal development and fixing bugs (Debug).

How would you suggest to achieve this goal? The .kdesrc-buildrc hardcodes the
cmake-options globally for me (currently to debug).

configuring cppcheck on the CI


not sure where to ask this question. Cppcheck running on the CI is a great
help - thanks for that! I'd like to configure it slightly though, as the three
"errors" it reports for kdevplatform are actually false-positives:

<a href="" title=""></a>

The first two errors are grantlee templates and should be ignored by cppcheck.
The third is a missing define (where does cppcheck get those from?).


Feature matrix for future infrastructure

Hey all,

I started this page just now:

<a href="" title=""></a>

It's pretty limited, so far. I hope everyone could help out and extend it and
fill it with the information and verify that each contestant is displayed in a
fair light. Please add links, comments etc. pp. wherever possible.


delay i18n arg replacement

Hello all,

I'm trying to solve a string puzzle in KDevelop, where we currently do
something like this:

QStringLiteral( "%1 %2 (%3)")

translatedString is a member in a list of static data structures which gets
initialized with i18n. I tried to move the %2 (%3) in there, but then the %1
(%2) gets replaced with I18N_ARGUMENT_MISSING. So, how do I delay the argument
resolution such that I can do


or similar?

A smarter rbt post?

Hello all,

again, like so many times before, I'm really fed up with rbt post. I hate how
I have to *manually* amend a commit after posting it to the review board with
the REVIEW: $ID line.

I.e. I usually do:

# create multiple local patches
# post them to reviewboard using:
# note: repeat this for every change you created!
# note: don't forget to publish the stuff afterwards...
rbt post -g $githash

Now, one has to ammend all patches to include the reviewboard id:
git rebase -i origin/master
# mark all to ammend
# copy'n'paste the ids in

I keep forgetting this.

Announcing heaptrack - a Heap Memory Profiler for Linux

Hey all,

I have just finished writing a lengthy introduction to heaptrack, an
alternative to Massif, see:

<a href="" title=""></a>

I'd like to see more people starting to use it. Any feedback, or even patches,
is welcome!

Especially, I'd love to see more people use it on their pet project in KDE.
Quite often, you'll find useless temporary allocations, overly large memory
consumption or even significant memory leaks. C++/Qt/KDE code can be extremely
efficient, but you have to code accordingly.

ThreadWeaver: using QObject's as Jobs

Hey All, esp. Mirko.

Could you please document, e.g. by adding another example, on how one is
supposed to use Job classes that are QObjects, i.e. have signals/slots? There
is this strange QObjectDecorator thingy which I don't quite get, it looks like
its supposed to add some signals to another job. But what if my job already is
a QObject, since it has its own signals that it emits when data is received?
Can I inherit from QObjectDecorator and pass "this" as the JobInterface


Triggering rebuild after changing a *.json file

Hey all,

in my quest for better *.json support in KF5 based applications, I noticed
that we currently do not rebuild properly on changes to the *.desktop or
*.json files.

For KDevelop, I'm thus playing around with something like this currently:

function(kdevplatform_add_plugin plugin)
set(options )
set(oneValueArgs JSON)
set(multiValueArgs SOURCES)
cmake_parse_arguments(KDEV_ADD_PLUGIN "${options}" "${oneValueArgs}"
"${multiValueArgs}" ${ARGN})

string(REGEX REPLACE "\\.cmake$" "" json_out ${KDEV_ADD_PLUGIN_JSON})


Hey all,

do we also need Q_PLUGIN_METADATA for plugins of, say, Kate or KDevelop?
Currently we don't use it and it seems to work fine. Can someone shed some
light on this? Are we missing out on something?


desktoptojson and list properties

Hello all!

KDevelop is currently bitten hard by a bug/limitation in desktoptojson. It
does not actually understand the .desktop files and custom properties get
converted to plain JSON strings.


Hello all.

Since recently I get spammed by warnings such as this one:

/usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE
are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
# warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"

Why do we defined _BSD_SOURCE or _GNU_SOURCE in FindKDE4Internal.cmake?


DBUS issues with KDE 4 and Frameworks 5

Hey all,

<a href="" title=""></a> says:

I just did that accidentally and now my whole system seems to be completely
fubared. Most applications freeze sooner or later with a backtrace like this:

(gdb) bt
#0 0x00007ffff3b6d5bd in poll () from /usr/lib/
#1 0x00007fffefab2028 in ?? () from /usr/lib/
#2 0x00007fffefab0ed8 in ?? () from /usr/lib/
#3 0x00007fffefa9a474 in ??

Administrating project boards on

Hey all,

I hope this is the right place to ask. I would like to start using more. It's imo a good place to track jobs that need to be done. I
did not figure out how to add categories though. Can we somehow give project
admins (see the required rights to that website? Or simply
allow every KDE account to create a new subject and/or board?


KUrl porting questions

Hey all, esp. David.

I'm working on the KDevelop port away from KUrl and have some questions which
I could not answer myself with the existing porting notes and KUrl

a) What should one do with KUrl::AddTrailingSlash? QUrl::setPath(QUrl::path()
+ '/'))?
b) What about KUrl::relativePath() and KUrl::relativeUrl()? I found no good
replacement for either of them. QUrl a; QUrl b; a.mid(b.length()) looks pretty
wrong to me (was proposed to me as a solution).

Review Request 118587: Optimize KConfigIniBackend::parseConfig by reducing allocations.

Review request for kdelibs.

Repository: kdelibs

Optimize KConfigIniBackend::parseConfig by reducing allocations.

Yet another awesome application of the Qt implicit sharing trick.
Since config files often contain only few different keys and even
value strings, we can share them.

Review Request 117789: Optimize word count in PlainTextExtractor.

Review request for kdelibs and Vishesh Handa.

Repository: kfilemetadata

Optimize word count in PlainTextExtractor.

Regular expressions are notoriously slow.