Missing commit from 2.9, ported to KDb 3
Summary: Unable to test as scripting not yet implemented in Kexi
Test Plan: If it compiles, ship it!
Reviewers: staniek
Reviewed By: staniek
Tags: KEXI
Maniphest Tasks: T1744
Differential Revision: https://phabricator.kde.org/D5893