qFatal usage in KStandardDirs

Alex Merry kde at randomguy3.me.uk
Sat Jan 15 12:14:03 GMT 2011


On Friday 14 Jan 2011 17:53:07 Aaron J. Seigo wrote:
> hi...
> 
> i just came across this in kstandarddirs.cpp:
> 
>             if (dirs.isEmpty()) {
>                 qFatal("KStandardDirs: The resource type %s is not
> registered", type);
>             } else {
>                 path = realPath(dirs.first());
>             }
> 
> isn't this is a bit heavy handed? for me as an app dev working on plasma-
> desktop, right now it means anyone can crash plasma-desktop with a script
> that passes some junk in to userDataPath in the desktop scripting (new
> feature to that for 4.7).

It looks like this should be an assert, at most.

Alex
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20110115/87d40b6b/attachment.sig>


More information about the kde-core-devel mailing list