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.