I am trying to read SMS inbox messages with QMessageManager::queryMessages. I got it working in Qt Simulator, but in my actual device (N8) it always returns 0 messages although there are SMS and email messages available. I am now pretty stuck; do I need to declare some permissions or what could be the problem? I tried running straight from Qt Creator with debug and release, installing Qt Creator created .sis file, and even tried signing the app with developer certificate with device's IMEI code, but the result is always the same.

Here is my test code:
MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent), ui(new Ui::MainWindow)
    QMessageManager mm;
    QMessageIdList msgs = mm.queryMessages();
    ui->textBrowser->append(QString("Messages %1").arg(msgs.size()));
    for (int i = 0; i < msgs.count(); ++i) {
        QMessage message = mm.message(msgs.at(i));
I have declared in .pro file:
CONFIG += mobility
MOBILITY += messaging
All ideas appreciated. I am new to Qt & Symbian development so this may well be some trivial thing I have just missed.