Aah... you need to id...

So, 

 int id = QMail::fileLock("messageserver-instance.lock");