The great purge

Written by  on February 24, 2020

Git is my VCS-system of choice and github most of the time the place for my publicly shared repositories.
Over the years some clutter piled up there:

  • unfinished business; projects which were started (with best intentions) and never finished
  • forked repositories, which I don’t need anymore (not sure if I will remove also those were I contributed, because then the evidence is more or less gone, or?)
  • code I am a bit ashamed right now :’) (if you have no projects were you laugh heartily about how naively you implemented them at that time, then you made no progress)

Therefore I started to check them to see if it makes sense to keep or delete them. Right now I am down to 39 and the delete-button is still hot 😉

Find crappy Qt-includes

Written by  on February 18, 2020

Use this regular expression

to check for includes of the format

Test it here with

QDialogs receive NO close-event in case of closing via the ESC-key. Nice.

Written by  on February 7, 2020

At first this looked like a bug, but upon reading carefully the documentation and crawling the internet, I’ve noticed that this is
a) wanted behavior and b) I am not the first one stumbling over this issue.

So just override in the header the method for processing the QHideEvent:

And reimplement the base-class-call with the emission of a custom signal (or triggering custom functionality) for futher processing. Like:

Another way is to connect the QDialog’s finished-signal to your signal via DirectConnection. Less code than overriding.

qobjectdefs_impl.h:72:118: error: no type named ‘Car’ in ‘struct QtPrivate::List<>‘

Written by  on February 4, 2020

Bruh, wait, what?

After rebasing a bigger feature and solving all obvious conflicts, the new build threw an error like “no type names Car”. And I am currently not working in the automotive industry!
Issue was that a commit, on which was rebased, changed ‘old’ Qt4-signal-slot-syntax (with SIGNAL/SLOT keywords; the string-based connect) to the ‘new’ Qt5-version (typed and verifyable from the compiler). And one of the slots had a default parameter. This is not allowed, except you squish a lambda as intermediate layer.

A bit more insight: Qt-docs.

edit: One of the earlier error-messags also hinted out what could be the culprit, but “no type named Car” is more funny 😉