qFatal usage in KStandardDirs

Aaron J. Seigo aseigo at kde.org
Sat Jan 15 01:53:07 GMT 2011


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).

is there any reason to keep it as a qFatal rather than just returning an empty 
string (in this case)? ditto for 

Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Qt Development Frameworks
-------------- 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/20110114/0dcc99bf/attachment.sig>

More information about the kde-core-devel mailing list