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:
Code:
MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent), ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    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));
        ui->textBrowser->append(message.from().addressee());
        ui->textBrowser->append(message.to().at(0).addressee());
        ui->textBrowser->append(message.textContent());
    }
}
I have declared in .pro file:
Code:
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.