In general please prefer to use more spaces:

```c++
bool DirectoryDAO::addDirectory(QString dir){
query.bindValue(":dir",escaper.escapeString(dir));
qDebug() << "purging dir ("%dir%") failed:"<<query.lastError();
```
```c++
// Spaces between method declaration and {
bool DirectoryDAO::addDirectory(QString dir) {
// Spaces between function arguments.
query.bindValue(":dir", escaper.escapeString(dir));
// Spaces between operators (<<, %, +, -, etc.)
qDebug() << "purging dir (" % dir % ") failed:" << query.lastError();
```