Bug 416046

Summary: Suggest to check that QDir().exists(...) is used correctly
Product: [Developer tools] clazy Reporter: Alexander Volkov <avolkov>
Component: generalAssignee: Unassigned bugs <unassigned-bugs-null>
Status: REPORTED ---    
Severity: wishlist CC: smartins
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Alexander Volkov 2020-01-09 13:30:44 UTC
It is used in several places in KDE:
https://lxr.kde.org/search?_filestring=&_string=QDir%5C%28%5C%29.exists

Warn that QDir().exists(path) checks for the existence of path and doesn't check that path is a directory. Suggest to use QFile::exists() or QFileInfo(path).isDir() instead.